diff --git a/marketplaces/default.json b/marketplaces/default.json index 6c81d44..125e241 100644 --- a/marketplaces/default.json +++ b/marketplaces/default.json @@ -389,6 +389,20 @@ "venv" ] }, + { + "name": "v0-v1-migration", + "source": "./v0-v1-migration", + "description": "Comprehensive toolkit for migrating from OpenHands V0 API to V1 API. Detects V0 call sites, generates migration plans, provides transformation guidance, and includes test fixtures.", + "category": "development", + "keywords": [ + "migration", + "api", + "v0", + "v1", + "deprecation", + "upgrade" + ] + }, { "name": "vercel", "source": "./vercel", @@ -402,4 +416,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/skills/v0-v1-migration/README.md b/skills/v0-v1-migration/README.md new file mode 100644 index 0000000..d0aaf53 --- /dev/null +++ b/skills/v0-v1-migration/README.md @@ -0,0 +1,199 @@ +# V0 to V1 API Migration Skill + +A comprehensive skill for migrating OpenHands integrations from the deprecated V0 API to the new V1 API. + +## ⚠️ Deprecation Notice + +The V0 API (`/api/conversations`) is deprecated and scheduled for removal on **April 1, 2026**. Migrate to V1 as soon as possible. + +## What This Skill Provides + +### 1. Detection Guidance +Commands and patterns to find V0 API calls in your codebase: +- URL pattern matching +- Field name detection +- Language-specific examples + +### 2. Migration Planning +Structured approach to plan your migration: +- Categorize call sites by complexity +- Generate migration checklists +- Identify breaking changes + +### 3. Transformation Examples +Code samples showing before/after for each endpoint: +- Simple path renames +- Async conversation handling +- Agent Server migration + +### 4. Test Fixtures +Request/response examples for testing: +- V0 fixtures (for reference) +- V1 fixtures (for new tests) +- Mapping file connecting V0→V1 + +## Directory Structure + +``` +v0-v1-migration/ +├── SKILL.md # Main skill (loaded by OpenHands) +├── README.md # This file +├── openapi/ +│ ├── app-server.json # App Server OpenAPI spec (V0 + V1 endpoints) +│ └── agent-server.json # Agent Server OpenAPI spec (per-sandbox API) +├── detection/ +│ └── patterns.json # Regex patterns for finding V0 calls +├── fixtures/ +│ ├── v0/ # V0 request/response examples +│ ├── v1/ # V1 request/response examples +│ └── mapping.json # Maps V0 fixtures to V1 equivalents +├── docs/ +│ ├── patterns/ # Language-specific migration patterns +│ └── examples/ # Real-world migration examples +└── templates/ + └── migration-plan.md # Template for generated plans +``` + +## OpenAPI Specifications + +This skill includes embedded OpenAPI specs for offline reference and tooling. + +> **Last Updated**: 2026-03-02 +> +> If you suspect the embedded specs are outdated, see [Refreshing the Specs](#refreshing-the-specs) below. + +### App Server (`openapi/app-server.json`) +- **Source**: https://app.all-hands.dev/openapi.json +- **Contains**: Both V0 (`/api/conversations/*`) and V1 (`/api/v1/*`) endpoints +- **Auth**: `Authorization: Bearer {api_key}` + +### Agent Server (`openapi/agent-server.json`) +- **Source**: Generated from `openhands-agent-server` PyPI package +- **Contains**: Per-sandbox APIs for files, bash, git, conversations, VSCode, desktop +- **Auth**: `X-Session-API-Key: {session_api_key}` (from sandbox info) +- **Note**: Agent Server runs on each sandbox - access via `exposed_urls.AGENT_SERVER` + +### Refreshing the Specs + +If you believe the embedded specs are outdated or want to verify against live systems: + +#### App Server Spec + +Fetch directly from the live endpoint (no auth required): + +```bash +curl -s "https://app.all-hands.dev/openapi.json" > openapi/app-server.json +``` + +Or if you have a self-hosted instance: +```bash +curl -s "https://your-instance.example.com/openapi.json" > openapi/app-server.json +``` + +#### Agent Server Spec + +**Option A: From a running sandbox** (recommended for production verification) + +1. Get your sandbox's Agent Server URL: + ```bash + curl -s "https://app.all-hands.dev/api/v1/sandboxes?id={sandbox_id}" \ + -H "Authorization: Bearer YOUR_API_KEY" | jq '.results[0].exposed_urls.AGENT_SERVER' + ``` + +2. Fetch the spec from that sandbox: + ```bash + curl -s "{agent_server_url}/openapi.json" \ + -H "X-Session-API-Key: {session_api_key}" > openapi/agent-server.json + ``` + +**Option B: Generate from the PyPI package** (for latest published version) + +```bash +pip install openhands-agent-server openhands-sdk openhands-tools +python -c " +from openhands.agent_server.api import api +import json +print(json.dumps(api.openapi(), indent=2)) +" > openapi/agent-server.json +``` + +**Option C: From Swagger UI** (interactive) + +1. Start or resume a sandbox +2. Navigate to `{agent_server_url}/docs` in your browser +3. Click the `/openapi.json` link at the top of the page + +## Quick Start + +### Find V0 Calls in Your Codebase + +```bash +# Find V0 endpoint URLs +grep -rn --include="*.py" --include="*.ts" --include="*.js" \ + -E "/api/conversations[^/]|/api/conversations/[^v]" . + +# Find V0-specific field names +grep -rn --include="*.py" --include="*.ts" --include="*.js" \ + "initial_user_msg" . +``` + +### Key Changes Summary + +| Aspect | V0 | V1 | +|--------|----|----| +| Base path | `/api/conversations` | `/api/v1/app-conversations` | +| Conversation start | Synchronous | Asynchronous (poll or stream) | +| File operations | App Server | Agent Server (per-sandbox) | +| Auth for files | `Authorization: Bearer` | `X-Session-API-Key` | + +### Endpoint Mapping + +| V0 | V1 | Complexity | +|----|----|-----------:| +| `POST /api/conversations` | `POST /api/v1/app-conversations` | Moderate | +| `GET /api/conversations` | `GET /api/v1/app-conversations/search` | Simple | +| `GET /api/conversations/{id}` | `GET /api/v1/app-conversations?id={id}` | Simple | +| `POST .../messages` | `POST /api/v1/conversation/{id}/events` | Moderate | +| `GET .../events` | `GET /api/v1/conversation/{id}/events/search` | Simple | +| `GET .../list-files` | Agent Server bash command | Complex | +| `GET .../select-file` | Agent Server file download | Complex | + +## Using the Fixtures + +The `fixtures/` directory contains sample request/response JSON files: + +```python +import json +from pathlib import Path + +fixtures = Path("fixtures") + +# Load V0 request +v0_request = json.loads((fixtures / "v0/conversations/create-request.json").read_text()) + +# Load equivalent V1 request +v1_request = json.loads((fixtures / "v1/app-conversations/create-request.json").read_text()) + +# Use mapping to understand the transformation +mapping = json.loads((fixtures / "mapping.json").read_text()) +create_mapping = next(m for m in mapping["mappings"] if m["operation"] == "create_conversation") +print(create_mapping["breaking_changes"]) +``` + +## Resources + +- [Full Migration Guide](https://docs.openhands.dev/openhands/usage/api/migration) +- [V1 API Swagger Docs](https://app.all-hands.dev/docs) +- [V1 OpenAPI Spec](https://app.all-hands.dev/openapi.json) + +## Contributing + +To improve this skill: +1. Add more fixtures for edge cases +2. Contribute language-specific patterns +3. Share real-world migration examples +4. Report detection pattern gaps + +## License + +MIT - Same as OpenHands diff --git a/skills/v0-v1-migration/SKILL.md b/skills/v0-v1-migration/SKILL.md new file mode 100644 index 0000000..c144748 --- /dev/null +++ b/skills/v0-v1-migration/SKILL.md @@ -0,0 +1,281 @@ +--- +name: v0-v1-migration +description: > + Comprehensive toolkit for migrating from OpenHands V0 API to V1 API. + Detects V0 call sites, generates migration plans, provides transformation + guidance, and includes test fixtures. Use when upgrading API integrations + before the V0 deprecation deadline (April 1, 2026). +triggers: + - migrate v0 to v1 + - v0 api migration + - openhands api migration + - find v0 api calls + - v0 to v1 + - api migration plan + - v0 deprecation + - deprecated api +--- + +# V0 to V1 API Migration Assistant + +You are helping migrate an OpenHands integration from the deprecated V0 API to V1. + +## Quick Context + +**Deadline**: V0 API deprecated, removal scheduled for **April 1, 2026**. + +**Key Changes in V1**: +1. **Decoupled architecture**: Conversations and sandboxes are independent resources +2. **Async conversation start**: Creation returns a start task; poll or stream for readiness +3. **Agent Server**: File/workspace operations moved to per-sandbox URLs +4. **New endpoints**: `/api/v1/app-conversations`, `/api/v1/sandboxes`, `/api/v1/conversation/{id}/events` + +## Migration Workflow + +Follow these steps systematically: + +### Step 1: Detect V0 API Calls + +Scan the codebase for V0 patterns: + +```bash +# Find V0 endpoint URLs +grep -rn --include="*.py" --include="*.ts" --include="*.js" --include="*.tsx" --include="*.jsx" \ + -E "/api/conversations[^/]|/api/conversations/[^v]" . + +# Find V0-specific field names +grep -rn --include="*.py" --include="*.ts" --include="*.js" \ + -E "initial_user_msg|\"repository\":" . + +# Find curl commands with V0 endpoints +grep -rn --include="*.sh" --include="*.md" \ + "/api/conversations" . +``` + +**V0 Patterns to Identify**: + +| Pattern | Type | Example | +|---------|------|---------| +| `/api/conversations` (no `/v1/`) | URL | `POST https://app.all-hands.dev/api/conversations` | +| `initial_user_msg` | Request field | `{"initial_user_msg": "Hello"}` | +| `/api/conversations/{id}/messages` | URL | Send message endpoint | +| `/api/conversations/{id}/list-files` | URL | File listing (moved to Agent Server) | +| `/api/conversations/{id}/select-file` | URL | File download (moved to Agent Server) | + +### Step 2: Categorize Each Call Site + +For each V0 call found, categorize by complexity: + +| Complexity | Description | Examples | +|------------|-------------|----------| +| **Simple** | Path/field rename only | GET conversations, DELETE conversation | +| **Moderate** | Structural changes needed | Create conversation (async), send message (content format) | +| **Complex** | Architecture change | File operations → Agent Server | + +### Step 3: Generate Migration Plan + +Create a checklist of all changes needed: + +```markdown +## Migration Plan for [project-name] + +### Summary +- V0 call sites found: X +- Files affected: Y +- Complexity breakdown: A simple, B moderate, C complex + +### Changes Required + +#### Simple Changes +- [ ] `src/api.py:42` - Update path `/api/conversations` → `/api/v1/app-conversations/search` +- [ ] `src/api.py:67` - Update path for DELETE + +#### Moderate Changes +- [ ] `src/client.py:15` - Conversation creation: implement async polling +- [ ] `src/client.py:89` - Message format: wrap in content array + +#### Complex Changes +- [ ] `src/files.py:23` - File listing: migrate to Agent Server bash command +- [ ] `src/files.py:45` - File download: migrate to Agent Server file endpoint + +### Testing Checklist +- [ ] Update unit test mocks for V1 response shapes +- [ ] Verify async conversation flow in integration tests +- [ ] Test Agent Server connectivity and auth +``` + +### Step 4: Apply Transformations + +#### Simple Transformations (Direct Replace) + +```python +# Path updates +"/api/conversations" → "/api/v1/app-conversations/search" # for listing +"/api/conversations/{id}" → "/api/v1/app-conversations?id={id}" # for get by ID +"/api/conversations/{id}" → "/api/v1/app-conversations/{id}" # for PATCH/DELETE +``` + +#### Moderate Transformations (Code Changes) + +**Conversation Creation (V0 → V1)**: + +```python +# ❌ V0 (deprecated) - synchronous +response = requests.post( + f"{base_url}/api/conversations", + headers={"Authorization": f"Bearer {api_key}"}, + json={ + "initial_user_msg": "Check the README", + "repository": "user/repo" + } +) +conversation_id = response.json()["conversation_id"] # Available immediately + +# ✅ V1 - asynchronous with polling +response = requests.post( + f"{base_url}/api/v1/app-conversations", + headers={"Authorization": f"Bearer {api_key}"}, + json={ + "initial_message": { + "content": [{"type": "text", "text": "Check the README"}] + }, + "selected_repository": "user/repo" + } +) +start_task_id = response.json()["id"] + +# Poll until ready +import time +while True: + status_response = requests.get( + f"{base_url}/api/v1/app-conversations/start-tasks?id={start_task_id}", + headers={"Authorization": f"Bearer {api_key}"} + ) + status = status_response.json() + + if status["status"] == "READY": + conversation_id = status["conversation_id"] + sandbox_id = status["sandbox_id"] + break + elif status["status"] == "ERROR": + raise Exception(f"Conversation start failed: {status.get('error')}") + + time.sleep(2) # Poll every 2 seconds +``` + +**Sending Messages (V0 → V1)**: + +```python +# ❌ V0 (deprecated) +requests.post( + f"{base_url}/api/conversations/{conv_id}/messages", + json={"message": "Hello world"} +) + +# ✅ V1 +requests.post( + f"{base_url}/api/v1/conversation/{conv_id}/events", + json={ + "content": [{"type": "text", "text": "Hello world"}] + } +) +``` + +#### Complex Transformations (Agent Server) + +**File Operations** require getting the Agent Server URL first: + +```python +# Step 1: Get sandbox info +sandbox_response = requests.get( + f"{base_url}/api/v1/sandboxes?id={sandbox_id}", + headers={"Authorization": f"Bearer {api_key}"} +) +sandbox = sandbox_response.json()["results"][0] +agent_server_url = sandbox["exposed_urls"]["AGENT_SERVER"] +session_api_key = sandbox["session_api_key"] + +# Step 2: Use Agent Server for file operations +# ❌ V0: GET /api/conversations/{id}/list-files +# ✅ V1: Execute ls command via Agent Server +files_response = requests.post( + f"{agent_server_url}/api/bash/execute_bash_command", + headers={"X-Session-API-Key": session_api_key}, + json={"command": "ls -la /workspace"} +) + +# ❌ V0: GET /api/conversations/{id}/select-file?file=README.md +# ✅ V1: Download via Agent Server +file_content = requests.get( + f"{agent_server_url}/api/file/download/workspace/README.md", + headers={"X-Session-API-Key": session_api_key} +) +``` + +### Step 5: Update Tests + +Use the fixtures provided in this skill for test data: + +- `fixtures/v0/` - Original V0 request/response shapes +- `fixtures/v1/` - New V1 request/response shapes +- `fixtures/mapping.json` - Maps V0 fixtures to V1 equivalents + +## Endpoint Quick Reference + +| Operation | V0 Endpoint | V1 Endpoint | +|-----------|-------------|-------------| +| Create conversation | `POST /api/conversations` | `POST /api/v1/app-conversations` | +| Check start status | N/A | `GET /api/v1/app-conversations/start-tasks?id={id}` | +| Stream start | `POST /api/conversations/{id}/start` | `POST /api/v1/app-conversations/stream-start` | +| List conversations | `GET /api/conversations` | `GET /api/v1/app-conversations/search` | +| Get conversation | `GET /api/conversations/{id}` | `GET /api/v1/app-conversations?id={id}` | +| Update conversation | `PATCH /api/conversations/{id}` | `PATCH /api/v1/app-conversations/{id}` | +| Delete conversation | `DELETE /api/conversations/{id}` | `DELETE /api/v1/app-conversations/{id}` | +| Send message | `POST /api/conversations/{id}/messages` | `POST /api/v1/conversation/{id}/events` | +| Get events | `GET /api/conversations/{id}/events` | `GET /api/v1/conversation/{id}/events/search` | +| List files | `GET /api/conversations/{id}/list-files` | Agent Server: `POST /api/bash/execute_bash_command` | +| Download file | `GET /api/conversations/{id}/select-file` | Agent Server: `GET /api/file/download/{path}` | +| Upload files | `POST /api/conversations/{id}/upload-files` | Agent Server: `POST /api/file/upload/{path}` | + +## Authentication Summary + +| API | Header | +|-----|--------| +| App Server (V0 & V1) | `Authorization: Bearer {api_key}` | +| Agent Server | `X-Session-API-Key: {session_api_key}` | + +## Resources + +**Online Documentation**: +- [Full Migration Guide](https://docs.openhands.dev/openhands/usage/api/migration) +- [V1 API Swagger Docs](https://app.all-hands.dev/docs) +- [V1 API OpenAPI Spec](https://app.all-hands.dev/openapi.json) +- [Agent Server OpenAPI](https://docs.openhands.dev/openhands/usage/api/migration#accessing-agent-server-api-documentation) (requires running sandbox) + +**Embedded in This Skill** (in `openapi/` directory, last updated 2026-03-02): +- `app-server.json` - Full App Server OpenAPI spec (V0 + V1 endpoints, ~450KB) +- `agent-server.json` - Agent Server OpenAPI spec (per-sandbox API, ~420KB) + +Use these for offline reference, code generation, or building migration tooling. + +**If specs seem outdated**, fetch fresh copies: + +```bash +# App Server - fetch from live endpoint (no auth required) +curl -s "https://app.all-hands.dev/openapi.json" > openapi/app-server.json + +# Agent Server - fetch from a running sandbox +# First get the agent server URL and session key from your sandbox: +curl -s "https://app.all-hands.dev/api/v1/sandboxes?id={sandbox_id}" \ + -H "Authorization: Bearer YOUR_API_KEY" +# Then fetch the spec: +curl -s "{agent_server_url}/openapi.json" \ + -H "X-Session-API-Key: {session_api_key}" > openapi/agent-server.json +``` + +## Common Pitfalls + +1. **Forgetting async handling**: V1 conversation creation is async—always poll or stream +2. **Wrong auth header for Agent Server**: Use `X-Session-API-Key`, not `Authorization: Bearer` +3. **Missing content wrapper**: Messages now use `{"content": [{"type": "text", "text": "..."}]}` +4. **Sandbox vs conversation ID**: V1 has separate IDs; file ops need sandbox_id, not conversation_id diff --git a/skills/v0-v1-migration/detection/patterns.json b/skills/v0-v1-migration/detection/patterns.json new file mode 100644 index 0000000..9e64313 --- /dev/null +++ b/skills/v0-v1-migration/detection/patterns.json @@ -0,0 +1,114 @@ +{ + "description": "Regex patterns for detecting V0 API usage in codebases", + "url_patterns": [ + { + "name": "v0_conversations_base", + "pattern": "/api/conversations(?!/start-tasks)(?![\\w-]*/v1)", + "description": "Matches /api/conversations but not V1 paths", + "examples": [ + "/api/conversations", + "/api/conversations/abc123", + "/api/conversations/abc123/events" + ], + "non_matches": [ + "/api/v1/app-conversations", + "/api/v1/conversation/abc123/events" + ] + }, + { + "name": "v0_create_conversation", + "pattern": "POST\\s+[\"'`]?[^\"'`]*?/api/conversations[\"'`]?", + "description": "POST to /api/conversations (V0 create)", + "severity": "moderate" + }, + { + "name": "v0_send_message", + "pattern": "/api/conversations/[^/]+/messages", + "description": "V0 message endpoint", + "severity": "moderate" + }, + { + "name": "v0_list_files", + "pattern": "/api/conversations/[^/]+/list-files", + "description": "V0 file listing (moved to Agent Server)", + "severity": "complex" + }, + { + "name": "v0_select_file", + "pattern": "/api/conversations/[^/]+/select-file", + "description": "V0 file download (moved to Agent Server)", + "severity": "complex" + }, + { + "name": "v0_upload_files", + "pattern": "/api/conversations/[^/]+/upload-files", + "description": "V0 file upload (moved to Agent Server)", + "severity": "complex" + }, + { + "name": "v0_zip_directory", + "pattern": "/api/conversations/[^/]+/zip-directory", + "description": "V0 zip download (no direct V1 equivalent)", + "severity": "complex" + }, + { + "name": "v0_vscode_url", + "pattern": "/api/conversations/[^/]+/vscode-url", + "description": "V0 VSCode URL (get from sandbox exposed_urls in V1)", + "severity": "moderate" + }, + { + "name": "v0_web_hosts", + "pattern": "/api/conversations/[^/]+/web-hosts", + "description": "V0 web hosts (get from sandbox exposed_urls in V1)", + "severity": "moderate" + } + ], + "field_patterns": [ + { + "name": "v0_initial_user_msg", + "pattern": "[\"']initial_user_msg[\"']", + "description": "V0 field name for initial message", + "v1_equivalent": "initial_message", + "severity": "moderate" + }, + { + "name": "v0_repository_field", + "pattern": "[\"']repository[\"']\\s*:", + "description": "V0 field name for repository (context-dependent)", + "v1_equivalent": "selected_repository", + "severity": "simple", + "notes": "May have false positives - verify context" + } + ], + "file_extensions": [ + ".py", + ".js", + ".ts", + ".tsx", + ".jsx", + ".sh", + ".bash", + ".zsh", + ".yaml", + ".yml", + ".json", + ".md" + ], + "exclude_patterns": [ + "node_modules/", + ".git/", + "dist/", + "build/", + "__pycache__/", + ".venv/", + "venv/", + "*.min.js", + "*.bundle.js" + ], + "grep_commands": { + "find_all_v0": "grep -rn --include='*.py' --include='*.ts' --include='*.js' --include='*.sh' -E '/api/conversations[^/]|/api/conversations/[^v]' .", + "find_v0_fields": "grep -rn --include='*.py' --include='*.ts' --include='*.js' -E 'initial_user_msg' .", + "find_file_ops": "grep -rn --include='*.py' --include='*.ts' --include='*.js' -E 'list-files|select-file|upload-files|zip-directory' ." + } +} diff --git a/skills/v0-v1-migration/fixtures/mapping.json b/skills/v0-v1-migration/fixtures/mapping.json new file mode 100644 index 0000000..68a0e0e --- /dev/null +++ b/skills/v0-v1-migration/fixtures/mapping.json @@ -0,0 +1,169 @@ +{ + "description": "Maps V0 fixtures to their V1 equivalents for migration testing", + "mappings": [ + { + "operation": "create_conversation", + "v0": { + "method": "POST", + "path": "/api/conversations", + "request": "v0/conversations/create-request.json", + "response": "v0/conversations/create-response.json" + }, + "v1": { + "method": "POST", + "path": "/api/v1/app-conversations", + "request": "v1/app-conversations/create-request.json", + "response": "v1/app-conversations/create-response.json", + "notes": "V1 is async - returns start task, poll start-tasks endpoint for conversation_id" + }, + "complexity": "moderate", + "breaking_changes": [ + "Response no longer contains conversation_id immediately", + "Must poll /api/v1/app-conversations/start-tasks?id={id} until status=READY", + "Request field 'initial_user_msg' renamed to 'initial_message' with content array", + "Request field 'repository' renamed to 'selected_repository'" + ] + }, + { + "operation": "poll_start_task", + "v0": null, + "v1": { + "method": "GET", + "path": "/api/v1/app-conversations/start-tasks?id={start_task_id}", + "response_starting": "v1/app-conversations/create-response.json", + "response_ready": "v1/app-conversations/start-task-ready.json" + }, + "complexity": "new", + "notes": "New endpoint in V1 - no V0 equivalent" + }, + { + "operation": "list_conversations", + "v0": { + "method": "GET", + "path": "/api/conversations" + }, + "v1": { + "method": "GET", + "path": "/api/v1/app-conversations/search" + }, + "complexity": "simple", + "breaking_changes": [] + }, + { + "operation": "get_conversation", + "v0": { + "method": "GET", + "path": "/api/conversations/{id}" + }, + "v1": { + "method": "GET", + "path": "/api/v1/app-conversations?id={id}" + }, + "complexity": "simple", + "breaking_changes": [ + "Path parameter becomes query parameter" + ] + }, + { + "operation": "send_message", + "v0": { + "method": "POST", + "path": "/api/conversations/{id}/messages", + "request": "v0/events/send-message-request.json" + }, + "v1": { + "method": "POST", + "path": "/api/v1/conversation/{id}/events", + "request": "v1/conversation-events/send-message-request.json" + }, + "complexity": "moderate", + "breaking_changes": [ + "Endpoint path changed", + "Request body: 'message' string → 'content' array with type objects" + ] + }, + { + "operation": "get_events", + "v0": { + "method": "GET", + "path": "/api/conversations/{id}/events" + }, + "v1": { + "method": "GET", + "path": "/api/v1/conversation/{id}/events/search" + }, + "complexity": "simple", + "breaking_changes": [] + }, + { + "operation": "list_files", + "v0": { + "method": "GET", + "path": "/api/conversations/{id}/list-files" + }, + "v1": { + "method": "POST", + "path": "{agent_server_url}/api/bash/execute_bash_command", + "request": "v1/agent-server/bash-execute-request.json", + "response": "v1/agent-server/bash-execute-response.json", + "auth_header": "X-Session-API-Key" + }, + "complexity": "complex", + "breaking_changes": [ + "Moved to Agent Server (per-sandbox URL)", + "Requires session_api_key from sandbox info", + "Different auth header: X-Session-API-Key instead of Authorization: Bearer", + "Must get sandbox info first to obtain agent_server_url and session_api_key" + ], + "prerequisites": [ + "GET /api/v1/sandboxes?id={sandbox_id} to get agent_server_url and session_api_key" + ] + }, + { + "operation": "download_file", + "v0": { + "method": "GET", + "path": "/api/conversations/{id}/select-file?file={path}" + }, + "v1": { + "method": "GET", + "path": "{agent_server_url}/api/file/download/{path}", + "auth_header": "X-Session-API-Key" + }, + "complexity": "complex", + "breaking_changes": [ + "Moved to Agent Server", + "Path is now part of URL, not query parameter", + "Different auth header" + ] + }, + { + "operation": "upload_files", + "v0": { + "method": "POST", + "path": "/api/conversations/{id}/upload-files" + }, + "v1": { + "method": "POST", + "path": "{agent_server_url}/api/file/upload/{path}", + "auth_header": "X-Session-API-Key" + }, + "complexity": "complex", + "breaking_changes": [ + "Moved to Agent Server", + "Upload path is part of URL" + ] + }, + { + "operation": "get_sandbox_info", + "v0": null, + "v1": { + "method": "GET", + "path": "/api/v1/sandboxes?id={sandbox_id}", + "response": "v1/sandboxes/get-response.json" + }, + "complexity": "new", + "notes": "New endpoint - required for Agent Server operations" + } + ] +} diff --git a/skills/v0-v1-migration/fixtures/v0/conversations/create-request.json b/skills/v0-v1-migration/fixtures/v0/conversations/create-request.json new file mode 100644 index 0000000..4d17a62 --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v0/conversations/create-request.json @@ -0,0 +1,4 @@ +{ + "initial_user_msg": "Check the README.md file and summarize its contents", + "repository": "octocat/hello-world" +} diff --git a/skills/v0-v1-migration/fixtures/v0/conversations/create-response.json b/skills/v0-v1-migration/fixtures/v0/conversations/create-response.json new file mode 100644 index 0000000..779cd88 --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v0/conversations/create-response.json @@ -0,0 +1,4 @@ +{ + "status": "ok", + "conversation_id": "conv_abc123def456" +} diff --git a/skills/v0-v1-migration/fixtures/v1/agent-server/bash-execute-request.json b/skills/v0-v1-migration/fixtures/v1/agent-server/bash-execute-request.json new file mode 100644 index 0000000..5fe461c --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v1/agent-server/bash-execute-request.json @@ -0,0 +1,3 @@ +{ + "command": "ls -la /workspace" +} diff --git a/skills/v0-v1-migration/fixtures/v1/agent-server/bash-execute-response.json b/skills/v0-v1-migration/fixtures/v1/agent-server/bash-execute-response.json new file mode 100644 index 0000000..17a31a1 --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v1/agent-server/bash-execute-response.json @@ -0,0 +1,4 @@ +{ + "output": "total 24\ndrwxr-xr-x 4 openhands openhands 4096 Jan 15 10:30 .\ndrwxr-xr-x 1 root root 4096 Jan 15 10:30 ..\ndrwxr-xr-x 8 openhands openhands 4096 Jan 15 10:30 .git\n-rw-r--r-- 1 openhands openhands 156 Jan 15 10:30 README.md\n-rw-r--r-- 1 openhands openhands 1024 Jan 15 10:30 package.json\ndrwxr-xr-x 2 openhands openhands 4096 Jan 15 10:30 src\n", + "exit_code": 0 +} diff --git a/skills/v0-v1-migration/fixtures/v1/app-conversations/create-request.json b/skills/v0-v1-migration/fixtures/v1/app-conversations/create-request.json new file mode 100644 index 0000000..94c5ba5 --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v1/app-conversations/create-request.json @@ -0,0 +1,11 @@ +{ + "initial_message": { + "content": [ + { + "type": "text", + "text": "Check the README.md file and summarize its contents" + } + ] + }, + "selected_repository": "octocat/hello-world" +} diff --git a/skills/v0-v1-migration/fixtures/v1/app-conversations/create-response.json b/skills/v0-v1-migration/fixtures/v1/app-conversations/create-response.json new file mode 100644 index 0000000..6223d13 --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v1/app-conversations/create-response.json @@ -0,0 +1,7 @@ +{ + "id": "start-task-550e8400-e29b-41d4-a716-446655440000", + "status": "STARTING", + "conversation_id": null, + "sandbox_id": null, + "created_at": "2025-01-15T10:30:00Z" +} diff --git a/skills/v0-v1-migration/fixtures/v1/app-conversations/start-task-ready.json b/skills/v0-v1-migration/fixtures/v1/app-conversations/start-task-ready.json new file mode 100644 index 0000000..95a00dd --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v1/app-conversations/start-task-ready.json @@ -0,0 +1,7 @@ +{ + "id": "start-task-550e8400-e29b-41d4-a716-446655440000", + "status": "READY", + "conversation_id": "550e8400-e29b-41d4-a716-446655440000", + "sandbox_id": "sandbox-abc123xyz", + "created_at": "2025-01-15T10:30:00Z" +} diff --git a/skills/v0-v1-migration/fixtures/v1/sandboxes/get-response.json b/skills/v0-v1-migration/fixtures/v1/sandboxes/get-response.json new file mode 100644 index 0000000..5340570 --- /dev/null +++ b/skills/v0-v1-migration/fixtures/v1/sandboxes/get-response.json @@ -0,0 +1,16 @@ +{ + "results": [ + { + "id": "sandbox-abc123xyz", + "status": "RUNNING", + "session_api_key": "sk-session-xyz789abc123", + "exposed_urls": { + "AGENT_SERVER": "https://sandbox-abc123xyz.runtime.all-hands.dev", + "VSCODE": "https://vscode-abc123xyz.runtime.all-hands.dev" + }, + "created_at": "2025-01-15T10:30:05Z", + "updated_at": "2025-01-15T10:30:15Z" + } + ], + "total": 1 +} diff --git a/skills/v0-v1-migration/openapi/agent-server.json b/skills/v0-v1-migration/openapi/agent-server.json new file mode 100644 index 0000000..179a60d --- /dev/null +++ b/skills/v0-v1-migration/openapi/agent-server.json @@ -0,0 +1,13580 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OpenHands Agent Server", + "description": "OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent", + "version": "0.1.0", + "x-skill-metadata": { + "generated_at": "2026-03-02T13:27:00Z", + "source": "openhands-agent-server PyPI package", + "refresh_instructions": { + "from_sandbox": "curl -s \"{agent_server_url}/openapi.json\" -H \"X-Session-API-Key: {session_api_key}\"", + "from_package": "python -c \"from openhands.agent_server.api import api; import json; print(json.dumps(api.openapi(), indent=2))\"" + } + } + }, + "paths": { + "/alive": { + "get": { + "tags": [ + "Server Details" + ], + "summary": "Alive", + "description": "Basic liveness check - returns OK if the server process is running.", + "operationId": "alive_alive_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/health": { + "get": { + "tags": [ + "Server Details" + ], + "summary": "Health", + "description": "Basic health check - returns OK if the server process is running.", + "operationId": "health_health_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Health Health Get" + } + } + } + } + } + } + }, + "/ready": { + "get": { + "tags": [ + "Server Details" + ], + "summary": "Ready", + "description": "Readiness check - returns OK only if the server has completed initialization.\n\nThis endpoint should be used by Kubernetes readiness probes to determine\nwhen the pod is ready to receive traffic. Returns 503 during initialization.", + "operationId": "ready_ready_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Response Ready Ready Get" + } + } + } + } + } + } + }, + "/server_info": { + "get": { + "tags": [ + "Server Details" + ], + "summary": "Get Server Info", + "operationId": "get_server_info_server_info_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerInfo" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/events/search": { + "get": { + "tags": [ + "Events" + ], + "summary": "Search Conversation Events", + "description": "Search / List local events", + "operationId": "search_conversation_events_api_conversations__conversation_id__events_search_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event kind/type (e.g., ActionEvent, MessageEvent)" + } + }, + { + "name": "source", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event source (e.g., agent, user, environment)" + } + }, + { + "name": "body", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by message content (case-insensitive)" + } + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/EventSortOrder", + "title": "Sort order for events", + "default": "TIMESTAMP" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter: event timestamp >= this datetime" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter: event timestamp < this datetime" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventPage" + } + } + } + }, + "404": { + "description": "Conversation not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/events/count": { + "get": { + "tags": [ + "Events" + ], + "summary": "Count Conversation Events", + "description": "Count local events matching the given filters", + "operationId": "count_conversation_events_api_conversations__conversation_id__events_count_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event kind/type (e.g., ActionEvent, MessageEvent)" + } + }, + { + "name": "source", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event source (e.g., agent, user, environment)" + } + }, + { + "name": "body", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by message content (case-insensitive)" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter: event timestamp >= this datetime" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter: event timestamp < this datetime" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count Conversation Events Api Conversations Conversation Id Events Count Get" + } + } + } + }, + "404": { + "description": "Conversation not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/events/{event_id}": { + "get": { + "tags": [ + "Events" + ], + "summary": "Get Conversation Event", + "description": "Get a local event given an id", + "operationId": "get_conversation_event_api_conversations__conversation_id__events__event_id__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "event_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + } + }, + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Event" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/events": { + "get": { + "tags": [ + "Events" + ], + "summary": "Batch Get Conversation Events", + "description": "Get a batch of local events given their ids, returning null for any\nmissing item.", + "operationId": "batch_get_conversation_events_api_conversations__conversation_id__events_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Event Ids" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Event" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Conversation Events Api Conversations Conversation Id Events Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Events" + ], + "summary": "Send Message", + "description": "Send a message to a conversation", + "operationId": "send_message_api_conversations__conversation_id__events_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SendMessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/events/respond_to_confirmation": { + "post": { + "tags": [ + "Events" + ], + "summary": "Respond To Confirmation", + "description": "Accept or reject a pending action in confirmation mode.", + "operationId": "respond_to_confirmation_api_conversations__conversation_id__events_respond_to_confirmation_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfirmationResponseRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/search": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Search Conversations", + "description": "Search / List conversations", + "operationId": "search_conversations_api_conversations_search_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationExecutionStatus" + }, + { + "type": "null" + } + ], + "title": "Optional filter by conversation execution status" + } + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/ConversationSortOrder", + "title": "Sort order for conversations", + "default": "CREATED_AT_DESC" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/count": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Count Conversations", + "description": "Count conversations matching the given filters", + "operationId": "count_conversations_api_conversations_count_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationExecutionStatus" + }, + { + "type": "null" + } + ], + "title": "Optional filter by conversation execution status" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count Conversations Api Conversations Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Get Conversation", + "description": "Given an id, get a conversation", + "operationId": "get_conversation_api_conversations__conversation_id__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationInfo" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Conversations" + ], + "summary": "Delete Conversation", + "description": "Permanently delete a conversation.", + "operationId": "delete_conversation_api_conversations__conversation_id__delete", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "tags": [ + "Conversations" + ], + "summary": "Update Conversation", + "description": "Update conversation metadata.\n\nThis endpoint allows updating conversation details like title.", + "operationId": "update_conversation_api_conversations__conversation_id__patch", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConversationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Batch Get Conversations", + "description": "Get a batch of conversations given their ids, returning null for\nany missing item", + "operationId": "batch_get_conversations_api_conversations_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "ids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "title": "Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInfo" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Conversations Api Conversations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Conversations" + ], + "summary": "Start Conversation", + "description": "Start a conversation in the local environment.", + "operationId": "start_conversation_api_conversations_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartConversationRequest", + "examples": [ + { + "agent": { + "llm": { + "model": "your-model-provider/your-model-name", + "api_key": "**********", + "temperature": 0.0, + "usage_id": "your-llm-service" + }, + "tools": [ + { + "name": "terminal" + }, + { + "name": "file_editor" + }, + { + "name": "task_tracker" + }, + { + "name": "browser_tool_set" + } + ], + "system_prompt_kwargs": { + "llm_security_analyzer": true + }, + "kind": "Agent" + }, + "workspace": { + "working_dir": "workspace/project", + "kind": "LocalWorkspace" + }, + "initial_message": { + "content": [ + { + "text": "Flip a coin!" + } + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationInfo" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/pause": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Pause Conversation", + "description": "Pause a conversation, allowing it to be resumed later.", + "operationId": "pause_conversation_api_conversations__conversation_id__pause_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/run": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Run Conversation", + "description": "Start running the conversation in the background.", + "operationId": "run_conversation_api_conversations__conversation_id__run_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "409": { + "description": "Conversation is already running" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/secrets": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Update Conversation Secrets", + "description": "Update secrets for a conversation.", + "operationId": "update_conversation_secrets_api_conversations__conversation_id__secrets_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSecretsRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/confirmation_policy": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Set Conversation Confirmation Policy", + "description": "Set the confirmation policy for a conversation.", + "operationId": "set_conversation_confirmation_policy_api_conversations__conversation_id__confirmation_policy_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetConfirmationPolicyRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/security_analyzer": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Set Conversation Security Analyzer", + "description": "Set the security analyzer for a conversation.", + "operationId": "set_conversation_security_analyzer_api_conversations__conversation_id__security_analyzer_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SetSecurityAnalyzerRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/generate_title": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Generate Conversation Title", + "description": "Generate a title for the conversation using LLM.", + "operationId": "generate_conversation_title_api_conversations__conversation_id__generate_title_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTitleRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateTitleResponse" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/ask_agent": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Ask Agent", + "description": "Ask the agent a simple question without affecting conversation state.", + "operationId": "ask_agent_api_conversations__conversation_id__ask_agent_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AskAgentRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AskAgentResponse" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/condense": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Condense Conversation", + "description": "Force condensation of the conversation history.", + "operationId": "condense_conversation_api_conversations__conversation_id__condense_post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/tools/": { + "get": { + "tags": [ + "Tools" + ], + "summary": "List Available Tools", + "description": "List all available tools.", + "operationId": "list_available_tools_api_tools__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response List Available Tools Api Tools Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/bash/bash_events/search": { + "get": { + "tags": [ + "Bash" + ], + "summary": "Search Bash Events", + "description": "Search / List bash event events", + "operationId": "search_bash_events_api_bash_bash_events_search_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "kind__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "BashCommand", + "BashOutput" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Kind Eq" + } + }, + { + "name": "command_id__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Command Id Eq" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Timestamp Gte" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Timestamp Lt" + } + }, + { + "name": "order__gt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Filter to events with order greater than this value", + "description": "Only returns BashOutput events with order > this value. Useful for polling to fetch only new events since the last poll." + }, + "description": "Only returns BashOutput events with order > this value. Useful for polling to fetch only new events since the last poll." + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/BashEventSortOrder", + "default": "TIMESTAMP" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BashEventPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/bash/bash_events/{event_id}": { + "get": { + "tags": [ + "Bash" + ], + "summary": "Get Bash Event", + "description": "Get a bash event event given an id", + "operationId": "get_bash_event_api_bash_bash_events__event_id__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "event_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BashEventBase" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/bash/bash_events/": { + "get": { + "tags": [ + "Bash" + ], + "summary": "Batch Get Bash Events", + "description": "Get a batch of bash event events given their ids, returning null for any\nmissing item.", + "operationId": "batch_get_bash_events_api_bash_bash_events__get", + "requestBody": { + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Event Ids" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/BashEventBase" + }, + { + "type": "null" + } + ] + }, + "type": "array", + "title": "Response Batch Get Bash Events Api Bash Bash Events Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/bash/start_bash_command": { + "post": { + "tags": [ + "Bash" + ], + "summary": "Start Bash Command", + "description": "Execute a bash command in the background", + "operationId": "start_bash_command_api_bash_start_bash_command_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteBashRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BashCommand" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/bash/execute_bash_command": { + "post": { + "tags": [ + "Bash" + ], + "summary": "Execute Bash Command", + "description": "Execute a bash command and wait for a result", + "operationId": "execute_bash_command_api_bash_execute_bash_command_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExecuteBashRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BashOutput" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/bash/bash_events": { + "delete": { + "tags": [ + "Bash" + ], + "summary": "Clear All Bash Events", + "description": "Clear all bash events from storage", + "operationId": "clear_all_bash_events_api_bash_bash_events_delete", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "integer" + }, + "type": "object", + "title": "Response Clear All Bash Events Api Bash Bash Events Delete" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/git/changes/{path}": { + "get": { + "tags": [ + "Git" + ], + "summary": "Git Changes", + "operationId": "git_changes_api_git_changes__path__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "path", + "title": "Path" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GitChange" + }, + "title": "Response Git Changes Api Git Changes Path Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/git/diff/{path}": { + "get": { + "tags": [ + "Git" + ], + "summary": "Git Diff", + "operationId": "git_diff_api_git_diff__path__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "path", + "title": "Path" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitDiff" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/file/upload/{path}": { + "post": { + "tags": [ + "Files" + ], + "summary": "Upload File", + "description": "Upload a file to the workspace.", + "operationId": "upload_file_api_file_upload__path__post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Absolute file path.", + "title": "Path" + }, + "description": "Absolute file path." + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload_file_api_file_upload__path__post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/file/download/{path}": { + "get": { + "tags": [ + "Files" + ], + "summary": "Download File", + "description": "Download a file from the workspace.", + "operationId": "download_file_api_file_download__path__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Absolute file path.", + "title": "Path" + }, + "description": "Absolute file path." + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/file/download-trajectory/{conversation_id}": { + "get": { + "tags": [ + "Files" + ], + "summary": "Download Trajectory", + "description": "Download a file from the workspace.", + "operationId": "download_trajectory_api_file_download_trajectory__conversation_id__get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/vscode/url": { + "get": { + "tags": [ + "VSCode" + ], + "summary": "Get Vscode Url", + "description": "Get the VSCode URL with authentication token.\n\nArgs:\n base_url: Base URL for the VSCode server (default: http://localhost:8001)\n workspace_dir: Path to workspace directory\n\nReturns:\n VSCode URL with token if available, None otherwise", + "operationId": "get_vscode_url_api_vscode_url_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "base_url", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "http://localhost:8001", + "title": "Base Url" + } + }, + { + "name": "workspace_dir", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "workspace", + "title": "Workspace Dir" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VSCodeUrlResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/vscode/status": { + "get": { + "tags": [ + "VSCode" + ], + "summary": "Get Vscode Status", + "description": "Get the VSCode server status.\n\nReturns:\n Dictionary with running status and enabled status", + "operationId": "get_vscode_status_api_vscode_status_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ] + }, + "type": "object", + "title": "Response Get Vscode Status Api Vscode Status Get" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/desktop/url": { + "get": { + "tags": [ + "Desktop" + ], + "summary": "Get Desktop Url", + "description": "Get the noVNC URL for desktop access.\n\nArgs:\n base_url: Base URL for the noVNC server (default: http://localhost:8002)\n\nReturns:\n noVNC URL if available, None otherwise", + "operationId": "get_desktop_url_api_desktop_url_get", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "base_url", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "http://localhost:8002", + "title": "Base Url" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DesktopUrlResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/skills": { + "post": { + "tags": [ + "Skills" + ], + "summary": "Get Skills", + "description": "Load and merge skills from all configured sources.\n\nSkills are loaded from multiple sources and merged with the following\nprecedence (later overrides earlier for duplicate names):\n1. Sandbox skills (lowest) - Exposed URLs from sandbox\n2. Public skills - From GitHub OpenHands/extensions repository\n3. User skills - From ~/.openhands/skills/\n4. Organization skills - From {org}/.openhands or equivalent\n5. Project skills (highest) - From {workspace}/.openhands/skills/\n\nArgs:\n request: SkillsRequest containing configuration for which sources to load.\n\nReturns:\n SkillsResponse containing merged skills and source counts.", + "operationId": "get_skills_api_skills_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SkillsResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/skills/sync": { + "post": { + "tags": [ + "Skills" + ], + "summary": "Sync Skills", + "description": "Force refresh of public skills from GitHub repository.\n\nThis triggers a git pull on the cached skills repository to get\nthe latest skills from the OpenHands/extensions repository.\n\nReturns:\n SyncResponse indicating success or failure.", + "operationId": "sync_skills_api_skills_sync_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SyncResponse" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/hooks": { + "post": { + "tags": [ + "Hooks" + ], + "summary": "Get Hooks", + "description": "Load hooks from the workspace .openhands/hooks.json file.\n\nThis endpoint reads the hooks configuration from the project's\n.openhands/hooks.json file if it exists.\n\nArgs:\n request: HooksRequest containing the project directory path.\n\nReturns:\n HooksResponse containing the hook configuration or None.", + "operationId": "get_hooks_api_hooks_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HooksRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HooksResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/": { + "get": { + "summary": "Get Server Info", + "operationId": "get_server_info__get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerInfo" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "APIBasedCritic-Input": { + "properties": { + "server_url": { + "type": "string", + "title": "Server Url", + "description": "Base URL of the vLLM classification service", + "default": "https://all-hands-ai--critic-qwen3-4b-serve.modal.run" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + } + ], + "title": "Api Key", + "description": "API key for authenticating with the vLLM service" + }, + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model to use", + "default": "critic-qwen3-4b" + }, + "tokenizer_name": { + "type": "string", + "title": "Tokenizer Name", + "description": "HuggingFace tokenizer name for loading chat template", + "default": "Qwen/Qwen3-4B-Instruct-2507" + }, + "pass_tools_definitions": { + "type": "boolean", + "title": "Pass Tools Definitions", + "description": "Whether to pass tool definitions to the model", + "default": true + }, + "timeout_seconds": { + "type": "number", + "title": "Timeout Seconds", + "description": "Timeout for requests to the model", + "default": 300.0 + }, + "has_success_label": { + "type": "boolean", + "title": "Has Success Label", + "description": "Whether the model predicts success label at index 0", + "default": true + }, + "sentiment_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sentiment Labels", + "default": [ + "sentiment_positive", + "sentiment_neutral", + "sentiment_negative" + ] + }, + "agent_issue_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Agent Issue Labels", + "default": [ + "misunderstood_intention", + "did_not_follow_instruction", + "insufficient_analysis", + "insufficient_clarification", + "improper_tool_use_or_setup", + "loop_behavior", + "insufficient_testing", + "insufficient_debugging", + "incomplete_implementation", + "file_management_errors", + "scope_creep", + "risky_actions_or_permission", + "other_agent_issue" + ] + }, + "infra_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Infra Labels", + "default": [ + "infrastructure_external_issue", + "infrastructure_agent_caused_issue" + ] + }, + "user_followup_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "User Followup Labels", + "default": [ + "clarification_or_restatement", + "correction", + "direction_change", + "vcs_update_requests", + "progress_or_scope_concern", + "frustration_or_complaint", + "removal_or_reversion_request", + "other_user_issue" + ] + }, + "sentiment_map": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Sentiment Map", + "default": { + "Positive": "sentiment_positive", + "Neutral": "sentiment_neutral", + "Negative": "sentiment_negative" + } + }, + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "APIBasedCritic", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "api_key" + ], + "title": "APIBasedCritic" + }, + "APIBasedCritic-Output": { + "properties": { + "server_url": { + "type": "string", + "title": "Server Url", + "description": "Base URL of the vLLM classification service", + "default": "https://all-hands-ai--critic-qwen3-4b-serve.modal.run" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + } + ], + "title": "Api Key", + "description": "API key for authenticating with the vLLM service" + }, + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model to use", + "default": "critic-qwen3-4b" + }, + "tokenizer_name": { + "type": "string", + "title": "Tokenizer Name", + "description": "HuggingFace tokenizer name for loading chat template", + "default": "Qwen/Qwen3-4B-Instruct-2507" + }, + "pass_tools_definitions": { + "type": "boolean", + "title": "Pass Tools Definitions", + "description": "Whether to pass tool definitions to the model", + "default": true + }, + "timeout_seconds": { + "type": "number", + "title": "Timeout Seconds", + "description": "Timeout for requests to the model", + "default": 300.0 + }, + "has_success_label": { + "type": "boolean", + "title": "Has Success Label", + "description": "Whether the model predicts success label at index 0", + "default": true + }, + "sentiment_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sentiment Labels", + "default": [ + "sentiment_positive", + "sentiment_neutral", + "sentiment_negative" + ] + }, + "agent_issue_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Agent Issue Labels", + "default": [ + "misunderstood_intention", + "did_not_follow_instruction", + "insufficient_analysis", + "insufficient_clarification", + "improper_tool_use_or_setup", + "loop_behavior", + "insufficient_testing", + "insufficient_debugging", + "incomplete_implementation", + "file_management_errors", + "scope_creep", + "risky_actions_or_permission", + "other_agent_issue" + ] + }, + "infra_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Infra Labels", + "default": [ + "infrastructure_external_issue", + "infrastructure_agent_caused_issue" + ] + }, + "user_followup_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "User Followup Labels", + "default": [ + "clarification_or_restatement", + "correction", + "direction_change", + "vcs_update_requests", + "progress_or_scope_concern", + "frustration_or_complaint", + "removal_or_reversion_request", + "other_user_issue" + ] + }, + "sentiment_map": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Sentiment Map", + "default": { + "Positive": "sentiment_positive", + "Neutral": "sentiment_neutral", + "Negative": "sentiment_negative" + } + }, + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "APIBasedCritic", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "api_key", + "kind" + ], + "title": "APIBasedCritic" + }, + "Action": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolAction" + }, + { + "$ref": "#/components/schemas/FinishAction" + }, + { + "$ref": "#/components/schemas/ThinkAction" + }, + { + "$ref": "#/components/schemas/BrowserAction" + }, + { + "$ref": "#/components/schemas/BrowserClickAction" + }, + { + "$ref": "#/components/schemas/BrowserCloseTabAction" + }, + { + "$ref": "#/components/schemas/BrowserGetContentAction" + }, + { + "$ref": "#/components/schemas/BrowserGetStateAction" + }, + { + "$ref": "#/components/schemas/BrowserGetStorageAction" + }, + { + "$ref": "#/components/schemas/BrowserGoBackAction" + }, + { + "$ref": "#/components/schemas/BrowserListTabsAction" + }, + { + "$ref": "#/components/schemas/BrowserNavigateAction" + }, + { + "$ref": "#/components/schemas/BrowserScrollAction" + }, + { + "$ref": "#/components/schemas/BrowserSetStorageAction" + }, + { + "$ref": "#/components/schemas/BrowserStartRecordingAction" + }, + { + "$ref": "#/components/schemas/BrowserStopRecordingAction" + }, + { + "$ref": "#/components/schemas/BrowserSwitchTabAction" + }, + { + "$ref": "#/components/schemas/BrowserTypeAction" + }, + { + "$ref": "#/components/schemas/DelegateAction" + }, + { + "$ref": "#/components/schemas/FileEditorAction" + }, + { + "$ref": "#/components/schemas/EditAction" + }, + { + "$ref": "#/components/schemas/ListDirectoryAction" + }, + { + "$ref": "#/components/schemas/ReadFileAction" + }, + { + "$ref": "#/components/schemas/WriteFileAction" + }, + { + "$ref": "#/components/schemas/GlobAction" + }, + { + "$ref": "#/components/schemas/GrepAction" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorAction" + }, + { + "$ref": "#/components/schemas/TaskTrackerAction" + }, + { + "$ref": "#/components/schemas/TerminalAction" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__definition__MCPToolAction-Output__1": "#/components/schemas/MCPToolAction", + "openhands__sdk__tool__builtins__finish__FinishAction-Output__1": "#/components/schemas/FinishAction", + "openhands__sdk__tool__builtins__think__ThinkAction-Output__1": "#/components/schemas/ThinkAction", + "openhands__tools__browser_use__definition__BrowserAction-Output__1": "#/components/schemas/BrowserAction", + "openhands__tools__browser_use__definition__BrowserClickAction-Output__1": "#/components/schemas/BrowserClickAction", + "openhands__tools__browser_use__definition__BrowserCloseTabAction-Output__1": "#/components/schemas/BrowserCloseTabAction", + "openhands__tools__browser_use__definition__BrowserGetContentAction-Output__1": "#/components/schemas/BrowserGetContentAction", + "openhands__tools__browser_use__definition__BrowserGetStateAction-Output__1": "#/components/schemas/BrowserGetStateAction", + "openhands__tools__browser_use__definition__BrowserGetStorageAction-Output__1": "#/components/schemas/BrowserGetStorageAction", + "openhands__tools__browser_use__definition__BrowserGoBackAction-Output__1": "#/components/schemas/BrowserGoBackAction", + "openhands__tools__browser_use__definition__BrowserListTabsAction-Output__1": "#/components/schemas/BrowserListTabsAction", + "openhands__tools__browser_use__definition__BrowserNavigateAction-Output__1": "#/components/schemas/BrowserNavigateAction", + "openhands__tools__browser_use__definition__BrowserScrollAction-Output__1": "#/components/schemas/BrowserScrollAction", + "openhands__tools__browser_use__definition__BrowserSetStorageAction-Output__1": "#/components/schemas/BrowserSetStorageAction", + "openhands__tools__browser_use__definition__BrowserStartRecordingAction-Output__1": "#/components/schemas/BrowserStartRecordingAction", + "openhands__tools__browser_use__definition__BrowserStopRecordingAction-Output__1": "#/components/schemas/BrowserStopRecordingAction", + "openhands__tools__browser_use__definition__BrowserSwitchTabAction-Output__1": "#/components/schemas/BrowserSwitchTabAction", + "openhands__tools__browser_use__definition__BrowserTypeAction-Output__1": "#/components/schemas/BrowserTypeAction", + "openhands__tools__delegate__definition__DelegateAction-Output__1": "#/components/schemas/DelegateAction", + "openhands__tools__file_editor__definition__FileEditorAction-Output__1": "#/components/schemas/FileEditorAction", + "openhands__tools__gemini__edit__definition__EditAction-Output__1": "#/components/schemas/EditAction", + "openhands__tools__gemini__list_directory__definition__ListDirectoryAction-Output__1": "#/components/schemas/ListDirectoryAction", + "openhands__tools__gemini__read_file__definition__ReadFileAction-Output__1": "#/components/schemas/ReadFileAction", + "openhands__tools__gemini__write_file__definition__WriteFileAction-Output__1": "#/components/schemas/WriteFileAction", + "openhands__tools__glob__definition__GlobAction-Output__1": "#/components/schemas/GlobAction", + "openhands__tools__grep__definition__GrepAction-Output__1": "#/components/schemas/GrepAction", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorAction-Output__1": "#/components/schemas/PlanningFileEditorAction", + "openhands__tools__task_tracker__definition__TaskTrackerAction-Output__1": "#/components/schemas/TaskTrackerAction", + "openhands__tools__terminal__definition__TerminalAction-Output__1": "#/components/schemas/TerminalAction" + } + } + }, + "ActionEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "thought": { + "items": { + "$ref": "#/components/schemas/TextContent" + }, + "type": "array", + "title": "Thought", + "description": "The thought process of the agent before taking this action" + }, + "reasoning_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning Content", + "description": "Intermediate reasoning/thinking content from reasoning models" + }, + "thinking_blocks": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingBlock" + }, + { + "$ref": "#/components/schemas/RedactedThinkingBlock" + } + ] + }, + "type": "array", + "title": "Thinking Blocks", + "description": "Anthropic thinking blocks from the LLM response" + }, + "responses_reasoning_item": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningItemModel" + }, + { + "type": "null" + } + ], + "description": "OpenAI Responses reasoning item from model output" + }, + "action": { + "anyOf": [ + { + "$ref": "#/components/schemas/Action" + }, + { + "type": "null" + } + ], + "description": "Single tool call returned by LLM (None when non-executable)" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the tool being called" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The unique id returned by LLM API for this tool call" + }, + "tool_call": { + "$ref": "#/components/schemas/MessageToolCall", + "description": "The tool call received from the LLM response. We keep a copy of it so it is easier to construct it into LLM messageThis could be different from `action`: e.g., `tool_call` may contain `security_risk` field predicted by LLM when LLM risk analyzer is enabled, while `action` does not." + }, + "llm_response_id": { + "type": "string", + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this eventE.g., Can be used to group related actions from same LLM response. This helps in tracking and managing results of parallel function calling from the same LLM response." + }, + "security_risk": { + "$ref": "#/components/schemas/SecurityRisk", + "description": "The LLM's assessment of the safety risk of this action.", + "default": "UNKNOWN" + }, + "critic_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticResult" + }, + { + "type": "null" + } + ], + "description": "Optional critic evaluation of this action and preceding history." + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary", + "description": "A concise summary (approximately 10 words) of what this action does, provided by the LLM for explainability and debugging. Examples of good summaries: 'editing configuration file for deployment settings' | 'searching codebase for authentication function definitions' | 'installing required dependencies from package manifest' | 'running tests to verify bug fix' | 'viewing directory structure to locate source files'" + }, + "kind": { + "type": "string", + "const": "ActionEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "thought", + "tool_name", + "tool_call_id", + "tool_call", + "llm_response_id", + "kind" + ], + "title": "ActionEvent" + }, + "Agent-Input": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM-Input", + "description": "LLM configuration for the agent.", + "examples": [ + { + "api_key": "your_api_key_here", + "base_url": "https://llm-proxy.eval.all-hands.dev", + "model": "litellm_proxy/anthropic/claude-sonnet-4-5-20250929" + } + ] + }, + "tools": { + "items": { + "$ref": "#/components/schemas/Tool-Input" + }, + "type": "array", + "title": "Tools", + "description": "List of tools to initialize for the agent.", + "examples": [ + { + "name": "TerminalTool", + "params": {} + }, + { + "name": "FileEditorTool", + "params": {} + }, + { + "name": "TaskTrackerTool", + "params": {} + } + ] + }, + "mcp_config": { + "additionalProperties": true, + "type": "object", + "title": "Mcp Config", + "description": "Optional MCP configuration dictionary to create MCP tools.", + "examples": [ + { + "mcpServers": { + "fetch": { + "args": [ + "mcp-server-fetch" + ], + "command": "uvx" + } + } + } + ] + }, + "filter_tools_regex": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter Tools Regex", + "description": "Optional regex to filter the tools available to the agent by name. This is applied after any tools provided in `tools` and any MCP tools are added.", + "examples": [ + "^(?!repomix)(.*)|^repomix.*pack_codebase.*$" + ] + }, + "include_default_tools": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Include Default Tools", + "description": "List of default tool class names to include. By default, the agent includes 'FinishTool' and 'ThinkTool'. Set to an empty list to disable all default tools, or provide a subset to include only specific ones. Example: include_default_tools=['FinishTool'] to only include FinishTool, or include_default_tools=[] to disable all default tools.", + "examples": [ + [ + "FinishTool", + "ThinkTool" + ], + [ + "FinishTool" + ], + [] + ] + }, + "agent_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentContext-Input" + }, + { + "type": "null" + } + ], + "description": "Optional AgentContext to initialize the agent with specific context.", + "examples": [ + { + "skills": [ + { + "content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.", + "name": "AGENTS.md", + "type": "repo" + }, + { + "content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are", + "name": "flarglebargle", + "trigger": [ + "flarglebargle" + ], + "type": "knowledge" + } + ], + "system_message_suffix": "Always finish your response with the word 'yay!'", + "user_message_prefix": "The first character of your response should be 'I'" + } + ] + }, + "system_prompt_filename": { + "type": "string", + "title": "System Prompt Filename", + "description": "System prompt template filename. Can be either:\n- A relative filename (e.g., 'system_prompt.j2') loaded from the agent's prompts directory\n- An absolute path (e.g., '/path/to/custom_prompt.j2')", + "default": "system_prompt.j2" + }, + "security_policy_filename": { + "type": "string", + "title": "Security Policy Filename", + "description": "Security policy template filename. Can be either:\n- A relative filename (e.g., 'security_policy.j2') loaded from the agent's prompts directory\n- An absolute path (e.g., '/path/to/custom_security_policy.j2')", + "default": "security_policy.j2" + }, + "system_prompt_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "System Prompt Kwargs", + "description": "Optional kwargs to pass to the system prompt Jinja2 template.", + "examples": [ + { + "cli_mode": true + } + ] + }, + "condenser": { + "anyOf": [ + { + "$ref": "#/components/schemas/CondenserBase-Input" + }, + { + "type": "null" + } + ], + "description": "Optional condenser to use for condensing conversation history.", + "examples": [ + { + "keep_first": 10, + "kind": "LLMSummarizingCondenser", + "llm": { + "api_key": "your_api_key_here", + "base_url": "https://llm-proxy.eval.all-hands.dev", + "model": "litellm_proxy/anthropic/claude-sonnet-4-5-20250929" + }, + "max_size": 80 + } + ] + }, + "critic": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticBase-Input" + }, + { + "type": "null" + } + ], + "description": "EXPERIMENTAL: Optional critic to evaluate agent actions and messages in real-time. API and behavior may change without notice. May impact performance, especially in 'all_actions' mode.", + "examples": [ + { + "kind": "AgentFinishedCritic" + } + ] + }, + "kind": { + "type": "string", + "const": "Agent", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "llm" + ], + "title": "Agent", + "description": "Main agent implementation for OpenHands.\n\nThe Agent class provides the core functionality for running AI agents that can\ninteract with tools, process messages, and execute actions. It inherits from\nAgentBase and implements the agent execution logic. Critic-related functionality\nis provided by CriticMixin.\n\nExample:\n >>> from openhands.sdk import LLM, Agent, Tool\n >>> llm = LLM(model=\"claude-sonnet-4-20250514\", api_key=SecretStr(\"key\"))\n >>> tools = [Tool(name=\"TerminalTool\"), Tool(name=\"FileEditorTool\")]\n >>> agent = Agent(llm=llm, tools=tools)" + }, + "Agent-Output": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM-Output", + "description": "LLM configuration for the agent.", + "examples": [ + { + "api_key": "your_api_key_here", + "base_url": "https://llm-proxy.eval.all-hands.dev", + "model": "litellm_proxy/anthropic/claude-sonnet-4-5-20250929" + } + ] + }, + "tools": { + "items": { + "$ref": "#/components/schemas/openhands__sdk__tool__spec__Tool" + }, + "type": "array", + "title": "Tools", + "description": "List of tools to initialize for the agent.", + "examples": [ + { + "name": "TerminalTool", + "params": {} + }, + { + "name": "FileEditorTool", + "params": {} + }, + { + "name": "TaskTrackerTool", + "params": {} + } + ] + }, + "mcp_config": { + "additionalProperties": true, + "type": "object", + "title": "Mcp Config", + "description": "Optional MCP configuration dictionary to create MCP tools.", + "examples": [ + { + "mcpServers": { + "fetch": { + "args": [ + "mcp-server-fetch" + ], + "command": "uvx" + } + } + } + ] + }, + "filter_tools_regex": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter Tools Regex", + "description": "Optional regex to filter the tools available to the agent by name. This is applied after any tools provided in `tools` and any MCP tools are added.", + "examples": [ + "^(?!repomix)(.*)|^repomix.*pack_codebase.*$" + ] + }, + "include_default_tools": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Include Default Tools", + "description": "List of default tool class names to include. By default, the agent includes 'FinishTool' and 'ThinkTool'. Set to an empty list to disable all default tools, or provide a subset to include only specific ones. Example: include_default_tools=['FinishTool'] to only include FinishTool, or include_default_tools=[] to disable all default tools.", + "examples": [ + [ + "FinishTool", + "ThinkTool" + ], + [ + "FinishTool" + ], + [] + ] + }, + "agent_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentContext-Output" + }, + { + "type": "null" + } + ], + "description": "Optional AgentContext to initialize the agent with specific context.", + "examples": [ + { + "skills": [ + { + "content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.", + "name": "AGENTS.md", + "type": "repo" + }, + { + "content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are", + "name": "flarglebargle", + "trigger": [ + "flarglebargle" + ], + "type": "knowledge" + } + ], + "system_message_suffix": "Always finish your response with the word 'yay!'", + "user_message_prefix": "The first character of your response should be 'I'" + } + ] + }, + "system_prompt_filename": { + "type": "string", + "title": "System Prompt Filename", + "description": "System prompt template filename. Can be either:\n- A relative filename (e.g., 'system_prompt.j2') loaded from the agent's prompts directory\n- An absolute path (e.g., '/path/to/custom_prompt.j2')", + "default": "system_prompt.j2" + }, + "security_policy_filename": { + "type": "string", + "title": "Security Policy Filename", + "description": "Security policy template filename. Can be either:\n- A relative filename (e.g., 'security_policy.j2') loaded from the agent's prompts directory\n- An absolute path (e.g., '/path/to/custom_security_policy.j2')", + "default": "security_policy.j2" + }, + "system_prompt_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "System Prompt Kwargs", + "description": "Optional kwargs to pass to the system prompt Jinja2 template.", + "examples": [ + { + "cli_mode": true + } + ] + }, + "condenser": { + "anyOf": [ + { + "$ref": "#/components/schemas/CondenserBase-Output" + }, + { + "type": "null" + } + ], + "description": "Optional condenser to use for condensing conversation history.", + "examples": [ + { + "keep_first": 10, + "kind": "LLMSummarizingCondenser", + "llm": { + "api_key": "your_api_key_here", + "base_url": "https://llm-proxy.eval.all-hands.dev", + "model": "litellm_proxy/anthropic/claude-sonnet-4-5-20250929" + }, + "max_size": 80 + } + ] + }, + "critic": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticBase-Output" + }, + { + "type": "null" + } + ], + "description": "EXPERIMENTAL: Optional critic to evaluate agent actions and messages in real-time. API and behavior may change without notice. May impact performance, especially in 'all_actions' mode.", + "examples": [ + { + "kind": "AgentFinishedCritic" + } + ] + }, + "kind": { + "type": "string", + "const": "Agent", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "llm", + "kind" + ], + "title": "Agent", + "description": "Main agent implementation for OpenHands.\n\nThe Agent class provides the core functionality for running AI agents that can\ninteract with tools, process messages, and execute actions. It inherits from\nAgentBase and implements the agent execution logic. Critic-related functionality\nis provided by CriticMixin.\n\nExample:\n >>> from openhands.sdk import LLM, Agent, Tool\n >>> llm = LLM(model=\"claude-sonnet-4-20250514\", api_key=SecretStr(\"key\"))\n >>> tools = [Tool(name=\"TerminalTool\"), Tool(name=\"FileEditorTool\")]\n >>> agent = Agent(llm=llm, tools=tools)" + }, + "AgentBase-Input": { + "$ref": "#/components/schemas/Agent-Input" + }, + "AgentBase-Output": { + "$ref": "#/components/schemas/Agent-Output" + }, + "AgentContext-Input": { + "properties": { + "skills": { + "items": { + "$ref": "#/components/schemas/Skill" + }, + "type": "array", + "title": "Skills", + "description": "List of available skills that can extend the user's input." + }, + "system_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "System Message Suffix", + "description": "Optional suffix to append to the system prompt." + }, + "user_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Message Suffix", + "description": "Optional suffix to append to the user's message." + }, + "load_user_skills": { + "type": "boolean", + "title": "Load User Skills", + "description": "Whether to automatically load user skills from ~/.openhands/skills/ and ~/.openhands/microagents/ (for backward compatibility). ", + "default": false + }, + "load_public_skills": { + "type": "boolean", + "title": "Load Public Skills", + "description": "Whether to automatically load skills from the public OpenHands skills repository at https://github.com/OpenHands/extensions. This allows you to get the latest skills without SDK updates.", + "default": false + }, + "secrets": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/SecretSource-Input" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Secrets", + "description": "Dictionary mapping secret keys to values or secret sources. Secrets are used for authentication and sensitive data handling. Values can be either strings or SecretSource instances (str | SecretSource)." + }, + "current_datetime": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Datetime", + "description": "Current date and time information to provide to the agent. Can be a datetime object (which will be formatted as ISO 8601) or a pre-formatted string. When provided, this information is included in the system prompt to give the agent awareness of the current time context. Defaults to the current datetime." + } + }, + "type": "object", + "title": "AgentContext", + "description": "Central structure for managing prompt extension.\n\nAgentContext unifies all the contextual inputs that shape how the system\nextends and interprets user prompts. It combines both static environment\ndetails and dynamic, user-activated extensions from skills.\n\nSpecifically, it provides:\n- **Repository context / Repo Skills**: Information about the active codebase,\n branches, and repo-specific instructions contributed by repo skills.\n- **Runtime context**: Current execution environment (hosts, working\n directory, secrets, date, etc.).\n- **Conversation instructions**: Optional task- or channel-specific rules\n that constrain or guide the agent\u2019s behavior across the session.\n- **Knowledge Skills**: Extensible components that can be triggered by user input\n to inject knowledge or domain-specific guidance.\n\nTogether, these elements make AgentContext the primary container responsible\nfor assembling, formatting, and injecting all prompt-relevant context into\nLLM interactions." + }, + "AgentContext-Output": { + "properties": { + "skills": { + "items": { + "$ref": "#/components/schemas/Skill" + }, + "type": "array", + "title": "Skills", + "description": "List of available skills that can extend the user's input." + }, + "system_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "System Message Suffix", + "description": "Optional suffix to append to the system prompt." + }, + "user_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Message Suffix", + "description": "Optional suffix to append to the user's message." + }, + "load_user_skills": { + "type": "boolean", + "title": "Load User Skills", + "description": "Whether to automatically load user skills from ~/.openhands/skills/ and ~/.openhands/microagents/ (for backward compatibility). ", + "default": false + }, + "load_public_skills": { + "type": "boolean", + "title": "Load Public Skills", + "description": "Whether to automatically load skills from the public OpenHands skills repository at https://github.com/OpenHands/extensions. This allows you to get the latest skills without SDK updates.", + "default": false + }, + "secrets": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/SecretSource-Output" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Secrets", + "description": "Dictionary mapping secret keys to values or secret sources. Secrets are used for authentication and sensitive data handling. Values can be either strings or SecretSource instances (str | SecretSource)." + }, + "current_datetime": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Datetime", + "description": "Current date and time information to provide to the agent. Can be a datetime object (which will be formatted as ISO 8601) or a pre-formatted string. When provided, this information is included in the system prompt to give the agent awareness of the current time context. Defaults to the current datetime." + } + }, + "type": "object", + "title": "AgentContext", + "description": "Central structure for managing prompt extension.\n\nAgentContext unifies all the contextual inputs that shape how the system\nextends and interprets user prompts. It combines both static environment\ndetails and dynamic, user-activated extensions from skills.\n\nSpecifically, it provides:\n- **Repository context / Repo Skills**: Information about the active codebase,\n branches, and repo-specific instructions contributed by repo skills.\n- **Runtime context**: Current execution environment (hosts, working\n directory, secrets, date, etc.).\n- **Conversation instructions**: Optional task- or channel-specific rules\n that constrain or guide the agent\u2019s behavior across the session.\n- **Knowledge Skills**: Extensible components that can be triggered by user input\n to inject knowledge or domain-specific guidance.\n\nTogether, these elements make AgentContext the primary container responsible\nfor assembling, formatting, and injecting all prompt-relevant context into\nLLM interactions." + }, + "AgentErrorEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "error": { + "type": "string", + "title": "Error", + "description": "The error message from the scaffold" + }, + "kind": { + "type": "string", + "const": "AgentErrorEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "error", + "kind" + ], + "title": "AgentErrorEvent", + "description": "Error triggered by the agent.\n\nNote: This event should not contain model \"thought\" or \"reasoning_content\". It\nrepresents an error produced by the agent/scaffold, not model output." + }, + "AgentFinishedCritic-Input": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "AgentFinishedCritic", + "title": "Kind" + } + }, + "type": "object", + "title": "AgentFinishedCritic", + "description": "Critic that evaluates whether an agent properly finished a task.\n\nThis critic checks two main criteria:\n1. The agent's last action was a FinishAction (proper completion)\n2. The generated git patch is non-empty (actual changes were made)" + }, + "AgentFinishedCritic-Output": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "AgentFinishedCritic", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "AgentFinishedCritic", + "description": "Critic that evaluates whether an agent properly finished a task.\n\nThis critic checks two main criteria:\n1. The agent's last action was a FinishAction (proper completion)\n2. The generated git patch is non-empty (actual changes were made)" + }, + "AlwaysConfirm-Input": { + "properties": { + "kind": { + "type": "string", + "const": "AlwaysConfirm", + "title": "Kind" + } + }, + "type": "object", + "title": "AlwaysConfirm" + }, + "AlwaysConfirm-Output": { + "properties": { + "kind": { + "type": "string", + "const": "AlwaysConfirm", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "AlwaysConfirm" + }, + "AskAgentRequest": { + "properties": { + "question": { + "type": "string", + "title": "Question", + "description": "The question to ask the agent" + } + }, + "type": "object", + "required": [ + "question" + ], + "title": "AskAgentRequest", + "description": "Payload to ask the agent a simple question." + }, + "AskAgentResponse": { + "properties": { + "response": { + "type": "string", + "title": "Response", + "description": "The agent's response to the question" + } + }, + "type": "object", + "required": [ + "response" + ], + "title": "AskAgentResponse", + "description": "Response containing the agent's answer." + }, + "BaseWorkspace": { + "oneOf": [ + { + "$ref": "#/components/schemas/LocalWorkspace-Output" + }, + { + "$ref": "#/components/schemas/RemoteWorkspace" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__workspace__local__LocalWorkspace-Output__1": "#/components/schemas/LocalWorkspace-Output", + "openhands__sdk__workspace__remote__base__RemoteWorkspace-Output__1": "#/components/schemas/RemoteWorkspace" + } + } + }, + "BashCommand": { + "properties": { + "command": { + "type": "string", + "title": "Command", + "description": "The bash command to execute" + }, + "cwd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cwd", + "description": "The current working directory" + }, + "timeout": { + "type": "integer", + "title": "Timeout", + "description": "The max number of seconds a command may be permitted to run.", + "default": 300 + }, + "id": { + "type": "string", + "title": "Id" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "kind": { + "type": "string", + "const": "BashCommand", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "BashCommand" + }, + "BashEventBase": { + "oneOf": [ + { + "$ref": "#/components/schemas/BashCommand" + }, + { + "$ref": "#/components/schemas/BashOutput" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__agent_server__models__BashCommand-Output__1": "#/components/schemas/BashCommand", + "openhands__agent_server__models__BashOutput-Output__1": "#/components/schemas/BashOutput" + } + } + }, + "BashEventPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/BashEventBase" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "BashEventPage" + }, + "BashEventSortOrder": { + "type": "string", + "enum": [ + "TIMESTAMP", + "TIMESTAMP_DESC" + ], + "title": "BashEventSortOrder" + }, + "BashOutput": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp" + }, + "command_id": { + "type": "string", + "title": "Command Id" + }, + "order": { + "type": "integer", + "title": "Order", + "description": "The order for this output, sequentially starting with 0", + "default": 0 + }, + "exit_code": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Exit Code", + "description": "Exit code None implies the command is still running." + }, + "stdout": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stdout", + "description": "The standard output from the command" + }, + "stderr": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stderr", + "description": "The error output from the command" + }, + "kind": { + "type": "string", + "const": "BashOutput", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "command_id", + "kind" + ], + "title": "BashOutput", + "description": "Output of a bash command. A single command may have multiple pieces of output\ndepending on how large the output is." + }, + "Body_upload_file_api_file_upload__path__post": { + "properties": { + "file": { + "type": "string", + "contentMediaType": "application/octet-stream", + "title": "File" + } + }, + "type": "object", + "required": [ + "file" + ], + "title": "Body_upload_file_api_file_upload__path__post" + }, + "BrowserAction": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserAction", + "description": "Base class for all browser actions.\n\nThis base class serves as the parent for all browser-related actions,\nenabling proper type hierarchy and eliminating the need for union types." + }, + "BrowserClickAction": { + "properties": { + "index": { + "type": "integer", + "minimum": 0.0, + "title": "Index", + "description": "The index of the element to click (from browser_get_state)" + }, + "new_tab": { + "type": "boolean", + "title": "New Tab", + "description": "Whether to open any resulting navigation in a new tab. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserClickAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "index", + "kind" + ], + "title": "BrowserClickAction", + "description": "Schema for clicking elements." + }, + "BrowserClickTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserClickTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserClickTool", + "description": "Tool for clicking browser elements." + }, + "BrowserCloseTabAction": { + "properties": { + "tab_id": { + "type": "string", + "title": "Tab Id", + "description": "4 Character Tab ID of the tab to close (from browser_list_tabs)" + }, + "kind": { + "type": "string", + "const": "BrowserCloseTabAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tab_id", + "kind" + ], + "title": "BrowserCloseTabAction", + "description": "Schema for closing browser tabs." + }, + "BrowserCloseTabTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserCloseTabTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserCloseTabTool", + "description": "Tool for closing browser tabs." + }, + "BrowserGetContentAction": { + "properties": { + "extract_links": { + "type": "boolean", + "title": "Extract Links", + "description": "Whether to include links in the content (default: False)", + "default": false + }, + "start_from_char": { + "type": "integer", + "minimum": 0.0, + "title": "Start From Char", + "description": "Character index to start from in the page content (default: 0)", + "default": 0 + }, + "kind": { + "type": "string", + "const": "BrowserGetContentAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGetContentAction", + "description": "Schema for getting page content in markdown." + }, + "BrowserGetContentTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetContentTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGetContentTool", + "description": "Tool for getting page content in markdown." + }, + "BrowserGetStateAction": { + "properties": { + "include_screenshot": { + "type": "boolean", + "title": "Include Screenshot", + "description": "Whether to include a screenshot of the current page. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserGetStateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGetStateAction", + "description": "Schema for getting browser state." + }, + "BrowserGetStateTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetStateTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGetStateTool", + "description": "Tool for getting browser state." + }, + "BrowserGetStorageAction": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserGetStorageAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGetStorageAction", + "description": "Schema for getting browser storage (cookies, local storage, session storage)." + }, + "BrowserGetStorageTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetStorageTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGetStorageTool", + "description": "Tool for getting browser storage." + }, + "BrowserGoBackAction": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserGoBackAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGoBackAction", + "description": "Schema for going back in browser history." + }, + "BrowserGoBackTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGoBackTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGoBackTool", + "description": "Tool for going back in browser history." + }, + "BrowserListTabsAction": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserListTabsAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserListTabsAction", + "description": "Schema for listing browser tabs." + }, + "BrowserListTabsTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserListTabsTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserListTabsTool", + "description": "Tool for listing browser tabs." + }, + "BrowserNavigateAction": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "The URL to navigate to" + }, + "new_tab": { + "type": "boolean", + "title": "New Tab", + "description": "Whether to open in a new tab. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserNavigateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "url", + "kind" + ], + "title": "BrowserNavigateAction", + "description": "Schema for browser navigation." + }, + "BrowserNavigateTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserNavigateTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserNavigateTool", + "description": "Tool for browser navigation." + }, + "BrowserObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "screenshot_data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Screenshot Data", + "description": "Base64 screenshot data if available" + }, + "full_output_save_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Output Save Dir", + "description": "Directory where full output files are saved" + }, + "kind": { + "type": "string", + "const": "BrowserObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserObservation", + "description": "Base observation for browser operations." + }, + "BrowserScrollAction": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "up", + "down" + ], + "title": "Direction", + "description": "Direction to scroll. Options: 'up', 'down'. Default: 'down'", + "default": "down" + }, + "kind": { + "type": "string", + "const": "BrowserScrollAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserScrollAction", + "description": "Schema for scrolling the page." + }, + "BrowserScrollTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserScrollTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserScrollTool", + "description": "Tool for scrolling the browser page." + }, + "BrowserSetStorageAction": { + "properties": { + "storage_state": { + "additionalProperties": true, + "type": "object", + "title": "Storage State", + "description": "Storage state dictionary containing 'cookies' and 'origins' (from browser_get_storage)" + }, + "kind": { + "type": "string", + "const": "BrowserSetStorageAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "storage_state", + "kind" + ], + "title": "BrowserSetStorageAction", + "description": "Schema for setting browser storage (cookies, local storage, session storage)." + }, + "BrowserSetStorageTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserSetStorageTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserSetStorageTool", + "description": "Tool for setting browser storage." + }, + "BrowserStartRecordingAction": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserStartRecordingAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserStartRecordingAction", + "description": "Schema for starting browser session recording." + }, + "BrowserStartRecordingTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserStartRecordingTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserStartRecordingTool", + "description": "Tool for starting browser session recording." + }, + "BrowserStopRecordingAction": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserStopRecordingAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserStopRecordingAction", + "description": "Schema for stopping browser session recording." + }, + "BrowserStopRecordingTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserStopRecordingTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserStopRecordingTool", + "description": "Tool for stopping browser session recording." + }, + "BrowserSwitchTabAction": { + "properties": { + "tab_id": { + "type": "string", + "title": "Tab Id", + "description": "4 Character Tab ID of the tab to switch to (from browser_list_tabs)" + }, + "kind": { + "type": "string", + "const": "BrowserSwitchTabAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tab_id", + "kind" + ], + "title": "BrowserSwitchTabAction", + "description": "Schema for switching browser tabs." + }, + "BrowserSwitchTabTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserSwitchTabTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserSwitchTabTool", + "description": "Tool for switching browser tabs." + }, + "BrowserToolSet": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserToolSet", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserToolSet", + "description": "A set of all browser tools.\n\nThis tool set includes all available browser-related tools\n for interacting with web pages.\n\nThe toolset automatically checks for Chromium availability\nwhen created and automatically installs it if missing." + }, + "BrowserTypeAction": { + "properties": { + "index": { + "type": "integer", + "minimum": 0.0, + "title": "Index", + "description": "The index of the input element (from browser_get_state)" + }, + "text": { + "type": "string", + "title": "Text", + "description": "The text to type" + }, + "kind": { + "type": "string", + "const": "BrowserTypeAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "index", + "text", + "kind" + ], + "title": "BrowserTypeAction", + "description": "Schema for typing text into elements." + }, + "BrowserTypeTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserTypeTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserTypeTool", + "description": "Tool for typing text into browser elements." + }, + "CmdOutputMetadata": { + "properties": { + "exit_code": { + "type": "integer", + "title": "Exit Code", + "description": "The exit code of the last executed command.", + "default": -1 + }, + "pid": { + "type": "integer", + "title": "Pid", + "description": "The process ID of the last executed command.", + "default": -1 + }, + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Username", + "description": "The username of the current user." + }, + "hostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Hostname", + "description": "The hostname of the machine." + }, + "working_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Working Dir", + "description": "The current working directory." + }, + "py_interpreter_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Py Interpreter Path", + "description": "The path to the current Python interpreter, if any." + }, + "prefix": { + "type": "string", + "title": "Prefix", + "description": "Prefix to add to command output", + "default": "" + }, + "suffix": { + "type": "string", + "title": "Suffix", + "description": "Suffix to add to command output", + "default": "" + } + }, + "type": "object", + "title": "CmdOutputMetadata", + "description": "Additional metadata captured from PS1" + }, + "Condensation": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "forgotten_event_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Forgotten Event Ids", + "description": "The IDs of the events that are being forgotten (removed from the `View` given to the LLM)." + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary", + "description": "An optional summary of the events being forgotten." + }, + "summary_offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Summary Offset", + "description": "An optional offset to the start of the resulting view (after forgotten events have been removed) indicating where the summary should be inserted. If not provided, the summary will not be inserted into the view." + }, + "llm_response_id": { + "type": "string", + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this event" + }, + "kind": { + "type": "string", + "const": "Condensation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "llm_response_id", + "kind" + ], + "title": "Condensation", + "description": "This action indicates a condensation of the conversation history is happening." + }, + "CondensationRequest": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "kind": { + "type": "string", + "const": "CondensationRequest", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "CondensationRequest", + "description": "This action is used to request a condensation of the conversation history.\n\nAttributes:\n action (str): The action type, namely ActionType.CONDENSATION_REQUEST." + }, + "CondensationSummaryEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "kind": { + "type": "string", + "const": "CondensationSummaryEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "summary", + "kind" + ], + "title": "CondensationSummaryEvent", + "description": "This event represents a summary generated by a condenser." + }, + "CondenserBase-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/LLMSummarizingCondenser-Input" + }, + { + "$ref": "#/components/schemas/NoOpCondenser-Input" + }, + { + "$ref": "#/components/schemas/PipelineCondenser-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__context__condenser__llm_summarizing_condenser__LLMSummarizingCondenser-Input__1": "#/components/schemas/LLMSummarizingCondenser-Input", + "openhands__sdk__context__condenser__no_op_condenser__NoOpCondenser-Input__1": "#/components/schemas/NoOpCondenser-Input", + "openhands__sdk__context__condenser__pipeline_condenser__PipelineCondenser-Input__1": "#/components/schemas/PipelineCondenser-Input" + } + } + }, + "CondenserBase-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/LLMSummarizingCondenser-Output" + }, + { + "$ref": "#/components/schemas/NoOpCondenser-Output" + }, + { + "$ref": "#/components/schemas/PipelineCondenser-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__context__condenser__llm_summarizing_condenser__LLMSummarizingCondenser-Output__1": "#/components/schemas/LLMSummarizingCondenser-Output", + "openhands__sdk__context__condenser__no_op_condenser__NoOpCondenser-Output__1": "#/components/schemas/NoOpCondenser-Output", + "openhands__sdk__context__condenser__pipeline_condenser__PipelineCondenser-Output__1": "#/components/schemas/PipelineCondenser-Output" + } + } + }, + "ConfirmRisky-Input": { + "properties": { + "threshold": { + "$ref": "#/components/schemas/SecurityRisk", + "default": "HIGH" + }, + "confirm_unknown": { + "type": "boolean", + "title": "Confirm Unknown", + "default": true + }, + "kind": { + "type": "string", + "const": "ConfirmRisky", + "title": "Kind" + } + }, + "type": "object", + "title": "ConfirmRisky" + }, + "ConfirmRisky-Output": { + "properties": { + "threshold": { + "$ref": "#/components/schemas/SecurityRisk", + "default": "HIGH" + }, + "confirm_unknown": { + "type": "boolean", + "title": "Confirm Unknown", + "default": true + }, + "kind": { + "type": "string", + "const": "ConfirmRisky", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "ConfirmRisky" + }, + "ConfirmationPolicyBase-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/AlwaysConfirm-Input" + }, + { + "$ref": "#/components/schemas/ConfirmRisky-Input" + }, + { + "$ref": "#/components/schemas/NeverConfirm-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__security__confirmation_policy__AlwaysConfirm-Input__1": "#/components/schemas/AlwaysConfirm-Input", + "openhands__sdk__security__confirmation_policy__ConfirmRisky-Input__1": "#/components/schemas/ConfirmRisky-Input", + "openhands__sdk__security__confirmation_policy__NeverConfirm-Input__1": "#/components/schemas/NeverConfirm-Input" + } + } + }, + "ConfirmationPolicyBase-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/AlwaysConfirm-Output" + }, + { + "$ref": "#/components/schemas/ConfirmRisky-Output" + }, + { + "$ref": "#/components/schemas/NeverConfirm-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__security__confirmation_policy__AlwaysConfirm-Output__1": "#/components/schemas/AlwaysConfirm-Output", + "openhands__sdk__security__confirmation_policy__ConfirmRisky-Output__1": "#/components/schemas/ConfirmRisky-Output", + "openhands__sdk__security__confirmation_policy__NeverConfirm-Output__1": "#/components/schemas/NeverConfirm-Output" + } + } + }, + "ConfirmationResponseRequest": { + "properties": { + "accept": { + "type": "boolean", + "title": "Accept" + }, + "reason": { + "type": "string", + "title": "Reason", + "default": "User rejected the action." + } + }, + "type": "object", + "required": [ + "accept" + ], + "title": "ConfirmationResponseRequest", + "description": "Payload to accept or reject a pending action." + }, + "ConversationErrorEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "description": "The source of this event" + }, + "code": { + "type": "string", + "title": "Code", + "description": "Code for the error - typically a type" + }, + "detail": { + "type": "string", + "title": "Detail", + "description": "Details about the error" + }, + "kind": { + "type": "string", + "const": "ConversationErrorEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "code", + "detail", + "kind" + ], + "title": "ConversationErrorEvent", + "description": "Conversation-level failure that is NOT sent back to the LLM.\n\nThis event is emitted by the conversation runtime when an unexpected\nexception bubbles up and prevents the run loop from continuing. It is\nintended for client applications (e.g., UIs) to present a top-level error\nstate, and for orchestration to react. It is not an observation and it is\nnot LLM-convertible.\n\nDifferences from AgentErrorEvent:\n- Not tied to any tool_name/tool_call_id (AgentErrorEvent is a tool\n observation).\n- Typically source='environment' and the run loop moves to an ERROR state,\n while AgentErrorEvent has source='agent' and the conversation can\n continue." + }, + "ConversationExecutionStatus": { + "type": "string", + "enum": [ + "idle", + "running", + "paused", + "waiting_for_confirmation", + "finished", + "error", + "stuck", + "deleting" + ], + "title": "ConversationExecutionStatus", + "description": "Enum representing the current execution state of the conversation." + }, + "ConversationInfo": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id", + "description": "Unique conversation ID" + }, + "agent": { + "$ref": "#/components/schemas/AgentBase-Output", + "description": "The agent running in the conversation. This is persisted to allow resuming conversations and check agent configuration to handle e.g., tool changes, LLM changes, etc." + }, + "workspace": { + "$ref": "#/components/schemas/BaseWorkspace", + "description": "Workspace used by the agent to execute commands and read/write files. Not the process working directory." + }, + "persistence_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Persistence Dir", + "description": "Directory for persisting conversation state and events. If None, conversation will not be persisted.", + "default": "workspace/conversations" + }, + "max_iterations": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Max Iterations", + "description": "Maximum number of iterations the agent can perform in a single run.", + "default": 500 + }, + "stuck_detection": { + "type": "boolean", + "title": "Stuck Detection", + "description": "Whether to enable stuck detection for the agent.", + "default": true + }, + "execution_status": { + "$ref": "#/components/schemas/ConversationExecutionStatus", + "default": "idle" + }, + "confirmation_policy": { + "$ref": "#/components/schemas/ConfirmationPolicyBase-Output", + "default": { + "kind": "NeverConfirm" + } + }, + "security_analyzer": { + "anyOf": [ + { + "$ref": "#/components/schemas/SecurityAnalyzerBase-Output" + }, + { + "type": "null" + } + ], + "description": "Optional security analyzer to evaluate action risks." + }, + "activated_knowledge_skills": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Activated Knowledge Skills", + "description": "List of activated knowledge skills name" + }, + "blocked_actions": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Blocked Actions", + "description": "Actions blocked by PreToolUse hooks, keyed by action ID" + }, + "blocked_messages": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Blocked Messages", + "description": "Messages blocked by UserPromptSubmit hooks, keyed by message ID" + }, + "last_user_message_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last User Message Id", + "description": "Most recent user MessageEvent id for hook block checks. Updated when user messages are emitted so Agent.step can pop blocked_messages without scanning the event log. If None, hook-blocked checks are skipped (legacy conversations)." + }, + "stats": { + "$ref": "#/components/schemas/ConversationStats", + "description": "Conversation statistics for tracking LLM metrics" + }, + "secret_registry": { + "$ref": "#/components/schemas/SecretRegistry", + "description": "Registry for handling secrets and sensitive data" + }, + "agent_state": { + "additionalProperties": true, + "type": "object", + "title": "Agent State", + "description": "Dictionary for agent-specific runtime state that persists across iterations. Agents can store feature-specific state using string keys. To trigger autosave, always reassign: state.agent_state = {**state.agent_state, key: value}. See https://docs.openhands.dev/sdk/guides/convo-persistence#how-state-persistence-works" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "User-defined title for the conversation" + }, + "metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/MetricsSnapshot" + }, + { + "type": "null" + } + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "agent", + "workspace" + ], + "title": "ConversationInfo", + "description": "Information about a conversation running locally without a Runtime sandbox." + }, + "ConversationPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ConversationInfo" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "ConversationPage" + }, + "ConversationSortOrder": { + "type": "string", + "enum": [ + "CREATED_AT", + "UPDATED_AT", + "CREATED_AT_DESC", + "UPDATED_AT_DESC" + ], + "title": "ConversationSortOrder", + "description": "Enum for conversation sorting options." + }, + "ConversationStateUpdateEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "key": { + "type": "string", + "title": "Key", + "description": "Unique key for this state update event" + }, + "value": { + "title": "Value", + "description": "Serialized conversation state updates" + }, + "kind": { + "type": "string", + "const": "ConversationStateUpdateEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ConversationStateUpdateEvent", + "description": "Event that contains conversation state updates.\n\nThis event is sent via websocket whenever the conversation state changes,\nallowing remote clients to stay in sync without making REST API calls.\n\nAll fields are serialized versions of the corresponding ConversationState fields\nto ensure compatibility with websocket transmission." + }, + "ConversationStats": { + "additionalProperties": true, + "type": "object" + }, + "Cost": { + "properties": { + "model": { + "type": "string", + "title": "Model" + }, + "cost": { + "type": "number", + "minimum": 0.0, + "title": "Cost", + "description": "Cost must be non-negative" + }, + "timestamp": { + "type": "number", + "title": "Timestamp" + } + }, + "type": "object", + "required": [ + "model", + "cost" + ], + "title": "Cost" + }, + "CriticBase-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/AgentFinishedCritic-Input" + }, + { + "$ref": "#/components/schemas/APIBasedCritic-Input" + }, + { + "$ref": "#/components/schemas/EmptyPatchCritic-Input" + }, + { + "$ref": "#/components/schemas/PassCritic-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__critic__impl__agent_finished__AgentFinishedCritic-Input__1": "#/components/schemas/AgentFinishedCritic-Input", + "openhands__sdk__critic__impl__api__critic__APIBasedCritic-Input__1": "#/components/schemas/APIBasedCritic-Input", + "openhands__sdk__critic__impl__empty_patch__EmptyPatchCritic-Input__1": "#/components/schemas/EmptyPatchCritic-Input", + "openhands__sdk__critic__impl__pass_critic__PassCritic-Input__1": "#/components/schemas/PassCritic-Input" + } + } + }, + "CriticBase-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/AgentFinishedCritic-Output" + }, + { + "$ref": "#/components/schemas/APIBasedCritic-Output" + }, + { + "$ref": "#/components/schemas/EmptyPatchCritic-Output" + }, + { + "$ref": "#/components/schemas/PassCritic-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__critic__impl__agent_finished__AgentFinishedCritic-Output__1": "#/components/schemas/AgentFinishedCritic-Output", + "openhands__sdk__critic__impl__api__critic__APIBasedCritic-Output__1": "#/components/schemas/APIBasedCritic-Output", + "openhands__sdk__critic__impl__empty_patch__EmptyPatchCritic-Output__1": "#/components/schemas/EmptyPatchCritic-Output", + "openhands__sdk__critic__impl__pass_critic__PassCritic-Output__1": "#/components/schemas/PassCritic-Output" + } + } + }, + "CriticResult": { + "properties": { + "score": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Score", + "description": "A predicted probability of success between 0 and 1." + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message", + "description": "An optional message explaining the score." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata", + "description": "Optional metadata about the critic evaluation. Can include event_ids and categorized_features for visualization." + } + }, + "type": "object", + "required": [ + "score", + "message" + ], + "title": "CriticResult", + "description": "A critic result is a score and a message." + }, + "DelegateAction": { + "properties": { + "command": { + "type": "string", + "enum": [ + "spawn", + "delegate" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `spawn`, `delegate`." + }, + "ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Ids", + "description": "Required parameter of `spawn` command. List of identifiers to initialize sub-agents with." + }, + "agent_types": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Agent Types", + "description": "Optional parameter of `spawn` command. List of agent types for each ID (e.g., ['researcher', 'programmer']). If omitted or blank for an ID, the default general-purpose agent is used." + }, + "tasks": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Tasks", + "description": "Required parameter of `delegate` command. Dictionary mapping sub-agent identifiers to task descriptions." + }, + "kind": { + "type": "string", + "const": "DelegateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "DelegateAction", + "description": "Schema for delegation operations." + }, + "DelegateObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "spawn", + "delegate" + ], + "title": "Command", + "description": "The command that was executed" + }, + "kind": { + "type": "string", + "const": "DelegateObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "DelegateObservation", + "description": "Observation from delegation operations." + }, + "DelegateTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "DelegateTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "DelegateTool", + "description": "A ToolDefinition subclass that automatically initializes a DelegateExecutor." + }, + "DesktopUrlResponse": { + "properties": { + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "DesktopUrlResponse", + "description": "Response model for Desktop URL." + }, + "EditAction": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to modify." + }, + "old_string": { + "type": "string", + "title": "Old String", + "description": "The text to replace. To create a new file, use an empty string. Must match the exact text in the file including whitespace." + }, + "new_string": { + "type": "string", + "title": "New String", + "description": "The text to replace it with." + }, + "expected_replacements": { + "type": "integer", + "minimum": 0.0, + "title": "Expected Replacements", + "description": "Number of replacements expected. Defaults to 1. Use when you want to replace multiple occurrences. The edit will fail if the actual count doesn't match.", + "default": 1 + }, + "kind": { + "type": "string", + "const": "EditAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "old_string", + "new_string", + "kind" + ], + "title": "EditAction", + "description": "Schema for edit operation." + }, + "EditObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Path", + "description": "The file path that was edited." + }, + "is_new_file": { + "type": "boolean", + "title": "Is New File", + "description": "Whether a new file was created.", + "default": false + }, + "replacements_made": { + "type": "integer", + "title": "Replacements Made", + "description": "Number of replacements actually made.", + "default": 0 + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content after the edit." + }, + "kind": { + "type": "string", + "const": "EditObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "EditObservation", + "description": "Observation from editing a file." + }, + "EditTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "EditTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "EditTool", + "description": "Tool for editing files via find/replace." + }, + "EmptyPatchCritic-Input": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "EmptyPatchCritic", + "title": "Kind" + } + }, + "type": "object", + "title": "EmptyPatchCritic", + "description": "Critic that only evaluates whether a git patch is non-empty.\n\nThis critic checks only one criterion:\n- The generated git patch is non-empty (actual changes were made)\n\nUnlike AgentFinishedCritic, this critic does not check for proper\nagent completion with FinishAction." + }, + "EmptyPatchCritic-Output": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "EmptyPatchCritic", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "EmptyPatchCritic", + "description": "Critic that only evaluates whether a git patch is non-empty.\n\nThis critic checks only one criterion:\n- The generated git patch is non-empty (actual changes were made)\n\nUnlike AgentFinishedCritic, this critic does not check for proper\nagent completion with FinishAction." + }, + "Event": { + "oneOf": [ + { + "$ref": "#/components/schemas/Condensation" + }, + { + "$ref": "#/components/schemas/CondensationRequest" + }, + { + "$ref": "#/components/schemas/CondensationSummaryEvent" + }, + { + "$ref": "#/components/schemas/ConversationErrorEvent" + }, + { + "$ref": "#/components/schemas/ConversationStateUpdateEvent" + }, + { + "$ref": "#/components/schemas/LLMCompletionLogEvent" + }, + { + "$ref": "#/components/schemas/ActionEvent" + }, + { + "$ref": "#/components/schemas/MessageEvent" + }, + { + "$ref": "#/components/schemas/AgentErrorEvent" + }, + { + "$ref": "#/components/schemas/ObservationEvent" + }, + { + "$ref": "#/components/schemas/UserRejectObservation" + }, + { + "$ref": "#/components/schemas/SystemPromptEvent" + }, + { + "$ref": "#/components/schemas/TokenEvent" + }, + { + "$ref": "#/components/schemas/PauseEvent" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__event__condenser__Condensation-Output__1": "#/components/schemas/Condensation", + "openhands__sdk__event__condenser__CondensationRequest-Output__1": "#/components/schemas/CondensationRequest", + "openhands__sdk__event__condenser__CondensationSummaryEvent-Output__1": "#/components/schemas/CondensationSummaryEvent", + "openhands__sdk__event__conversation_error__ConversationErrorEvent-Output__1": "#/components/schemas/ConversationErrorEvent", + "openhands__sdk__event__conversation_state__ConversationStateUpdateEvent-Output__1": "#/components/schemas/ConversationStateUpdateEvent", + "openhands__sdk__event__llm_completion_log__LLMCompletionLogEvent-Output__1": "#/components/schemas/LLMCompletionLogEvent", + "openhands__sdk__event__llm_convertible__action__ActionEvent-Output__1": "#/components/schemas/ActionEvent", + "openhands__sdk__event__llm_convertible__message__MessageEvent-Output__1": "#/components/schemas/MessageEvent", + "openhands__sdk__event__llm_convertible__observation__AgentErrorEvent-Output__1": "#/components/schemas/AgentErrorEvent", + "openhands__sdk__event__llm_convertible__observation__ObservationEvent-Output__1": "#/components/schemas/ObservationEvent", + "openhands__sdk__event__llm_convertible__observation__UserRejectObservation-Output__1": "#/components/schemas/UserRejectObservation", + "openhands__sdk__event__llm_convertible__system__SystemPromptEvent-Output__1": "#/components/schemas/SystemPromptEvent", + "openhands__sdk__event__token__TokenEvent-Output__1": "#/components/schemas/TokenEvent", + "openhands__sdk__event__user_action__PauseEvent-Output__1": "#/components/schemas/PauseEvent" + } + } + }, + "EventPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Event" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "EventPage" + }, + "EventSortOrder": { + "type": "string", + "enum": [ + "TIMESTAMP", + "TIMESTAMP_DESC" + ], + "title": "EventSortOrder", + "description": "Enum for event sorting options." + }, + "ExecuteBashRequest": { + "properties": { + "command": { + "type": "string", + "title": "Command", + "description": "The bash command to execute" + }, + "cwd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cwd", + "description": "The current working directory" + }, + "timeout": { + "type": "integer", + "title": "Timeout", + "description": "The max number of seconds a command may be permitted to run.", + "default": 300 + } + }, + "type": "object", + "required": [ + "command" + ], + "title": "ExecuteBashRequest" + }, + "ExposedUrl": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "url": { + "type": "string", + "title": "Url" + }, + "port": { + "type": "integer", + "title": "Port" + } + }, + "type": "object", + "required": [ + "name", + "url", + "port" + ], + "title": "ExposedUrl", + "description": "Represents an exposed URL from the sandbox." + }, + "FallbackStrategy": { + "properties": { + "fallback_llms": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Fallback Llms", + "description": "Ordered list of LLM profile names to try on transient failure." + }, + "profile_store_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "path" + }, + { + "type": "null" + } + ], + "title": "Profile Store Dir", + "description": "Path to directory containing profiles. If not specified, defaults to `.openhands/profiles`." + } + }, + "type": "object", + "required": [ + "fallback_llms" + ], + "title": "FallbackStrategy", + "description": "Encapsulates fallback behavior for LLM calls.\n\nWhen the primary LLM fails with a transient error (after retries),\nthis strategy tries alternate LLMs loaded from LLMProfileStore profiles.\nFallback is per-call: each new request starts with the primary model." + }, + "FileEditorAction": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to file or directory." + }, + "file_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Text", + "description": "Required parameter of `create` command, with the content of the file to be created." + }, + "old_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Str", + "description": "Required parameter of `str_replace` command containing the string in `path` to replace." + }, + "new_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Str", + "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert." + }, + "insert_line": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Insert Line", + "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`." + }, + "view_range": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "View Range", + "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file." + }, + "kind": { + "type": "string", + "const": "FileEditorAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "path", + "kind" + ], + "title": "FileEditorAction", + "description": "Schema for file editor operations." + }, + "FileEditorObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The command that was run: `view`, `create`, `str_replace`, `insert`, or `undo_edit`." + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The file path that was edited." + }, + "prev_exist": { + "type": "boolean", + "title": "Prev Exist", + "description": "Indicates if the file previously existed. If not, it was created.", + "default": true + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content of the file before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content of the file after the edit." + }, + "kind": { + "type": "string", + "const": "FileEditorObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "FileEditorObservation", + "description": "A ToolResult that can be rendered as a CLI output." + }, + "FileEditorTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "FileEditorTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "FileEditorTool", + "description": "A ToolDefinition subclass that automatically initializes a FileEditorExecutor." + }, + "FileEntry": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the file or directory" + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to the file or directory" + }, + "is_directory": { + "type": "boolean", + "title": "Is Directory", + "description": "Whether this entry is a directory" + }, + "size": { + "type": "integer", + "title": "Size", + "description": "Size of the file in bytes (0 for directories)" + }, + "modified_time": { + "type": "string", + "format": "date-time", + "title": "Modified Time", + "description": "Last modified timestamp" + } + }, + "type": "object", + "required": [ + "name", + "path", + "is_directory", + "size", + "modified_time" + ], + "title": "FileEntry", + "description": "Information about a file or directory." + }, + "FinishAction": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "description": "Final message to send to the user." + }, + "kind": { + "type": "string", + "const": "FinishAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "message", + "kind" + ], + "title": "FinishAction" + }, + "FinishObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "kind": { + "type": "string", + "const": "FinishObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "FinishObservation", + "description": "Observation returned after finishing a task.\nThe FinishAction itself contains the message sent to the user so no\nextra fields are needed here." + }, + "FinishTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "FinishTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "FinishTool", + "description": "Tool for signaling the completion of a task or conversation." + }, + "GenerateTitleRequest": { + "properties": { + "max_length": { + "type": "integer", + "maximum": 200.0, + "minimum": 1.0, + "title": "Max Length", + "description": "Maximum length of the generated title", + "default": 50 + }, + "llm": { + "anyOf": [ + { + "$ref": "#/components/schemas/LLM-Input" + }, + { + "type": "null" + } + ], + "description": "Optional LLM to use for title generation" + } + }, + "type": "object", + "title": "GenerateTitleRequest", + "description": "Payload to generate a title for a conversation." + }, + "GenerateTitleResponse": { + "properties": { + "title": { + "type": "string", + "title": "Title", + "description": "The generated title for the conversation" + } + }, + "type": "object", + "required": [ + "title" + ], + "title": "GenerateTitleResponse", + "description": "Response containing the generated conversation title." + }, + "GitChange": { + "properties": { + "status": { + "$ref": "#/components/schemas/GitChangeStatus" + }, + "path": { + "type": "string", + "format": "path", + "title": "Path" + } + }, + "type": "object", + "required": [ + "status", + "path" + ], + "title": "GitChange" + }, + "GitChangeStatus": { + "type": "string", + "enum": [ + "MOVED", + "ADDED", + "DELETED", + "UPDATED" + ], + "title": "GitChangeStatus" + }, + "GitDiff": { + "properties": { + "modified": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Modified" + }, + "original": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Original" + } + }, + "type": "object", + "required": [ + "modified", + "original" + ], + "title": "GitDiff" + }, + "GlobAction": { + "properties": { + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The glob pattern to match files (e.g., \"**/*.js\", \"src/**/*.ts\")" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The directory (absolute path) to search in. Defaults to the current working directory." + }, + "kind": { + "type": "string", + "const": "GlobAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pattern", + "kind" + ], + "title": "GlobAction", + "description": "Schema for glob pattern matching operations." + }, + "GlobObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "files": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Files", + "description": "List of matching file paths sorted by modification time" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The glob pattern that was used" + }, + "search_path": { + "type": "string", + "title": "Search Path", + "description": "The directory that was searched" + }, + "truncated": { + "type": "boolean", + "title": "Truncated", + "description": "Whether results were truncated to 100 files", + "default": false + }, + "kind": { + "type": "string", + "const": "GlobObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "files", + "pattern", + "search_path", + "kind" + ], + "title": "GlobObservation", + "description": "Observation from glob pattern matching operations." + }, + "GlobTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "GlobTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "GlobTool", + "description": "A ToolDefinition subclass that automatically initializes a GlobExecutor." + }, + "GraySwanAnalyzer-Input": { + "properties": { + "history_limit": { + "type": "integer", + "title": "History Limit", + "description": "Number of recent events to include as context", + "default": 20 + }, + "max_message_chars": { + "type": "integer", + "title": "Max Message Chars", + "description": "Max characters for conversation processing", + "default": 30000 + }, + "timeout": { + "type": "number", + "title": "Timeout", + "description": "Request timeout in seconds", + "default": 30.0 + }, + "low_threshold": { + "type": "number", + "title": "Low Threshold", + "description": "Risk threshold for LOW classification (score <= threshold)", + "default": 0.3 + }, + "medium_threshold": { + "type": "number", + "title": "Medium Threshold", + "description": "Risk threshold for MEDIUM classification (score <= threshold)", + "default": 0.7 + }, + "api_url": { + "type": "string", + "title": "Api Url", + "description": "GraySwan Cygnal API endpoint", + "default": "https://api.grayswan.ai/cygnal/monitor" + }, + "api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "GraySwan API key (via GRAYSWAN_API_KEY env var)" + }, + "policy_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Policy Id", + "description": "GraySwan policy ID (via GRAYSWAN_POLICY_ID env var)" + }, + "kind": { + "type": "string", + "const": "GraySwanAnalyzer", + "title": "Kind" + } + }, + "type": "object", + "title": "GraySwanAnalyzer", + "description": "Security analyzer using GraySwan's Cygnal API for AI safety monitoring.\n\nThis analyzer sends conversation history and pending actions to the GraySwan\nCygnal API for security analysis. The API returns a violation score which is\nmapped to SecurityRisk levels.\n\nEnvironment Variables:\n GRAYSWAN_API_KEY: Required API key for GraySwan authentication\n GRAYSWAN_POLICY_ID: Optional policy ID for custom GraySwan policy\n\nExample:\n >>> from openhands.sdk.security.grayswan import GraySwanAnalyzer\n >>> analyzer = GraySwanAnalyzer()\n >>> risk = analyzer.security_risk(action_event)" + }, + "GraySwanAnalyzer-Output": { + "properties": { + "history_limit": { + "type": "integer", + "title": "History Limit", + "description": "Number of recent events to include as context", + "default": 20 + }, + "max_message_chars": { + "type": "integer", + "title": "Max Message Chars", + "description": "Max characters for conversation processing", + "default": 30000 + }, + "timeout": { + "type": "number", + "title": "Timeout", + "description": "Request timeout in seconds", + "default": 30.0 + }, + "low_threshold": { + "type": "number", + "title": "Low Threshold", + "description": "Risk threshold for LOW classification (score <= threshold)", + "default": 0.3 + }, + "medium_threshold": { + "type": "number", + "title": "Medium Threshold", + "description": "Risk threshold for MEDIUM classification (score <= threshold)", + "default": 0.7 + }, + "api_url": { + "type": "string", + "title": "Api Url", + "description": "GraySwan Cygnal API endpoint", + "default": "https://api.grayswan.ai/cygnal/monitor" + }, + "api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "GraySwan API key (via GRAYSWAN_API_KEY env var)" + }, + "policy_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Policy Id", + "description": "GraySwan policy ID (via GRAYSWAN_POLICY_ID env var)" + }, + "kind": { + "type": "string", + "const": "GraySwanAnalyzer", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "GraySwanAnalyzer", + "description": "Security analyzer using GraySwan's Cygnal API for AI safety monitoring.\n\nThis analyzer sends conversation history and pending actions to the GraySwan\nCygnal API for security analysis. The API returns a violation score which is\nmapped to SecurityRisk levels.\n\nEnvironment Variables:\n GRAYSWAN_API_KEY: Required API key for GraySwan authentication\n GRAYSWAN_POLICY_ID: Optional policy ID for custom GraySwan policy\n\nExample:\n >>> from openhands.sdk.security.grayswan import GraySwanAnalyzer\n >>> analyzer = GraySwanAnalyzer()\n >>> risk = analyzer.security_risk(action_event)" + }, + "GrepAction": { + "properties": { + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The regex pattern to search for in file contents" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The directory (absolute path) to search in. Defaults to the current working directory." + }, + "include": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Include", + "description": "Optional file pattern to filter which files to search (e.g., \"*.js\", \"*.{ts,tsx}\")" + }, + "kind": { + "type": "string", + "const": "GrepAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pattern", + "kind" + ], + "title": "GrepAction", + "description": "Schema for grep content search operations." + }, + "GrepObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "matches": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Matches", + "description": "List of file paths containing the pattern" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The regex pattern that was used" + }, + "search_path": { + "type": "string", + "title": "Search Path", + "description": "The directory that was searched" + }, + "include_pattern": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Include Pattern", + "description": "The file pattern filter that was used" + }, + "truncated": { + "type": "boolean", + "title": "Truncated", + "description": "Whether results were truncated to 100 files", + "default": false + }, + "kind": { + "type": "string", + "const": "GrepObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "matches", + "pattern", + "search_path", + "kind" + ], + "title": "GrepObservation", + "description": "Observation from grep content search operations." + }, + "GrepTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "GrepTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "GrepTool", + "description": "A ToolDefinition subclass that automatically initializes a GrepExecutor." + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "HookConfig-Input": { + "properties": { + "pre_tool_use": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Input" + }, + "type": "array", + "title": "Pre Tool Use", + "description": "Hooks that run before tool execution" + }, + "post_tool_use": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Input" + }, + "type": "array", + "title": "Post Tool Use", + "description": "Hooks that run after tool execution" + }, + "user_prompt_submit": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Input" + }, + "type": "array", + "title": "User Prompt Submit", + "description": "Hooks that run when user submits a prompt" + }, + "session_start": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Input" + }, + "type": "array", + "title": "Session Start", + "description": "Hooks that run when a session starts" + }, + "session_end": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Input" + }, + "type": "array", + "title": "Session End", + "description": "Hooks that run when a session ends" + }, + "stop": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Input" + }, + "type": "array", + "title": "Stop", + "description": "Hooks that run when the agent attempts to stop" + } + }, + "additionalProperties": false, + "type": "object", + "title": "HookConfig", + "description": "Configuration for all hooks.\n\nHooks can be configured either by loading from `.openhands/hooks.json` or\nby directly instantiating with typed fields:\n\n # Direct instantiation with typed fields (recommended):\n config = HookConfig(\n pre_tool_use=[\n HookMatcher(\n matcher=\"terminal\",\n hooks=[HookDefinition(command=\"block_dangerous.sh\")]\n )\n ]\n )\n\n # Load from JSON file:\n config = HookConfig.load(\".openhands/hooks.json\")" + }, + "HookConfig-Output": { + "properties": { + "pre_tool_use": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Output" + }, + "type": "array", + "title": "Pre Tool Use", + "description": "Hooks that run before tool execution" + }, + "post_tool_use": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Output" + }, + "type": "array", + "title": "Post Tool Use", + "description": "Hooks that run after tool execution" + }, + "user_prompt_submit": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Output" + }, + "type": "array", + "title": "User Prompt Submit", + "description": "Hooks that run when user submits a prompt" + }, + "session_start": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Output" + }, + "type": "array", + "title": "Session Start", + "description": "Hooks that run when a session starts" + }, + "session_end": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Output" + }, + "type": "array", + "title": "Session End", + "description": "Hooks that run when a session ends" + }, + "stop": { + "items": { + "$ref": "#/components/schemas/HookMatcher-Output" + }, + "type": "array", + "title": "Stop", + "description": "Hooks that run when the agent attempts to stop" + } + }, + "additionalProperties": false, + "type": "object", + "title": "HookConfig", + "description": "Configuration for all hooks.\n\nHooks can be configured either by loading from `.openhands/hooks.json` or\nby directly instantiating with typed fields:\n\n # Direct instantiation with typed fields (recommended):\n config = HookConfig(\n pre_tool_use=[\n HookMatcher(\n matcher=\"terminal\",\n hooks=[HookDefinition(command=\"block_dangerous.sh\")]\n )\n ]\n )\n\n # Load from JSON file:\n config = HookConfig.load(\".openhands/hooks.json\")" + }, + "HookDefinition": { + "properties": { + "type": { + "$ref": "#/components/schemas/HookType", + "default": "command" + }, + "command": { + "type": "string", + "title": "Command" + }, + "timeout": { + "type": "integer", + "title": "Timeout", + "default": 60 + }, + "async": { + "type": "boolean", + "title": "Async", + "default": false + } + }, + "type": "object", + "required": [ + "command" + ], + "title": "HookDefinition", + "description": "A single hook definition." + }, + "HookMatcher-Input": { + "properties": { + "matcher": { + "type": "string", + "title": "Matcher", + "default": "*" + }, + "hooks": { + "items": { + "$ref": "#/components/schemas/HookDefinition" + }, + "type": "array", + "title": "Hooks" + } + }, + "type": "object", + "title": "HookMatcher", + "description": "Matches events to hooks based on patterns.\n\nSupports exact match, wildcard (*), and regex (auto-detected or /pattern/)." + }, + "HookMatcher-Output": { + "properties": { + "matcher": { + "type": "string", + "title": "Matcher", + "default": "*" + }, + "hooks": { + "items": { + "$ref": "#/components/schemas/HookDefinition" + }, + "type": "array", + "title": "Hooks" + } + }, + "type": "object", + "title": "HookMatcher", + "description": "Matches events to hooks based on patterns.\n\nSupports exact match, wildcard (*), and regex (auto-detected or /pattern/)." + }, + "HookType": { + "type": "string", + "enum": [ + "command", + "prompt" + ], + "title": "HookType", + "description": "Types of hooks that can be executed." + }, + "HooksRequest": { + "properties": { + "project_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Project Dir", + "description": "Workspace directory path for project hooks" + } + }, + "type": "object", + "title": "HooksRequest", + "description": "Request body for loading hooks." + }, + "HooksResponse": { + "properties": { + "hook_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HookConfig-Output" + }, + { + "type": "null" + } + ], + "description": "Hook configuration loaded from the workspace, or None if not found" + } + }, + "type": "object", + "title": "HooksResponse", + "description": "Response containing hooks configuration." + }, + "Icon": { + "properties": { + "src": { + "type": "string", + "title": "Src" + }, + "mimeType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Mimetype" + }, + "sizes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sizes" + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "src" + ], + "title": "Icon", + "description": "An icon for display in user interfaces." + }, + "ImageContent": { + "properties": { + "cache_prompt": { + "type": "boolean", + "title": "Cache Prompt", + "default": false + }, + "type": { + "type": "string", + "const": "image", + "title": "Type", + "default": "image" + }, + "image_urls": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Image Urls" + } + }, + "type": "object", + "required": [ + "image_urls" + ], + "title": "ImageContent" + }, + "InputMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the input parameter" + }, + "description": { + "type": "string", + "title": "Description", + "description": "Description of the input parameter" + } + }, + "type": "object", + "required": [ + "name", + "description" + ], + "title": "InputMetadata", + "description": "Metadata for task skill inputs." + }, + "IterativeRefinementConfig": { + "properties": { + "success_threshold": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Success Threshold", + "description": "Score threshold (0-1) to consider task successful.", + "default": 0.6 + }, + "max_iterations": { + "type": "integer", + "minimum": 1.0, + "title": "Max Iterations", + "description": "Maximum number of iterations before giving up.", + "default": 3 + } + }, + "type": "object", + "title": "IterativeRefinementConfig", + "description": "Configuration for iterative refinement based on critic feedback.\n\nWhen attached to a CriticBase, the Conversation.run() method will\nautomatically retry the task if the critic score is below the threshold.\n\nExample:\n critic = APIBasedCritic(\n server_url=\"...\",\n api_key=\"...\",\n model_name=\"critic\",\n iterative_refinement=IterativeRefinementConfig(\n success_threshold=0.7,\n max_iterations=3,\n ),\n )\n agent = Agent(llm=llm, tools=tools, critic=critic)\n conversation = Conversation(agent=agent, workspace=workspace)\n conversation.send_message(\"Create a calculator module...\")\n conversation.run() # Will automatically retry if critic score < 0.7" + }, + "KeywordTrigger": { + "properties": { + "type": { + "type": "string", + "const": "keyword", + "title": "Type", + "default": "keyword" + }, + "keywords": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Keywords" + } + }, + "type": "object", + "required": [ + "keywords" + ], + "title": "KeywordTrigger", + "description": "Trigger for keyword-based skills.\n\nThese skills are activated when specific keywords appear in the user's query." + }, + "LLM-Input": { + "properties": { + "model": { + "type": "string", + "title": "Model", + "description": "Model name.", + "default": "claude-sonnet-4-20250514" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "API key." + }, + "base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Url", + "description": "Custom base URL." + }, + "api_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Version", + "description": "API version (e.g., Azure)." + }, + "aws_access_key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Aws Access Key Id" + }, + "aws_secret_access_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Aws Secret Access Key" + }, + "aws_region_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Aws Region Name" + }, + "openrouter_site_url": { + "type": "string", + "title": "Openrouter Site Url", + "default": "https://docs.all-hands.dev/" + }, + "openrouter_app_name": { + "type": "string", + "title": "Openrouter App Name", + "default": "OpenHands" + }, + "num_retries": { + "type": "integer", + "minimum": 0.0, + "title": "Num Retries", + "default": 5 + }, + "retry_multiplier": { + "type": "number", + "minimum": 0.0, + "title": "Retry Multiplier", + "default": 8.0 + }, + "retry_min_wait": { + "type": "integer", + "minimum": 0.0, + "title": "Retry Min Wait", + "default": 8 + }, + "retry_max_wait": { + "type": "integer", + "minimum": 0.0, + "title": "Retry Max Wait", + "default": 64 + }, + "timeout": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Timeout", + "description": "HTTP timeout in seconds. Default is 300s (5 minutes). Set to None to disable timeout (not recommended for production).", + "default": 300 + }, + "max_message_chars": { + "type": "integer", + "minimum": 1.0, + "title": "Max Message Chars", + "description": "Approx max chars in each event/content sent to the LLM.", + "default": 30000 + }, + "temperature": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "Sampling temperature for response generation. Defaults to 0 for most models and provider default for reasoning models." + }, + "top_p": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Top P", + "default": 1.0 + }, + "top_k": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Top K" + }, + "max_input_tokens": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Input Tokens", + "description": "The maximum number of input tokens. Note that this is currently unused, and the value at runtime is actually the total tokens in OpenAI (e.g. 128,000 tokens for GPT-4)." + }, + "max_output_tokens": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Output Tokens", + "description": "The maximum number of output tokens. This is sent to the LLM." + }, + "model_canonical_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Canonical Name", + "description": "Optional canonical model name for feature registry lookups. The OpenHands SDK maintains a model feature registry that maps model names to capabilities (e.g., vision support, prompt caching, responses API support). When using proxied or aliased model identifiers, set this field to the canonical model name (e.g., 'openai/gpt-4o') to ensure correct capability detection. If not provided, the 'model' field will be used for capability lookups." + }, + "extra_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extra Headers", + "description": "Optional HTTP headers to forward to LiteLLM requests." + }, + "input_cost_per_token": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Input Cost Per Token", + "description": "The cost per input token. This will available in logs for user." + }, + "output_cost_per_token": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Output Cost Per Token", + "description": "The cost per output token. This will available in logs for user." + }, + "ollama_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ollama Base Url" + }, + "stream": { + "type": "boolean", + "title": "Stream", + "description": "Enable streaming responses from the LLM. When enabled, the provided `on_token` callback in .completions and .responses will be invoked for each chunk of tokens.", + "default": false + }, + "drop_params": { + "type": "boolean", + "title": "Drop Params", + "default": true + }, + "modify_params": { + "type": "boolean", + "title": "Modify Params", + "description": "Modify params allows litellm to do transformations like adding a default message, when a message is empty.", + "default": true + }, + "disable_vision": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Vision", + "description": "If model is vision capable, this option allows to disable image processing (useful for cost reduction)." + }, + "disable_stop_word": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Stop Word", + "description": "Disable using of stop word.", + "default": false + }, + "caching_prompt": { + "type": "boolean", + "title": "Caching Prompt", + "description": "Enable caching of prompts.", + "default": true + }, + "log_completions": { + "type": "boolean", + "title": "Log Completions", + "description": "Enable logging of completions.", + "default": false + }, + "log_completions_folder": { + "type": "string", + "title": "Log Completions Folder", + "description": "The folder to log LLM completions to. Required if log_completions is True.", + "default": "logs/completions" + }, + "custom_tokenizer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Tokenizer", + "description": "A custom tokenizer to use for token counting." + }, + "native_tool_calling": { + "type": "boolean", + "title": "Native Tool Calling", + "description": "Whether to use native tool calling.", + "default": true + }, + "force_string_serializer": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force String Serializer", + "description": "Force using string content serializer when sending to LLM API. If None (default), auto-detect based on model. Useful for providers that do not support list content, like HuggingFace and Groq." + }, + "reasoning_effort": { + "anyOf": [ + { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "xhigh", + "none" + ] + }, + { + "type": "null" + } + ], + "title": "Reasoning Effort", + "description": "The effort to put into reasoning. This is a string that can be one of 'low', 'medium', 'high', 'xhigh', or 'none'. Can apply to all reasoning models.", + "default": "high" + }, + "reasoning_summary": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ] + }, + { + "type": "null" + } + ], + "title": "Reasoning Summary", + "description": "The level of detail for reasoning summaries. This is a string that can be one of 'auto', 'concise', or 'detailed'. Requires verified OpenAI organization. Only sent when explicitly set." + }, + "enable_encrypted_reasoning": { + "type": "boolean", + "title": "Enable Encrypted Reasoning", + "description": "If True, ask for ['reasoning.encrypted_content'] in Responses API include.", + "default": true + }, + "prompt_cache_retention": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Cache Retention", + "description": "Retention policy for prompt cache. Only sent for GPT-5+ models; explicitly stripped for all other models.", + "default": "24h" + }, + "extended_thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Extended Thinking Budget", + "description": "The budget tokens for extended thinking, supported by Anthropic models.", + "default": 200000 + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "The seed to use for random number generation." + }, + "safety_settings": { + "anyOf": [ + { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Safety Settings", + "description": "Deprecated: Safety settings for models that support them (like Mistral AI and Gemini). This field is deprecated in 1.10.0 and will be removed in 1.15.0. Safety settings are designed for consumer-facing content moderation, which is not relevant for coding agents." + }, + "usage_id": { + "type": "string", + "title": "Usage Id", + "description": "Unique usage identifier for the LLM. Used for registry lookups, telemetry, and spend tracking.", + "default": "default" + }, + "litellm_extra_body": { + "additionalProperties": true, + "type": "object", + "title": "Litellm Extra Body", + "description": "Additional key-value pairs to pass to litellm's extra_body parameter. This is useful for custom inference endpoints that need additional parameters for configuration, routing, or advanced features. NOTE: Not all LLM providers support extra_body parameters. Some providers (e.g., OpenAI) may reject requests with unrecognized options. This is commonly supported by: - LiteLLM proxy servers (routing metadata, tracing) - vLLM endpoints (return_token_ids, etc.) - Custom inference clusters Examples: - Proxy routing: {'trace_version': '1.0.0', 'tags': ['agent:my-agent']} - vLLM features: {'return_token_ids': True}" + }, + "fallback_strategy": { + "anyOf": [ + { + "$ref": "#/components/schemas/FallbackStrategy" + }, + { + "type": "null" + } + ], + "description": "Optional fallback strategy for trying alternate LLMs on transient failure. Construct with FallbackStrategy(fallback_llms=[...]).Excluded from serialization; must be reconfigured after load." + } + }, + "type": "object", + "title": "LLM", + "description": "Language model interface for OpenHands agents.\n\nThe LLM class provides a unified interface for interacting with various\nlanguage models through the litellm library. It handles model configuration,\nAPI authentication,\nretry logic, and tool calling capabilities.\n\nExample:\n >>> from openhands.sdk import LLM\n >>> from pydantic import SecretStr\n >>> llm = LLM(\n ... model=\"claude-sonnet-4-20250514\",\n ... api_key=SecretStr(\"your-api-key\"),\n ... usage_id=\"my-agent\"\n ... )\n >>> # Use with agent or conversation" + }, + "LLM-Output": { + "properties": { + "model": { + "type": "string", + "title": "Model", + "description": "Model name.", + "default": "claude-sonnet-4-20250514" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "API key." + }, + "base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Url", + "description": "Custom base URL." + }, + "api_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Version", + "description": "API version (e.g., Azure)." + }, + "aws_access_key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Aws Access Key Id" + }, + "aws_secret_access_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Aws Secret Access Key" + }, + "aws_region_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Aws Region Name" + }, + "openrouter_site_url": { + "type": "string", + "title": "Openrouter Site Url", + "default": "https://docs.all-hands.dev/" + }, + "openrouter_app_name": { + "type": "string", + "title": "Openrouter App Name", + "default": "OpenHands" + }, + "num_retries": { + "type": "integer", + "minimum": 0.0, + "title": "Num Retries", + "default": 5 + }, + "retry_multiplier": { + "type": "number", + "minimum": 0.0, + "title": "Retry Multiplier", + "default": 8.0 + }, + "retry_min_wait": { + "type": "integer", + "minimum": 0.0, + "title": "Retry Min Wait", + "default": 8 + }, + "retry_max_wait": { + "type": "integer", + "minimum": 0.0, + "title": "Retry Max Wait", + "default": 64 + }, + "timeout": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Timeout", + "description": "HTTP timeout in seconds. Default is 300s (5 minutes). Set to None to disable timeout (not recommended for production).", + "default": 300 + }, + "max_message_chars": { + "type": "integer", + "minimum": 1.0, + "title": "Max Message Chars", + "description": "Approx max chars in each event/content sent to the LLM.", + "default": 30000 + }, + "temperature": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "Sampling temperature for response generation. Defaults to 0 for most models and provider default for reasoning models." + }, + "top_p": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Top P", + "default": 1.0 + }, + "top_k": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Top K" + }, + "max_input_tokens": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Input Tokens", + "description": "The maximum number of input tokens. Note that this is currently unused, and the value at runtime is actually the total tokens in OpenAI (e.g. 128,000 tokens for GPT-4)." + }, + "max_output_tokens": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Output Tokens", + "description": "The maximum number of output tokens. This is sent to the LLM." + }, + "model_canonical_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Canonical Name", + "description": "Optional canonical model name for feature registry lookups. The OpenHands SDK maintains a model feature registry that maps model names to capabilities (e.g., vision support, prompt caching, responses API support). When using proxied or aliased model identifiers, set this field to the canonical model name (e.g., 'openai/gpt-4o') to ensure correct capability detection. If not provided, the 'model' field will be used for capability lookups." + }, + "extra_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extra Headers", + "description": "Optional HTTP headers to forward to LiteLLM requests." + }, + "input_cost_per_token": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Input Cost Per Token", + "description": "The cost per input token. This will available in logs for user." + }, + "output_cost_per_token": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Output Cost Per Token", + "description": "The cost per output token. This will available in logs for user." + }, + "ollama_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ollama Base Url" + }, + "stream": { + "type": "boolean", + "title": "Stream", + "description": "Enable streaming responses from the LLM. When enabled, the provided `on_token` callback in .completions and .responses will be invoked for each chunk of tokens.", + "default": false + }, + "drop_params": { + "type": "boolean", + "title": "Drop Params", + "default": true + }, + "modify_params": { + "type": "boolean", + "title": "Modify Params", + "description": "Modify params allows litellm to do transformations like adding a default message, when a message is empty.", + "default": true + }, + "disable_vision": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Vision", + "description": "If model is vision capable, this option allows to disable image processing (useful for cost reduction)." + }, + "disable_stop_word": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Stop Word", + "description": "Disable using of stop word.", + "default": false + }, + "caching_prompt": { + "type": "boolean", + "title": "Caching Prompt", + "description": "Enable caching of prompts.", + "default": true + }, + "log_completions": { + "type": "boolean", + "title": "Log Completions", + "description": "Enable logging of completions.", + "default": false + }, + "log_completions_folder": { + "type": "string", + "title": "Log Completions Folder", + "description": "The folder to log LLM completions to. Required if log_completions is True.", + "default": "logs/completions" + }, + "custom_tokenizer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Tokenizer", + "description": "A custom tokenizer to use for token counting." + }, + "native_tool_calling": { + "type": "boolean", + "title": "Native Tool Calling", + "description": "Whether to use native tool calling.", + "default": true + }, + "force_string_serializer": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force String Serializer", + "description": "Force using string content serializer when sending to LLM API. If None (default), auto-detect based on model. Useful for providers that do not support list content, like HuggingFace and Groq." + }, + "reasoning_effort": { + "anyOf": [ + { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "xhigh", + "none" + ] + }, + { + "type": "null" + } + ], + "title": "Reasoning Effort", + "description": "The effort to put into reasoning. This is a string that can be one of 'low', 'medium', 'high', 'xhigh', or 'none'. Can apply to all reasoning models.", + "default": "high" + }, + "reasoning_summary": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ] + }, + { + "type": "null" + } + ], + "title": "Reasoning Summary", + "description": "The level of detail for reasoning summaries. This is a string that can be one of 'auto', 'concise', or 'detailed'. Requires verified OpenAI organization. Only sent when explicitly set." + }, + "enable_encrypted_reasoning": { + "type": "boolean", + "title": "Enable Encrypted Reasoning", + "description": "If True, ask for ['reasoning.encrypted_content'] in Responses API include.", + "default": true + }, + "prompt_cache_retention": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Cache Retention", + "description": "Retention policy for prompt cache. Only sent for GPT-5+ models; explicitly stripped for all other models.", + "default": "24h" + }, + "extended_thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Extended Thinking Budget", + "description": "The budget tokens for extended thinking, supported by Anthropic models.", + "default": 200000 + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "The seed to use for random number generation." + }, + "safety_settings": { + "anyOf": [ + { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Safety Settings", + "description": "Deprecated: Safety settings for models that support them (like Mistral AI and Gemini). This field is deprecated in 1.10.0 and will be removed in 1.15.0. Safety settings are designed for consumer-facing content moderation, which is not relevant for coding agents." + }, + "usage_id": { + "type": "string", + "title": "Usage Id", + "description": "Unique usage identifier for the LLM. Used for registry lookups, telemetry, and spend tracking.", + "default": "default" + }, + "litellm_extra_body": { + "additionalProperties": true, + "type": "object", + "title": "Litellm Extra Body", + "description": "Additional key-value pairs to pass to litellm's extra_body parameter. This is useful for custom inference endpoints that need additional parameters for configuration, routing, or advanced features. NOTE: Not all LLM providers support extra_body parameters. Some providers (e.g., OpenAI) may reject requests with unrecognized options. This is commonly supported by: - LiteLLM proxy servers (routing metadata, tracing) - vLLM endpoints (return_token_ids, etc.) - Custom inference clusters Examples: - Proxy routing: {'trace_version': '1.0.0', 'tags': ['agent:my-agent']} - vLLM features: {'return_token_ids': True}" + } + }, + "type": "object", + "title": "LLM", + "description": "Language model interface for OpenHands agents.\n\nThe LLM class provides a unified interface for interacting with various\nlanguage models through the litellm library. It handles model configuration,\nAPI authentication,\nretry logic, and tool calling capabilities.\n\nExample:\n >>> from openhands.sdk import LLM\n >>> from pydantic import SecretStr\n >>> llm = LLM(\n ... model=\"claude-sonnet-4-20250514\",\n ... api_key=SecretStr(\"your-api-key\"),\n ... usage_id=\"my-agent\"\n ... )\n >>> # Use with agent or conversation" + }, + "LLMCompletionLogEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "filename": { + "type": "string", + "title": "Filename", + "description": "The intended filename for this log (relative to log directory)" + }, + "log_data": { + "type": "string", + "title": "Log Data", + "description": "The JSON-encoded log data to be written to the file" + }, + "model_name": { + "type": "string", + "title": "Model Name", + "description": "The model name for context", + "default": "unknown" + }, + "usage_id": { + "type": "string", + "title": "Usage Id", + "description": "The LLM usage_id that produced this log", + "default": "default" + }, + "kind": { + "type": "string", + "const": "LLMCompletionLogEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "filename", + "log_data", + "kind" + ], + "title": "LLMCompletionLogEvent", + "description": "Event containing LLM completion log data.\n\nWhen an LLM is configured with log_completions=True in a remote conversation,\nthis event streams the completion log data back to the client through WebSocket\ninstead of writing it to a file inside the Docker container." + }, + "LLMSecurityAnalyzer-Input": { + "properties": { + "kind": { + "type": "string", + "const": "LLMSecurityAnalyzer", + "title": "Kind" + } + }, + "type": "object", + "title": "LLMSecurityAnalyzer", + "description": "LLM-based security analyzer.\n\nThis analyzer respects the security_risk attribute that can be set by the LLM\nwhen generating actions, similar to OpenHands' LLMRiskAnalyzer.\n\nIt provides a lightweight security analysis approach that leverages the LLM's\nunderstanding of action context and potential risks." + }, + "LLMSecurityAnalyzer-Output": { + "properties": { + "kind": { + "type": "string", + "const": "LLMSecurityAnalyzer", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "LLMSecurityAnalyzer", + "description": "LLM-based security analyzer.\n\nThis analyzer respects the security_risk attribute that can be set by the LLM\nwhen generating actions, similar to OpenHands' LLMRiskAnalyzer.\n\nIt provides a lightweight security analysis approach that leverages the LLM's\nunderstanding of action context and potential risks." + }, + "LLMSummarizingCondenser-Input": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM-Input" + }, + "max_size": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Max Size", + "default": 240 + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens" + }, + "keep_first": { + "type": "integer", + "minimum": 0.0, + "title": "Keep First", + "default": 2 + }, + "minimum_progress": { + "type": "number", + "exclusiveMaximum": 1.0, + "exclusiveMinimum": 0.0, + "title": "Minimum Progress", + "default": 0.1 + }, + "hard_context_reset_max_retries": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Hard Context Reset Max Retries", + "default": 5 + }, + "hard_context_reset_context_scaling": { + "type": "number", + "exclusiveMaximum": 1.0, + "exclusiveMinimum": 0.0, + "title": "Hard Context Reset Context Scaling", + "default": 0.8 + }, + "kind": { + "type": "string", + "const": "LLMSummarizingCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "llm" + ], + "title": "LLMSummarizingCondenser", + "description": "LLM-based condenser that summarizes forgotten events.\n\nUses an independent LLM (stored in the `llm` attribute) for generating summaries\nof forgotten events. The optional `agent_llm` parameter passed to condense() is\nthe LLM used by the agent for token counting purposes, and you should not assume\nit is the same as the one defined in this condenser." + }, + "LLMSummarizingCondenser-Output": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM-Output" + }, + "max_size": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Max Size", + "default": 240 + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens" + }, + "keep_first": { + "type": "integer", + "minimum": 0.0, + "title": "Keep First", + "default": 2 + }, + "minimum_progress": { + "type": "number", + "exclusiveMaximum": 1.0, + "exclusiveMinimum": 0.0, + "title": "Minimum Progress", + "default": 0.1 + }, + "hard_context_reset_max_retries": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Hard Context Reset Max Retries", + "default": 5 + }, + "hard_context_reset_context_scaling": { + "type": "number", + "exclusiveMaximum": 1.0, + "exclusiveMinimum": 0.0, + "title": "Hard Context Reset Context Scaling", + "default": 0.8 + }, + "kind": { + "type": "string", + "const": "LLMSummarizingCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "llm", + "kind" + ], + "title": "LLMSummarizingCondenser", + "description": "LLM-based condenser that summarizes forgotten events.\n\nUses an independent LLM (stored in the `llm` attribute) for generating summaries\nof forgotten events. The optional `agent_llm` parameter passed to condense() is\nthe LLM used by the agent for token counting purposes, and you should not assume\nit is the same as the one defined in this condenser." + }, + "ListDirectoryAction": { + "properties": { + "dir_path": { + "type": "string", + "title": "Dir Path", + "description": "The path to the directory to list. Defaults to current directory.", + "default": "." + }, + "recursive": { + "type": "boolean", + "title": "Recursive", + "description": "Whether to list subdirectories recursively (up to 2 levels).", + "default": false + }, + "kind": { + "type": "string", + "const": "ListDirectoryAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ListDirectoryAction", + "description": "Schema for list directory operation." + }, + "ListDirectoryObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "dir_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Dir Path", + "description": "The directory path that was listed." + }, + "entries": { + "items": { + "$ref": "#/components/schemas/FileEntry" + }, + "type": "array", + "title": "Entries", + "description": "List of files and directories found." + }, + "total_count": { + "type": "integer", + "title": "Total Count", + "description": "Total number of entries found.", + "default": 0 + }, + "is_truncated": { + "type": "boolean", + "title": "Is Truncated", + "description": "Whether the listing was truncated due to too many entries.", + "default": false + }, + "kind": { + "type": "string", + "const": "ListDirectoryObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ListDirectoryObservation", + "description": "Observation from listing a directory." + }, + "ListDirectoryTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ListDirectoryTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ListDirectoryTool", + "description": "Tool for listing directory contents with metadata." + }, + "LocalWorkspace-Input": { + "properties": { + "working_dir": { + "type": "string", + "title": "Working Dir", + "description": "The working directory for agent operations and tool execution. Accepts both string paths and Path objects. Path objects are automatically converted to strings." + }, + "kind": { + "type": "string", + "const": "LocalWorkspace", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "working_dir" + ], + "title": "LocalWorkspace", + "description": "Local workspace implementation that operates on the host filesystem.\n\nLocalWorkspace provides direct access to the local filesystem and command execution\nenvironment. It's suitable for development and testing scenarios where the agent\nshould operate directly on the host system.\n\nExample:\n >>> workspace = LocalWorkspace(working_dir=\"/path/to/project\")\n >>> with workspace:\n ... result = workspace.execute_command(\"ls -la\")\n ... content = workspace.read_file(\"README.md\")" + }, + "LocalWorkspace-Output": { + "properties": { + "working_dir": { + "type": "string", + "title": "Working Dir", + "description": "The working directory for agent operations and tool execution. Accepts both string paths and Path objects. Path objects are automatically converted to strings." + }, + "kind": { + "type": "string", + "const": "LocalWorkspace", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "working_dir", + "kind" + ], + "title": "LocalWorkspace", + "description": "Local workspace implementation that operates on the host filesystem.\n\nLocalWorkspace provides direct access to the local filesystem and command execution\nenvironment. It's suitable for development and testing scenarios where the agent\nshould operate directly on the host system.\n\nExample:\n >>> workspace = LocalWorkspace(working_dir=\"/path/to/project\")\n >>> with workspace:\n ... result = workspace.execute_command(\"ls -la\")\n ... content = workspace.read_file(\"README.md\")" + }, + "LookupSecret-Input": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description for this secret" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers" + }, + "kind": { + "type": "string", + "const": "LookupSecret", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "LookupSecret", + "description": "A secret looked up from some external url" + }, + "LookupSecret-Output": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description for this secret" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers" + }, + "kind": { + "type": "string", + "const": "LookupSecret", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "url", + "kind" + ], + "title": "LookupSecret", + "description": "A secret looked up from some external url" + }, + "MCPToolAction": { + "properties": { + "data": { + "additionalProperties": true, + "type": "object", + "title": "Data", + "description": "Dynamic data fields from the tool call" + }, + "kind": { + "type": "string", + "const": "MCPToolAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "MCPToolAction", + "description": "Schema for MCP input action.\n\nIt is just a thin wrapper around raw JSON and does\nnot do any validation.\n\nValidation will be performed by MCPTool.__call__\nby constructing dynamically created Pydantic model\nfrom the MCP tool input schema." + }, + "MCPToolDefinition": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "mcp_tool": { + "$ref": "#/components/schemas/mcp__types__Tool", + "description": "The MCP tool definition." + }, + "kind": { + "type": "string", + "const": "MCPToolDefinition", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "mcp_tool", + "kind", + "title" + ], + "title": "MCPToolDefinition", + "description": "MCP Tool that wraps an MCP client and provides tool functionality." + }, + "MCPToolObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "Name of the tool that was called" + }, + "kind": { + "type": "string", + "const": "MCPToolObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "kind" + ], + "title": "MCPToolObservation", + "description": "Observation from MCP tool execution." + }, + "Message": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "system", + "assistant", + "tool" + ], + "title": "Role" + }, + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content" + }, + "tool_calls": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/MessageToolCall" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Calls" + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "reasoning_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning Content", + "description": "Intermediate reasoning/thinking content from reasoning models" + }, + "thinking_blocks": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingBlock" + }, + { + "$ref": "#/components/schemas/RedactedThinkingBlock" + } + ] + }, + "type": "array", + "title": "Thinking Blocks", + "description": "Raw Anthropic thinking blocks for extended thinking feature" + }, + "responses_reasoning_item": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningItemModel" + }, + { + "type": "null" + } + ], + "description": "OpenAI Responses reasoning item from model output" + } + }, + "type": "object", + "required": [ + "role" + ], + "title": "Message" + }, + "MessageEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source" + }, + "llm_message": { + "$ref": "#/components/schemas/Message", + "description": "The exact LLM message for this message event" + }, + "llm_response_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this eventIf the source != 'agent', this field is None" + }, + "activated_skills": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Activated Skills", + "description": "List of activated skill name" + }, + "extended_content": { + "items": { + "$ref": "#/components/schemas/TextContent" + }, + "type": "array", + "title": "Extended Content", + "description": "List of content added by agent context" + }, + "sender": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sender", + "description": "Optional identifier of the sender. Can be used to track message origin in multi-agent scenarios." + }, + "critic_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticResult" + }, + { + "type": "null" + } + ], + "description": "Optional critic evaluation of this message and preceding history." + }, + "kind": { + "type": "string", + "const": "MessageEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "llm_message", + "kind" + ], + "title": "MessageEvent", + "description": "Message from either agent or user.\n\nThis is originally the \"MessageAction\", but it suppose not to be tool call." + }, + "MessageToolCall": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Canonical tool call id" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Tool/function name" + }, + "arguments": { + "type": "string", + "title": "Arguments", + "description": "JSON string of arguments" + }, + "origin": { + "type": "string", + "enum": [ + "completion", + "responses" + ], + "title": "Origin", + "description": "Originating API family" + } + }, + "type": "object", + "required": [ + "id", + "name", + "arguments", + "origin" + ], + "title": "MessageToolCall", + "description": "Transport-agnostic tool call representation.\n\nOne canonical id is used for linking across actions/observations and\nfor Responses function_call_output call_id." + }, + "Metrics": { + "properties": { + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model", + "default": "default" + }, + "accumulated_cost": { + "type": "number", + "minimum": 0.0, + "title": "Accumulated Cost", + "description": "Total accumulated cost, must be non-negative", + "default": 0.0 + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task", + "description": "Maximum budget per task" + }, + "accumulated_token_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/TokenUsage" + }, + { + "type": "null" + } + ], + "description": "Accumulated token usage across all calls" + }, + "costs": { + "items": { + "$ref": "#/components/schemas/Cost" + }, + "type": "array", + "title": "Costs", + "description": "List of individual costs" + }, + "response_latencies": { + "items": { + "$ref": "#/components/schemas/ResponseLatency" + }, + "type": "array", + "title": "Response Latencies", + "description": "List of response latencies" + }, + "token_usages": { + "items": { + "$ref": "#/components/schemas/TokenUsage" + }, + "type": "array", + "title": "Token Usages", + "description": "List of token usage records" + } + }, + "type": "object", + "title": "Metrics", + "description": "Metrics class can record various metrics during running and evaluation.\nWe track:\n - accumulated_cost and costs\n - max_budget_per_task (budget limit)\n - A list of ResponseLatency\n - A list of TokenUsage (one per call)." + }, + "MetricsSnapshot": { + "properties": { + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model", + "default": "default" + }, + "accumulated_cost": { + "type": "number", + "minimum": 0.0, + "title": "Accumulated Cost", + "description": "Total accumulated cost, must be non-negative", + "default": 0.0 + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task", + "description": "Maximum budget per task" + }, + "accumulated_token_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/TokenUsage" + }, + { + "type": "null" + } + ], + "description": "Accumulated token usage across all calls" + } + }, + "type": "object", + "title": "MetricsSnapshot", + "description": "A snapshot of metrics at a point in time.\n\nDoes not include lists of individual costs, latencies, or token usages." + }, + "NeverConfirm-Input": { + "properties": { + "kind": { + "type": "string", + "const": "NeverConfirm", + "title": "Kind" + } + }, + "type": "object", + "title": "NeverConfirm" + }, + "NeverConfirm-Output": { + "properties": { + "kind": { + "type": "string", + "const": "NeverConfirm", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "NeverConfirm" + }, + "NoOpCondenser-Input": { + "properties": { + "kind": { + "type": "string", + "const": "NoOpCondenser", + "title": "Kind" + } + }, + "type": "object", + "title": "NoOpCondenser", + "description": "Simple condenser that returns a view un-manipulated.\n\nPrimarily intended for testing purposes." + }, + "NoOpCondenser-Output": { + "properties": { + "kind": { + "type": "string", + "const": "NoOpCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "NoOpCondenser", + "description": "Simple condenser that returns a view un-manipulated.\n\nPrimarily intended for testing purposes." + }, + "Observation": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolObservation" + }, + { + "$ref": "#/components/schemas/FinishObservation" + }, + { + "$ref": "#/components/schemas/ThinkObservation" + }, + { + "$ref": "#/components/schemas/BrowserObservation" + }, + { + "$ref": "#/components/schemas/DelegateObservation" + }, + { + "$ref": "#/components/schemas/FileEditorObservation" + }, + { + "$ref": "#/components/schemas/EditObservation" + }, + { + "$ref": "#/components/schemas/ListDirectoryObservation" + }, + { + "$ref": "#/components/schemas/ReadFileObservation" + }, + { + "$ref": "#/components/schemas/WriteFileObservation" + }, + { + "$ref": "#/components/schemas/GlobObservation" + }, + { + "$ref": "#/components/schemas/GrepObservation" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorObservation" + }, + { + "$ref": "#/components/schemas/TaskTrackerObservation" + }, + { + "$ref": "#/components/schemas/TerminalObservation" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__definition__MCPToolObservation-Output__1": "#/components/schemas/MCPToolObservation", + "openhands__sdk__tool__builtins__finish__FinishObservation-Output__1": "#/components/schemas/FinishObservation", + "openhands__sdk__tool__builtins__think__ThinkObservation-Output__1": "#/components/schemas/ThinkObservation", + "openhands__tools__browser_use__definition__BrowserObservation-Output__1": "#/components/schemas/BrowserObservation", + "openhands__tools__delegate__definition__DelegateObservation-Output__1": "#/components/schemas/DelegateObservation", + "openhands__tools__file_editor__definition__FileEditorObservation-Output__1": "#/components/schemas/FileEditorObservation", + "openhands__tools__gemini__edit__definition__EditObservation-Output__1": "#/components/schemas/EditObservation", + "openhands__tools__gemini__list_directory__definition__ListDirectoryObservation-Output__1": "#/components/schemas/ListDirectoryObservation", + "openhands__tools__gemini__read_file__definition__ReadFileObservation-Output__1": "#/components/schemas/ReadFileObservation", + "openhands__tools__gemini__write_file__definition__WriteFileObservation-Output__1": "#/components/schemas/WriteFileObservation", + "openhands__tools__glob__definition__GlobObservation-Output__1": "#/components/schemas/GlobObservation", + "openhands__tools__grep__definition__GrepObservation-Output__1": "#/components/schemas/GrepObservation", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorObservation-Output__1": "#/components/schemas/PlanningFileEditorObservation", + "openhands__tools__task_tracker__definition__TaskTrackerObservation-Output__1": "#/components/schemas/TaskTrackerObservation", + "openhands__tools__terminal__definition__TerminalObservation-Output__1": "#/components/schemas/TerminalObservation" + } + } + }, + "ObservationEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "observation": { + "$ref": "#/components/schemas/Observation", + "description": "The observation (tool call) sent to LLM" + }, + "action_id": { + "type": "string", + "title": "Action Id", + "description": "The action id that this observation is responding to" + }, + "kind": { + "type": "string", + "const": "ObservationEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "observation", + "action_id", + "kind" + ], + "title": "ObservationEvent" + }, + "OrgConfig": { + "properties": { + "repository": { + "type": "string", + "title": "Repository", + "description": "Selected repository (e.g., 'owner/repo')" + }, + "provider": { + "type": "string", + "title": "Provider", + "description": "Git provider type: github, gitlab, azure, bitbucket" + }, + "org_repo_url": { + "type": "string", + "title": "Org Repo Url", + "description": "Pre-authenticated Git URL for the organization repository. Contains sensitive credentials - handle with care and avoid logging." + }, + "org_name": { + "type": "string", + "title": "Org Name", + "description": "Organization name" + } + }, + "type": "object", + "required": [ + "repository", + "provider", + "org_repo_url", + "org_name" + ], + "title": "OrgConfig", + "description": "Configuration for loading organization-level skills." + }, + "PassCritic-Input": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "PassCritic", + "title": "Kind" + } + }, + "type": "object", + "title": "PassCritic", + "description": "Critic that always returns success.\n\nThis critic can be used when no evaluation is needed or when\nall instances should be considered successful regardless of their output." + }, + "PassCritic-Output": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "PassCritic", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "PassCritic", + "description": "Critic that always returns success.\n\nThis critic can be used when no evaluation is needed or when\nall instances should be considered successful regardless of their output." + }, + "PauseEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "user" + }, + "kind": { + "type": "string", + "const": "PauseEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "PauseEvent", + "description": "Event indicating that the agent execution was paused by user request." + }, + "PipelineCondenser-Input": { + "properties": { + "condensers": { + "items": { + "$ref": "#/components/schemas/CondenserBase-Input" + }, + "type": "array", + "title": "Condensers" + }, + "kind": { + "type": "string", + "const": "PipelineCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "condensers" + ], + "title": "PipelineCondenser", + "description": "A condenser that applies a sequence of condensers in order.\n\nAll condensers are defined primarily by their `condense` method, which takes a\n`View` and an optional `agent_llm` parameter, returning either a new `View` or a\n`Condensation` event. That means we can chain multiple condensers together by\npassing `View`s along and exiting early if any condenser returns a `Condensation`.\n\nFor example:\n\n # Use the pipeline condenser to chain multiple other condensers together\n condenser = PipelineCondenser(condensers=[\n CondenserA(...),\n CondenserB(...),\n CondenserC(...),\n ])\n\n result = condenser.condense(view, agent_llm=agent_llm)\n\n # Doing the same thing without the pipeline condenser requires more boilerplate\n # for the monadic chaining\n other_result = view\n\n if isinstance(other_result, View):\n other_result = CondenserA(...).condense(other_result, agent_llm=agent_llm)\n\n if isinstance(other_result, View):\n other_result = CondenserB(...).condense(other_result, agent_llm=agent_llm)\n\n if isinstance(other_result, View):\n other_result = CondenserC(...).condense(other_result, agent_llm=agent_llm)\n\n assert result == other_result" + }, + "PipelineCondenser-Output": { + "properties": { + "condensers": { + "items": { + "$ref": "#/components/schemas/CondenserBase-Output" + }, + "type": "array", + "title": "Condensers" + }, + "kind": { + "type": "string", + "const": "PipelineCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "condensers", + "kind" + ], + "title": "PipelineCondenser", + "description": "A condenser that applies a sequence of condensers in order.\n\nAll condensers are defined primarily by their `condense` method, which takes a\n`View` and an optional `agent_llm` parameter, returning either a new `View` or a\n`Condensation` event. That means we can chain multiple condensers together by\npassing `View`s along and exiting early if any condenser returns a `Condensation`.\n\nFor example:\n\n # Use the pipeline condenser to chain multiple other condensers together\n condenser = PipelineCondenser(condensers=[\n CondenserA(...),\n CondenserB(...),\n CondenserC(...),\n ])\n\n result = condenser.condense(view, agent_llm=agent_llm)\n\n # Doing the same thing without the pipeline condenser requires more boilerplate\n # for the monadic chaining\n other_result = view\n\n if isinstance(other_result, View):\n other_result = CondenserA(...).condense(other_result, agent_llm=agent_llm)\n\n if isinstance(other_result, View):\n other_result = CondenserB(...).condense(other_result, agent_llm=agent_llm)\n\n if isinstance(other_result, View):\n other_result = CondenserC(...).condense(other_result, agent_llm=agent_llm)\n\n assert result == other_result" + }, + "PlanningFileEditorAction": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to file or directory." + }, + "file_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Text", + "description": "Required parameter of `create` command, with the content of the file to be created." + }, + "old_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Str", + "description": "Required parameter of `str_replace` command containing the string in `path` to replace." + }, + "new_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Str", + "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert." + }, + "insert_line": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Insert Line", + "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`." + }, + "view_range": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "View Range", + "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file." + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "path", + "kind" + ], + "title": "PlanningFileEditorAction", + "description": "Schema for planning file editor operations.\n\nInherits from FileEditorAction but restricts editing to PLAN.md only.\nAllows viewing any file but only editing PLAN.md." + }, + "PlanningFileEditorObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The command that was run: `view`, `create`, `str_replace`, `insert`, or `undo_edit`." + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The file path that was edited." + }, + "prev_exist": { + "type": "boolean", + "title": "Prev Exist", + "description": "Indicates if the file previously existed. If not, it was created.", + "default": true + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content of the file before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content of the file after the edit." + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "PlanningFileEditorObservation", + "description": "Observation from planning file editor operations.\n\nInherits from FileEditorObservation - same structure, just different type." + }, + "PlanningFileEditorTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "PlanningFileEditorTool", + "description": "A planning file editor tool with read-all, edit-PLAN.md-only access." + }, + "PluginSource": { + "properties": { + "source": { + "type": "string", + "title": "Source", + "description": "Plugin source: 'github:owner/repo', any git URL, or local path" + }, + "ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ref", + "description": "Optional branch, tag, or commit (only for git sources)" + }, + "repo_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Repo Path", + "description": "Subdirectory path within the git repository (e.g., 'plugins/my-plugin' for monorepos). Only relevant for git sources, not local paths." + } + }, + "type": "object", + "required": [ + "source" + ], + "title": "PluginSource", + "description": "Specification for a plugin to load.\n\nThis model describes where to find a plugin and is used by load_plugins()\nto fetch and load plugins from various sources.\n\nExamples:\n >>> # GitHub repository\n >>> PluginSource(source=\"github:owner/repo\", ref=\"v1.0.0\")\n\n >>> # Plugin from monorepo subdirectory\n >>> PluginSource(\n ... source=\"github:owner/monorepo\",\n ... repo_path=\"plugins/my-plugin\"\n ... )\n\n >>> # Local path\n >>> PluginSource(source=\"/path/to/plugin\")" + }, + "ReadFileAction": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to read." + }, + "offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Optional: The 0-based line number to start reading from. Use for paginating through large files." + }, + "limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Optional: Maximum number of lines to read. Use with 'offset' to paginate through large files." + }, + "kind": { + "type": "string", + "const": "ReadFileAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "kind" + ], + "title": "ReadFileAction", + "description": "Schema for read file operation." + }, + "ReadFileObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "type": "string", + "title": "File Path", + "description": "The file path that was read." + }, + "file_content": { + "type": "string", + "title": "File Content", + "description": "The content read from the file.", + "default": "" + }, + "is_truncated": { + "type": "boolean", + "title": "Is Truncated", + "description": "Whether the content was truncated due to size limits.", + "default": false + }, + "lines_shown": { + "anyOf": [ + { + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2 + }, + { + "type": "null" + } + ], + "title": "Lines Shown", + "description": "If truncated, the range of lines shown (start, end) - 1-indexed." + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Lines", + "description": "Total number of lines in the file." + }, + "kind": { + "type": "string", + "const": "ReadFileObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "kind" + ], + "title": "ReadFileObservation", + "description": "Observation from reading a file." + }, + "ReadFileTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ReadFileTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ReadFileTool", + "description": "Tool for reading file contents with pagination support." + }, + "ReasoningItemModel": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "summary": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Content" + }, + "encrypted_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Encrypted Content" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status" + } + }, + "type": "object", + "title": "ReasoningItemModel", + "description": "OpenAI Responses reasoning item (non-stream, subset we consume).\n\nDo not log or render encrypted_content." + }, + "RedactedThinkingBlock": { + "properties": { + "type": { + "type": "string", + "const": "redacted_thinking", + "title": "Type", + "default": "redacted_thinking" + }, + "data": { + "type": "string", + "title": "Data", + "description": "The redacted thinking content" + } + }, + "type": "object", + "required": [ + "data" + ], + "title": "RedactedThinkingBlock", + "description": "Redacted thinking block for previous responses without extended thinking.\n\nThis is used as a placeholder for assistant messages that were generated\nbefore extended thinking was enabled." + }, + "RemoteWorkspace": { + "properties": { + "working_dir": { + "type": "string", + "title": "Working Dir", + "description": "The working directory for agent operations and tool execution." + }, + "host": { + "type": "string", + "title": "Host", + "description": "The remote host URL for the workspace." + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "API key for authenticating with the remote host." + }, + "read_timeout": { + "type": "number", + "title": "Read Timeout", + "description": "Timeout in seconds for reading operations of httpx.Client.", + "default": 600.0 + }, + "max_connections": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Connections", + "description": "Maximum number of connections for httpx.Client. None means no limit, useful for running many conversations in parallel." + }, + "kind": { + "type": "string", + "const": "RemoteWorkspace", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "working_dir", + "host", + "kind" + ], + "title": "RemoteWorkspace", + "description": "Remote workspace implementation that connects to an OpenHands agent server.\n\nRemoteWorkspace provides access to a sandboxed environment running on a remote\nOpenHands agent server. This is the recommended approach for production deployments\nas it provides better isolation and security.\n\nExample:\n >>> workspace = RemoteWorkspace(\n ... host=\"https://agent-server.example.com\",\n ... working_dir=\"/workspace\"\n ... )\n >>> with workspace:\n ... result = workspace.execute_command(\"ls -la\")\n ... content = workspace.read_file(\"README.md\")" + }, + "ResponseLatency": { + "properties": { + "model": { + "type": "string", + "title": "Model" + }, + "latency": { + "type": "number", + "minimum": 0.0, + "title": "Latency", + "description": "Latency must be non-negative" + }, + "response_id": { + "type": "string", + "title": "Response Id" + } + }, + "type": "object", + "required": [ + "model", + "latency", + "response_id" + ], + "title": "ResponseLatency", + "description": "Metric tracking the round-trip time per completion call." + }, + "SandboxConfig": { + "properties": { + "exposed_urls": { + "items": { + "$ref": "#/components/schemas/ExposedUrl" + }, + "type": "array", + "title": "Exposed Urls", + "description": "List of exposed URLs from the sandbox" + } + }, + "type": "object", + "title": "SandboxConfig", + "description": "Configuration for loading sandbox-specific skills." + }, + "SecretRegistry": { + "properties": { + "secret_sources": { + "additionalProperties": { + "$ref": "#/components/schemas/SecretSource-Output" + }, + "type": "object", + "title": "Secret Sources" + } + }, + "type": "object", + "title": "SecretRegistry", + "description": "Manages secrets and injects them into bash commands when needed.\n\nThe secret registry stores a mapping of secret keys to SecretSources\nthat retrieve the actual secret values. When a bash command is about to be\nexecuted, it scans the command for any secret keys and injects the corresponding\nenvironment variables.\n\nSecret sources will redact / encrypt their sensitive values as appropriate when\nserializing, depending on the content of the context. If a context is present\nand contains a 'cipher' object, this is used for encryption. If it contains a\nboolean 'expose_secrets' flag set to True, secrets are dunped in plain text.\nOtherwise secrets are redacted.\n\nAdditionally, it tracks the latest exported values to enable consistent masking\neven when callable secrets fail on subsequent calls." + }, + "SecretSource-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/LookupSecret-Input" + }, + { + "$ref": "#/components/schemas/StaticSecret-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__secret__secrets__LookupSecret-Input__1": "#/components/schemas/LookupSecret-Input", + "openhands__sdk__secret__secrets__StaticSecret-Input__1": "#/components/schemas/StaticSecret-Input" + } + } + }, + "SecretSource-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/LookupSecret-Output" + }, + { + "$ref": "#/components/schemas/StaticSecret-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__secret__secrets__LookupSecret-Output__1": "#/components/schemas/LookupSecret-Output", + "openhands__sdk__secret__secrets__StaticSecret-Output__1": "#/components/schemas/StaticSecret-Output" + } + } + }, + "SecurityAnalyzerBase-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/GraySwanAnalyzer-Input" + }, + { + "$ref": "#/components/schemas/LLMSecurityAnalyzer-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__security__grayswan__analyzer__GraySwanAnalyzer-Input__1": "#/components/schemas/GraySwanAnalyzer-Input", + "openhands__sdk__security__llm_analyzer__LLMSecurityAnalyzer-Input__1": "#/components/schemas/LLMSecurityAnalyzer-Input" + } + } + }, + "SecurityAnalyzerBase-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/GraySwanAnalyzer-Output" + }, + { + "$ref": "#/components/schemas/LLMSecurityAnalyzer-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__security__grayswan__analyzer__GraySwanAnalyzer-Output__1": "#/components/schemas/GraySwanAnalyzer-Output", + "openhands__sdk__security__llm_analyzer__LLMSecurityAnalyzer-Output__1": "#/components/schemas/LLMSecurityAnalyzer-Output" + } + } + }, + "SecurityRisk": { + "type": "string", + "enum": [ + "UNKNOWN", + "LOW", + "MEDIUM", + "HIGH" + ], + "title": "SecurityRisk", + "description": "Security risk levels for actions.\n\nBased on OpenHands security risk levels but adapted for agent-sdk.\nInteger values allow for easy comparison and ordering." + }, + "SendMessageRequest": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "system", + "assistant", + "tool" + ], + "title": "Role", + "default": "user" + }, + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content" + }, + "run": { + "type": "boolean", + "title": "Run", + "description": "Whether the agent loop should automatically run if not running", + "default": false + } + }, + "type": "object", + "title": "SendMessageRequest", + "description": "Payload to send a message to the agent.\n\nThis is a simplified version of openhands.sdk.Message." + }, + "ServerInfo": { + "properties": { + "uptime": { + "type": "number", + "title": "Uptime" + }, + "idle_time": { + "type": "number", + "title": "Idle Time" + }, + "title": { + "type": "string", + "title": "Title", + "default": "OpenHands Agent Server" + }, + "version": { + "type": "string", + "title": "Version", + "default": "1.11.5" + }, + "docs": { + "type": "string", + "title": "Docs", + "default": "/docs" + }, + "redoc": { + "type": "string", + "title": "Redoc", + "default": "/redoc" + } + }, + "type": "object", + "required": [ + "uptime", + "idle_time" + ], + "title": "ServerInfo" + }, + "SetConfirmationPolicyRequest": { + "properties": { + "policy": { + "$ref": "#/components/schemas/ConfirmationPolicyBase-Input", + "description": "The confirmation policy to set" + } + }, + "type": "object", + "required": [ + "policy" + ], + "title": "SetConfirmationPolicyRequest", + "description": "Payload to set confirmation policy for a conversation." + }, + "SetSecurityAnalyzerRequest": { + "properties": { + "security_analyzer": { + "anyOf": [ + { + "$ref": "#/components/schemas/SecurityAnalyzerBase-Input" + }, + { + "type": "null" + } + ], + "description": "The security analyzer to set" + } + }, + "type": "object", + "required": [ + "security_analyzer" + ], + "title": "SetSecurityAnalyzerRequest", + "description": "Payload to set security analyzer for a conversation" + }, + "Skill": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "content": { + "type": "string", + "title": "Content" + }, + "trigger": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/KeywordTrigger" + }, + { + "$ref": "#/components/schemas/TaskTrigger" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "keyword": "#/components/schemas/KeywordTrigger", + "task": "#/components/schemas/TaskTrigger" + } + } + }, + { + "type": "null" + } + ], + "title": "Trigger", + "description": "Trigger determines when skill content is auto-injected. None = no auto-injection (for AgentSkills: agent reads on demand; for legacy: full content always in system prompt). KeywordTrigger = auto-inject when keywords appear in user messages. TaskTrigger = auto-inject for specific tasks, may require user input." + }, + "source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source", + "description": "The source path or identifier of the skill. When it is None, it is treated as a programmatically defined skill." + }, + "mcp_tools": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Tools", + "description": "MCP tools configuration for the skill (repo skills only). It should conform to the MCPConfig schema: https://gofastmcp.com/clients/client#configuration-format" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/InputMetadata" + }, + "type": "array", + "title": "Inputs", + "description": "Input metadata for the skill (task skills only)" + }, + "is_agentskills_format": { + "type": "boolean", + "title": "Is Agentskills Format", + "description": "Whether this skill was loaded from a SKILL.md file following the AgentSkills standard. AgentSkills-format skills use progressive disclosure: always listed in with name, description, and location. If the skill also has triggers, content is auto-injected when triggered AND agent can read file anytime.", + "default": false + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A brief description of what the skill does and when to use it. AgentSkills standard field (max 1024 characters)." + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "License", + "description": "The license under which the skill is distributed. AgentSkills standard field (e.g., 'Apache-2.0', 'MIT')." + }, + "compatibility": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Compatibility", + "description": "Environment requirements or compatibility notes for the skill. AgentSkills standard field (e.g., 'Requires git and docker')." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata", + "description": "Arbitrary key-value metadata for the skill. AgentSkills standard field for extensibility." + }, + "allowed_tools": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Tools", + "description": "List of pre-approved tools for this skill. AgentSkills standard field (parsed from space-delimited string)." + }, + "resources": { + "anyOf": [ + { + "$ref": "#/components/schemas/SkillResources" + }, + { + "type": "null" + } + ], + "description": "Resource directories for the skill (scripts/, references/, assets/). AgentSkills standard field. Only populated for SKILL.md directory format." + } + }, + "type": "object", + "required": [ + "name", + "content" + ], + "title": "Skill", + "description": "A skill provides specialized knowledge or functionality.\n\nSkill behavior depends on format (is_agentskills_format) and trigger:\n\nAgentSkills format (SKILL.md files):\n- Always listed in with name, description, location\n- Agent reads full content on demand (progressive disclosure)\n- If has triggers: content is ALSO auto-injected when triggered\n\nLegacy OpenHands format:\n- With triggers: Listed in , content injected on trigger\n- Without triggers (None): Full content in , always active\n\nThis model supports both OpenHands-specific fields and AgentSkills standard\nfields (https://agentskills.io/specification) for cross-platform compatibility." + }, + "SkillInfo": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "type": { + "type": "string", + "enum": [ + "repo", + "knowledge", + "agentskills" + ], + "title": "Type" + }, + "content": { + "type": "string", + "title": "Content" + }, + "triggers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Triggers" + }, + "source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "is_agentskills_format": { + "type": "boolean", + "title": "Is Agentskills Format", + "default": false + } + }, + "type": "object", + "required": [ + "name", + "type", + "content" + ], + "title": "SkillInfo", + "description": "Skill information returned by the API." + }, + "SkillResources": { + "properties": { + "skill_root": { + "type": "string", + "title": "Skill Root", + "description": "Root directory of the skill (absolute path)" + }, + "scripts": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scripts", + "description": "List of script files in scripts/ directory (relative paths)" + }, + "references": { + "items": { + "type": "string" + }, + "type": "array", + "title": "References", + "description": "List of reference files in references/ directory (relative paths)" + }, + "assets": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Assets", + "description": "List of asset files in assets/ directory (relative paths)" + } + }, + "type": "object", + "required": [ + "skill_root" + ], + "title": "SkillResources", + "description": "Resource directories for a skill (AgentSkills standard).\n\nPer the AgentSkills specification, skills can include:\n- scripts/: Executable scripts the agent can run\n- references/: Reference documentation and examples\n- assets/: Static assets (images, data files, etc.)" + }, + "SkillsRequest": { + "properties": { + "load_public": { + "type": "boolean", + "title": "Load Public", + "description": "Load public skills from OpenHands/extensions repo", + "default": true + }, + "load_user": { + "type": "boolean", + "title": "Load User", + "description": "Load user skills from ~/.openhands/skills/", + "default": true + }, + "load_project": { + "type": "boolean", + "title": "Load Project", + "description": "Load project skills from workspace", + "default": true + }, + "load_org": { + "type": "boolean", + "title": "Load Org", + "description": "Load organization-level skills", + "default": true + }, + "project_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Project Dir", + "description": "Workspace directory path for project skills" + }, + "org_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/OrgConfig" + }, + { + "type": "null" + } + ], + "description": "Organization skills configuration" + }, + "sandbox_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/SandboxConfig" + }, + { + "type": "null" + } + ], + "description": "Sandbox skills configuration" + } + }, + "type": "object", + "title": "SkillsRequest", + "description": "Request body for loading skills." + }, + "SkillsResponse": { + "properties": { + "skills": { + "items": { + "$ref": "#/components/schemas/SkillInfo" + }, + "type": "array", + "title": "Skills" + }, + "sources": { + "additionalProperties": { + "type": "integer" + }, + "type": "object", + "title": "Sources", + "description": "Count of skills loaded from each source" + } + }, + "type": "object", + "required": [ + "skills" + ], + "title": "SkillsResponse", + "description": "Response containing all available skills." + }, + "StartConversationRequest": { + "properties": { + "agent": { + "$ref": "#/components/schemas/AgentBase-Input" + }, + "workspace": { + "$ref": "#/components/schemas/LocalWorkspace-Input", + "description": "Working directory for agent operations and tool execution" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Conversation Id", + "description": "Optional conversation ID. If not provided, a random UUID will be generated." + }, + "confirmation_policy": { + "$ref": "#/components/schemas/ConfirmationPolicyBase-Input", + "description": "Controls when the conversation will prompt the user before continuing. Defaults to never.", + "default": { + "kind": "NeverConfirm" + } + }, + "initial_message": { + "anyOf": [ + { + "$ref": "#/components/schemas/SendMessageRequest" + }, + { + "type": "null" + } + ], + "description": "Initial message to pass to the LLM" + }, + "max_iterations": { + "type": "integer", + "minimum": 1.0, + "title": "Max Iterations", + "description": "If set, the max number of iterations the agent will run before stopping. This is useful to prevent infinite loops.", + "default": 500 + }, + "stuck_detection": { + "type": "boolean", + "title": "Stuck Detection", + "description": "If true, the conversation will use stuck detection to prevent infinite loops.", + "default": true + }, + "secrets": { + "additionalProperties": { + "$ref": "#/components/schemas/SecretSource-Input" + }, + "type": "object", + "title": "Secrets", + "description": "Secrets available in the conversation" + }, + "tool_module_qualnames": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Tool Module Qualnames", + "description": "Mapping of tool names to their module qualnames from the client's registry. These modules will be dynamically imported on the server to register the tools for this conversation." + }, + "plugins": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PluginSource" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Plugins", + "description": "List of plugins to load for this conversation. Plugins are loaded and their skills/MCP config are merged into the agent. Hooks are extracted and stored for runtime execution." + }, + "hook_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/HookConfig-Input" + }, + { + "type": "null" + } + ], + "description": "Optional hook configuration for this conversation. Hooks are shell scripts that run at key lifecycle events (PreToolUse, PostToolUse, UserPromptSubmit, Stop, etc.). If both hook_config and plugins are provided, they are merged with explicit hooks running before plugin hooks." + } + }, + "type": "object", + "required": [ + "agent", + "workspace" + ], + "title": "StartConversationRequest", + "description": "Payload to create a new conversation.\n\nContains an Agent configuration along with conversation-specific options." + }, + "StaticSecret-Input": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description for this secret" + }, + "value": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Value" + }, + "kind": { + "type": "string", + "const": "StaticSecret", + "title": "Kind" + } + }, + "type": "object", + "title": "StaticSecret", + "description": "A secret stored locally" + }, + "StaticSecret-Output": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description for this secret" + }, + "value": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Value" + }, + "kind": { + "type": "string", + "const": "StaticSecret", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "StaticSecret", + "description": "A secret stored locally" + }, + "Success": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "default": true + } + }, + "type": "object", + "title": "Success" + }, + "SyncResponse": { + "properties": { + "status": { + "type": "string", + "enum": [ + "success", + "error" + ], + "title": "Status" + }, + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "status", + "message" + ], + "title": "SyncResponse", + "description": "Response from skill sync operation." + }, + "SystemPromptEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "system_prompt": { + "$ref": "#/components/schemas/TextContent", + "description": "The system prompt text" + }, + "tools": { + "items": { + "$ref": "#/components/schemas/ToolDefinition" + }, + "type": "array", + "title": "Tools", + "description": "List of tools as ToolDefinition objects" + }, + "dynamic_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "type": "null" + } + ], + "description": "Optional dynamic per-conversation context (runtime info, repo context, secrets). When provided, this is included as a second content block in the system message (not cached)." + }, + "kind": { + "type": "string", + "const": "SystemPromptEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "system_prompt", + "tools", + "kind" + ], + "title": "SystemPromptEvent", + "description": "System prompt added by the agent.\n\nThe system prompt can optionally include dynamic context that varies between\nconversations. When ``dynamic_context`` is provided, it is included as a\nsecond content block in the same system message. Cache markers are NOT\napplied here - they are applied by ``LLM._apply_prompt_caching()`` when\ncaching is enabled, ensuring provider-specific cache control is only added\nwhen appropriate.\n\nAttributes:\n system_prompt: The static system prompt text (cacheable across conversations)\n tools: List of available tools\n dynamic_context: Optional per-conversation context (hosts, repo info, etc.)\n Sent as a second TextContent block inside the system message." + }, + "TaskItem": { + "properties": { + "title": { + "type": "string", + "title": "Title", + "description": "A brief title for the task." + }, + "notes": { + "type": "string", + "title": "Notes", + "description": "Additional details or notes about the task.", + "default": "" + }, + "status": { + "type": "string", + "enum": [ + "todo", + "in_progress", + "done" + ], + "title": "Status", + "description": "The current status of the task. One of 'todo', 'in_progress', or 'done'.", + "default": "todo" + } + }, + "type": "object", + "required": [ + "title" + ], + "title": "TaskItem" + }, + "TaskTrackerAction": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "plan" + ], + "title": "Command", + "description": "The command to execute. `view` shows the current task list. `plan` creates or updates the task list based on provided requirements and progress. Always `view` the current list before making changes.", + "default": "view" + }, + "task_list": { + "items": { + "$ref": "#/components/schemas/TaskItem" + }, + "type": "array", + "title": "Task List", + "description": "The full task list. Required parameter of `plan` command." + }, + "kind": { + "type": "string", + "const": "TaskTrackerAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "TaskTrackerAction", + "description": "An action where the agent writes or updates a task list for task management." + }, + "TaskTrackerObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "plan" + ], + "title": "Command", + "description": "The command that was executed: \"view\" or \"plan\"." + }, + "task_list": { + "items": { + "$ref": "#/components/schemas/TaskItem" + }, + "type": "array", + "title": "Task List", + "description": "The current task list" + }, + "kind": { + "type": "string", + "const": "TaskTrackerObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "TaskTrackerObservation", + "description": "This data class represents the result of a task tracking operation." + }, + "TaskTrackerTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TaskTrackerTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "TaskTrackerTool", + "description": "A ToolDefinition subclass that automatically initializes a TaskTrackerExecutor." + }, + "TaskTrigger": { + "properties": { + "type": { + "type": "string", + "const": "task", + "title": "Type", + "default": "task" + }, + "triggers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Triggers" + } + }, + "type": "object", + "required": [ + "triggers" + ], + "title": "TaskTrigger", + "description": "Trigger for task-specific skills.\n\nThese skills are activated for specific task types and can modify prompts." + }, + "TerminalAction": { + "properties": { + "command": { + "type": "string", + "title": "Command", + "description": "The bash command to execute. Can be empty string to view additional logs when previous exit code is `-1`. Can be `C-c` (Ctrl+C) to interrupt the currently running process. Note: You can only execute one bash command at a time. If you need to run multiple commands sequentially, you can use `&&` or `;` to chain them together." + }, + "is_input": { + "type": "boolean", + "title": "Is Input", + "description": "If True, the command is an input to the running process. If False, the command is a bash command to be executed in the terminal. Default is False.", + "default": false + }, + "timeout": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Timeout", + "description": "Optional. Sets a maximum time limit (in seconds) for running the command. If the command takes longer than this limit, you\u2019ll be asked whether to continue or stop it. If you don\u2019t set a value, the command will instead pause and ask for confirmation when it produces no new output for 30 seconds. Use a higher value if the command is expected to take a long time (like installation or testing), or if it has a known fixed duration (like sleep)." + }, + "reset": { + "type": "boolean", + "title": "Reset", + "description": "If True, reset the terminal by creating a new session. Use this only when the terminal becomes unresponsive. Note that all previously set environment variables and session state will be lost after reset. Cannot be used with is_input=True.", + "default": false + }, + "kind": { + "type": "string", + "const": "TerminalAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "TerminalAction", + "description": "Schema for bash command execution." + }, + "TerminalObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Command", + "description": "The bash command that was executed. Can be empty string if the observation is from a previous command that hit soft timeout and is not yet finished." + }, + "exit_code": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Exit Code", + "description": "The exit code of the command. -1 indicates the process hit the soft timeout and is not yet finished." + }, + "timeout": { + "type": "boolean", + "title": "Timeout", + "description": "Whether the command execution timed out.", + "default": false + }, + "metadata": { + "$ref": "#/components/schemas/CmdOutputMetadata", + "description": "Additional metadata captured from PS1 after command execution." + }, + "full_output_save_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Output Save Dir", + "description": "Directory where full output files are saved" + }, + "kind": { + "type": "string", + "const": "TerminalObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "TerminalObservation", + "description": "A ToolResult that can be rendered as a CLI output." + }, + "TerminalTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TerminalTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "TerminalTool", + "description": "A ToolDefinition subclass that automatically initializes a TerminalExecutor with auto-detection." + }, + "TextContent": { + "properties": { + "cache_prompt": { + "type": "boolean", + "title": "Cache Prompt", + "default": false + }, + "type": { + "type": "string", + "const": "text", + "title": "Type", + "default": "text" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "text" + ], + "title": "TextContent" + }, + "ThinkAction": { + "properties": { + "thought": { + "type": "string", + "title": "Thought", + "description": "The thought to log." + }, + "kind": { + "type": "string", + "const": "ThinkAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "thought", + "kind" + ], + "title": "ThinkAction", + "description": "Action for logging a thought without making any changes." + }, + "ThinkObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "kind": { + "type": "string", + "const": "ThinkObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ThinkObservation", + "description": "Observation returned after logging a thought.\nThe ThinkAction itself contains the thought logged so no extra\nfields are needed here." + }, + "ThinkTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ThinkTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ThinkTool", + "description": "Tool for logging thoughts without making changes." + }, + "ThinkingBlock": { + "properties": { + "type": { + "type": "string", + "const": "thinking", + "title": "Type", + "default": "thinking" + }, + "thinking": { + "type": "string", + "title": "Thinking", + "description": "The thinking content" + }, + "signature": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Signature", + "description": "Cryptographic signature for the thinking block" + } + }, + "type": "object", + "required": [ + "thinking" + ], + "title": "ThinkingBlock", + "description": "Anthropic thinking block for extended thinking feature.\n\nThis represents the raw thinking blocks returned by Anthropic models\nwhen extended thinking is enabled. These blocks must be preserved\nand passed back to the API for tool use scenarios." + }, + "TokenEvent": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source" + }, + "prompt_token_ids": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Prompt Token Ids", + "description": "The exact prompt token IDs for this message event" + }, + "response_token_ids": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Response Token Ids", + "description": "The exact response token IDs for this message event" + }, + "kind": { + "type": "string", + "const": "TokenEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "prompt_token_ids", + "response_token_ids", + "kind" + ], + "title": "TokenEvent", + "description": "Event from VLLM representing token IDs used in LLM interaction." + }, + "TokenUsage": { + "properties": { + "model": { + "type": "string", + "title": "Model", + "default": "" + }, + "prompt_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Prompt Tokens", + "description": "Prompt tokens must be non-negative", + "default": 0 + }, + "completion_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Completion Tokens", + "description": "Completion tokens must be non-negative", + "default": 0 + }, + "cache_read_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Cache Read Tokens", + "description": "Cache read tokens must be non-negative", + "default": 0 + }, + "cache_write_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Cache Write Tokens", + "description": "Cache write tokens must be non-negative", + "default": 0 + }, + "reasoning_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Reasoning Tokens", + "description": "Reasoning tokens must be non-negative", + "default": 0 + }, + "context_window": { + "type": "integer", + "minimum": 0.0, + "title": "Context Window", + "description": "Context window must be non-negative", + "default": 0 + }, + "per_turn_token": { + "type": "integer", + "minimum": 0.0, + "title": "Per Turn Token", + "description": "Per turn tokens must be non-negative", + "default": 0 + }, + "response_id": { + "type": "string", + "title": "Response Id", + "default": "" + } + }, + "type": "object", + "title": "TokenUsage", + "description": "Metric tracking detailed token usage per completion call." + }, + "Tool-Input": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the tool class, e.g., 'TerminalTool'. Import it from an `openhands.tools.` subpackage.", + "examples": [ + "TerminalTool", + "FileEditorTool", + "TaskTrackerTool" + ] + }, + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params", + "description": "Parameters for the tool's .create() method, e.g., {'working_dir': '/app'}", + "examples": [ + { + "working_dir": "/workspace" + } + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Tool", + "description": "Defines a tool to be initialized for the agent.\n\nThis is only used in agent-sdk for type schema for server use." + }, + "ToolDefinition": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolDefinition" + }, + { + "$ref": "#/components/schemas/FinishTool" + }, + { + "$ref": "#/components/schemas/ThinkTool" + }, + { + "$ref": "#/components/schemas/BrowserClickTool" + }, + { + "$ref": "#/components/schemas/BrowserCloseTabTool" + }, + { + "$ref": "#/components/schemas/BrowserGetContentTool" + }, + { + "$ref": "#/components/schemas/BrowserGetStateTool" + }, + { + "$ref": "#/components/schemas/BrowserGetStorageTool" + }, + { + "$ref": "#/components/schemas/BrowserGoBackTool" + }, + { + "$ref": "#/components/schemas/BrowserListTabsTool" + }, + { + "$ref": "#/components/schemas/BrowserNavigateTool" + }, + { + "$ref": "#/components/schemas/BrowserScrollTool" + }, + { + "$ref": "#/components/schemas/BrowserSetStorageTool" + }, + { + "$ref": "#/components/schemas/BrowserStartRecordingTool" + }, + { + "$ref": "#/components/schemas/BrowserStopRecordingTool" + }, + { + "$ref": "#/components/schemas/BrowserSwitchTabTool" + }, + { + "$ref": "#/components/schemas/BrowserToolSet" + }, + { + "$ref": "#/components/schemas/BrowserTypeTool" + }, + { + "$ref": "#/components/schemas/DelegateTool" + }, + { + "$ref": "#/components/schemas/FileEditorTool" + }, + { + "$ref": "#/components/schemas/EditTool" + }, + { + "$ref": "#/components/schemas/ListDirectoryTool" + }, + { + "$ref": "#/components/schemas/ReadFileTool" + }, + { + "$ref": "#/components/schemas/WriteFileTool" + }, + { + "$ref": "#/components/schemas/GlobTool" + }, + { + "$ref": "#/components/schemas/GrepTool" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorTool" + }, + { + "$ref": "#/components/schemas/TaskTrackerTool" + }, + { + "$ref": "#/components/schemas/TerminalTool" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__tool__MCPToolDefinition-Output__1": "#/components/schemas/MCPToolDefinition", + "openhands__sdk__tool__builtins__finish__FinishTool-Output__1": "#/components/schemas/FinishTool", + "openhands__sdk__tool__builtins__think__ThinkTool-Output__1": "#/components/schemas/ThinkTool", + "openhands__tools__browser_use__definition__BrowserClickTool-Output__1": "#/components/schemas/BrowserClickTool", + "openhands__tools__browser_use__definition__BrowserCloseTabTool-Output__1": "#/components/schemas/BrowserCloseTabTool", + "openhands__tools__browser_use__definition__BrowserGetContentTool-Output__1": "#/components/schemas/BrowserGetContentTool", + "openhands__tools__browser_use__definition__BrowserGetStateTool-Output__1": "#/components/schemas/BrowserGetStateTool", + "openhands__tools__browser_use__definition__BrowserGetStorageTool-Output__1": "#/components/schemas/BrowserGetStorageTool", + "openhands__tools__browser_use__definition__BrowserGoBackTool-Output__1": "#/components/schemas/BrowserGoBackTool", + "openhands__tools__browser_use__definition__BrowserListTabsTool-Output__1": "#/components/schemas/BrowserListTabsTool", + "openhands__tools__browser_use__definition__BrowserNavigateTool-Output__1": "#/components/schemas/BrowserNavigateTool", + "openhands__tools__browser_use__definition__BrowserScrollTool-Output__1": "#/components/schemas/BrowserScrollTool", + "openhands__tools__browser_use__definition__BrowserSetStorageTool-Output__1": "#/components/schemas/BrowserSetStorageTool", + "openhands__tools__browser_use__definition__BrowserStartRecordingTool-Output__1": "#/components/schemas/BrowserStartRecordingTool", + "openhands__tools__browser_use__definition__BrowserStopRecordingTool-Output__1": "#/components/schemas/BrowserStopRecordingTool", + "openhands__tools__browser_use__definition__BrowserSwitchTabTool-Output__1": "#/components/schemas/BrowserSwitchTabTool", + "openhands__tools__browser_use__definition__BrowserToolSet-Output__1": "#/components/schemas/BrowserToolSet", + "openhands__tools__browser_use__definition__BrowserTypeTool-Output__1": "#/components/schemas/BrowserTypeTool", + "openhands__tools__delegate__definition__DelegateTool-Output__1": "#/components/schemas/DelegateTool", + "openhands__tools__file_editor__definition__FileEditorTool-Output__1": "#/components/schemas/FileEditorTool", + "openhands__tools__gemini__edit__definition__EditTool-Output__1": "#/components/schemas/EditTool", + "openhands__tools__gemini__list_directory__definition__ListDirectoryTool-Output__1": "#/components/schemas/ListDirectoryTool", + "openhands__tools__gemini__read_file__definition__ReadFileTool-Output__1": "#/components/schemas/ReadFileTool", + "openhands__tools__gemini__write_file__definition__WriteFileTool-Output__1": "#/components/schemas/WriteFileTool", + "openhands__tools__glob__definition__GlobTool-Output__1": "#/components/schemas/GlobTool", + "openhands__tools__grep__definition__GrepTool-Output__1": "#/components/schemas/GrepTool", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorTool-Output__1": "#/components/schemas/PlanningFileEditorTool", + "openhands__tools__task_tracker__definition__TaskTrackerTool-Output__1": "#/components/schemas/TaskTrackerTool", + "openhands__tools__terminal__definition__TerminalTool-Output__1": "#/components/schemas/TerminalTool" + } + } + }, + "ToolExecution": { + "properties": { + "taskSupport": { + "anyOf": [ + { + "type": "string", + "enum": [ + "forbidden", + "optional", + "required" + ] + }, + { + "type": "null" + } + ], + "title": "Tasksupport" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ToolExecution", + "description": "Execution-related properties for a tool." + }, + "UpdateConversationRequest": { + "properties": { + "title": { + "type": "string", + "maxLength": 200, + "minLength": 1, + "title": "Title", + "description": "New conversation title" + } + }, + "type": "object", + "required": [ + "title" + ], + "title": "UpdateConversationRequest", + "description": "Payload to update conversation metadata." + }, + "UpdateSecretsRequest": { + "properties": { + "secrets": { + "additionalProperties": { + "$ref": "#/components/schemas/SecretSource-Input" + }, + "type": "object", + "title": "Secrets", + "description": "Dictionary mapping secret keys to values" + } + }, + "type": "object", + "required": [ + "secrets" + ], + "title": "UpdateSecretsRequest", + "description": "Payload to update secrets in a conversation." + }, + "UserRejectObservation": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "rejection_reason": { + "type": "string", + "title": "Rejection Reason", + "description": "Reason for rejecting the action", + "default": "User rejected the action" + }, + "rejection_source": { + "type": "string", + "enum": [ + "user", + "hook" + ], + "title": "Rejection Source", + "description": "Source of the rejection: 'user' for confirmation mode rejections, 'hook' for PreToolUse hook blocks", + "default": "user" + }, + "action_id": { + "type": "string", + "title": "Action Id", + "description": "The action id that this observation is responding to" + }, + "kind": { + "type": "string", + "const": "UserRejectObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "action_id", + "kind" + ], + "title": "UserRejectObservation", + "description": "Observation when an action is rejected by user or hook.\n\nThis event is emitted when:\n- User rejects an action during confirmation mode (rejection_source=\"user\")\n- A PreToolUse hook blocks an action (rejection_source=\"hook\")" + }, + "VSCodeUrlResponse": { + "properties": { + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "VSCodeUrlResponse", + "description": "Response model for VSCode URL." + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + }, + "input": { + "title": "Input" + }, + "ctx": { + "type": "object", + "title": "Context" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "WriteFileAction": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to write to." + }, + "content": { + "type": "string", + "title": "Content", + "description": "The content to write to the file." + }, + "kind": { + "type": "string", + "const": "WriteFileAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "content", + "kind" + ], + "title": "WriteFileAction", + "description": "Schema for write file operation." + }, + "WriteFileObservation": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Path", + "description": "The file path that was written." + }, + "is_new_file": { + "type": "boolean", + "title": "Is New File", + "description": "Whether a new file was created.", + "default": false + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The previous content of the file (if it existed)." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The new content written to the file." + }, + "kind": { + "type": "string", + "const": "WriteFileObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "WriteFileObservation", + "description": "Observation from writing a file." + }, + "WriteFileTool": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "WriteFileTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "WriteFileTool", + "description": "Tool for writing complete file contents." + }, + "mcp__types__Tool": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "inputSchema": { + "additionalProperties": true, + "type": "object", + "title": "Inputschema" + }, + "outputSchema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Outputschema" + }, + "icons": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Icon" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Icons" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/mcp__types__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "_meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "execution": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecution" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "name", + "inputSchema" + ], + "title": "Tool", + "description": "Definition for a tool the client can call." + }, + "mcp__types__ToolAnnotations": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "readOnlyHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Readonlyhint" + }, + "destructiveHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Destructivehint" + }, + "idempotentHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Idempotenthint" + }, + "openWorldHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Openworldhint" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ToolAnnotations", + "description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like `title`).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers." + }, + "openhands__sdk__tool__spec__Tool": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the tool class, e.g., 'TerminalTool'. Import it from an `openhands.tools.` subpackage.", + "examples": [ + "TerminalTool", + "FileEditorTool", + "TaskTrackerTool" + ] + }, + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params", + "description": "Parameters for the tool's .create() method, e.g., {'working_dir': '/app'}", + "examples": [ + { + "working_dir": "/workspace" + } + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Tool", + "description": "Defines a tool to be initialized for the agent.\n\nThis is only used in agent-sdk for type schema for server use." + }, + "openhands__sdk__tool__tool__ToolAnnotations": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "A human-readable title for the tool." + }, + "readOnlyHint": { + "type": "boolean", + "title": "Readonlyhint", + "description": "If true, the tool does not modify its environment. Default: false", + "default": false + }, + "destructiveHint": { + "type": "boolean", + "title": "Destructivehint", + "description": "If true, the tool may perform destructive updates to its environment. If false, the tool performs only additive updates. (This property is meaningful only when `readOnlyHint == false`) Default: true", + "default": true + }, + "idempotentHint": { + "type": "boolean", + "title": "Idempotenthint", + "description": "If true, calling the tool repeatedly with the same arguments will have no additional effect on the its environment. (This property is meaningful only when `readOnlyHint == false`) Default: false", + "default": false + }, + "openWorldHint": { + "type": "boolean", + "title": "Openworldhint", + "description": "If true, this tool may interact with an 'open world' of external entities. If false, the tool's domain of interaction is closed. For example, the world of a web search tool is open, whereas that of a memory tool is not. Default: true", + "default": true + } + }, + "type": "object", + "title": "openhands.sdk.tool.tool.ToolAnnotations", + "description": "Annotations to provide hints about the tool's behavior.\n\nBased on Model Context Protocol (MCP) spec:\nhttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/caf3424488b10b4a7b1f8cb634244a450a1f4400/schema/2025-06-18/schema.ts#L838" + } + }, + "securitySchemes": { + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "X-Session-API-Key" + } + } + } +} \ No newline at end of file diff --git a/skills/v0-v1-migration/openapi/app-server.json b/skills/v0-v1-migration/openapi/app-server.json new file mode 100644 index 0000000..0069b74 --- /dev/null +++ b/skills/v0-v1-migration/openapi/app-server.json @@ -0,0 +1,26677 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "OpenHands", + "description": "OpenHands: Code Less, Make More", + "version": "0.0.1", + "x-skill-metadata": { + "retrieved_at": "2026-03-02T13:27:00Z", + "source_url": "https://app.all-hands.dev/openapi.json", + "refresh_instructions": "curl -s \"https://app.all-hands.dev/openapi.json\" > app-server.json" + } + }, + "paths": { + "/api/options/models": { + "get": { + "summary": "Get Litellm Models", + "description": "Get all models supported by LiteLLM.\n\nThis function combines models from litellm and Bedrock, removing any\nerror-prone Bedrock models.\n\nTo get the models:\n```sh\ncurl http://localhost:3000/api/litellm-models\n```\n\nReturns:\n list[str]: A sorted list of unique model names.", + "operationId": "get_litellm_models_api_options_models_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Get Litellm Models Api Options Models Get" + } + } + } + } + } + } + }, + "/api/options/agents": { + "get": { + "summary": "Get Agents", + "description": "Get all agents supported by LiteLLM.\n\nTo get the agents:\n```sh\ncurl http://localhost:3000/api/agents\n```\n\nReturns:\n list[str]: A sorted list of agent names.", + "operationId": "get_agents_api_options_agents_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Get Agents Api Options Agents Get" + } + } + } + } + } + } + }, + "/api/options/security-analyzers": { + "get": { + "summary": "Get Security Analyzers", + "description": "Get all supported security analyzers.\n\nTo get the security analyzers:\n```sh\ncurl http://localhost:3000/api/security-analyzers\n```\n\nReturns:\n list[str]: A sorted list of security analyzer names.", + "operationId": "get_security_analyzers_api_options_security_analyzers_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Response Get Security Analyzers Api Options Security Analyzers Get" + } + } + } + } + } + } + }, + "/api/options/config": { + "get": { + "summary": "Get Config", + "description": "Get current config.\n\nThis method has been replaced with the /v1/web-client/config endpoint,\nand will be removed as part of the V0 cleanup on 2026-04-01\n\nReturns:\n dict[str, Any]: The current server configuration.", + "operationId": "get_config_api_options_config_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "type": "object", + "title": "Response Get Config Api Options Config Get" + } + } + } + } + }, + "deprecated": true + } + }, + "/api/conversations/{conversation_id}/list-files": { + "get": { + "summary": "List Files", + "description": "List files in the specified path.\n\nThis function retrieves a list of files from the agent's runtime file store,\nexcluding certain system and hidden files/directories.\n\nTo list files:\n```sh\ncurl http://localhost:3000/api/conversations/{conversation_id}/list-files\n```\n\nArgs:\n metadata: The conversation metadata (provides conversation_id and user access validation).\n path (str, optional): The path to list files from. Defaults to None.\n\nReturns:\n list: A list of file names in the specified path.\n\nRaises:\n HTTPException: If there's an error listing the files.\n\n For V1 conversations, file operations are handled through the agent server.\n Use the sandbox's exposed agent server URL to access file operations.", + "operationId": "list_files_api_conversations__conversation_id__list_files_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "path", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Response List Files Api Conversations Conversation Id List Files Get" + } + } + } + }, + "404": { + "description": "Runtime not initialized", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 404 List Files Api Conversations Conversation Id List Files Get" + } + } + } + }, + "500": { + "description": "Error listing or filtering files", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 500 List Files Api Conversations Conversation Id List Files Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/select-file": { + "get": { + "summary": "Select File", + "description": "Retrieve the content of a specified file.\n\nTo select a file:\n```sh\ncurl http://localhost:3000/api/conversations/{conversation_id}/select-file?file=\n```\n\nArgs:\n file (str): The path of the file to be retrieved (relative to workspace root).\n metadata: The conversation metadata (provides conversation_id and user access validation).\n\nReturns:\n dict: A dictionary containing the file content.\n\nRaises:\n HTTPException: If there's an error opening the file.\n\n For V1 conversations, file operations are handled through the agent server.\n Use the sandbox's exposed agent server URL to access file operations.", + "operationId": "select_file_api_conversations__conversation_id__select_file_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "file", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "File" + } + } + ], + "responses": { + "200": { + "description": "File content returned as JSON", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Response 200 Select File Api Conversations Conversation Id Select File Get" + } + } + } + }, + "500": { + "description": "Error opening file", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 500 Select File Api Conversations Conversation Id Select File Get" + } + } + } + }, + "415": { + "description": "Unsupported media type", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 415 Select File Api Conversations Conversation Id Select File Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/zip-directory": { + "get": { + "summary": "Zip Current Workspace", + "description": "Download the current workspace as a zip file.\n\nFor V1 conversations, file operations are handled through the agent server.\nUse the sandbox's exposed agent server URL to access file operations.", + "operationId": "zip_current_workspace_api_conversations__conversation_id__zip_directory_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Zipped workspace returned as FileResponse", + "content": { + "application/json": { + "schema": {} + } + } + }, + "500": { + "description": "Error zipping workspace", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 500 Zip Current Workspace Api Conversations Conversation Id Zip Directory Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/git/changes": { + "get": { + "summary": "Git Changes", + "description": "Get git changes in the workspace.\n\nFor V1 conversations, git operations are handled through the agent server.\nUse the sandbox's exposed agent server URL to access git operations.", + "operationId": "git_changes_api_conversations__conversation_id__git_changes_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "title": "Response Git Changes Api Conversations Conversation Id Git Changes Get" + } + } + } + }, + "404": { + "description": "Not a git repository", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 404 Git Changes Api Conversations Conversation Id Git Changes Get" + } + } + } + }, + "500": { + "description": "Error getting changes", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 500 Git Changes Api Conversations Conversation Id Git Changes Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/git/diff": { + "get": { + "summary": "Git Diff", + "description": "Get git diff for a specific file.\n\nFor V1 conversations, git operations are handled through the agent server.\nUse the sandbox's exposed agent server URL to access git operations.", + "operationId": "git_diff_api_conversations__conversation_id__git_diff_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "path", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Path" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Git Diff Api Conversations Conversation Id Git Diff Get" + } + } + } + }, + "500": { + "description": "Error getting diff", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response 500 Git Diff Api Conversations Conversation Id Git Diff Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/upload-files": { + "post": { + "summary": "Upload Files", + "description": "Upload files to the workspace.\n\nFor V1 conversations, file operations are handled through the agent server.\nUse the sandbox's exposed agent server URL to access file operations.", + "operationId": "upload_files_api_conversations__conversation_id__upload_files_post", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_upload_files_api_conversations__conversation_id__upload_files_post" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/POSTUploadFilesModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/submit-feedback": { + "post": { + "summary": "Submit Feedback", + "description": "Submit user feedback.\n\nThis function stores the provided feedback data.\n\nTo submit feedback:\n```sh\ncurl -X POST -d '{\"email\": \"test@example.com\"}' -H \"Authorization:\"\n```\n\nArgs:\n request (Request): The incoming request object.\n feedback (FeedbackDataModel): The feedback data to be stored.\n\nReturns:\n dict: The stored feedback data.\n\nRaises:\n HTTPException: If there's an error submitting the feedback.", + "operationId": "submit_feedback_api_conversations__conversation_id__submit_feedback_post", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/config": { + "get": { + "summary": "Get Remote Runtime Config", + "description": "Retrieve the runtime configuration.\n\nFor V0 conversations: returns runtime_id and session_id from the runtime.\nFor V1 conversations: returns sandbox_id as runtime_id and conversation_id as session_id.", + "operationId": "get_remote_runtime_config_api_conversations__conversation_id__config_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/vscode-url": { + "get": { + "summary": "Get Vscode Url", + "description": "Get the VSCode URL.\n\nThis endpoint allows getting the VSCode URL.\n\nArgs:\n request (Request): The incoming FastAPI request object.\n\nReturns:\n JSONResponse: A JSON response indicating the success of the operation.\n\n For V1 conversations, the VSCode URL is available in the sandbox's ``exposed_urls``\n field. Use ``GET /api/v1/sandboxes?id={sandbox_id}`` to retrieve sandbox information and use the name VSCODE.", + "operationId": "get_vscode_url_api_conversations__conversation_id__vscode_url_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/web-hosts": { + "get": { + "summary": "Get Hosts", + "description": "Get the hosts used by the runtime.\n\nThis endpoint allows getting the hosts used by the runtime.\n\nArgs:\n request (Request): The incoming FastAPI request object.\n\nReturns:\n JSONResponse: A JSON response indicating the success of the operation.\n\n For V1 conversations, web hosts are available in the sandbox's ``exposed_urls``\n field. Use ``GET /api/v1/sandboxes?id={sandbox_id}`` to retrieve sandbox information and use the name AGENT_SERVER.", + "operationId": "get_hosts_api_conversations__conversation_id__web_hosts_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/events": { + "get": { + "summary": "Search Events", + "description": "Search through the event stream with filtering and pagination.\n\nArgs:\n conversation_id: The conversation ID\n start_id: Starting ID in the event stream. Defaults to 0\n end_id: Ending ID in the event stream\n reverse: Whether to retrieve events in reverse order. Defaults to False.\n filter: Filter for events\n limit: Maximum number of events to return. Must be between 1 and 100. Defaults to 20\n metadata: Conversation metadata (injected by dependency)\n user_id: User ID (injected by dependency)\n\nReturns:\n dict: Dictionary containing:\n - events: List of matching events\n - has_more: Whether there are more matching events after this batch\nRaises:\n HTTPException: If conversation is not found or access is denied\n ValueError: If limit is less than 1 or greater than 100\n\n Use the V1 endpoint ``GET /api/v1/events/search?conversation_id__eq={conversation_id}``\n instead, which provides enhanced filtering by event kind, timestamp ranges,\n and improved pagination.", + "operationId": "search_events_api_conversations__conversation_id__events_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "start_id", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0, + "title": "Start Id" + } + }, + { + "name": "end_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "End Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false, + "title": "Reverse" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "title": "Limit" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "null" + } + ], + "title": "Filter" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "summary": "Add Event", + "description": "Add an event to a conversation.\n\nFor V1 conversations, events are managed through the sandbox webhook system.\nUse ``POST /api/v1/webhooks/events/{conversation_id}`` for event callbacks.", + "operationId": "add_event_api_conversations__conversation_id__events_post", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/message": { + "post": { + "summary": "Add Message", + "description": "Add a message to an existing conversation.\n\nThis endpoint allows adding a user message to an existing conversation.\nThe message will be processed by the agent in the conversation.\n\nArgs:\n data: The request data containing the message text\n conversation: The conversation to add the message to (injected by dependency)\n\nReturns:\n JSONResponse: A JSON response indicating the success of the operation\n\n For V1 conversations, messages are handled through the agent server.\n Use the sandbox's exposed agent server URL to send messages.", + "operationId": "add_message_api_conversations__conversation_id__message_post", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddMessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/microagents": { + "get": { + "summary": "Get Microagents", + "description": "Get all microagents associated with the conversation.\n\nThis endpoint returns all repository and knowledge microagents that are loaded for the conversation.\n\nReturns:\n JSONResponse: A JSON response containing the list of microagents.\n\n Use the V1 endpoint ``GET /api/v1/app-conversations/{conversation_id}/skills`` instead,\n which provides skill information including triggers and content for V1 conversations.", + "operationId": "get_microagents_api_conversations__conversation_id__microagents_get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations": { + "post": { + "summary": "New Conversation", + "description": "Initialize a new session or join an existing one.\n\nAfter successful initialization, the client should connect to the WebSocket\nusing the returned conversation ID.\n\n Use the V1 endpoint ``POST /api/v1/app-conversations`` instead, which provides\n improved conversation management with sandbox lifecycle support.", + "operationId": "new_conversation_api_conversations_post", + "deprecated": true, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InitSessionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "summary": "Search Conversations", + "description": "Search and list conversations with pagination support.\n\nUse the V1 endpoint ``GET /api/v1/app-conversations/search`` instead, which provides\nenhanced filtering, sorting, and pagination capabilities.", + "operationId": "search_conversations_api_conversations_get", + "deprecated": true, + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Page Id" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "title": "Limit" + } + }, + { + "name": "selected_repository", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Repository" + } + }, + { + "name": "conversation_trigger", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTrigger" + }, + { + "type": "null" + } + ], + "title": "Conversation Trigger" + } + }, + { + "name": "include_sub_conversations", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "If True, include sub-conversations in the results. If False (default), exclude all sub-conversations.", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationInfoResultSet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}": { + "get": { + "summary": "Get Conversation", + "description": "Get a single conversation by ID.\n\nUse the V1 endpoint ``GET /api/v1/app-conversations?ids={conversation_id}`` instead,\nwhich supports batch retrieval of conversations by their IDs.", + "operationId": "get_conversation_api_conversations__conversation_id__get", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationInfo-Output" + }, + { + "type": "null" + } + ], + "title": "Response Get Conversation Api Conversations Conversation Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Conversation", + "description": "Delete a conversation by ID.\n\nFor V1 conversations, use ``DELETE /api/v1/sandboxes/{sandbox_id}`` to delete the\nassociated sandbox, which will clean up the conversation resources.", + "operationId": "delete_conversation_api_conversations__conversation_id__delete", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Delete Conversation Api Conversations Conversation Id Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "summary": "Update Conversation", + "description": "Update conversation metadata.\n\nThis endpoint allows updating conversation details like title.\nOnly the conversation owner can update the conversation.\nSupports both V0 and V1 conversations.\n\nArgs:\n conversation_id: The ID of the conversation to update\n data: The conversation update data (title, etc.)\n user_id: The authenticated user ID\n conversation_store: The conversation store dependency\n app_conversation_info_service: The app conversation info service for V1 conversations\n app_conversation_service: The app conversation service for agent-server communication\n\nReturns:\n bool: True if the conversation was updated successfully\n\nRaises:\n HTTPException: If conversation is not found or user lacks permission\n\n This endpoint is part of the legacy V0 API and will be removed in a future release.\n Use the V1 endpoint ``PATCH /api/v1/app-conversations/{conversation_id}`` instead,\n which provides the same functionality for updating conversation metadata.", + "operationId": "update_conversation_api_conversations__conversation_id__patch", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateConversationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Update Conversation Api Conversations Conversation Id Patch" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/remember-prompt": { + "get": { + "summary": "Get Prompt", + "operationId": "get_prompt_api_conversations__conversation_id__remember_prompt_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "event_id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "title": "Event Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/start": { + "post": { + "summary": "Start Conversation", + "description": "Start an agent loop for a conversation.\n\nThis endpoint calls the conversation_manager's maybe_start_agent_loop method\nto start a conversation. If the conversation is already running, it will\nreturn the existing agent loop info.\n\n Use the V1 endpoint ``POST /api/v1/app-conversations`` instead, which combines\n conversation creation and starting into a single operation with integrated\n sandbox lifecycle management.", + "operationId": "start_conversation_api_conversations__conversation_id__start_post", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProvidersSetModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/stop": { + "post": { + "summary": "Stop Conversation", + "description": "Stop an agent loop for a conversation.\n\nThis endpoint calls the conversation_manager's close_session method\nto stop a conversation.\n\n Use the V1 endpoint ``POST /api/v1/sandboxes/{sandbox_id}/pause`` instead to pause\n the sandbox execution, or ``DELETE /api/v1/sandboxes/{sandbox_id}`` to fully stop\n and remove the sandbox.", + "operationId": "stop_conversation_api_conversations__conversation_id__stop_post", + "deprecated": true, + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/exp-config": { + "post": { + "summary": "Add Experiment Config For Conversation", + "operationId": "add_experiment_config_for_conversation_api_conversations__conversation_id__exp_config_post", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExperimentConfig" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Add Experiment Config For Conversation Api Conversations Conversation Id Exp Config Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/microagent-management/conversations": { + "get": { + "summary": "Get Microagent Management Conversations", + "description": "Get conversations for the microagent management page with pagination support.\n\nThis endpoint returns conversations with conversation_trigger = 'microagent_management'\nand only includes conversations with active PRs. Pagination is supported.\n\nArgs:\n page_id: Optional page ID for pagination\n limit: Maximum number of results per page (default: 20)\n selected_repository: Repository filter to limit results to a specific repository\n conversation_store: Conversation store dependency\n provider_tokens: Provider tokens for checking PR status\n app_conversation_service: App conversation service for V1 conversations\n\nReturns:\n ConversationInfoResultSet with filtered and paginated results", + "operationId": "get_microagent_management_conversations_api_microagent_management_conversations_get", + "parameters": [ + { + "name": "selected_repository", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Selected Repository" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Page Id" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 20, + "title": "Limit" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationInfoResultSet" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/settings": { + "get": { + "summary": "Load Settings", + "operationId": "load_settings_api_settings_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GETSettingsModel" + } + } + } + }, + "404": { + "description": "Settings not found", + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "type": "object", + "title": "Response 404 Load Settings Api Settings Get" + } + } + } + }, + "401": { + "description": "Invalid token", + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "type": "object", + "title": "Response 401 Load Settings Api Settings Get" + } + } + } + } + } + }, + "post": { + "summary": "Store Settings", + "operationId": "store_settings_api_settings_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Settings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Settings stored successfully", + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "type": "object", + "title": "Response 200 Store Settings Api Settings Post" + } + } + } + }, + "500": { + "description": "Error storing settings", + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "type": "object", + "title": "Response 500 Store Settings Api Settings Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/reset-settings": { + "post": { + "summary": "Reset Settings", + "description": "Resets user settings. (Deprecated)", + "operationId": "reset_settings_api_reset_settings_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "410": { + "description": "Reset settings functionality has been removed", + "content": { + "application/json": { + "schema": { + "additionalProperties": true, + "type": "object", + "title": "Response 410 Reset Settings Api Reset Settings Post" + } + } + } + } + } + } + }, + "/api/add-git-providers": { + "post": { + "summary": "Store Provider Tokens", + "operationId": "store_provider_tokens_api_add_git_providers_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/POSTProviderModel" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/unset-provider-tokens": { + "post": { + "summary": "Unset Provider Tokens", + "operationId": "unset_provider_tokens_api_unset_provider_tokens_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Response Unset Provider Tokens Api Unset Provider Tokens Post" + } + } + } + } + } + } + }, + "/api/secrets": { + "get": { + "summary": "Load Custom Secrets Names", + "operationId": "load_custom_secrets_names_api_secrets_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GETCustomSecrets" + } + } + } + } + } + }, + "post": { + "summary": "Create Custom Secret", + "operationId": "create_custom_secret_api_secrets_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomSecretModel" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Response Create Custom Secret Api Secrets Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/secrets/{secret_id}": { + "put": { + "summary": "Update Custom Secret", + "operationId": "update_custom_secret_api_secrets__secret_id__put", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomSecretWithoutValueModel" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "Response Update Custom Secret Api Secrets Secret Id Put" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Custom Secret", + "operationId": "delete_custom_secret_api_secrets__secret_id__delete", + "parameters": [ + { + "name": "secret_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Secret Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/conversation/{conversation_id}/events/search": { + "get": { + "tags": [ + "Events" + ], + "summary": "Search Events", + "description": "Search / List events.", + "operationId": "search_events_api_v1_conversation__conversation_id__events_search_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "kind__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "Condensation", + "CondensationRequest", + "CondensationSummaryEvent", + "ConversationErrorEvent", + "ConversationStateUpdateEvent", + "LLMCompletionLogEvent", + "ActionEvent", + "MessageEvent", + "AgentErrorEvent", + "ObservationEvent", + "UserRejectObservation", + "SystemPromptEvent", + "TokenEvent", + "PauseEvent" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event kind" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp greater than or equal to" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp less than" + } + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/EventSortOrder", + "title": "Sort order for results", + "default": "TIMESTAMP" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/conversation/{conversation_id}/events/count": { + "get": { + "tags": [ + "Events" + ], + "summary": "Count Events", + "description": "Count events matching the given filters.", + "operationId": "count_events_api_v1_conversation__conversation_id__events_count_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "kind__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "Condensation", + "CondensationRequest", + "CondensationSummaryEvent", + "ConversationErrorEvent", + "ConversationStateUpdateEvent", + "LLMCompletionLogEvent", + "ActionEvent", + "MessageEvent", + "AgentErrorEvent", + "ObservationEvent", + "UserRejectObservation", + "SystemPromptEvent", + "TokenEvent", + "PauseEvent" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event kind" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp greater than or equal to" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp less than" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count Events Api V1 Conversation Conversation Id Events Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/conversation/{conversation_id}/events": { + "get": { + "tags": [ + "Events" + ], + "summary": "Batch Get Events", + "description": "Get a batch of events given their ids, returning null for any missing event.", + "operationId": "batch_get_events_api_v1_conversation__conversation_id__events_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Event-Output" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Events Api V1 Conversation Conversation Id Events Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/search": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Search App Conversations", + "description": "Search / List sandboxed conversations.", + "operationId": "search_app_conversations_api_v1_app_conversations_search_get", + "parameters": [ + { + "name": "title__contains", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter by title containing this string" + } + }, + { + "name": "created_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at greater than or equal to this datetime" + } + }, + { + "name": "created_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at less than this datetime" + } + }, + { + "name": "updated_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at greater than or equal to this datetime" + } + }, + { + "name": "updated_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at less than this datetime" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + }, + { + "name": "include_sub_conversations", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "If True, include sub-conversations in the results. If False (default), exclude all sub-conversations.", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversationPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/count": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Count App Conversations", + "description": "Count sandboxed conversations matching the given filters.", + "operationId": "count_app_conversations_api_v1_app_conversations_count_get", + "parameters": [ + { + "name": "title__contains", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter by title containing this string" + } + }, + { + "name": "created_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at greater than or equal to this datetime" + } + }, + { + "name": "created_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at less than this datetime" + } + }, + { + "name": "updated_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at greater than or equal to this datetime" + } + }, + { + "name": "updated_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at less than this datetime" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count App Conversations Api V1 App Conversations Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Batch Get App Conversations", + "description": "Get a batch of sandboxed conversations given their ids. Return None for any missing.\n\nAccepts UUIDs as strings (with or without dashes) and converts them internally.\nReturns 400 Bad Request if any string cannot be converted to a valid UUID.", + "operationId": "batch_get_app_conversations_api_v1_app_conversations_get", + "parameters": [ + { + "name": "ids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppConversation" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get App Conversations Api V1 App Conversations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Conversations" + ], + "summary": "Start App Conversation", + "operationId": "start_app_conversation_api_v1_app_conversations_post", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversationStartRequest-Input" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversationStartTask" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/{conversation_id}": { + "patch": { + "tags": [ + "Conversations" + ], + "summary": "Update App Conversation", + "operationId": "update_app_conversation_api_v1_app_conversations__conversation_id__patch", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversationUpdateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversation" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/stream-start": { + "post": { + "tags": [ + "Conversations" + ], + "summary": "Stream App Conversation Start", + "description": "Start an app conversation start task and stream updates from it.\nLeaves the connection open until either the conversation starts or there was an error", + "operationId": "stream_app_conversation_start_api_v1_app_conversations_stream_start_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversationStartRequest-Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/AppConversationStartTask" + }, + "type": "array", + "title": "Response Stream App Conversation Start Api V1 App Conversations Stream Start Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/start-tasks/search": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Search App Conversation Start Tasks", + "description": "Search / List conversation start tasks.", + "operationId": "search_app_conversation_start_tasks_api_v1_app_conversations_start_tasks_search_get", + "parameters": [ + { + "name": "conversation_id__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Filter by conversation ID equal to this value" + } + }, + { + "name": "created_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at greater than or equal to this datetime" + } + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/AppConversationStartTaskSortOrder", + "title": "Sort order for the results", + "default": "CREATED_AT_DESC" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AppConversationStartTaskPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/start-tasks/count": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Count App Conversation Start Tasks", + "description": "Count conversation start tasks matching the given filters.", + "operationId": "count_app_conversation_start_tasks_api_v1_app_conversations_start_tasks_count_get", + "parameters": [ + { + "name": "conversation_id__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Filter by conversation ID equal to this value" + } + }, + { + "name": "created_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at greater than or equal to this datetime" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count App Conversation Start Tasks Api V1 App Conversations Start Tasks Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/start-tasks": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Batch Get App Conversation Start Tasks", + "description": "Get a batch of start app conversation tasks given their ids. Return None for any missing.", + "operationId": "batch_get_app_conversation_start_tasks_api_v1_app_conversations_start_tasks_get", + "parameters": [ + { + "name": "ids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "title": "Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/AppConversationStartTask" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get App Conversation Start Tasks Api V1 App Conversations Start Tasks Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/{conversation_id}/file": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Read Conversation File", + "description": "Read a file from a specific conversation's sandbox workspace.\n\nReturns the content of the file at the specified path if it exists, otherwise returns an empty string.\n\nArgs:\n conversation_id: The UUID of the conversation\n file_path: Path to the file to read within the sandbox workspace\n\nReturns:\n The content of the file or an empty string if the file doesn't exist", + "operationId": "read_conversation_file_api_v1_app_conversations__conversation_id__file_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + }, + { + "name": "file_path", + "in": "query", + "required": false, + "schema": { + "type": "string", + "title": "Path to the file to read within the sandbox workspace", + "default": "/workspace/project/PLAN.md" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Read Conversation File Api V1 App Conversations Conversation Id File Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/{conversation_id}/skills": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Get Conversation Skills", + "description": "Get all skills associated with the conversation.\n\nThis endpoint returns all skills that are loaded for the v1 conversation.\nSkills are loaded from multiple sources:\n- Sandbox skills (exposed URLs)\n- Global skills (OpenHands/skills/)\n- User skills (~/.openhands/skills/)\n- Organization skills (org/.openhands repository)\n- Repository skills (repo/.openhands/skills/ or .openhands/microagents/)\n\nReturns:\n JSONResponse: A JSON response containing the list of skills.", + "operationId": "get_conversation_skills_api_v1_app_conversations__conversation_id__skills_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/app-conversations/{conversation_id}/download": { + "get": { + "tags": [ + "Conversations" + ], + "summary": "Export Conversation", + "description": "Download a conversation trajectory as a zip file.\n\nReturns a zip file containing all events and metadata for the conversation.\n\nArgs:\n conversation_id: The UUID of the conversation to download\n\nReturns:\n A zip file containing the conversation trajectory", + "operationId": "export_conversation_api_v1_app_conversations__conversation_id__download_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandboxes/search": { + "get": { + "tags": [ + "Sandbox" + ], + "summary": "Search Sandboxes", + "description": "Search / list sandboxes owned by the current user.", + "operationId": "search_sandboxes_api_v1_sandboxes_search_get", + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandboxes": { + "get": { + "tags": [ + "Sandbox" + ], + "summary": "Batch Get Sandboxes", + "description": "Get a batch of sandboxes given their ids, returning null for any missing.", + "operationId": "batch_get_sandboxes_api_v1_sandboxes_get", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SandboxInfo" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Sandboxes Api V1 Sandboxes Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "tags": [ + "Sandbox" + ], + "summary": "Start Sandbox", + "operationId": "start_sandbox_api_v1_sandboxes_post", + "parameters": [ + { + "name": "sandbox_spec_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Spec Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxInfo" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandboxes/{sandbox_id}/pause": { + "post": { + "tags": [ + "Sandbox" + ], + "summary": "Pause Sandbox", + "operationId": "pause_sandbox_api_v1_sandboxes__sandbox_id__pause_post", + "parameters": [ + { + "name": "sandbox_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Sandbox Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandboxes/{sandbox_id}/resume": { + "post": { + "tags": [ + "Sandbox" + ], + "summary": "Resume Sandbox", + "operationId": "resume_sandbox_api_v1_sandboxes__sandbox_id__resume_post", + "parameters": [ + { + "name": "sandbox_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Sandbox Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandboxes/{id}": { + "delete": { + "tags": [ + "Sandbox" + ], + "summary": "Delete Sandbox", + "operationId": "delete_sandbox_api_v1_sandboxes__id__delete", + "parameters": [ + { + "name": "sandbox_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Sandbox Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "404": { + "description": "Item not found" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandbox-specs/search": { + "get": { + "tags": [ + "Sandbox" + ], + "summary": "Search Sandbox Specs", + "description": "Search / List sandbox specs.", + "operationId": "search_sandbox_specs_api_v1_sandbox_specs_search_get", + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SandboxSpecInfoPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/sandbox-specs": { + "get": { + "tags": [ + "Sandbox" + ], + "summary": "Batch Get Sandbox Specs", + "description": "Get a batch of sandbox specs given their ids, returning null for any missing.", + "operationId": "batch_get_sandbox_specs_api_v1_sandbox_specs_get", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SandboxSpecInfo" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Sandbox Specs Api V1 Sandbox Specs Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/users/me": { + "get": { + "tags": [ + "User" + ], + "summary": "Get Current User", + "description": "Get the current authenticated user.", + "operationId": "get_current_user_api_v1_users_me_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfo" + } + } + } + } + } + } + }, + "/api/v1/webhooks/conversations": { + "post": { + "tags": [ + "Webhooks" + ], + "summary": "On Conversation Update", + "description": "Webhook callback for when a conversation starts, pauses, resumes, or deletes.", + "operationId": "on_conversation_update_api_v1_webhooks_conversations_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConversationInfo-Input" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/v1/webhooks/events/{conversation_id}": { + "post": { + "tags": [ + "Webhooks" + ], + "summary": "On Event", + "description": "Webhook callback for when event stream events occur.", + "operationId": "on_event_api_v1_webhooks_events__conversation_id__post", + "security": [ + { + "APIKeyHeader": [] + } + ], + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Conversation Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Event-Input" + }, + "title": "Events" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Success" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/v1/webhooks/secrets": { + "get": { + "tags": [ + "Webhooks" + ], + "summary": "Get Secret", + "description": "Given an access token, retrieve a user secret. The access token\nis limited by user and provider type, and may include a timeout, limiting\nthe damage in the event that a token is ever leaked", + "operationId": "get_secret_api_v1_webhooks_secrets_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "APIKeyHeader": [] + } + ] + } + }, + "/api/v1/web-client/config": { + "get": { + "tags": [ + "Config" + ], + "summary": "Get Web Client Config", + "description": "Get the configuration of the web client.\n\nThis endpoint is typically one of the first invoked, and does not require\nauthentication. It provides general settings for the web client independent\nof users.", + "operationId": "get_web_client_config_api_v1_web_client_config_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebClientConfig" + } + } + } + } + } + } + }, + "/api/conversations/{conversation_id}/trajectory": { + "get": { + "summary": "Get Trajectory", + "description": "Get trajectory.\n\nThis function retrieves the current trajectory and returns it.\nUses the local EventStore which reads events from the file store,\nso it works with both standalone and nested conversation managers.\n\nArgs:\n metadata: The conversation metadata (provides conversation_id and user access validation).\n\nReturns:\n JSONResponse: A JSON response containing the trajectory as a list of\n events.", + "operationId": "get_trajectory_api_conversations__conversation_id__trajectory_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/alive": { + "get": { + "summary": "Alive", + "description": "Endpoint for liveness probes. If this responds then the server is\nconsidered alive.", + "operationId": "alive_alive_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/health": { + "get": { + "summary": "Health", + "operationId": "health_health_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "string", + "title": "Response Health Health Get" + } + } + } + } + } + } + }, + "/server_info": { + "get": { + "summary": "Get Server Info", + "operationId": "get_server_info_server_info_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/ready": { + "get": { + "summary": "Is Ready", + "operationId": "is_ready_ready_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/saas": { + "get": { + "summary": "Is Saas", + "operationId": "is_saas_saas_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/api/authenticate": { + "post": { + "summary": "Authenticate", + "operationId": "authenticate_api_authenticate_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/api/accept_tos": { + "post": { + "summary": "Accept Tos", + "operationId": "accept_tos_api_accept_tos_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/api/logout": { + "post": { + "summary": "Logout", + "operationId": "logout_api_logout_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/api/refresh-tokens": { + "get": { + "summary": "Refresh Tokens", + "description": "Return the latest token for a given provider.", + "operationId": "refresh_tokens_api_refresh_tokens_get", + "parameters": [ + { + "name": "provider", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/ProviderType" + } + }, + { + "name": "sid", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Sid" + } + }, + { + "name": "X-Session-API-Key", + "in": "header", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Session-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/oauth/keycloak/callback": { + "get": { + "summary": "Keycloak Callback", + "operationId": "keycloak_callback_oauth_keycloak_callback_get", + "parameters": [ + { + "name": "code", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Code" + } + }, + { + "name": "state", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "State" + } + }, + { + "name": "error", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + } + }, + { + "name": "error_description", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Description" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/oauth/keycloak/offline/callback": { + "get": { + "summary": "Keycloak Offline Callback", + "operationId": "keycloak_offline_callback_oauth_keycloak_offline_callback_get", + "parameters": [ + { + "name": "code", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Code" + } + }, + { + "name": "state", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "State" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/oauth/github/callback": { + "get": { + "summary": "Github Dummy Callback", + "description": "Callback for GitHub that just forwards the user to the app base URL.", + "operationId": "github_dummy_callback_oauth_github_callback_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/oauth/device/authorize": { + "post": { + "summary": "Device Authorization", + "description": "Start device flow by generating device and user codes.", + "operationId": "device_authorization_oauth_device_authorize_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceAuthorizationResponse" + } + } + } + } + } + } + }, + "/oauth/device/token": { + "post": { + "summary": "Device Token", + "description": "Poll for a token until the user authorizes or the code expires.", + "operationId": "device_token_oauth_device_token_post", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/Body_device_token_oauth_device_token_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/oauth/device/verify-authenticated": { + "post": { + "summary": "Device Verification Authenticated", + "description": "Process device verification for authenticated users (called by frontend).", + "operationId": "device_verification_authenticated_oauth_device_verify_authenticated_post", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/Body_device_verification_authenticated_oauth_device_verify_authenticated_post" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/installations": { + "get": { + "summary": "Saas Get User Installations", + "operationId": "saas_get_user_installations_api_user_installations_get", + "parameters": [ + { + "name": "provider", + "in": "query", + "required": true, + "schema": { + "$ref": "#/components/schemas/ProviderType" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Response Saas Get User Installations Api User Installations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/repositories": { + "get": { + "summary": "Saas Get User Repositories", + "operationId": "saas_get_user_repositories_api_user_repositories_get", + "parameters": [ + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "pushed", + "title": "Sort" + } + }, + { + "name": "selected_provider", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ], + "title": "Selected Provider" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Per Page" + } + }, + { + "name": "installation_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Installation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Repository" + }, + "title": "Response Saas Get User Repositories Api User Repositories Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/info": { + "get": { + "summary": "Saas Get User", + "operationId": "saas_get_user_api_user_info_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + } + }, + "/api/user/search/repositories": { + "get": { + "summary": "Saas Search Repositories", + "operationId": "saas_search_repositories_api_user_search_repositories_get", + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Query" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 5, + "title": "Per Page" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "stars", + "title": "Sort" + } + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "desc", + "title": "Order" + } + }, + { + "name": "selected_provider", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ], + "title": "Selected Provider" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Repository" + }, + "title": "Response Saas Search Repositories Api User Search Repositories Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/suggested-tasks": { + "get": { + "summary": "Saas Get Suggested Tasks", + "description": "Get suggested tasks for the authenticated user across their most recently pushed repositories.\n\nReturns:\n- PRs owned by the user\n- Issues assigned to the user.", + "operationId": "saas_get_suggested_tasks_api_user_suggested_tasks_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/SuggestedTask" + }, + "type": "array", + "title": "Response Saas Get Suggested Tasks Api User Suggested Tasks Get" + } + } + } + } + } + } + }, + "/api/user/repository/branches": { + "get": { + "summary": "Saas Get Repository Branches", + "description": "Get branches for a repository.\n\nArgs:\n repository: The repository name in the format 'owner/repo'\n\nReturns:\n A list of branches for the repository", + "operationId": "saas_get_repository_branches_api_user_repository_branches_get", + "parameters": [ + { + "name": "repository", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Repository" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1, + "title": "Page" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 30, + "title": "Per Page" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedBranchesResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/search/branches": { + "get": { + "summary": "Saas Search Branches", + "operationId": "saas_search_branches_api_user_search_branches_get", + "parameters": [ + { + "name": "repository", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Repository" + } + }, + { + "name": "query", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Query" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 30, + "title": "Per Page" + } + }, + { + "name": "selected_provider", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ], + "title": "Selected Provider" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Branch" + }, + "title": "Response Saas Search Branches Api User Search Branches Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/repository/{repository_name}/microagents": { + "get": { + "summary": "Saas Get Repository Microagents", + "description": "Scan the microagents directory of a repository and return the list of microagents.\n\nThe microagents directory location depends on the git provider and actual repository name:\n- If git provider is not GitLab and actual repository name is \".openhands\": scans \"microagents\" folder\n- If git provider is GitLab and actual repository name is \"openhands-config\": scans \"microagents\" folder\n- Otherwise: scans \".openhands/microagents\" folder\n\nNote: This API returns microagent metadata without content for performance.\nUse the separate content API to fetch individual microagent content.\n\nArgs:\n repository_name: Repository name in the format 'owner/repo' or 'domain/owner/repo'\n provider_tokens: Provider tokens for authentication\n access_token: Access token for external authentication\n user_id: User ID for authentication\n\nReturns:\n List of microagents found in the repository's microagents directory (without content)", + "operationId": "saas_get_repository_microagents_api_user_repository__repository_name__microagents_get", + "parameters": [ + { + "name": "repository_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Repository Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MicroagentResponse" + }, + "title": "Response Saas Get Repository Microagents Api User Repository Repository Name Microagents Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/user/repository/{repository_name}/microagents/content": { + "get": { + "summary": "Saas Get Repository Microagent Content", + "description": "Fetch the content of a specific microagent file from a repository.\n\nArgs:\n repository_name: Repository name in the format 'owner/repo' or 'domain/owner/repo'\n file_path: Query parameter - Path to the microagent file within the repository\n provider_tokens: Provider tokens for authentication\n access_token: Access token for external authentication\n user_id: User ID for authentication\n\nReturns:\n Microagent file content and metadata\n\nExample:\n GET /api/user/repository/owner/repo/microagents/content?file_path=.openhands/microagents/my-agent.md", + "operationId": "saas_get_repository_microagent_content_api_user_repository__repository_name__microagents_content_get", + "parameters": [ + { + "name": "repository_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Repository Name" + } + }, + { + "name": "file_path", + "in": "query", + "required": true, + "schema": { + "type": "string", + "description": "Path to the microagent file within the repository", + "title": "File Path" + }, + "description": "Path to the microagent file within the repository" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MicroagentContentResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/billing/credits": { + "get": { + "summary": "Get Credits", + "operationId": "get_credits_api_billing_credits_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCreditsResponse" + } + } + } + } + } + } + }, + "/api/billing/subscription-access": { + "get": { + "summary": "Get Subscription Access", + "description": "Get details of the currently valid subscription for the user.", + "operationId": "get_subscription_access_api_billing_subscription_access_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/SubscriptionAccessResponse" + }, + { + "type": "null" + } + ], + "title": "Response Get Subscription Access Api Billing Subscription Access Get" + } + } + } + } + } + } + }, + "/api/billing/has-payment-method": { + "post": { + "summary": "Has Payment Method", + "operationId": "has_payment_method_api_billing_has_payment_method_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "title": "Response Has Payment Method Api Billing Has Payment Method Post" + } + } + } + } + } + } + }, + "/api/billing/create-customer-setup-session": { + "post": { + "summary": "Create Customer Setup Session", + "operationId": "create_customer_setup_session_api_billing_create_customer_setup_session_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateBillingSessionResponse" + } + } + } + } + } + } + }, + "/api/billing/create-checkout-session": { + "post": { + "summary": "Create Checkout Session", + "operationId": "create_checkout_session_api_billing_create_checkout_session_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCheckoutSessionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateBillingSessionResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/billing/success": { + "get": { + "summary": "Success Callback", + "operationId": "success_callback_api_billing_success_get", + "parameters": [ + { + "name": "session_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/billing/cancel": { + "get": { + "summary": "Cancel Callback", + "operationId": "cancel_callback_api_billing_cancel_get", + "parameters": [ + { + "name": "session_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-conversations/search": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Search Shared Conversations", + "description": "Search / List shared conversations.", + "operationId": "search_shared_conversations_api_shared_conversations_search_get", + "parameters": [ + { + "name": "title__contains", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter by title containing this string" + } + }, + { + "name": "created_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at greater than or equal to this datetime" + } + }, + { + "name": "created_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at less than this datetime" + } + }, + { + "name": "updated_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at greater than or equal to this datetime" + } + }, + { + "name": "updated_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at less than this datetime" + } + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/SharedConversationSortOrder", + "title": "Sort order for results", + "default": "CREATED_AT_DESC" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + }, + { + "name": "include_sub_conversations", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "title": "If True, include sub-conversations in the results. If False (default), exclude all sub-conversations.", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SharedConversationPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-conversations/count": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Count Shared Conversations", + "description": "Count shared conversations matching the given filters.", + "operationId": "count_shared_conversations_api_shared_conversations_count_get", + "parameters": [ + { + "name": "title__contains", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter by title containing this string" + } + }, + { + "name": "created_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at greater than or equal to this datetime" + } + }, + { + "name": "created_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by created_at less than this datetime" + } + }, + { + "name": "updated_at__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at greater than or equal to this datetime" + } + }, + { + "name": "updated_at__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Filter by updated_at less than this datetime" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count Shared Conversations Api Shared Conversations Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-conversations": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Batch Get Shared Conversations", + "description": "Get a batch of shared conversations given their ids. Return None for any missing or non-shared.", + "operationId": "batch_get_shared_conversations_api_shared_conversations_get", + "parameters": [ + { + "name": "ids", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Ids" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SharedConversation" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Shared Conversations Api Shared Conversations Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-events/search": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Search Shared Events", + "description": "Search / List events for a shared conversation.", + "operationId": "search_shared_events_api_shared_events_search_get", + "parameters": [ + { + "name": "conversation_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Conversation ID to search events for" + } + }, + { + "name": "kind__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "Condensation", + "CondensationRequest", + "CondensationSummaryEvent", + "ConversationErrorEvent", + "ConversationStateUpdateEvent", + "LLMCompletionLogEvent", + "ActionEvent", + "MessageEvent", + "AgentErrorEvent", + "ObservationEvent", + "UserRejectObservation", + "SystemPromptEvent", + "TokenEvent", + "PauseEvent" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event kind" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp greater than or equal to" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp less than" + } + }, + { + "name": "sort_order", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/EventSortOrder", + "title": "Sort order for results", + "default": "TIMESTAMP" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-events/count": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Count Shared Events", + "description": "Count events for a shared conversation matching the given filters.", + "operationId": "count_shared_events_api_shared_events_count_get", + "parameters": [ + { + "name": "conversation_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Conversation ID to count events for" + } + }, + { + "name": "kind__eq", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "Condensation", + "CondensationRequest", + "CondensationSummaryEvent", + "ConversationErrorEvent", + "ConversationStateUpdateEvent", + "LLMCompletionLogEvent", + "ActionEvent", + "MessageEvent", + "AgentErrorEvent", + "ObservationEvent", + "UserRejectObservation", + "SystemPromptEvent", + "TokenEvent", + "PauseEvent" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional filter by event kind" + } + }, + { + "name": "timestamp__gte", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp greater than or equal to" + } + }, + { + "name": "timestamp__lt", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Optional filter by timestamp less than" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "integer", + "title": "Response Count Shared Events Api Shared Events Count Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-events": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Batch Get Shared Events", + "description": "Get a batch of events for a shared conversation given their ids, returning null for any missing event.", + "operationId": "batch_get_shared_events_api_shared_events_get", + "parameters": [ + { + "name": "conversation_id", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Conversation ID to get events for" + } + }, + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Event-Output" + }, + { + "type": "null" + } + ] + }, + "title": "Response Batch Get Shared Events Api Shared Events Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/shared-events/{conversation_id}/{event_id}": { + "get": { + "tags": [ + "Sharing" + ], + "summary": "Get Shared Event", + "description": "Get a single event from a shared conversation by conversation_id and event_id.", + "operationId": "get_shared_event_api_shared_events__conversation_id___event_id__get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + }, + { + "name": "event_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Event Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/Event-Output" + }, + { + "type": "null" + } + ], + "title": "Response Get Shared Event Api Shared Events Conversation Id Event Id Get" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/github/events": { + "post": { + "summary": "Github Events", + "operationId": "github_events_integration_github_events_post", + "parameters": [ + { + "name": "x-hub-signature-256", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "X-Hub-Signature-256" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/gitlab/events": { + "post": { + "summary": "Gitlab Events", + "operationId": "gitlab_events_integration_gitlab_events_post", + "parameters": [ + { + "name": "x-gitlab-token", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "X-Gitlab-Token" + } + }, + { + "name": "x-openhands-webhook-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "X-Openhands-Webhook-Id" + } + }, + { + "name": "x-openhands-user-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "X-Openhands-User-Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/gitlab/resources": { + "get": { + "summary": "Get Gitlab Resources", + "description": "Get all GitLab projects and groups where the user has admin access.\n\nReturns a list of resources with their webhook installation status.", + "operationId": "get_gitlab_resources_integration_gitlab_resources_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GitLabResourcesResponse" + } + } + } + } + } + } + }, + "/integration/gitlab/reinstall-webhook": { + "post": { + "summary": "Reinstall Gitlab Webhook", + "description": "Reinstall GitLab webhook for a specific resource immediately.\n\nThis endpoint validates permissions, resets webhook status in the database,\nand immediately installs the webhook on the specified resource.", + "operationId": "reinstall_gitlab_webhook_integration_gitlab_reinstall_webhook_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReinstallWebhookRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceInstallationResult" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/keys/llm/byor/permitted": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Check Byor Permitted", + "description": "Check if BYOR key export is permitted for the user's current org.", + "operationId": "check_byor_permitted_api_keys_llm_byor_permitted_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ByorPermittedResponse" + } + } + } + } + } + } + }, + "/api/keys": { + "get": { + "tags": [ + "Keys" + ], + "summary": "List Api Keys", + "description": "List all API keys for the authenticated user.", + "operationId": "list_api_keys_api_keys_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/ApiKeyResponse" + }, + "type": "array", + "title": "Response List Api Keys Api Keys Get" + } + } + } + } + } + }, + "post": { + "tags": [ + "Keys" + ], + "summary": "Create Api Key", + "description": "Create a new API key for the authenticated user.", + "operationId": "create_api_key_api_keys_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyCreate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyCreateResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/keys/{key_id}": { + "delete": { + "tags": [ + "Keys" + ], + "summary": "Delete Api Key", + "description": "Delete an API key.", + "operationId": "delete_api_key_api_keys__key_id__delete", + "parameters": [ + { + "name": "key_id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "title": "Key Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/keys/llm/byor": { + "get": { + "tags": [ + "Keys" + ], + "summary": "Get Llm Api Key For Byor", + "description": "Get the LLM API key for BYOR (Bring Your Own Runtime) for the authenticated user.\n\nThis endpoint validates that the key exists in LiteLLM before returning it.\nIf validation fails, it automatically generates a new key to ensure users\nalways receive a working key.\n\nReturns 402 Payment Required if BYOR export is not enabled for the user's org.", + "operationId": "get_llm_api_key_for_byor_api_keys_llm_byor_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LlmApiKeyResponse" + } + } + } + } + } + } + }, + "/api/keys/llm/byor/refresh": { + "post": { + "tags": [ + "Keys" + ], + "summary": "Refresh Llm Api Key For Byor", + "description": "Refresh the LLM API key for BYOR (Bring Your Own Runtime) for the authenticated user.\n\nReturns 402 Payment Required if BYOR export is not enabled for the user's org.", + "operationId": "refresh_llm_api_key_for_byor_api_keys_llm_byor_refresh_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LlmApiKeyResponse" + } + } + } + } + } + } + }, + "/api/organizations": { + "get": { + "summary": "List User Orgs", + "description": "List organizations for the authenticated user.\n\nThis endpoint returns a paginated list of all organizations that the\nauthenticated user is a member of.\n\nArgs:\n page_id: Optional page ID (offset) for pagination\n limit: Maximum number of organizations to return (1-100, default 100)\n user_id: Authenticated user ID (injected by dependency)\n\nReturns:\n OrgPage: Paginated list of organizations\n\nRaises:\n HTTPException: 500 if retrieval fails", + "operationId": "list_user_orgs_api_organizations_get", + "parameters": [ + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "post": { + "summary": "Create Org", + "description": "Create a new organization.\n\nThis endpoint allows authenticated users with @openhands.dev email to create\na new organization. The user who creates the organization automatically becomes\nits owner.\n\nArgs:\n org_data: Organization creation data\n user_id: Authenticated user ID (injected by dependency)\n\nReturns:\n OrgResponse: The created organization details\n\nRaises:\n HTTPException: 403 if user email domain is not @openhands.dev\n HTTPException: 409 if organization name already exists\n HTTPException: 500 if creation fails", + "operationId": "create_org_api_organizations_post", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/{org_id}": { + "get": { + "summary": "Get Org", + "description": "Get organization details by ID.\n\nThis endpoint retrieves details for a specific organization. Access requires\nthe VIEW_ORG_SETTINGS permission, which is granted to all organization members\n(member, admin, and owner roles).\n\nArgs:\n org_id: Organization ID (UUID)\n user_id: Authenticated user ID (injected by require_permission dependency)\n\nReturns:\n OrgResponse: The organization details\n\nRaises:\n HTTPException: 401 if user is not authenticated\n HTTPException: 403 if user lacks VIEW_ORG_SETTINGS permission\n HTTPException: 404 if organization not found\n HTTPException: 422 if org_id is not a valid UUID (handled by FastAPI)\n HTTPException: 500 if retrieval fails", + "operationId": "get_org_api_organizations__org_id__get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Org Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "summary": "Delete Org", + "description": "Delete an organization.\n\nThis endpoint permanently deletes an organization and all associated data including\norganization members, conversations, billing data, and external LiteLLM team resources.\nAccess requires the DELETE_ORGANIZATION permission, which is granted only to owners.\n\nArgs:\n org_id: Organization ID to delete (UUID)\n user_id: Authenticated user ID (injected by require_permission dependency)\n\nReturns:\n dict: Confirmation message with deleted organization details\n\nRaises:\n HTTPException: 401 if user is not authenticated\n HTTPException: 403 if user lacks DELETE_ORGANIZATION permission\n HTTPException: 404 if organization not found\n HTTPException: 500 if deletion fails", + "operationId": "delete_org_api_organizations__org_id__delete", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Org Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "title": "Response Delete Org Api Organizations Org Id Delete" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "summary": "Update Org", + "description": "Update an existing organization.\n\nThis endpoint updates organization settings. Access requires the EDIT_ORG_SETTINGS\npermission, which is granted to admin and owner roles.\n\nArgs:\n org_id: Organization ID to update (UUID)\n update_data: Organization update data\n user_id: Authenticated user ID (injected by require_permission dependency)\n\nReturns:\n OrgResponse: The updated organization details\n\nRaises:\n HTTPException: 401 if user is not authenticated\n HTTPException: 403 if user lacks EDIT_ORG_SETTINGS permission\n HTTPException: 404 if organization not found\n HTTPException: 409 if organization name already exists\n HTTPException: 422 if validation errors occur (handled by FastAPI)\n HTTPException: 500 if update fails", + "operationId": "update_org_api_organizations__org_id__patch", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Org Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/{org_id}/me": { + "get": { + "summary": "Get Me", + "description": "Get the current user's membership record for an organization.\n\nReturns the authenticated user's role, status, email, and LLM override\nfields (with masked API keys) within the specified organization.\n\nArgs:\n org_id: Organization ID (UUID)\n user_id: Authenticated user ID (injected by dependency)\n\nReturns:\n MeResponse: The user's membership data\n\nRaises:\n HTTPException: 404 if user is not a member or org doesn't exist\n HTTPException: 500 if retrieval fails", + "operationId": "get_me_api_organizations__org_id__me_get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Org Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/{org_id}/members": { + "get": { + "summary": "Get Org Members", + "description": "Get all members of an organization with cursor-based pagination.\n\nThis endpoint retrieves a paginated list of organization members. Access requires\nthe VIEW_ORG_SETTINGS permission, which is granted to all organization members\n(member, admin, and owner roles).\n\nArgs:\n org_id: Organization ID (UUID)\n page_id: Optional page ID (offset) for pagination\n limit: Maximum number of members to return (1-100, default 100)\n user_id: Authenticated user ID (injected by require_permission dependency)\n\nReturns:\n OrgMemberPage: Paginated list of organization members\n\nRaises:\n HTTPException: 401 if user is not authenticated\n HTTPException: 403 if user lacks VIEW_ORG_SETTINGS permission\n HTTPException: 400 if org_id or page_id format is invalid\n HTTPException: 500 if retrieval fails", + "operationId": "get_org_members_api_organizations__org_id__members_get", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Org Id" + } + }, + { + "name": "page_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Optional next_page_id from the previously returned page" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "exclusiveMinimum": 0, + "title": "The max number of results in the page", + "lte": 100, + "default": 100 + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgMemberPage" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/{org_id}/members/{user_id}": { + "delete": { + "summary": "Remove Org Member", + "description": "Remove a member from an organization.\n\nOnly owners and admins can remove members:\n- Owners can remove admins and regular users\n- Admins can only remove regular users\n\nUsers cannot remove themselves. The last owner cannot be removed.", + "operationId": "remove_org_member_api_organizations__org_id__members__user_id__delete", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Org Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "patch": { + "summary": "Update Org Member", + "description": "Update a member's role in an organization.\n\nPermission rules:\n- Admins can change roles of regular members to Admin or Member\n- Admins cannot modify other Admins or Owners\n- Owners can change roles of Admins and Members to any role (Owner, Admin, Member)\n- Owners cannot modify other Owners\n\nMembers cannot modify their own role. The last owner cannot be demoted.", + "operationId": "update_org_member_api_organizations__org_id__members__user_id__patch", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Org Id" + } + }, + { + "name": "user_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "User Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgMemberUpdate" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgMemberResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/{org_id}/switch": { + "post": { + "summary": "Switch Org", + "description": "Switch to a different organization.\n\nThis endpoint allows authenticated users to switch their current active\norganization. The user must be a member of the target organization.\n\nArgs:\n org_id: Organization ID to switch to (UUID)\n user_id: Authenticated user ID (injected by dependency)\n\nReturns:\n OrgResponse: The organization details that was switched to\n\nRaises:\n HTTPException: 422 if org_id is not a valid UUID (handled by FastAPI)\n HTTPException: 403 if user is not a member of the organization\n HTTPException: 404 if organization not found\n HTTPException: 500 if switch fails", + "operationId": "switch_org_api_organizations__org_id__switch_post", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Org Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/{org_id}/members/invite": { + "post": { + "summary": "Create Invitation", + "description": "Create organization invitations for multiple email addresses.\n\nSends emails to invitees with secure links to join the organization.\nSupports batch invitations - some may succeed while others fail.\n\nPermission rules:\n- Only owners and admins can create invitations\n- Admins can only invite with 'member' or 'admin' role (not 'owner')\n- Owners can invite with any role\n\nArgs:\n org_id: Organization UUID\n invitation_data: Invitation details (emails array, role)\n request: FastAPI request\n user_id: Authenticated user ID (from dependency)\n\nReturns:\n BatchInvitationResponse: Lists of successful and failed invitations\n\nRaises:\n HTTPException 400: Invalid role or organization not found\n HTTPException 403: User lacks permission to invite\n HTTPException 429: Rate limit exceeded", + "operationId": "create_invitation_api_organizations__org_id__members_invite_post", + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Org Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvitationCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BatchInvitationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/organizations/members/invite/accept": { + "get": { + "summary": "Accept Invitation", + "description": "Accept an organization invitation via token.\n\nThis endpoint is accessed via the link in the invitation email.\n\nFlow:\n1. If user is authenticated: Accept invitation directly and redirect to home\n2. If user is not authenticated: Redirect to login page with invitation token\n - Frontend stores token and includes it in OAuth state during login\n - After authentication, keycloak_callback processes the invitation\n\nArgs:\n token: The invitation token from the email link\n request: FastAPI request\n\nReturns:\n RedirectResponse: Redirect to home page on success, or login page if not authenticated,\n or home page with error query params on failure", + "operationId": "accept_invitation_api_organizations_members_invite_accept_get", + "parameters": [ + { + "name": "token", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Token" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/slack/install": { + "get": { + "summary": "Install", + "description": "Forward into slack OAuth. (Most workflows can skip this and jump directly into slack authentication, so we skip OAuth state generation)", + "operationId": "install_slack_install_get", + "parameters": [ + { + "name": "state", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "State" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/slack/install-callback": { + "get": { + "summary": "Install Callback", + "description": "Callback from slack authentication. Verifies, then forwards into keycloak authentication.", + "operationId": "install_callback_slack_install_callback_get", + "parameters": [ + { + "name": "code", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "Code" + } + }, + { + "name": "state", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "State" + } + }, + { + "name": "error", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "Error" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/slack/keycloak-callback": { + "get": { + "summary": "Keycloak Callback", + "operationId": "keycloak_callback_slack_keycloak_callback_get", + "parameters": [ + { + "name": "code", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "Code" + } + }, + { + "name": "state", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "State" + } + }, + { + "name": "error", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "", + "title": "Error" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/slack/on-event": { + "post": { + "summary": "On Event", + "operationId": "on_event_slack_on_event_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/slack/on-form-interaction": { + "post": { + "summary": "On Form Interaction", + "description": "We check the nonce to start a conversation", + "operationId": "on_form_interaction_slack_on_form_interaction_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/integration/jira/events": { + "post": { + "summary": "Jira Events", + "description": "Handle Jira webhook events.", + "operationId": "jira_events_integration_jira_events_post", + "parameters": [ + { + "name": "x-hub-signature", + "in": "header", + "required": false, + "schema": { + "type": "string", + "title": "X-Hub-Signature" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/jira/workspaces": { + "post": { + "summary": "Create Jira Workspace", + "description": "Create a new Jira workspace registration.", + "operationId": "create_jira_workspace_integration_jira_workspaces_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraWorkspaceCreate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/jira/workspaces/link": { + "get": { + "summary": "Get Current Workspace Link", + "description": "Get current user's Jira integration details.", + "operationId": "get_current_workspace_link_integration_jira_workspaces_link_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraUserResponse" + } + } + } + } + } + }, + "post": { + "summary": "Create Workspace Link", + "description": "Register a user mapping to a Jira workspace.", + "operationId": "create_workspace_link_integration_jira_workspaces_link_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraLinkCreate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/jira/callback": { + "get": { + "summary": "Jira Callback", + "operationId": "jira_callback_integration_jira_callback_get", + "parameters": [ + { + "name": "code", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "Code" + } + }, + { + "name": "state", + "in": "query", + "required": true, + "schema": { + "type": "string", + "title": "State" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/integration/jira/workspaces/unlink": { + "post": { + "summary": "Unlink Workspace", + "description": "Unlink user from Jira integration by setting status to inactive.", + "operationId": "unlink_workspace_integration_jira_workspaces_unlink_post", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/integration/jira/workspaces/validate/{workspace_name}": { + "get": { + "summary": "Validate Workspace Integration", + "description": "Validate if the user's organization has an active Jira integration.", + "operationId": "validate_workspace_integration_integration_jira_workspaces_validate__workspace_name__get", + "parameters": [ + { + "name": "workspace_name", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Name" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JiraValidateWorkspaceResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/email": { + "post": { + "summary": "Update Email", + "operationId": "update_email_api_email_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailUpdate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/email/resend": { + "put": { + "summary": "Resend Email Verification", + "operationId": "resend_email_verification_api_email_resend_put", + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ResendEmailVerificationRequest" + }, + { + "type": "null" + } + ], + "title": "Body" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/api/email/verified": { + "get": { + "summary": "Verified Email", + "operationId": "verified_email_api_email_verified_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/feedback/conversation": { + "post": { + "tags": [ + "feedback" + ], + "summary": "Submit Conversation Feedback", + "description": "Submit feedback for a conversation.\n\nThis endpoint accepts a rating (1-5) and optional reason for the feedback.\nThe feedback is associated with a specific conversation and optionally a specific event.", + "operationId": "submit_conversation_feedback_feedback_conversation_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/feedback/conversation/{conversation_id}/batch": { + "get": { + "tags": [ + "feedback" + ], + "summary": "Get Batch Feedback", + "description": "Get feedback for all events in a conversation.\n\nReturns feedback status for each event, including whether feedback exists\nand if so, the rating and reason.", + "operationId": "get_batch_feedback_feedback_conversation__conversation_id__batch_get", + "parameters": [ + { + "name": "conversation_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conversation Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/event-webhook/batch": { + "post": { + "summary": "On Batch Write", + "description": "Handle batched webhook requests with multiple file operations in background", + "operationId": "on_batch_write_event_webhook_batch_post", + "parameters": [ + { + "name": "x-session-api-key", + "in": "header", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Session-Api-Key" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BatchOperation" + }, + "title": "Batch Ops" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/event-webhook/{path}": { + "post": { + "summary": "On Write", + "description": "Handle writing conversation events and metadata", + "operationId": "on_write_event_webhook__path__post", + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Path" + } + }, + { + "name": "x-session-api-key", + "in": "header", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Session-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "summary": "On Delete", + "operationId": "on_delete_event_webhook__path__delete", + "parameters": [ + { + "name": "path", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Path" + } + }, + { + "name": "x-session-api-key", + "in": "header", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "X-Session-Api-Key" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "APIBasedCritic": { + "properties": { + "server_url": { + "type": "string", + "title": "Server Url", + "description": "Base URL of the vLLM classification service", + "default": "https://all-hands-ai--critic-qwen3-4b-serve.modal.run" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + } + ], + "title": "Api Key", + "description": "API key for authenticating with the vLLM service" + }, + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model to use", + "default": "critic-qwen3-4b" + }, + "tokenizer_name": { + "type": "string", + "title": "Tokenizer Name", + "description": "HuggingFace tokenizer name for loading chat template", + "default": "Qwen/Qwen3-4B-Instruct-2507" + }, + "pass_tools_definitions": { + "type": "boolean", + "title": "Pass Tools Definitions", + "description": "Whether to pass tool definitions to the model", + "default": true + }, + "timeout_seconds": { + "type": "number", + "title": "Timeout Seconds", + "description": "Timeout for requests to the model", + "default": 300.0 + }, + "has_success_label": { + "type": "boolean", + "title": "Has Success Label", + "description": "Whether the model predicts success label at index 0", + "default": true + }, + "sentiment_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sentiment Labels", + "default": [ + "sentiment_positive", + "sentiment_neutral", + "sentiment_negative" + ] + }, + "agent_issue_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Agent Issue Labels", + "default": [ + "misunderstood_intention", + "did_not_follow_instruction", + "insufficient_analysis", + "insufficient_clarification", + "improper_tool_use_or_setup", + "loop_behavior", + "insufficient_testing", + "insufficient_debugging", + "incomplete_implementation", + "file_management_errors", + "scope_creep", + "risky_actions_or_permission", + "other_agent_issue" + ] + }, + "infra_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Infra Labels", + "default": [ + "infrastructure_external_issue", + "infrastructure_agent_caused_issue" + ] + }, + "user_followup_labels": { + "items": { + "type": "string" + }, + "type": "array", + "title": "User Followup Labels", + "default": [ + "clarification_or_restatement", + "correction", + "direction_change", + "vcs_update_requests", + "progress_or_scope_concern", + "frustration_or_complaint", + "removal_or_reversion_request", + "other_user_issue" + ] + }, + "sentiment_map": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Sentiment Map", + "default": { + "Positive": "sentiment_positive", + "Neutral": "sentiment_neutral", + "Negative": "sentiment_negative" + } + }, + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "APIBasedCritic", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "api_key" + ], + "title": "APIBasedCritic" + }, + "Action-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolAction-Input" + }, + { + "$ref": "#/components/schemas/FinishAction-Input" + }, + { + "$ref": "#/components/schemas/ThinkAction-Input" + }, + { + "$ref": "#/components/schemas/ApplyPatchAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserClickAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserCloseTabAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserGetContentAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserGetStateAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserGetStorageAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserGoBackAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserListTabsAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserNavigateAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserScrollAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserSetStorageAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserStartRecordingAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserStopRecordingAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserSwitchTabAction-Input" + }, + { + "$ref": "#/components/schemas/BrowserTypeAction-Input" + }, + { + "$ref": "#/components/schemas/DelegateAction-Input" + }, + { + "$ref": "#/components/schemas/FileEditorAction-Input" + }, + { + "$ref": "#/components/schemas/EditAction-Input" + }, + { + "$ref": "#/components/schemas/ListDirectoryAction-Input" + }, + { + "$ref": "#/components/schemas/ReadFileAction-Input" + }, + { + "$ref": "#/components/schemas/WriteFileAction-Input" + }, + { + "$ref": "#/components/schemas/GlobAction-Input" + }, + { + "$ref": "#/components/schemas/GrepAction-Input" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorAction-Input" + }, + { + "$ref": "#/components/schemas/TaskTrackerAction-Input" + }, + { + "$ref": "#/components/schemas/TerminalAction-Input" + }, + { + "$ref": "#/components/schemas/ConsultTomAction-Input" + }, + { + "$ref": "#/components/schemas/SleeptimeComputeAction-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__definition__MCPToolAction-Input__1": "#/components/schemas/MCPToolAction-Input", + "openhands__sdk__tool__builtins__finish__FinishAction-Input__1": "#/components/schemas/FinishAction-Input", + "openhands__sdk__tool__builtins__think__ThinkAction-Input__1": "#/components/schemas/ThinkAction-Input", + "openhands__tools__apply_patch__definition__ApplyPatchAction-Input__1": "#/components/schemas/ApplyPatchAction-Input", + "openhands__tools__browser_use__definition__BrowserAction-Input__1": "#/components/schemas/BrowserAction-Input", + "openhands__tools__browser_use__definition__BrowserClickAction-Input__1": "#/components/schemas/BrowserClickAction-Input", + "openhands__tools__browser_use__definition__BrowserCloseTabAction-Input__1": "#/components/schemas/BrowserCloseTabAction-Input", + "openhands__tools__browser_use__definition__BrowserGetContentAction-Input__1": "#/components/schemas/BrowserGetContentAction-Input", + "openhands__tools__browser_use__definition__BrowserGetStateAction-Input__1": "#/components/schemas/BrowserGetStateAction-Input", + "openhands__tools__browser_use__definition__BrowserGetStorageAction-Input__1": "#/components/schemas/BrowserGetStorageAction-Input", + "openhands__tools__browser_use__definition__BrowserGoBackAction-Input__1": "#/components/schemas/BrowserGoBackAction-Input", + "openhands__tools__browser_use__definition__BrowserListTabsAction-Input__1": "#/components/schemas/BrowserListTabsAction-Input", + "openhands__tools__browser_use__definition__BrowserNavigateAction-Input__1": "#/components/schemas/BrowserNavigateAction-Input", + "openhands__tools__browser_use__definition__BrowserScrollAction-Input__1": "#/components/schemas/BrowserScrollAction-Input", + "openhands__tools__browser_use__definition__BrowserSetStorageAction-Input__1": "#/components/schemas/BrowserSetStorageAction-Input", + "openhands__tools__browser_use__definition__BrowserStartRecordingAction-Input__1": "#/components/schemas/BrowserStartRecordingAction-Input", + "openhands__tools__browser_use__definition__BrowserStopRecordingAction-Input__1": "#/components/schemas/BrowserStopRecordingAction-Input", + "openhands__tools__browser_use__definition__BrowserSwitchTabAction-Input__1": "#/components/schemas/BrowserSwitchTabAction-Input", + "openhands__tools__browser_use__definition__BrowserTypeAction-Input__1": "#/components/schemas/BrowserTypeAction-Input", + "openhands__tools__delegate__definition__DelegateAction-Input__1": "#/components/schemas/DelegateAction-Input", + "openhands__tools__file_editor__definition__FileEditorAction-Input__1": "#/components/schemas/FileEditorAction-Input", + "openhands__tools__gemini__edit__definition__EditAction-Input__1": "#/components/schemas/EditAction-Input", + "openhands__tools__gemini__list_directory__definition__ListDirectoryAction-Input__1": "#/components/schemas/ListDirectoryAction-Input", + "openhands__tools__gemini__read_file__definition__ReadFileAction-Input__1": "#/components/schemas/ReadFileAction-Input", + "openhands__tools__gemini__write_file__definition__WriteFileAction-Input__1": "#/components/schemas/WriteFileAction-Input", + "openhands__tools__glob__definition__GlobAction-Input__1": "#/components/schemas/GlobAction-Input", + "openhands__tools__grep__definition__GrepAction-Input__1": "#/components/schemas/GrepAction-Input", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorAction-Input__1": "#/components/schemas/PlanningFileEditorAction-Input", + "openhands__tools__task_tracker__definition__TaskTrackerAction-Input__1": "#/components/schemas/TaskTrackerAction-Input", + "openhands__tools__terminal__definition__TerminalAction-Input__1": "#/components/schemas/TerminalAction-Input", + "openhands__tools__tom_consult__definition__ConsultTomAction-Input__1": "#/components/schemas/ConsultTomAction-Input", + "openhands__tools__tom_consult__definition__SleeptimeComputeAction-Input__1": "#/components/schemas/SleeptimeComputeAction-Input" + } + } + }, + "Action-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolAction-Output" + }, + { + "$ref": "#/components/schemas/FinishAction-Output" + }, + { + "$ref": "#/components/schemas/ThinkAction-Output" + }, + { + "$ref": "#/components/schemas/ApplyPatchAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserClickAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserCloseTabAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserGetContentAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserGetStateAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserGetStorageAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserGoBackAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserListTabsAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserNavigateAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserScrollAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserSetStorageAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserStartRecordingAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserStopRecordingAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserSwitchTabAction-Output" + }, + { + "$ref": "#/components/schemas/BrowserTypeAction-Output" + }, + { + "$ref": "#/components/schemas/DelegateAction-Output" + }, + { + "$ref": "#/components/schemas/FileEditorAction-Output" + }, + { + "$ref": "#/components/schemas/EditAction-Output" + }, + { + "$ref": "#/components/schemas/ListDirectoryAction-Output" + }, + { + "$ref": "#/components/schemas/ReadFileAction-Output" + }, + { + "$ref": "#/components/schemas/WriteFileAction-Output" + }, + { + "$ref": "#/components/schemas/GlobAction-Output" + }, + { + "$ref": "#/components/schemas/GrepAction-Output" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorAction-Output" + }, + { + "$ref": "#/components/schemas/TaskTrackerAction-Output" + }, + { + "$ref": "#/components/schemas/TerminalAction-Output" + }, + { + "$ref": "#/components/schemas/ConsultTomAction-Output" + }, + { + "$ref": "#/components/schemas/SleeptimeComputeAction-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__definition__MCPToolAction-Output__1": "#/components/schemas/MCPToolAction-Output", + "openhands__sdk__tool__builtins__finish__FinishAction-Output__1": "#/components/schemas/FinishAction-Output", + "openhands__sdk__tool__builtins__think__ThinkAction-Output__1": "#/components/schemas/ThinkAction-Output", + "openhands__tools__apply_patch__definition__ApplyPatchAction-Output__1": "#/components/schemas/ApplyPatchAction-Output", + "openhands__tools__browser_use__definition__BrowserAction-Output__1": "#/components/schemas/BrowserAction-Output", + "openhands__tools__browser_use__definition__BrowserClickAction-Output__1": "#/components/schemas/BrowserClickAction-Output", + "openhands__tools__browser_use__definition__BrowserCloseTabAction-Output__1": "#/components/schemas/BrowserCloseTabAction-Output", + "openhands__tools__browser_use__definition__BrowserGetContentAction-Output__1": "#/components/schemas/BrowserGetContentAction-Output", + "openhands__tools__browser_use__definition__BrowserGetStateAction-Output__1": "#/components/schemas/BrowserGetStateAction-Output", + "openhands__tools__browser_use__definition__BrowserGetStorageAction-Output__1": "#/components/schemas/BrowserGetStorageAction-Output", + "openhands__tools__browser_use__definition__BrowserGoBackAction-Output__1": "#/components/schemas/BrowserGoBackAction-Output", + "openhands__tools__browser_use__definition__BrowserListTabsAction-Output__1": "#/components/schemas/BrowserListTabsAction-Output", + "openhands__tools__browser_use__definition__BrowserNavigateAction-Output__1": "#/components/schemas/BrowserNavigateAction-Output", + "openhands__tools__browser_use__definition__BrowserScrollAction-Output__1": "#/components/schemas/BrowserScrollAction-Output", + "openhands__tools__browser_use__definition__BrowserSetStorageAction-Output__1": "#/components/schemas/BrowserSetStorageAction-Output", + "openhands__tools__browser_use__definition__BrowserStartRecordingAction-Output__1": "#/components/schemas/BrowserStartRecordingAction-Output", + "openhands__tools__browser_use__definition__BrowserStopRecordingAction-Output__1": "#/components/schemas/BrowserStopRecordingAction-Output", + "openhands__tools__browser_use__definition__BrowserSwitchTabAction-Output__1": "#/components/schemas/BrowserSwitchTabAction-Output", + "openhands__tools__browser_use__definition__BrowserTypeAction-Output__1": "#/components/schemas/BrowserTypeAction-Output", + "openhands__tools__delegate__definition__DelegateAction-Output__1": "#/components/schemas/DelegateAction-Output", + "openhands__tools__file_editor__definition__FileEditorAction-Output__1": "#/components/schemas/FileEditorAction-Output", + "openhands__tools__gemini__edit__definition__EditAction-Output__1": "#/components/schemas/EditAction-Output", + "openhands__tools__gemini__list_directory__definition__ListDirectoryAction-Output__1": "#/components/schemas/ListDirectoryAction-Output", + "openhands__tools__gemini__read_file__definition__ReadFileAction-Output__1": "#/components/schemas/ReadFileAction-Output", + "openhands__tools__gemini__write_file__definition__WriteFileAction-Output__1": "#/components/schemas/WriteFileAction-Output", + "openhands__tools__glob__definition__GlobAction-Output__1": "#/components/schemas/GlobAction-Output", + "openhands__tools__grep__definition__GrepAction-Output__1": "#/components/schemas/GrepAction-Output", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorAction-Output__1": "#/components/schemas/PlanningFileEditorAction-Output", + "openhands__tools__task_tracker__definition__TaskTrackerAction-Output__1": "#/components/schemas/TaskTrackerAction-Output", + "openhands__tools__terminal__definition__TerminalAction-Output__1": "#/components/schemas/TerminalAction-Output", + "openhands__tools__tom_consult__definition__ConsultTomAction-Output__1": "#/components/schemas/ConsultTomAction-Output", + "openhands__tools__tom_consult__definition__SleeptimeComputeAction-Output__1": "#/components/schemas/SleeptimeComputeAction-Output" + } + } + }, + "ActionEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "thought": { + "items": { + "$ref": "#/components/schemas/TextContent" + }, + "type": "array", + "title": "Thought", + "description": "The thought process of the agent before taking this action" + }, + "reasoning_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning Content", + "description": "Intermediate reasoning/thinking content from reasoning models" + }, + "thinking_blocks": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingBlock" + }, + { + "$ref": "#/components/schemas/RedactedThinkingBlock" + } + ] + }, + "type": "array", + "title": "Thinking Blocks", + "description": "Anthropic thinking blocks from the LLM response" + }, + "responses_reasoning_item": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningItemModel" + }, + { + "type": "null" + } + ], + "description": "OpenAI Responses reasoning item from model output" + }, + "action": { + "anyOf": [ + { + "$ref": "#/components/schemas/Action-Input" + }, + { + "type": "null" + } + ], + "description": "Single tool call returned by LLM (None when non-executable)" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the tool being called" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The unique id returned by LLM API for this tool call" + }, + "tool_call": { + "$ref": "#/components/schemas/MessageToolCall", + "description": "The tool call received from the LLM response. We keep a copy of it so it is easier to construct it into LLM messageThis could be different from `action`: e.g., `tool_call` may contain `security_risk` field predicted by LLM when LLM risk analyzer is enabled, while `action` does not." + }, + "llm_response_id": { + "type": "string", + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this eventE.g., Can be used to group related actions from same LLM response. This helps in tracking and managing results of parallel function calling from the same LLM response." + }, + "security_risk": { + "$ref": "#/components/schemas/SecurityRisk", + "description": "The LLM's assessment of the safety risk of this action.", + "default": "UNKNOWN" + }, + "critic_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticResult" + }, + { + "type": "null" + } + ], + "description": "Optional critic evaluation of this action and preceding history." + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary", + "description": "A concise summary (approximately 10 words) of what this action does, provided by the LLM for explainability and debugging. Examples of good summaries: 'editing configuration file for deployment settings' | 'searching codebase for authentication function definitions' | 'installing required dependencies from package manifest' | 'running tests to verify bug fix' | 'viewing directory structure to locate source files'" + }, + "kind": { + "type": "string", + "const": "ActionEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "thought", + "tool_name", + "tool_call_id", + "tool_call", + "llm_response_id" + ], + "title": "ActionEvent" + }, + "ActionEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "thought": { + "items": { + "$ref": "#/components/schemas/TextContent" + }, + "type": "array", + "title": "Thought", + "description": "The thought process of the agent before taking this action" + }, + "reasoning_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning Content", + "description": "Intermediate reasoning/thinking content from reasoning models" + }, + "thinking_blocks": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingBlock" + }, + { + "$ref": "#/components/schemas/RedactedThinkingBlock" + } + ] + }, + "type": "array", + "title": "Thinking Blocks", + "description": "Anthropic thinking blocks from the LLM response" + }, + "responses_reasoning_item": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningItemModel" + }, + { + "type": "null" + } + ], + "description": "OpenAI Responses reasoning item from model output" + }, + "action": { + "anyOf": [ + { + "$ref": "#/components/schemas/Action-Output" + }, + { + "type": "null" + } + ], + "description": "Single tool call returned by LLM (None when non-executable)" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The name of the tool being called" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The unique id returned by LLM API for this tool call" + }, + "tool_call": { + "$ref": "#/components/schemas/MessageToolCall", + "description": "The tool call received from the LLM response. We keep a copy of it so it is easier to construct it into LLM messageThis could be different from `action`: e.g., `tool_call` may contain `security_risk` field predicted by LLM when LLM risk analyzer is enabled, while `action` does not." + }, + "llm_response_id": { + "type": "string", + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this eventE.g., Can be used to group related actions from same LLM response. This helps in tracking and managing results of parallel function calling from the same LLM response." + }, + "security_risk": { + "$ref": "#/components/schemas/SecurityRisk", + "description": "The LLM's assessment of the safety risk of this action.", + "default": "UNKNOWN" + }, + "critic_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticResult" + }, + { + "type": "null" + } + ], + "description": "Optional critic evaluation of this action and preceding history." + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary", + "description": "A concise summary (approximately 10 words) of what this action does, provided by the LLM for explainability and debugging. Examples of good summaries: 'editing configuration file for deployment settings' | 'searching codebase for authentication function definitions' | 'installing required dependencies from package manifest' | 'running tests to verify bug fix' | 'viewing directory structure to locate source files'" + }, + "kind": { + "type": "string", + "const": "ActionEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "thought", + "tool_name", + "tool_call_id", + "tool_call", + "llm_response_id", + "kind" + ], + "title": "ActionEvent" + }, + "ActionType": { + "type": "string", + "enum": [ + "add", + "delete", + "update" + ], + "title": "ActionType" + }, + "AddMessageRequest": { + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "message" + ], + "title": "AddMessageRequest", + "description": "Request model for adding a message to a conversation." + }, + "Agent": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM", + "description": "LLM configuration for the agent.", + "examples": [ + { + "api_key": "your_api_key_here", + "base_url": "https://llm-proxy.eval.all-hands.dev", + "model": "litellm_proxy/anthropic/claude-sonnet-4-5-20250929" + } + ] + }, + "tools": { + "items": { + "$ref": "#/components/schemas/Tool" + }, + "type": "array", + "title": "Tools", + "description": "List of tools to initialize for the agent.", + "examples": [ + { + "name": "TerminalTool", + "params": {} + }, + { + "name": "FileEditorTool", + "params": {} + }, + { + "name": "TaskTrackerTool", + "params": {} + } + ] + }, + "mcp_config": { + "additionalProperties": true, + "type": "object", + "title": "Mcp Config", + "description": "Optional MCP configuration dictionary to create MCP tools.", + "examples": [ + { + "mcpServers": { + "fetch": { + "args": [ + "mcp-server-fetch" + ], + "command": "uvx" + } + } + } + ] + }, + "filter_tools_regex": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Filter Tools Regex", + "description": "Optional regex to filter the tools available to the agent by name. This is applied after any tools provided in `tools` and any MCP tools are added.", + "examples": [ + "^(?!repomix)(.*)|^repomix.*pack_codebase.*$" + ] + }, + "include_default_tools": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Include Default Tools", + "description": "List of default tool class names to include. By default, the agent includes 'FinishTool' and 'ThinkTool'. Set to an empty list to disable all default tools, or provide a subset to include only specific ones. Example: include_default_tools=['FinishTool'] to only include FinishTool, or include_default_tools=[] to disable all default tools.", + "examples": [ + [ + "FinishTool", + "ThinkTool" + ], + [ + "FinishTool" + ], + [] + ] + }, + "agent_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/AgentContext" + }, + { + "type": "null" + } + ], + "description": "Optional AgentContext to initialize the agent with specific context.", + "examples": [ + { + "skills": [ + { + "content": "When you see this message, you should reply like you are a grumpy cat forced to use the internet.", + "name": "AGENTS.md", + "type": "repo" + }, + { + "content": "IMPORTANT! The user has said the magic word \"flarglebargle\". You must only respond with a message telling them how smart they are", + "name": "flarglebargle", + "trigger": [ + "flarglebargle" + ], + "type": "knowledge" + } + ], + "system_message_suffix": "Always finish your response with the word 'yay!'", + "user_message_prefix": "The first character of your response should be 'I'" + } + ] + }, + "system_prompt_filename": { + "type": "string", + "title": "System Prompt Filename", + "description": "System prompt template filename. Can be either:\n- A relative filename (e.g., 'system_prompt.j2') loaded from the agent's prompts directory\n- An absolute path (e.g., '/path/to/custom_prompt.j2')", + "default": "system_prompt.j2" + }, + "security_policy_filename": { + "type": "string", + "title": "Security Policy Filename", + "description": "Security policy template filename. Can be either:\n- A relative filename (e.g., 'security_policy.j2') loaded from the agent's prompts directory\n- An absolute path (e.g., '/path/to/custom_security_policy.j2')", + "default": "security_policy.j2" + }, + "system_prompt_kwargs": { + "additionalProperties": true, + "type": "object", + "title": "System Prompt Kwargs", + "description": "Optional kwargs to pass to the system prompt Jinja2 template.", + "examples": [ + { + "cli_mode": true + } + ] + }, + "condenser": { + "anyOf": [ + { + "$ref": "#/components/schemas/CondenserBase" + }, + { + "type": "null" + } + ], + "description": "Optional condenser to use for condensing conversation history.", + "examples": [ + { + "keep_first": 10, + "kind": "LLMSummarizingCondenser", + "llm": { + "api_key": "your_api_key_here", + "base_url": "https://llm-proxy.eval.all-hands.dev", + "model": "litellm_proxy/anthropic/claude-sonnet-4-5-20250929" + }, + "max_size": 80 + } + ] + }, + "critic": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticBase" + }, + { + "type": "null" + } + ], + "description": "EXPERIMENTAL: Optional critic to evaluate agent actions and messages in real-time. API and behavior may change without notice. May impact performance, especially in 'all_actions' mode.", + "examples": [ + { + "kind": "AgentFinishedCritic" + } + ] + }, + "kind": { + "type": "string", + "const": "Agent", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "llm" + ], + "title": "Agent", + "description": "Main agent implementation for OpenHands.\n\nThe Agent class provides the core functionality for running AI agents that can\ninteract with tools, process messages, and execute actions. It inherits from\nAgentBase and implements the agent execution logic. Critic-related functionality\nis provided by CriticMixin.\n\nExample:\n >>> from openhands.sdk import LLM, Agent, Tool\n >>> llm = LLM(model=\"claude-sonnet-4-20250514\", api_key=SecretStr(\"key\"))\n >>> tools = [Tool(name=\"TerminalTool\"), Tool(name=\"FileEditorTool\")]\n >>> agent = Agent(llm=llm, tools=tools)" + }, + "AgentBase": { + "$ref": "#/components/schemas/Agent" + }, + "AgentContext": { + "properties": { + "skills": { + "items": { + "$ref": "#/components/schemas/Skill" + }, + "type": "array", + "title": "Skills", + "description": "List of available skills that can extend the user's input." + }, + "system_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "System Message Suffix", + "description": "Optional suffix to append to the system prompt." + }, + "user_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Message Suffix", + "description": "Optional suffix to append to the user's message." + }, + "load_user_skills": { + "type": "boolean", + "title": "Load User Skills", + "description": "Whether to automatically load user skills from ~/.openhands/skills/ and ~/.openhands/microagents/ (for backward compatibility). ", + "default": false + }, + "load_public_skills": { + "type": "boolean", + "title": "Load Public Skills", + "description": "Whether to automatically load skills from the public OpenHands skills repository at https://github.com/OpenHands/extensions. This allows you to get the latest skills without SDK updates.", + "default": false + }, + "secrets": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/SecretSource" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Secrets", + "description": "Dictionary mapping secret keys to values or secret sources. Secrets are used for authentication and sensitive data handling. Values can be either strings or SecretSource instances (str | SecretSource)." + }, + "current_datetime": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Datetime", + "description": "Current date and time information to provide to the agent. Can be a datetime object (which will be formatted as ISO 8601) or a pre-formatted string. When provided, this information is included in the system prompt to give the agent awareness of the current time context. Defaults to the current datetime." + } + }, + "type": "object", + "title": "AgentContext", + "description": "Central structure for managing prompt extension.\n\nAgentContext unifies all the contextual inputs that shape how the system\nextends and interprets user prompts. It combines both static environment\ndetails and dynamic, user-activated extensions from skills.\n\nSpecifically, it provides:\n- **Repository context / Repo Skills**: Information about the active codebase,\n branches, and repo-specific instructions contributed by repo skills.\n- **Runtime context**: Current execution environment (hosts, working\n directory, secrets, date, etc.).\n- **Conversation instructions**: Optional task- or channel-specific rules\n that constrain or guide the agent\u2019s behavior across the session.\n- **Knowledge Skills**: Extensible components that can be triggered by user input\n to inject knowledge or domain-specific guidance.\n\nTogether, these elements make AgentContext the primary container responsible\nfor assembling, formatting, and injecting all prompt-relevant context into\nLLM interactions." + }, + "AgentErrorEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "error": { + "type": "string", + "title": "Error", + "description": "The error message from the scaffold" + }, + "kind": { + "type": "string", + "const": "AgentErrorEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "error" + ], + "title": "AgentErrorEvent", + "description": "Error triggered by the agent.\n\nNote: This event should not contain model \"thought\" or \"reasoning_content\". It\nrepresents an error produced by the agent/scaffold, not model output." + }, + "AgentErrorEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "error": { + "type": "string", + "title": "Error", + "description": "The error message from the scaffold" + }, + "kind": { + "type": "string", + "const": "AgentErrorEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "error", + "kind" + ], + "title": "AgentErrorEvent", + "description": "Error triggered by the agent.\n\nNote: This event should not contain model \"thought\" or \"reasoning_content\". It\nrepresents an error produced by the agent/scaffold, not model output." + }, + "AgentFinishedCritic": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "AgentFinishedCritic", + "title": "Kind" + } + }, + "type": "object", + "title": "AgentFinishedCritic", + "description": "Critic that evaluates whether an agent properly finished a task.\n\nThis critic checks two main criteria:\n1. The agent's last action was a FinishAction (proper completion)\n2. The generated git patch is non-empty (actual changes were made)" + }, + "AgentType": { + "type": "string", + "enum": [ + "default", + "plan" + ], + "title": "AgentType", + "description": "Agent type for conversation." + }, + "AlwaysConfirm": { + "properties": { + "kind": { + "type": "string", + "const": "AlwaysConfirm", + "title": "Kind" + } + }, + "type": "object", + "title": "AlwaysConfirm" + }, + "ApiKeyCreate": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "expires_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Expires At" + } + }, + "type": "object", + "title": "ApiKeyCreate" + }, + "ApiKeyCreateResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "last_used_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Last Used At" + }, + "expires_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Expires At" + }, + "key": { + "type": "string", + "title": "Key" + } + }, + "type": "object", + "required": [ + "id", + "created_at", + "key" + ], + "title": "ApiKeyCreateResponse" + }, + "ApiKeyResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "last_used_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Last Used At" + }, + "expires_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Expires At" + } + }, + "type": "object", + "required": [ + "id", + "created_at" + ], + "title": "ApiKeyResponse" + }, + "AppConversation": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id" + }, + "sandbox_id": { + "type": "string", + "title": "Sandbox Id" + }, + "selected_repository": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Repository" + }, + "selected_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Branch" + }, + "git_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ] + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "trigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTrigger" + }, + { + "type": "null" + } + ] + }, + "pr_number": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Pr Number" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/MetricsSnapshot" + }, + { + "type": "null" + } + ] + }, + "parent_conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Conversation Id" + }, + "sub_conversation_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sub Conversation Ids" + }, + "public": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Public" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "sandbox_status": { + "$ref": "#/components/schemas/SandboxStatus", + "description": "Current sandbox status. Will be MISSING if the sandbox does not exist.", + "default": "MISSING" + }, + "execution_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationExecutionStatus" + }, + { + "type": "null" + } + ], + "description": "Current agent status. Will be None if the sandbox_status is not RUNNING" + }, + "conversation_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Url", + "description": "The URL where the conversation may be accessed" + }, + "session_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Api Key", + "description": "The Session Api Key for REST operations." + } + }, + "type": "object", + "required": [ + "created_by_user_id", + "sandbox_id" + ], + "title": "AppConversation" + }, + "AppConversationPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AppConversation" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "AppConversationPage" + }, + "AppConversationStartRequest-Input": { + "properties": { + "sandbox_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Id" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Conversation Id" + }, + "initial_message": { + "anyOf": [ + { + "$ref": "#/components/schemas/SendMessageRequest" + }, + { + "type": "null" + } + ] + }, + "system_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "System Message Suffix" + }, + "processors": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/EventCallbackProcessor-Input" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Processors" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "selected_repository": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Repository" + }, + "selected_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Branch" + }, + "git_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ] + }, + "suggested_task": { + "anyOf": [ + { + "$ref": "#/components/schemas/SuggestedTask" + }, + { + "type": "null" + } + ] + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "trigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTrigger" + }, + { + "type": "null" + } + ] + }, + "pr_number": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Pr Number" + }, + "parent_conversation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Parent Conversation Id" + }, + "agent_type": { + "$ref": "#/components/schemas/AgentType", + "default": "default" + }, + "public": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Public" + }, + "plugins": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PluginSpec" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Plugins", + "description": "List of plugins to load for this conversation. Plugins are loaded and their skills/MCP config are merged into the agent." + } + }, + "type": "object", + "title": "AppConversationStartRequest", + "description": "Start conversation request object.\n\nAlthough a user can go directly to the sandbox and start conversations, they\nwould need to manually supply required startup parameters such as LLM key. Starting\nfrom the app server copies these from the user info." + }, + "AppConversationStartRequest-Output": { + "properties": { + "sandbox_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Id" + }, + "conversation_id": { + "anyOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ], + "title": "Conversation Id" + }, + "initial_message": { + "anyOf": [ + { + "$ref": "#/components/schemas/SendMessageRequest" + }, + { + "type": "null" + } + ] + }, + "system_message_suffix": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "System Message Suffix" + }, + "processors": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/EventCallbackProcessor-Output" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Processors" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "selected_repository": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Repository" + }, + "selected_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Branch" + }, + "git_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ] + }, + "suggested_task": { + "anyOf": [ + { + "$ref": "#/components/schemas/SuggestedTask" + }, + { + "type": "null" + } + ] + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "trigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTrigger" + }, + { + "type": "null" + } + ] + }, + "pr_number": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Pr Number" + }, + "parent_conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Conversation Id" + }, + "agent_type": { + "$ref": "#/components/schemas/AgentType", + "default": "default" + }, + "public": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Public" + }, + "plugins": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/PluginSpec" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Plugins", + "description": "List of plugins to load for this conversation. Plugins are loaded and their skills/MCP config are merged into the agent." + } + }, + "type": "object", + "title": "AppConversationStartRequest", + "description": "Start conversation request object.\n\nAlthough a user can go directly to the sandbox and start conversations, they\nwould need to manually supply required startup parameters such as LLM key. Starting\nfrom the app server copies these from the user info." + }, + "AppConversationStartTask": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id" + }, + "status": { + "$ref": "#/components/schemas/AppConversationStartTaskStatus", + "default": "WORKING" + }, + "detail": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Detail" + }, + "app_conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "App Conversation Id", + "description": "The id of the app_conversation, if READY" + }, + "sandbox_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Id", + "description": "The id of the sandbox, if READY" + }, + "agent_server_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent Server Url", + "description": "The agent server url, if READY" + }, + "request": { + "$ref": "#/components/schemas/AppConversationStartRequest-Output" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "created_by_user_id", + "request" + ], + "title": "AppConversationStartTask", + "description": "Object describing the start process for an app conversation.\n\nBecause starting an app conversation can be slow (And can involve starting a sandbox),\nwe kick off a background task for it. Once the conversation is started, the app_conversation_id\nis populated." + }, + "AppConversationStartTaskPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/AppConversationStartTask" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "AppConversationStartTaskPage" + }, + "AppConversationStartTaskSortOrder": { + "type": "string", + "enum": [ + "CREATED_AT", + "CREATED_AT_DESC", + "UPDATED_AT", + "UPDATED_AT_DESC" + ], + "title": "AppConversationStartTaskSortOrder" + }, + "AppConversationStartTaskStatus": { + "type": "string", + "enum": [ + "WORKING", + "WAITING_FOR_SANDBOX", + "PREPARING_REPOSITORY", + "RUNNING_SETUP_SCRIPT", + "SETTING_UP_GIT_HOOKS", + "SETTING_UP_SKILLS", + "STARTING_CONVERSATION", + "READY", + "ERROR" + ], + "title": "AppConversationStartTaskStatus" + }, + "AppConversationUpdateRequest": { + "properties": { + "public": { + "type": "boolean", + "title": "Public" + } + }, + "type": "object", + "required": [ + "public" + ], + "title": "AppConversationUpdateRequest" + }, + "AppMode": { + "type": "string", + "enum": [ + "oss", + "saas", + "oss" + ], + "title": "AppMode" + }, + "ApplyPatchAction-Input": { + "properties": { + "patch": { + "type": "string", + "title": "Patch", + "description": "Patch content following the '*** Begin Patch' ... '*** End Patch' format as described in OpenAI GPT-5.1 prompting guide." + }, + "kind": { + "type": "string", + "const": "ApplyPatchAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "patch" + ], + "title": "ApplyPatchAction", + "description": "Tool action schema specifying the patch to apply.\n\nThe patch must follow the exact text format described in the OpenAI\nCookbook's GPT-5.1 prompting guide. The executor parses this patch and\napplies changes relative to the current workspace root." + }, + "ApplyPatchAction-Output": { + "properties": { + "patch": { + "type": "string", + "title": "Patch", + "description": "Patch content following the '*** Begin Patch' ... '*** End Patch' format as described in OpenAI GPT-5.1 prompting guide." + }, + "kind": { + "type": "string", + "const": "ApplyPatchAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "patch", + "kind" + ], + "title": "ApplyPatchAction", + "description": "Tool action schema specifying the patch to apply.\n\nThe patch must follow the exact text format described in the OpenAI\nCookbook's GPT-5.1 prompting guide. The executor parses this patch and\napplies changes relative to the current workspace root." + }, + "ApplyPatchObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "message": { + "type": "string", + "title": "Message", + "default": "" + }, + "fuzz": { + "type": "integer", + "title": "Fuzz", + "default": 0 + }, + "commit": { + "anyOf": [ + { + "$ref": "#/components/schemas/Commit-Input" + }, + { + "type": "null" + } + ] + }, + "kind": { + "type": "string", + "const": "ApplyPatchObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ApplyPatchObservation", + "description": "Result of applying a patch.\n\n- message: human-readable summary of the changes or error\n- fuzz: number of lines of fuzz used when applying hunks (0 means exact)\n- commit: structured summary of the applied operations" + }, + "ApplyPatchObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "message": { + "type": "string", + "title": "Message", + "default": "" + }, + "fuzz": { + "type": "integer", + "title": "Fuzz", + "default": 0 + }, + "commit": { + "anyOf": [ + { + "$ref": "#/components/schemas/Commit-Output" + }, + { + "type": "null" + } + ] + }, + "kind": { + "type": "string", + "const": "ApplyPatchObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ApplyPatchObservation", + "description": "Result of applying a patch.\n\n- message: human-readable summary of the changes or error\n- fuzz: number of lines of fuzz used when applying hunks (0 means exact)\n- commit: structured summary of the applied operations" + }, + "ApplyPatchTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ApplyPatchTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "ApplyPatchTool", + "description": "ToolDefinition for applying unified text patches.\n\nCreates an ApplyPatchExecutor bound to the current workspace and supplies a\nconcise description. The Responses tool schema is minimized to rely on\nprovider-known behavior for GPT-5.1 models." + }, + "ApplyPatchTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ApplyPatchTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ApplyPatchTool", + "description": "ToolDefinition for applying unified text patches.\n\nCreates an ApplyPatchExecutor bound to the current workspace and supplies a\nconcise description. The Responses tool schema is minimized to rely on\nprovider-known behavior for GPT-5.1 models." + }, + "BaseWorkspace": { + "oneOf": [ + { + "$ref": "#/components/schemas/LocalWorkspace" + }, + { + "$ref": "#/components/schemas/RemoteWorkspace" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__workspace__local__LocalWorkspace-Input__1": "#/components/schemas/LocalWorkspace", + "openhands__sdk__workspace__remote__base__RemoteWorkspace-Input__1": "#/components/schemas/RemoteWorkspace" + } + } + }, + "BatchInvitationResponse": { + "properties": { + "successful": { + "items": { + "$ref": "#/components/schemas/InvitationResponse" + }, + "type": "array", + "title": "Successful" + }, + "failed": { + "items": { + "$ref": "#/components/schemas/InvitationFailure" + }, + "type": "array", + "title": "Failed" + } + }, + "type": "object", + "required": [ + "successful", + "failed" + ], + "title": "BatchInvitationResponse", + "description": "Response model for batch invitation creation." + }, + "BatchMethod": { + "type": "string", + "enum": [ + "POST", + "DELETE" + ], + "title": "BatchMethod" + }, + "BatchOperation": { + "properties": { + "method": { + "$ref": "#/components/schemas/BatchMethod" + }, + "path": { + "type": "string", + "title": "Path" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content" + }, + "encoding": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Encoding" + } + }, + "type": "object", + "required": [ + "method", + "path" + ], + "title": "BatchOperation" + }, + "Body_device_token_oauth_device_token_post": { + "properties": { + "device_code": { + "type": "string", + "title": "Device Code" + } + }, + "type": "object", + "required": [ + "device_code" + ], + "title": "Body_device_token_oauth_device_token_post" + }, + "Body_device_verification_authenticated_oauth_device_verify_authenticated_post": { + "properties": { + "user_code": { + "type": "string", + "title": "User Code" + } + }, + "type": "object", + "required": [ + "user_code" + ], + "title": "Body_device_verification_authenticated_oauth_device_verify_authenticated_post" + }, + "Body_upload_files_api_conversations__conversation_id__upload_files_post": { + "properties": { + "files": { + "items": { + "type": "string", + "format": "binary" + }, + "type": "array", + "title": "Files" + } + }, + "type": "object", + "required": [ + "files" + ], + "title": "Body_upload_files_api_conversations__conversation_id__upload_files_post" + }, + "Branch": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "commit_sha": { + "type": "string", + "title": "Commit Sha" + }, + "protected": { + "type": "boolean", + "title": "Protected" + }, + "last_push_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Push Date" + } + }, + "type": "object", + "required": [ + "name", + "commit_sha", + "protected" + ], + "title": "Branch" + }, + "BrowserAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserAction", + "description": "Base class for all browser actions.\n\nThis base class serves as the parent for all browser-related actions,\nenabling proper type hierarchy and eliminating the need for union types." + }, + "BrowserAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserAction", + "description": "Base class for all browser actions.\n\nThis base class serves as the parent for all browser-related actions,\nenabling proper type hierarchy and eliminating the need for union types." + }, + "BrowserClickAction-Input": { + "properties": { + "index": { + "type": "integer", + "minimum": 0.0, + "title": "Index", + "description": "The index of the element to click (from browser_get_state)" + }, + "new_tab": { + "type": "boolean", + "title": "New Tab", + "description": "Whether to open any resulting navigation in a new tab. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserClickAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "index" + ], + "title": "BrowserClickAction", + "description": "Schema for clicking elements." + }, + "BrowserClickAction-Output": { + "properties": { + "index": { + "type": "integer", + "minimum": 0.0, + "title": "Index", + "description": "The index of the element to click (from browser_get_state)" + }, + "new_tab": { + "type": "boolean", + "title": "New Tab", + "description": "Whether to open any resulting navigation in a new tab. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserClickAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "index", + "kind" + ], + "title": "BrowserClickAction", + "description": "Schema for clicking elements." + }, + "BrowserClickTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserClickTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserClickTool", + "description": "Tool for clicking browser elements." + }, + "BrowserClickTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserClickTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserClickTool", + "description": "Tool for clicking browser elements." + }, + "BrowserCloseTabAction-Input": { + "properties": { + "tab_id": { + "type": "string", + "title": "Tab Id", + "description": "4 Character Tab ID of the tab to close (from browser_list_tabs)" + }, + "kind": { + "type": "string", + "const": "BrowserCloseTabAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tab_id" + ], + "title": "BrowserCloseTabAction", + "description": "Schema for closing browser tabs." + }, + "BrowserCloseTabAction-Output": { + "properties": { + "tab_id": { + "type": "string", + "title": "Tab Id", + "description": "4 Character Tab ID of the tab to close (from browser_list_tabs)" + }, + "kind": { + "type": "string", + "const": "BrowserCloseTabAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tab_id", + "kind" + ], + "title": "BrowserCloseTabAction", + "description": "Schema for closing browser tabs." + }, + "BrowserCloseTabTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserCloseTabTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserCloseTabTool", + "description": "Tool for closing browser tabs." + }, + "BrowserCloseTabTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserCloseTabTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserCloseTabTool", + "description": "Tool for closing browser tabs." + }, + "BrowserGetContentAction-Input": { + "properties": { + "extract_links": { + "type": "boolean", + "title": "Extract Links", + "description": "Whether to include links in the content (default: False)", + "default": false + }, + "start_from_char": { + "type": "integer", + "minimum": 0.0, + "title": "Start From Char", + "description": "Character index to start from in the page content (default: 0)", + "default": 0 + }, + "kind": { + "type": "string", + "const": "BrowserGetContentAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserGetContentAction", + "description": "Schema for getting page content in markdown." + }, + "BrowserGetContentAction-Output": { + "properties": { + "extract_links": { + "type": "boolean", + "title": "Extract Links", + "description": "Whether to include links in the content (default: False)", + "default": false + }, + "start_from_char": { + "type": "integer", + "minimum": 0.0, + "title": "Start From Char", + "description": "Character index to start from in the page content (default: 0)", + "default": 0 + }, + "kind": { + "type": "string", + "const": "BrowserGetContentAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGetContentAction", + "description": "Schema for getting page content in markdown." + }, + "BrowserGetContentTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetContentTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserGetContentTool", + "description": "Tool for getting page content in markdown." + }, + "BrowserGetContentTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetContentTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGetContentTool", + "description": "Tool for getting page content in markdown." + }, + "BrowserGetStateAction-Input": { + "properties": { + "include_screenshot": { + "type": "boolean", + "title": "Include Screenshot", + "description": "Whether to include a screenshot of the current page. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserGetStateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserGetStateAction", + "description": "Schema for getting browser state." + }, + "BrowserGetStateAction-Output": { + "properties": { + "include_screenshot": { + "type": "boolean", + "title": "Include Screenshot", + "description": "Whether to include a screenshot of the current page. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserGetStateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGetStateAction", + "description": "Schema for getting browser state." + }, + "BrowserGetStateTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetStateTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserGetStateTool", + "description": "Tool for getting browser state." + }, + "BrowserGetStateTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetStateTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGetStateTool", + "description": "Tool for getting browser state." + }, + "BrowserGetStorageAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserGetStorageAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserGetStorageAction", + "description": "Schema for getting browser storage (cookies, local storage, session storage)." + }, + "BrowserGetStorageAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserGetStorageAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGetStorageAction", + "description": "Schema for getting browser storage (cookies, local storage, session storage)." + }, + "BrowserGetStorageTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetStorageTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserGetStorageTool", + "description": "Tool for getting browser storage." + }, + "BrowserGetStorageTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGetStorageTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGetStorageTool", + "description": "Tool for getting browser storage." + }, + "BrowserGoBackAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserGoBackAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserGoBackAction", + "description": "Schema for going back in browser history." + }, + "BrowserGoBackAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserGoBackAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserGoBackAction", + "description": "Schema for going back in browser history." + }, + "BrowserGoBackTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGoBackTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserGoBackTool", + "description": "Tool for going back in browser history." + }, + "BrowserGoBackTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserGoBackTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserGoBackTool", + "description": "Tool for going back in browser history." + }, + "BrowserListTabsAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserListTabsAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserListTabsAction", + "description": "Schema for listing browser tabs." + }, + "BrowserListTabsAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserListTabsAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserListTabsAction", + "description": "Schema for listing browser tabs." + }, + "BrowserListTabsTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserListTabsTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserListTabsTool", + "description": "Tool for listing browser tabs." + }, + "BrowserListTabsTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserListTabsTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserListTabsTool", + "description": "Tool for listing browser tabs." + }, + "BrowserNavigateAction-Input": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "The URL to navigate to" + }, + "new_tab": { + "type": "boolean", + "title": "New Tab", + "description": "Whether to open in a new tab. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserNavigateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "url" + ], + "title": "BrowserNavigateAction", + "description": "Schema for browser navigation." + }, + "BrowserNavigateAction-Output": { + "properties": { + "url": { + "type": "string", + "title": "Url", + "description": "The URL to navigate to" + }, + "new_tab": { + "type": "boolean", + "title": "New Tab", + "description": "Whether to open in a new tab. Default: False", + "default": false + }, + "kind": { + "type": "string", + "const": "BrowserNavigateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "url", + "kind" + ], + "title": "BrowserNavigateAction", + "description": "Schema for browser navigation." + }, + "BrowserNavigateTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserNavigateTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserNavigateTool", + "description": "Tool for browser navigation." + }, + "BrowserNavigateTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserNavigateTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserNavigateTool", + "description": "Tool for browser navigation." + }, + "BrowserObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "screenshot_data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Screenshot Data", + "description": "Base64 screenshot data if available" + }, + "full_output_save_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Output Save Dir", + "description": "Directory where full output files are saved" + }, + "kind": { + "type": "string", + "const": "BrowserObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserObservation", + "description": "Base observation for browser operations." + }, + "BrowserObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "screenshot_data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Screenshot Data", + "description": "Base64 screenshot data if available" + }, + "full_output_save_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Output Save Dir", + "description": "Directory where full output files are saved" + }, + "kind": { + "type": "string", + "const": "BrowserObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserObservation", + "description": "Base observation for browser operations." + }, + "BrowserScrollAction-Input": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "up", + "down" + ], + "title": "Direction", + "description": "Direction to scroll. Options: 'up', 'down'. Default: 'down'", + "default": "down" + }, + "kind": { + "type": "string", + "const": "BrowserScrollAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserScrollAction", + "description": "Schema for scrolling the page." + }, + "BrowserScrollAction-Output": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "up", + "down" + ], + "title": "Direction", + "description": "Direction to scroll. Options: 'up', 'down'. Default: 'down'", + "default": "down" + }, + "kind": { + "type": "string", + "const": "BrowserScrollAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserScrollAction", + "description": "Schema for scrolling the page." + }, + "BrowserScrollTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserScrollTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserScrollTool", + "description": "Tool for scrolling the browser page." + }, + "BrowserScrollTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserScrollTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserScrollTool", + "description": "Tool for scrolling the browser page." + }, + "BrowserSetStorageAction-Input": { + "properties": { + "storage_state": { + "additionalProperties": true, + "type": "object", + "title": "Storage State", + "description": "Storage state dictionary containing 'cookies' and 'origins' (from browser_get_storage)" + }, + "kind": { + "type": "string", + "const": "BrowserSetStorageAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "storage_state" + ], + "title": "BrowserSetStorageAction", + "description": "Schema for setting browser storage (cookies, local storage, session storage)." + }, + "BrowserSetStorageAction-Output": { + "properties": { + "storage_state": { + "additionalProperties": true, + "type": "object", + "title": "Storage State", + "description": "Storage state dictionary containing 'cookies' and 'origins' (from browser_get_storage)" + }, + "kind": { + "type": "string", + "const": "BrowserSetStorageAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "storage_state", + "kind" + ], + "title": "BrowserSetStorageAction", + "description": "Schema for setting browser storage (cookies, local storage, session storage)." + }, + "BrowserSetStorageTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserSetStorageTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserSetStorageTool", + "description": "Tool for setting browser storage." + }, + "BrowserSetStorageTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserSetStorageTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserSetStorageTool", + "description": "Tool for setting browser storage." + }, + "BrowserStartRecordingAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserStartRecordingAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserStartRecordingAction", + "description": "Schema for starting browser session recording." + }, + "BrowserStartRecordingAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserStartRecordingAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserStartRecordingAction", + "description": "Schema for starting browser session recording." + }, + "BrowserStartRecordingTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserStartRecordingTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserStartRecordingTool", + "description": "Tool for starting browser session recording." + }, + "BrowserStartRecordingTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserStartRecordingTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserStartRecordingTool", + "description": "Tool for starting browser session recording." + }, + "BrowserStopRecordingAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserStopRecordingAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "BrowserStopRecordingAction", + "description": "Schema for stopping browser session recording." + }, + "BrowserStopRecordingAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "BrowserStopRecordingAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "BrowserStopRecordingAction", + "description": "Schema for stopping browser session recording." + }, + "BrowserStopRecordingTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserStopRecordingTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserStopRecordingTool", + "description": "Tool for stopping browser session recording." + }, + "BrowserStopRecordingTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserStopRecordingTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserStopRecordingTool", + "description": "Tool for stopping browser session recording." + }, + "BrowserSwitchTabAction-Input": { + "properties": { + "tab_id": { + "type": "string", + "title": "Tab Id", + "description": "4 Character Tab ID of the tab to switch to (from browser_list_tabs)" + }, + "kind": { + "type": "string", + "const": "BrowserSwitchTabAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tab_id" + ], + "title": "BrowserSwitchTabAction", + "description": "Schema for switching browser tabs." + }, + "BrowserSwitchTabAction-Output": { + "properties": { + "tab_id": { + "type": "string", + "title": "Tab Id", + "description": "4 Character Tab ID of the tab to switch to (from browser_list_tabs)" + }, + "kind": { + "type": "string", + "const": "BrowserSwitchTabAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tab_id", + "kind" + ], + "title": "BrowserSwitchTabAction", + "description": "Schema for switching browser tabs." + }, + "BrowserSwitchTabTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserSwitchTabTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserSwitchTabTool", + "description": "Tool for switching browser tabs." + }, + "BrowserSwitchTabTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserSwitchTabTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserSwitchTabTool", + "description": "Tool for switching browser tabs." + }, + "BrowserToolSet-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserToolSet", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserToolSet", + "description": "A set of all browser tools.\n\nThis tool set includes all available browser-related tools\n for interacting with web pages.\n\nThe toolset automatically checks for Chromium availability\nwhen created and automatically installs it if missing." + }, + "BrowserToolSet-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserToolSet", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserToolSet", + "description": "A set of all browser tools.\n\nThis tool set includes all available browser-related tools\n for interacting with web pages.\n\nThe toolset automatically checks for Chromium availability\nwhen created and automatically installs it if missing." + }, + "BrowserTypeAction-Input": { + "properties": { + "index": { + "type": "integer", + "minimum": 0.0, + "title": "Index", + "description": "The index of the input element (from browser_get_state)" + }, + "text": { + "type": "string", + "title": "Text", + "description": "The text to type" + }, + "kind": { + "type": "string", + "const": "BrowserTypeAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "index", + "text" + ], + "title": "BrowserTypeAction", + "description": "Schema for typing text into elements." + }, + "BrowserTypeAction-Output": { + "properties": { + "index": { + "type": "integer", + "minimum": 0.0, + "title": "Index", + "description": "The index of the input element (from browser_get_state)" + }, + "text": { + "type": "string", + "title": "Text", + "description": "The text to type" + }, + "kind": { + "type": "string", + "const": "BrowserTypeAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "index", + "text", + "kind" + ], + "title": "BrowserTypeAction", + "description": "Schema for typing text into elements." + }, + "BrowserTypeTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserTypeTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "BrowserTypeTool", + "description": "Tool for typing text into browser elements." + }, + "BrowserTypeTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "BrowserTypeTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "BrowserTypeTool", + "description": "Tool for typing text into browser elements." + }, + "ByorPermittedResponse": { + "properties": { + "permitted": { + "type": "boolean", + "title": "Permitted" + } + }, + "type": "object", + "required": [ + "permitted" + ], + "title": "ByorPermittedResponse" + }, + "CmdOutputMetadata": { + "properties": { + "exit_code": { + "type": "integer", + "title": "Exit Code", + "description": "The exit code of the last executed command.", + "default": -1 + }, + "pid": { + "type": "integer", + "title": "Pid", + "description": "The process ID of the last executed command.", + "default": -1 + }, + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Username", + "description": "The username of the current user." + }, + "hostname": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Hostname", + "description": "The hostname of the machine." + }, + "working_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Working Dir", + "description": "The current working directory." + }, + "py_interpreter_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Py Interpreter Path", + "description": "The path to the current Python interpreter, if any." + }, + "prefix": { + "type": "string", + "title": "Prefix", + "description": "Prefix to add to command output", + "default": "" + }, + "suffix": { + "type": "string", + "title": "Suffix", + "description": "Suffix to add to command output", + "default": "" + } + }, + "type": "object", + "title": "CmdOutputMetadata", + "description": "Additional metadata captured from PS1" + }, + "Commit-Input": { + "properties": { + "changes": { + "additionalProperties": { + "$ref": "#/components/schemas/FileChange" + }, + "type": "object", + "title": "Changes" + } + }, + "type": "object", + "title": "Commit" + }, + "Commit-Output": { + "properties": { + "changes": { + "additionalProperties": { + "$ref": "#/components/schemas/FileChange" + }, + "type": "object", + "title": "Changes" + } + }, + "type": "object", + "title": "Commit" + }, + "Condensation-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "forgotten_event_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Forgotten Event Ids", + "description": "The IDs of the events that are being forgotten (removed from the `View` given to the LLM)." + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary", + "description": "An optional summary of the events being forgotten." + }, + "summary_offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Summary Offset", + "description": "An optional offset to the start of the resulting view (after forgotten events have been removed) indicating where the summary should be inserted. If not provided, the summary will not be inserted into the view." + }, + "llm_response_id": { + "type": "string", + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this event" + }, + "kind": { + "type": "string", + "const": "Condensation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "llm_response_id" + ], + "title": "Condensation", + "description": "This action indicates a condensation of the conversation history is happening." + }, + "Condensation-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "forgotten_event_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Forgotten Event Ids", + "description": "The IDs of the events that are being forgotten (removed from the `View` given to the LLM)." + }, + "summary": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Summary", + "description": "An optional summary of the events being forgotten." + }, + "summary_offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Summary Offset", + "description": "An optional offset to the start of the resulting view (after forgotten events have been removed) indicating where the summary should be inserted. If not provided, the summary will not be inserted into the view." + }, + "llm_response_id": { + "type": "string", + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this event" + }, + "kind": { + "type": "string", + "const": "Condensation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "llm_response_id", + "kind" + ], + "title": "Condensation", + "description": "This action indicates a condensation of the conversation history is happening." + }, + "CondensationRequest-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "kind": { + "type": "string", + "const": "CondensationRequest", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "CondensationRequest", + "description": "This action is used to request a condensation of the conversation history.\n\nAttributes:\n action (str): The action type, namely ActionType.CONDENSATION_REQUEST." + }, + "CondensationRequest-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "kind": { + "type": "string", + "const": "CondensationRequest", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "CondensationRequest", + "description": "This action is used to request a condensation of the conversation history.\n\nAttributes:\n action (str): The action type, namely ActionType.CONDENSATION_REQUEST." + }, + "CondensationSummaryEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "kind": { + "type": "string", + "const": "CondensationSummaryEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "summary" + ], + "title": "CondensationSummaryEvent", + "description": "This event represents a summary generated by a condenser." + }, + "CondensationSummaryEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "summary": { + "type": "string", + "title": "Summary" + }, + "kind": { + "type": "string", + "const": "CondensationSummaryEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "summary", + "kind" + ], + "title": "CondensationSummaryEvent", + "description": "This event represents a summary generated by a condenser." + }, + "CondenserBase": { + "oneOf": [ + { + "$ref": "#/components/schemas/LLMSummarizingCondenser" + }, + { + "$ref": "#/components/schemas/NoOpCondenser" + }, + { + "$ref": "#/components/schemas/PipelineCondenser" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__context__condenser__llm_summarizing_condenser__LLMSummarizingCondenser-Input__1": "#/components/schemas/LLMSummarizingCondenser", + "openhands__sdk__context__condenser__no_op_condenser__NoOpCondenser-Input__1": "#/components/schemas/NoOpCondenser", + "openhands__sdk__context__condenser__pipeline_condenser__PipelineCondenser-Input__1": "#/components/schemas/PipelineCondenser" + } + } + }, + "ConfirmRisky": { + "properties": { + "threshold": { + "$ref": "#/components/schemas/SecurityRisk", + "default": "HIGH" + }, + "confirm_unknown": { + "type": "boolean", + "title": "Confirm Unknown", + "default": true + }, + "kind": { + "type": "string", + "const": "ConfirmRisky", + "title": "Kind" + } + }, + "type": "object", + "title": "ConfirmRisky" + }, + "ConfirmationPolicyBase": { + "oneOf": [ + { + "$ref": "#/components/schemas/AlwaysConfirm" + }, + { + "$ref": "#/components/schemas/ConfirmRisky" + }, + { + "$ref": "#/components/schemas/NeverConfirm" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__security__confirmation_policy__AlwaysConfirm-Input__1": "#/components/schemas/AlwaysConfirm", + "openhands__sdk__security__confirmation_policy__ConfirmRisky-Input__1": "#/components/schemas/ConfirmRisky", + "openhands__sdk__security__confirmation_policy__NeverConfirm-Input__1": "#/components/schemas/NeverConfirm" + } + } + }, + "ConsultTomAction-Input": { + "properties": { + "reason": { + "type": "string", + "title": "Reason", + "description": "Brief explanation of why you need Tom agent consultation" + }, + "use_user_message": { + "type": "boolean", + "title": "Use User Message", + "description": "Whether to consult about the user message (True) or provide custom query (False)", + "default": true + }, + "custom_query": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Query", + "description": "Custom query to ask Tom agent (only used when use_user_message is False)" + }, + "kind": { + "type": "string", + "const": "ConsultTomAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "reason" + ], + "title": "ConsultTomAction", + "description": "Action to consult Tom agent for guidance." + }, + "ConsultTomAction-Output": { + "properties": { + "reason": { + "type": "string", + "title": "Reason", + "description": "Brief explanation of why you need Tom agent consultation" + }, + "use_user_message": { + "type": "boolean", + "title": "Use User Message", + "description": "Whether to consult about the user message (True) or provide custom query (False)", + "default": true + }, + "custom_query": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Query", + "description": "Custom query to ask Tom agent (only used when use_user_message is False)" + }, + "kind": { + "type": "string", + "const": "ConsultTomAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "reason", + "kind" + ], + "title": "ConsultTomAction", + "description": "Action to consult Tom agent for guidance." + }, + "ConsultTomObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "suggestions": { + "type": "string", + "title": "Suggestions", + "description": "Tom agent's suggestions or guidance", + "default": "" + }, + "confidence": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Confidence", + "description": "Confidence score from Tom agent (0-1)" + }, + "reasoning": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning", + "description": "Tom agent's reasoning for the suggestions" + }, + "kind": { + "type": "string", + "const": "ConsultTomObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ConsultTomObservation", + "description": "Observation from Tom agent consultation." + }, + "ConsultTomObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "suggestions": { + "type": "string", + "title": "Suggestions", + "description": "Tom agent's suggestions or guidance", + "default": "" + }, + "confidence": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Confidence", + "description": "Confidence score from Tom agent (0-1)" + }, + "reasoning": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning", + "description": "Tom agent's reasoning for the suggestions" + }, + "kind": { + "type": "string", + "const": "ConsultTomObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ConsultTomObservation", + "description": "Observation from Tom agent consultation." + }, + "ConversationErrorEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "description": "The source of this event" + }, + "code": { + "type": "string", + "title": "Code", + "description": "Code for the error - typically a type" + }, + "detail": { + "type": "string", + "title": "Detail", + "description": "Details about the error" + }, + "kind": { + "type": "string", + "const": "ConversationErrorEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "code", + "detail" + ], + "title": "ConversationErrorEvent", + "description": "Conversation-level failure that is NOT sent back to the LLM.\n\nThis event is emitted by the conversation runtime when an unexpected\nexception bubbles up and prevents the run loop from continuing. It is\nintended for client applications (e.g., UIs) to present a top-level error\nstate, and for orchestration to react. It is not an observation and it is\nnot LLM-convertible.\n\nDifferences from AgentErrorEvent:\n- Not tied to any tool_name/tool_call_id (AgentErrorEvent is a tool\n observation).\n- Typically source='environment' and the run loop moves to an ERROR state,\n while AgentErrorEvent has source='agent' and the conversation can\n continue." + }, + "ConversationErrorEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "description": "The source of this event" + }, + "code": { + "type": "string", + "title": "Code", + "description": "Code for the error - typically a type" + }, + "detail": { + "type": "string", + "title": "Detail", + "description": "Details about the error" + }, + "kind": { + "type": "string", + "const": "ConversationErrorEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "code", + "detail", + "kind" + ], + "title": "ConversationErrorEvent", + "description": "Conversation-level failure that is NOT sent back to the LLM.\n\nThis event is emitted by the conversation runtime when an unexpected\nexception bubbles up and prevents the run loop from continuing. It is\nintended for client applications (e.g., UIs) to present a top-level error\nstate, and for orchestration to react. It is not an observation and it is\nnot LLM-convertible.\n\nDifferences from AgentErrorEvent:\n- Not tied to any tool_name/tool_call_id (AgentErrorEvent is a tool\n observation).\n- Typically source='environment' and the run loop moves to an ERROR state,\n while AgentErrorEvent has source='agent' and the conversation can\n continue." + }, + "ConversationExecutionStatus": { + "type": "string", + "enum": [ + "idle", + "running", + "paused", + "waiting_for_confirmation", + "finished", + "error", + "stuck", + "deleting" + ], + "title": "ConversationExecutionStatus", + "description": "Enum representing the current execution state of the conversation." + }, + "ConversationInfo-Input": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Id", + "description": "Unique conversation ID" + }, + "agent": { + "$ref": "#/components/schemas/AgentBase", + "description": "The agent running in the conversation. This is persisted to allow resuming conversations and check agent configuration to handle e.g., tool changes, LLM changes, etc." + }, + "workspace": { + "$ref": "#/components/schemas/BaseWorkspace", + "description": "Workspace used by the agent to execute commands and read/write files. Not the process working directory." + }, + "persistence_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Persistence Dir", + "description": "Directory for persisting conversation state and events. If None, conversation will not be persisted.", + "default": "workspace/conversations" + }, + "max_iterations": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Max Iterations", + "description": "Maximum number of iterations the agent can perform in a single run.", + "default": 500 + }, + "stuck_detection": { + "type": "boolean", + "title": "Stuck Detection", + "description": "Whether to enable stuck detection for the agent.", + "default": true + }, + "execution_status": { + "$ref": "#/components/schemas/ConversationExecutionStatus", + "default": "idle" + }, + "confirmation_policy": { + "$ref": "#/components/schemas/ConfirmationPolicyBase", + "default": { + "kind": "NeverConfirm" + } + }, + "security_analyzer": { + "anyOf": [ + { + "$ref": "#/components/schemas/SecurityAnalyzerBase" + }, + { + "type": "null" + } + ], + "description": "Optional security analyzer to evaluate action risks." + }, + "activated_knowledge_skills": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Activated Knowledge Skills", + "description": "List of activated knowledge skills name" + }, + "blocked_actions": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Blocked Actions", + "description": "Actions blocked by PreToolUse hooks, keyed by action ID" + }, + "blocked_messages": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Blocked Messages", + "description": "Messages blocked by UserPromptSubmit hooks, keyed by message ID" + }, + "last_user_message_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last User Message Id", + "description": "Most recent user MessageEvent id for hook block checks. Updated when user messages are emitted so Agent.step can pop blocked_messages without scanning the event log. If None, hook-blocked checks are skipped (legacy conversations)." + }, + "stats": { + "$ref": "#/components/schemas/ConversationStats", + "description": "Conversation statistics for tracking LLM metrics" + }, + "secret_registry": { + "$ref": "#/components/schemas/SecretRegistry", + "description": "Registry for handling secrets and sensitive data" + }, + "agent_state": { + "additionalProperties": true, + "type": "object", + "title": "Agent State", + "description": "Dictionary for agent-specific runtime state that persists across iterations. Agents can store feature-specific state using string keys. To trigger autosave, always reassign: state.agent_state = {**state.agent_state, key: value}. See https://docs.openhands.dev/sdk/guides/convo-persistence#how-state-persistence-works" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "User-defined title for the conversation" + }, + "metrics": { + "anyOf": [ + { + "$ref": "#/components/schemas/MetricsSnapshot" + }, + { + "type": "null" + } + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "agent", + "workspace" + ], + "title": "ConversationInfo", + "description": "Information about a conversation running locally without a Runtime sandbox." + }, + "ConversationInfo-Output": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "title": { + "type": "string", + "title": "Title" + }, + "last_updated_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Last Updated At" + }, + "status": { + "$ref": "#/components/schemas/ConversationStatus", + "default": "STOPPED" + }, + "runtime_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/RuntimeStatus" + }, + { + "type": "null" + } + ] + }, + "selected_repository": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Repository" + }, + "selected_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Branch" + }, + "git_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ] + }, + "trigger": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationTrigger" + }, + { + "type": "null" + } + ] + }, + "num_connections": { + "type": "integer", + "title": "Num Connections", + "default": 0 + }, + "url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Url" + }, + "session_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Api Key" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "pr_number": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Pr Number" + }, + "conversation_version": { + "type": "string", + "title": "Conversation Version", + "default": "V0" + }, + "sub_conversation_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sub Conversation Ids" + }, + "public": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Public" + } + }, + "type": "object", + "required": [ + "conversation_id", + "title" + ], + "title": "ConversationInfo" + }, + "ConversationInfoResultSet": { + "properties": { + "results": { + "items": { + "$ref": "#/components/schemas/ConversationInfo-Output" + }, + "type": "array", + "title": "Results" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "title": "ConversationInfoResultSet" + }, + "ConversationResponse": { + "properties": { + "status": { + "type": "string", + "title": "Status" + }, + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message" + }, + "conversation_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConversationStatus" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "required": [ + "status", + "conversation_id" + ], + "title": "ConversationResponse" + }, + "ConversationStateUpdateEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "key": { + "type": "string", + "title": "Key", + "description": "Unique key for this state update event" + }, + "value": { + "title": "Value", + "description": "Serialized conversation state updates" + }, + "kind": { + "type": "string", + "const": "ConversationStateUpdateEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ConversationStateUpdateEvent", + "description": "Event that contains conversation state updates.\n\nThis event is sent via websocket whenever the conversation state changes,\nallowing remote clients to stay in sync without making REST API calls.\n\nAll fields are serialized versions of the corresponding ConversationState fields\nto ensure compatibility with websocket transmission." + }, + "ConversationStateUpdateEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "key": { + "type": "string", + "title": "Key", + "description": "Unique key for this state update event" + }, + "value": { + "title": "Value", + "description": "Serialized conversation state updates" + }, + "kind": { + "type": "string", + "const": "ConversationStateUpdateEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ConversationStateUpdateEvent", + "description": "Event that contains conversation state updates.\n\nThis event is sent via websocket whenever the conversation state changes,\nallowing remote clients to stay in sync without making REST API calls.\n\nAll fields are serialized versions of the corresponding ConversationState fields\nto ensure compatibility with websocket transmission." + }, + "ConversationStats": { + "properties": { + "usage_to_metrics": { + "additionalProperties": { + "$ref": "#/components/schemas/Metrics" + }, + "type": "object", + "title": "Usage To Metrics", + "description": "Active usage metrics tracked by the registry." + } + }, + "type": "object", + "title": "ConversationStats", + "description": "Track per-LLM usage metrics observed during conversations." + }, + "ConversationStatus": { + "type": "string", + "enum": [ + "STARTING", + "RUNNING", + "STOPPED", + "ARCHIVED", + "ERROR" + ], + "title": "ConversationStatus" + }, + "ConversationTrigger": { + "type": "string", + "enum": [ + "resolver", + "gui", + "suggested_task", + "openhands_api", + "slack", + "microagent_management", + "jira", + "jira_dc", + "linear", + "bitbucket" + ], + "title": "ConversationTrigger" + }, + "Cost": { + "properties": { + "model": { + "type": "string", + "title": "Model" + }, + "cost": { + "type": "number", + "minimum": 0.0, + "title": "Cost", + "description": "Cost must be non-negative" + }, + "timestamp": { + "type": "number", + "title": "Timestamp" + } + }, + "type": "object", + "required": [ + "model", + "cost" + ], + "title": "Cost" + }, + "CreateBillingSessionResponse": { + "properties": { + "redirect_url": { + "type": "string", + "title": "Redirect Url" + } + }, + "type": "object", + "required": [ + "redirect_url" + ], + "title": "CreateBillingSessionResponse" + }, + "CreateCheckoutSessionRequest": { + "properties": { + "amount": { + "type": "integer", + "title": "Amount" + } + }, + "type": "object", + "required": [ + "amount" + ], + "title": "CreateCheckoutSessionRequest" + }, + "CreateMicroagent": { + "properties": { + "repo": { + "type": "string", + "title": "Repo" + }, + "git_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ] + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + } + }, + "type": "object", + "required": [ + "repo" + ], + "title": "CreateMicroagent" + }, + "CriticBase": { + "oneOf": [ + { + "$ref": "#/components/schemas/AgentFinishedCritic" + }, + { + "$ref": "#/components/schemas/APIBasedCritic" + }, + { + "$ref": "#/components/schemas/EmptyPatchCritic" + }, + { + "$ref": "#/components/schemas/PassCritic" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__critic__impl__agent_finished__AgentFinishedCritic-Input__1": "#/components/schemas/AgentFinishedCritic", + "openhands__sdk__critic__impl__api__critic__APIBasedCritic-Input__1": "#/components/schemas/APIBasedCritic", + "openhands__sdk__critic__impl__empty_patch__EmptyPatchCritic-Input__1": "#/components/schemas/EmptyPatchCritic", + "openhands__sdk__critic__impl__pass_critic__PassCritic-Input__1": "#/components/schemas/PassCritic" + } + } + }, + "CriticResult": { + "properties": { + "score": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Score", + "description": "A predicted probability of success between 0 and 1." + }, + "message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Message", + "description": "An optional message explaining the score." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata", + "description": "Optional metadata about the critic evaluation. Can include event_ids and categorized_features for visualization." + } + }, + "type": "object", + "required": [ + "score", + "message" + ], + "title": "CriticResult", + "description": "A critic result is a score and a message." + }, + "CustomSecret": { + "properties": { + "secret": { + "type": "string", + "format": "password", + "title": "Secret", + "writeOnly": true + }, + "description": { + "type": "string", + "title": "Description", + "default": "" + } + }, + "type": "object", + "title": "CustomSecret" + }, + "CustomSecretModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "value": { + "type": "string", + "format": "password", + "title": "Value", + "writeOnly": true + } + }, + "type": "object", + "required": [ + "name", + "value" + ], + "title": "CustomSecretModel", + "description": "Custom secret model with value" + }, + "CustomSecretWithoutValueModel": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "CustomSecretWithoutValueModel", + "description": "Custom secret model without value" + }, + "DelegateAction-Input": { + "properties": { + "command": { + "type": "string", + "enum": [ + "spawn", + "delegate" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `spawn`, `delegate`." + }, + "ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Ids", + "description": "Required parameter of `spawn` command. List of identifiers to initialize sub-agents with." + }, + "agent_types": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Agent Types", + "description": "Optional parameter of `spawn` command. List of agent types for each ID (e.g., ['researcher', 'programmer']). If omitted or blank for an ID, the default general-purpose agent is used." + }, + "tasks": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Tasks", + "description": "Required parameter of `delegate` command. Dictionary mapping sub-agent identifiers to task descriptions." + }, + "kind": { + "type": "string", + "const": "DelegateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "DelegateAction", + "description": "Schema for delegation operations." + }, + "DelegateAction-Output": { + "properties": { + "command": { + "type": "string", + "enum": [ + "spawn", + "delegate" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `spawn`, `delegate`." + }, + "ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Ids", + "description": "Required parameter of `spawn` command. List of identifiers to initialize sub-agents with." + }, + "agent_types": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Agent Types", + "description": "Optional parameter of `spawn` command. List of agent types for each ID (e.g., ['researcher', 'programmer']). If omitted or blank for an ID, the default general-purpose agent is used." + }, + "tasks": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Tasks", + "description": "Required parameter of `delegate` command. Dictionary mapping sub-agent identifiers to task descriptions." + }, + "kind": { + "type": "string", + "const": "DelegateAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "DelegateAction", + "description": "Schema for delegation operations." + }, + "DelegateObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "spawn", + "delegate" + ], + "title": "Command", + "description": "The command that was executed" + }, + "kind": { + "type": "string", + "const": "DelegateObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "DelegateObservation", + "description": "Observation from delegation operations." + }, + "DelegateObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "spawn", + "delegate" + ], + "title": "Command", + "description": "The command that was executed" + }, + "kind": { + "type": "string", + "const": "DelegateObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "DelegateObservation", + "description": "Observation from delegation operations." + }, + "DelegateTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "DelegateTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "DelegateTool", + "description": "A ToolDefinition subclass that automatically initializes a DelegateExecutor." + }, + "DelegateTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "DelegateTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "DelegateTool", + "description": "A ToolDefinition subclass that automatically initializes a DelegateExecutor." + }, + "DeviceAuthorizationResponse": { + "properties": { + "device_code": { + "type": "string", + "title": "Device Code" + }, + "user_code": { + "type": "string", + "title": "User Code" + }, + "verification_uri": { + "type": "string", + "title": "Verification Uri" + }, + "verification_uri_complete": { + "type": "string", + "title": "Verification Uri Complete" + }, + "expires_in": { + "type": "integer", + "title": "Expires In" + }, + "interval": { + "type": "integer", + "title": "Interval" + } + }, + "type": "object", + "required": [ + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" + ], + "title": "DeviceAuthorizationResponse" + }, + "EditAction-Input": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to modify." + }, + "old_string": { + "type": "string", + "title": "Old String", + "description": "The text to replace. To create a new file, use an empty string. Must match the exact text in the file including whitespace." + }, + "new_string": { + "type": "string", + "title": "New String", + "description": "The text to replace it with." + }, + "expected_replacements": { + "type": "integer", + "minimum": 0.0, + "title": "Expected Replacements", + "description": "Number of replacements expected. Defaults to 1. Use when you want to replace multiple occurrences. The edit will fail if the actual count doesn't match.", + "default": 1 + }, + "kind": { + "type": "string", + "const": "EditAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "old_string", + "new_string" + ], + "title": "EditAction", + "description": "Schema for edit operation." + }, + "EditAction-Output": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to modify." + }, + "old_string": { + "type": "string", + "title": "Old String", + "description": "The text to replace. To create a new file, use an empty string. Must match the exact text in the file including whitespace." + }, + "new_string": { + "type": "string", + "title": "New String", + "description": "The text to replace it with." + }, + "expected_replacements": { + "type": "integer", + "minimum": 0.0, + "title": "Expected Replacements", + "description": "Number of replacements expected. Defaults to 1. Use when you want to replace multiple occurrences. The edit will fail if the actual count doesn't match.", + "default": 1 + }, + "kind": { + "type": "string", + "const": "EditAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "old_string", + "new_string", + "kind" + ], + "title": "EditAction", + "description": "Schema for edit operation." + }, + "EditObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Path", + "description": "The file path that was edited." + }, + "is_new_file": { + "type": "boolean", + "title": "Is New File", + "description": "Whether a new file was created.", + "default": false + }, + "replacements_made": { + "type": "integer", + "title": "Replacements Made", + "description": "Number of replacements actually made.", + "default": 0 + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content after the edit." + }, + "kind": { + "type": "string", + "const": "EditObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "EditObservation", + "description": "Observation from editing a file." + }, + "EditObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Path", + "description": "The file path that was edited." + }, + "is_new_file": { + "type": "boolean", + "title": "Is New File", + "description": "Whether a new file was created.", + "default": false + }, + "replacements_made": { + "type": "integer", + "title": "Replacements Made", + "description": "Number of replacements actually made.", + "default": 0 + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content after the edit." + }, + "kind": { + "type": "string", + "const": "EditObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "EditObservation", + "description": "Observation from editing a file." + }, + "EditTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "EditTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "EditTool", + "description": "Tool for editing files via find/replace." + }, + "EditTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "EditTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "EditTool", + "description": "Tool for editing files via find/replace." + }, + "EmailUpdate": { + "properties": { + "email": { + "type": "string", + "title": "Email" + } + }, + "type": "object", + "required": [ + "email" + ], + "title": "EmailUpdate" + }, + "EmptyPatchCritic": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "EmptyPatchCritic", + "title": "Kind" + } + }, + "type": "object", + "title": "EmptyPatchCritic", + "description": "Critic that only evaluates whether a git patch is non-empty.\n\nThis critic checks only one criterion:\n- The generated git patch is non-empty (actual changes were made)\n\nUnlike AgentFinishedCritic, this critic does not check for proper\nagent completion with FinishAction." + }, + "Event-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/Condensation-Input" + }, + { + "$ref": "#/components/schemas/CondensationRequest-Input" + }, + { + "$ref": "#/components/schemas/CondensationSummaryEvent-Input" + }, + { + "$ref": "#/components/schemas/ConversationErrorEvent-Input" + }, + { + "$ref": "#/components/schemas/ConversationStateUpdateEvent-Input" + }, + { + "$ref": "#/components/schemas/LLMCompletionLogEvent-Input" + }, + { + "$ref": "#/components/schemas/ActionEvent-Input" + }, + { + "$ref": "#/components/schemas/MessageEvent-Input" + }, + { + "$ref": "#/components/schemas/AgentErrorEvent-Input" + }, + { + "$ref": "#/components/schemas/ObservationEvent-Input" + }, + { + "$ref": "#/components/schemas/UserRejectObservation-Input" + }, + { + "$ref": "#/components/schemas/SystemPromptEvent-Input" + }, + { + "$ref": "#/components/schemas/TokenEvent-Input" + }, + { + "$ref": "#/components/schemas/PauseEvent-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__event__condenser__Condensation-Input__1": "#/components/schemas/Condensation-Input", + "openhands__sdk__event__condenser__CondensationRequest-Input__1": "#/components/schemas/CondensationRequest-Input", + "openhands__sdk__event__condenser__CondensationSummaryEvent-Input__1": "#/components/schemas/CondensationSummaryEvent-Input", + "openhands__sdk__event__conversation_error__ConversationErrorEvent-Input__1": "#/components/schemas/ConversationErrorEvent-Input", + "openhands__sdk__event__conversation_state__ConversationStateUpdateEvent-Input__1": "#/components/schemas/ConversationStateUpdateEvent-Input", + "openhands__sdk__event__llm_completion_log__LLMCompletionLogEvent-Input__1": "#/components/schemas/LLMCompletionLogEvent-Input", + "openhands__sdk__event__llm_convertible__action__ActionEvent-Input__1": "#/components/schemas/ActionEvent-Input", + "openhands__sdk__event__llm_convertible__message__MessageEvent-Input__1": "#/components/schemas/MessageEvent-Input", + "openhands__sdk__event__llm_convertible__observation__AgentErrorEvent-Input__1": "#/components/schemas/AgentErrorEvent-Input", + "openhands__sdk__event__llm_convertible__observation__ObservationEvent-Input__1": "#/components/schemas/ObservationEvent-Input", + "openhands__sdk__event__llm_convertible__observation__UserRejectObservation-Input__1": "#/components/schemas/UserRejectObservation-Input", + "openhands__sdk__event__llm_convertible__system__SystemPromptEvent-Input__1": "#/components/schemas/SystemPromptEvent-Input", + "openhands__sdk__event__token__TokenEvent-Input__1": "#/components/schemas/TokenEvent-Input", + "openhands__sdk__event__user_action__PauseEvent-Input__1": "#/components/schemas/PauseEvent-Input" + } + } + }, + "Event-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/Condensation-Output" + }, + { + "$ref": "#/components/schemas/CondensationRequest-Output" + }, + { + "$ref": "#/components/schemas/CondensationSummaryEvent-Output" + }, + { + "$ref": "#/components/schemas/ConversationErrorEvent-Output" + }, + { + "$ref": "#/components/schemas/ConversationStateUpdateEvent-Output" + }, + { + "$ref": "#/components/schemas/LLMCompletionLogEvent-Output" + }, + { + "$ref": "#/components/schemas/ActionEvent-Output" + }, + { + "$ref": "#/components/schemas/MessageEvent-Output" + }, + { + "$ref": "#/components/schemas/AgentErrorEvent-Output" + }, + { + "$ref": "#/components/schemas/ObservationEvent-Output" + }, + { + "$ref": "#/components/schemas/UserRejectObservation-Output" + }, + { + "$ref": "#/components/schemas/SystemPromptEvent-Output" + }, + { + "$ref": "#/components/schemas/TokenEvent-Output" + }, + { + "$ref": "#/components/schemas/PauseEvent-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__event__condenser__Condensation-Output__1": "#/components/schemas/Condensation-Output", + "openhands__sdk__event__condenser__CondensationRequest-Output__1": "#/components/schemas/CondensationRequest-Output", + "openhands__sdk__event__condenser__CondensationSummaryEvent-Output__1": "#/components/schemas/CondensationSummaryEvent-Output", + "openhands__sdk__event__conversation_error__ConversationErrorEvent-Output__1": "#/components/schemas/ConversationErrorEvent-Output", + "openhands__sdk__event__conversation_state__ConversationStateUpdateEvent-Output__1": "#/components/schemas/ConversationStateUpdateEvent-Output", + "openhands__sdk__event__llm_completion_log__LLMCompletionLogEvent-Output__1": "#/components/schemas/LLMCompletionLogEvent-Output", + "openhands__sdk__event__llm_convertible__action__ActionEvent-Output__1": "#/components/schemas/ActionEvent-Output", + "openhands__sdk__event__llm_convertible__message__MessageEvent-Output__1": "#/components/schemas/MessageEvent-Output", + "openhands__sdk__event__llm_convertible__observation__AgentErrorEvent-Output__1": "#/components/schemas/AgentErrorEvent-Output", + "openhands__sdk__event__llm_convertible__observation__ObservationEvent-Output__1": "#/components/schemas/ObservationEvent-Output", + "openhands__sdk__event__llm_convertible__observation__UserRejectObservation-Output__1": "#/components/schemas/UserRejectObservation-Output", + "openhands__sdk__event__llm_convertible__system__SystemPromptEvent-Output__1": "#/components/schemas/SystemPromptEvent-Output", + "openhands__sdk__event__token__TokenEvent-Output__1": "#/components/schemas/TokenEvent-Output", + "openhands__sdk__event__user_action__PauseEvent-Output__1": "#/components/schemas/PauseEvent-Output" + } + } + }, + "EventCallbackProcessor-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/GithubV1CallbackProcessor-Input" + }, + { + "$ref": "#/components/schemas/SlackV1CallbackProcessor-Input" + }, + { + "$ref": "#/components/schemas/LoggingCallbackProcessor-Input" + }, + { + "$ref": "#/components/schemas/SetTitleCallbackProcessor-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "integrations__github__github_v1_callback_processor__GithubV1CallbackProcessor-Input__1": "#/components/schemas/GithubV1CallbackProcessor-Input", + "integrations__slack__slack_v1_callback_processor__SlackV1CallbackProcessor-Input__1": "#/components/schemas/SlackV1CallbackProcessor-Input", + "openhands__app_server__event_callback__event_callback_models__LoggingCallbackProcessor-Input__1": "#/components/schemas/LoggingCallbackProcessor-Input", + "openhands__app_server__event_callback__set_title_callback_processor__SetTitleCallbackProcessor-Input__1": "#/components/schemas/SetTitleCallbackProcessor-Input" + } + } + }, + "EventCallbackProcessor-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/GithubV1CallbackProcessor-Output" + }, + { + "$ref": "#/components/schemas/SlackV1CallbackProcessor-Output" + }, + { + "$ref": "#/components/schemas/LoggingCallbackProcessor-Output" + }, + { + "$ref": "#/components/schemas/SetTitleCallbackProcessor-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "integrations__github__github_v1_callback_processor__GithubV1CallbackProcessor-Output__1": "#/components/schemas/GithubV1CallbackProcessor-Output", + "integrations__slack__slack_v1_callback_processor__SlackV1CallbackProcessor-Output__1": "#/components/schemas/SlackV1CallbackProcessor-Output", + "openhands__app_server__event_callback__event_callback_models__LoggingCallbackProcessor-Output__1": "#/components/schemas/LoggingCallbackProcessor-Output", + "openhands__app_server__event_callback__set_title_callback_processor__SetTitleCallbackProcessor-Output__1": "#/components/schemas/SetTitleCallbackProcessor-Output" + } + } + }, + "EventFilter": { + "properties": { + "exclude_hidden": { + "type": "boolean", + "title": "Exclude Hidden", + "default": false + }, + "query": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Query" + }, + "include_types": { + "anyOf": [ + { + "items": {}, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Include Types" + }, + "exclude_types": { + "anyOf": [ + { + "items": {}, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Exclude Types" + }, + "source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source" + }, + "start_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start Date" + }, + "end_date": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "End Date" + } + }, + "type": "object", + "title": "EventFilter" + }, + "EventPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Event-Output" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "EventPage" + }, + "EventSortOrder": { + "type": "string", + "enum": [ + "TIMESTAMP", + "TIMESTAMP_DESC" + ], + "title": "EventSortOrder", + "description": "Enum for event sorting options." + }, + "ExperimentConfig": { + "properties": { + "config": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Config" + } + }, + "type": "object", + "title": "ExperimentConfig" + }, + "ExposedUrl": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "url": { + "type": "string", + "title": "Url" + }, + "port": { + "type": "integer", + "title": "Port" + } + }, + "type": "object", + "required": [ + "name", + "url", + "port" + ], + "title": "ExposedUrl", + "description": "URL to access some named service within the container." + }, + "FallbackStrategy": { + "properties": { + "fallback_llms": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Fallback Llms", + "description": "Ordered list of LLM profile names to try on transient failure." + }, + "profile_store_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "path" + }, + { + "type": "null" + } + ], + "title": "Profile Store Dir", + "description": "Path to directory containing profiles. If not specified, defaults to `.openhands/profiles`." + } + }, + "type": "object", + "required": [ + "fallback_llms" + ], + "title": "FallbackStrategy", + "description": "Encapsulates fallback behavior for LLM calls.\n\nWhen the primary LLM fails with a transient error (after retries),\nthis strategy tries alternate LLMs loaded from LLMProfileStore profiles.\nFallback is per-call: each new request starts with the primary model." + }, + "FeedbackRequest": { + "properties": { + "conversation_id": { + "type": "string", + "title": "Conversation Id" + }, + "event_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Event Id" + }, + "rating": { + "type": "integer", + "maximum": 5.0, + "minimum": 1.0, + "title": "Rating" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "required": [ + "conversation_id", + "rating" + ], + "title": "FeedbackRequest" + }, + "FileChange": { + "properties": { + "type": { + "$ref": "#/components/schemas/ActionType" + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content" + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content" + }, + "move_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Move Path" + } + }, + "type": "object", + "required": [ + "type" + ], + "title": "FileChange" + }, + "FileEditorAction-Input": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to file or directory." + }, + "file_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Text", + "description": "Required parameter of `create` command, with the content of the file to be created." + }, + "old_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Str", + "description": "Required parameter of `str_replace` command containing the string in `path` to replace." + }, + "new_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Str", + "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert." + }, + "insert_line": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Insert Line", + "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`." + }, + "view_range": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "View Range", + "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file." + }, + "kind": { + "type": "string", + "const": "FileEditorAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "path" + ], + "title": "FileEditorAction", + "description": "Schema for file editor operations." + }, + "FileEditorAction-Output": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to file or directory." + }, + "file_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Text", + "description": "Required parameter of `create` command, with the content of the file to be created." + }, + "old_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Str", + "description": "Required parameter of `str_replace` command containing the string in `path` to replace." + }, + "new_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Str", + "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert." + }, + "insert_line": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Insert Line", + "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`." + }, + "view_range": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "View Range", + "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file." + }, + "kind": { + "type": "string", + "const": "FileEditorAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "path", + "kind" + ], + "title": "FileEditorAction", + "description": "Schema for file editor operations." + }, + "FileEditorObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The command that was run: `view`, `create`, `str_replace`, `insert`, or `undo_edit`." + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The file path that was edited." + }, + "prev_exist": { + "type": "boolean", + "title": "Prev Exist", + "description": "Indicates if the file previously existed. If not, it was created.", + "default": true + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content of the file before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content of the file after the edit." + }, + "kind": { + "type": "string", + "const": "FileEditorObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "FileEditorObservation", + "description": "A ToolResult that can be rendered as a CLI output." + }, + "FileEditorObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The command that was run: `view`, `create`, `str_replace`, `insert`, or `undo_edit`." + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The file path that was edited." + }, + "prev_exist": { + "type": "boolean", + "title": "Prev Exist", + "description": "Indicates if the file previously existed. If not, it was created.", + "default": true + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content of the file before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content of the file after the edit." + }, + "kind": { + "type": "string", + "const": "FileEditorObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "FileEditorObservation", + "description": "A ToolResult that can be rendered as a CLI output." + }, + "FileEditorTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "FileEditorTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "FileEditorTool", + "description": "A ToolDefinition subclass that automatically initializes a FileEditorExecutor." + }, + "FileEditorTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "FileEditorTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "FileEditorTool", + "description": "A ToolDefinition subclass that automatically initializes a FileEditorExecutor." + }, + "FileEntry": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the file or directory" + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to the file or directory" + }, + "is_directory": { + "type": "boolean", + "title": "Is Directory", + "description": "Whether this entry is a directory" + }, + "size": { + "type": "integer", + "title": "Size", + "description": "Size of the file in bytes (0 for directories)" + }, + "modified_time": { + "type": "string", + "format": "date-time", + "title": "Modified Time", + "description": "Last modified timestamp" + } + }, + "type": "object", + "required": [ + "name", + "path", + "is_directory", + "size", + "modified_time" + ], + "title": "FileEntry", + "description": "Information about a file or directory." + }, + "FinishAction-Input": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "description": "Final message to send to the user." + }, + "kind": { + "type": "string", + "const": "FinishAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "message" + ], + "title": "FinishAction" + }, + "FinishAction-Output": { + "properties": { + "message": { + "type": "string", + "title": "Message", + "description": "Final message to send to the user." + }, + "kind": { + "type": "string", + "const": "FinishAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "message", + "kind" + ], + "title": "FinishAction" + }, + "FinishObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "kind": { + "type": "string", + "const": "FinishObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "FinishObservation", + "description": "Observation returned after finishing a task.\nThe FinishAction itself contains the message sent to the user so no\nextra fields are needed here." + }, + "FinishObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "kind": { + "type": "string", + "const": "FinishObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "FinishObservation", + "description": "Observation returned after finishing a task.\nThe FinishAction itself contains the message sent to the user so no\nextra fields are needed here." + }, + "FinishTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "FinishTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "FinishTool", + "description": "Tool for signaling the completion of a task or conversation." + }, + "FinishTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "FinishTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "FinishTool", + "description": "Tool for signaling the completion of a task or conversation." + }, + "GETCustomSecrets": { + "properties": { + "custom_secrets": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/CustomSecretWithoutValueModel" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Custom Secrets" + } + }, + "type": "object", + "title": "GETCustomSecrets", + "description": "Custom secrets names" + }, + "GETSettingsModel": { + "properties": { + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "agent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent" + }, + "max_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Iterations" + }, + "security_analyzer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Security Analyzer" + }, + "confirmation_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Confirmation Mode" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "llm_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Llm Api Key" + }, + "llm_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Base Url" + }, + "user_version": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "User Version" + }, + "remote_runtime_resource_factor": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Remote Runtime Resource Factor" + }, + "secrets_store": { + "$ref": "#/components/schemas/Secrets-Output" + }, + "enable_default_condenser": { + "type": "boolean", + "title": "Enable Default Condenser", + "default": true + }, + "enable_sound_notifications": { + "type": "boolean", + "title": "Enable Sound Notifications", + "default": false + }, + "enable_proactive_conversation_starters": { + "type": "boolean", + "title": "Enable Proactive Conversation Starters", + "default": true + }, + "enable_solvability_analysis": { + "type": "boolean", + "title": "Enable Solvability Analysis", + "default": true + }, + "user_consents_to_analytics": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "User Consents To Analytics" + }, + "sandbox_base_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Base Container Image" + }, + "sandbox_runtime_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Runtime Container Image" + }, + "mcp_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MCPConfig" + }, + { + "type": "null" + } + ] + }, + "search_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Search Api Key" + }, + "sandbox_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Sandbox Api Key" + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task" + }, + "condenser_max_size": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Condenser Max Size" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + }, + "email_verified": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Email Verified" + }, + "git_user_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git User Name" + }, + "git_user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git User Email" + }, + "v1_enabled": { + "type": "boolean", + "title": "V1 Enabled", + "default": true + }, + "provider_tokens_set": { + "anyOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "propertyNames": { + "$ref": "#/components/schemas/ProviderType" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Provider Tokens Set" + }, + "llm_api_key_set": { + "type": "boolean", + "title": "Llm Api Key Set" + }, + "search_api_key_set": { + "type": "boolean", + "title": "Search Api Key Set", + "default": false + } + }, + "type": "object", + "required": [ + "llm_api_key_set" + ], + "title": "GETSettingsModel", + "description": "Settings with additional token data for the frontend" + }, + "GetCreditsResponse": { + "properties": { + "credits": { + "anyOf": [ + { + "type": "string", + "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$" + }, + { + "type": "null" + } + ], + "title": "Credits" + } + }, + "type": "object", + "title": "GetCreditsResponse" + }, + "GitLabResourceType": { + "type": "string", + "enum": [ + "group", + "subgroup", + "project" + ], + "title": "GitLabResourceType" + }, + "GitLabResourcesResponse": { + "properties": { + "resources": { + "items": { + "$ref": "#/components/schemas/ResourceWithWebhookStatus" + }, + "type": "array", + "title": "Resources" + } + }, + "type": "object", + "required": [ + "resources" + ], + "title": "GitLabResourcesResponse" + }, + "GithubV1CallbackProcessor-Input": { + "properties": { + "github_view_data": { + "additionalProperties": true, + "type": "object", + "title": "Github View Data" + }, + "should_request_summary": { + "type": "boolean", + "title": "Should Request Summary", + "default": true + }, + "inline_pr_comment": { + "type": "boolean", + "title": "Inline Pr Comment", + "default": false + }, + "kind": { + "type": "string", + "const": "GithubV1CallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "title": "GithubV1CallbackProcessor", + "description": "Callback processor for GitHub V1 integrations." + }, + "GithubV1CallbackProcessor-Output": { + "properties": { + "github_view_data": { + "additionalProperties": true, + "type": "object", + "title": "Github View Data" + }, + "should_request_summary": { + "type": "boolean", + "title": "Should Request Summary", + "default": true + }, + "inline_pr_comment": { + "type": "boolean", + "title": "Inline Pr Comment", + "default": false + }, + "kind": { + "type": "string", + "const": "GithubV1CallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "GithubV1CallbackProcessor", + "description": "Callback processor for GitHub V1 integrations." + }, + "GlobAction-Input": { + "properties": { + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The glob pattern to match files (e.g., \"**/*.js\", \"src/**/*.ts\")" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The directory (absolute path) to search in. Defaults to the current working directory." + }, + "kind": { + "type": "string", + "const": "GlobAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pattern" + ], + "title": "GlobAction", + "description": "Schema for glob pattern matching operations." + }, + "GlobAction-Output": { + "properties": { + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The glob pattern to match files (e.g., \"**/*.js\", \"src/**/*.ts\")" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The directory (absolute path) to search in. Defaults to the current working directory." + }, + "kind": { + "type": "string", + "const": "GlobAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pattern", + "kind" + ], + "title": "GlobAction", + "description": "Schema for glob pattern matching operations." + }, + "GlobObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "files": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Files", + "description": "List of matching file paths sorted by modification time" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The glob pattern that was used" + }, + "search_path": { + "type": "string", + "title": "Search Path", + "description": "The directory that was searched" + }, + "truncated": { + "type": "boolean", + "title": "Truncated", + "description": "Whether results were truncated to 100 files", + "default": false + }, + "kind": { + "type": "string", + "const": "GlobObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "files", + "pattern", + "search_path" + ], + "title": "GlobObservation", + "description": "Observation from glob pattern matching operations." + }, + "GlobObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "files": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Files", + "description": "List of matching file paths sorted by modification time" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The glob pattern that was used" + }, + "search_path": { + "type": "string", + "title": "Search Path", + "description": "The directory that was searched" + }, + "truncated": { + "type": "boolean", + "title": "Truncated", + "description": "Whether results were truncated to 100 files", + "default": false + }, + "kind": { + "type": "string", + "const": "GlobObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "files", + "pattern", + "search_path", + "kind" + ], + "title": "GlobObservation", + "description": "Observation from glob pattern matching operations." + }, + "GlobTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "GlobTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "GlobTool", + "description": "A ToolDefinition subclass that automatically initializes a GlobExecutor." + }, + "GlobTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "GlobTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "GlobTool", + "description": "A ToolDefinition subclass that automatically initializes a GlobExecutor." + }, + "GraySwanAnalyzer": { + "properties": { + "history_limit": { + "type": "integer", + "title": "History Limit", + "description": "Number of recent events to include as context", + "default": 20 + }, + "max_message_chars": { + "type": "integer", + "title": "Max Message Chars", + "description": "Max characters for conversation processing", + "default": 30000 + }, + "timeout": { + "type": "number", + "title": "Timeout", + "description": "Request timeout in seconds", + "default": 30.0 + }, + "low_threshold": { + "type": "number", + "title": "Low Threshold", + "description": "Risk threshold for LOW classification (score <= threshold)", + "default": 0.3 + }, + "medium_threshold": { + "type": "number", + "title": "Medium Threshold", + "description": "Risk threshold for MEDIUM classification (score <= threshold)", + "default": 0.7 + }, + "api_url": { + "type": "string", + "title": "Api Url", + "description": "GraySwan Cygnal API endpoint", + "default": "https://api.grayswan.ai/cygnal/monitor" + }, + "api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "GraySwan API key (via GRAYSWAN_API_KEY env var)" + }, + "policy_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Policy Id", + "description": "GraySwan policy ID (via GRAYSWAN_POLICY_ID env var)" + }, + "kind": { + "type": "string", + "const": "GraySwanAnalyzer", + "title": "Kind" + } + }, + "type": "object", + "title": "GraySwanAnalyzer", + "description": "Security analyzer using GraySwan's Cygnal API for AI safety monitoring.\n\nThis analyzer sends conversation history and pending actions to the GraySwan\nCygnal API for security analysis. The API returns a violation score which is\nmapped to SecurityRisk levels.\n\nEnvironment Variables:\n GRAYSWAN_API_KEY: Required API key for GraySwan authentication\n GRAYSWAN_POLICY_ID: Optional policy ID for custom GraySwan policy\n\nExample:\n >>> from openhands.sdk.security.grayswan import GraySwanAnalyzer\n >>> analyzer = GraySwanAnalyzer()\n >>> risk = analyzer.security_risk(action_event)" + }, + "GrepAction-Input": { + "properties": { + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The regex pattern to search for in file contents" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The directory (absolute path) to search in. Defaults to the current working directory." + }, + "include": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Include", + "description": "Optional file pattern to filter which files to search (e.g., \"*.js\", \"*.{ts,tsx}\")" + }, + "kind": { + "type": "string", + "const": "GrepAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pattern" + ], + "title": "GrepAction", + "description": "Schema for grep content search operations." + }, + "GrepAction-Output": { + "properties": { + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The regex pattern to search for in file contents" + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The directory (absolute path) to search in. Defaults to the current working directory." + }, + "include": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Include", + "description": "Optional file pattern to filter which files to search (e.g., \"*.js\", \"*.{ts,tsx}\")" + }, + "kind": { + "type": "string", + "const": "GrepAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "pattern", + "kind" + ], + "title": "GrepAction", + "description": "Schema for grep content search operations." + }, + "GrepObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "matches": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Matches", + "description": "List of file paths containing the pattern" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The regex pattern that was used" + }, + "search_path": { + "type": "string", + "title": "Search Path", + "description": "The directory that was searched" + }, + "include_pattern": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Include Pattern", + "description": "The file pattern filter that was used" + }, + "truncated": { + "type": "boolean", + "title": "Truncated", + "description": "Whether results were truncated to 100 files", + "default": false + }, + "kind": { + "type": "string", + "const": "GrepObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "matches", + "pattern", + "search_path" + ], + "title": "GrepObservation", + "description": "Observation from grep content search operations." + }, + "GrepObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "matches": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Matches", + "description": "List of file paths containing the pattern" + }, + "pattern": { + "type": "string", + "title": "Pattern", + "description": "The regex pattern that was used" + }, + "search_path": { + "type": "string", + "title": "Search Path", + "description": "The directory that was searched" + }, + "include_pattern": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Include Pattern", + "description": "The file pattern filter that was used" + }, + "truncated": { + "type": "boolean", + "title": "Truncated", + "description": "Whether results were truncated to 100 files", + "default": false + }, + "kind": { + "type": "string", + "const": "GrepObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "matches", + "pattern", + "search_path", + "kind" + ], + "title": "GrepObservation", + "description": "Observation from grep content search operations." + }, + "GrepTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "GrepTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "GrepTool", + "description": "A ToolDefinition subclass that automatically initializes a GrepExecutor." + }, + "GrepTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "GrepTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "GrepTool", + "description": "A ToolDefinition subclass that automatically initializes a GrepExecutor." + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "Icon": { + "properties": { + "src": { + "type": "string", + "title": "Src" + }, + "mimeType": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Mimetype" + }, + "sizes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Sizes" + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "src" + ], + "title": "Icon", + "description": "An icon for display in user interfaces." + }, + "ImageContent": { + "properties": { + "cache_prompt": { + "type": "boolean", + "title": "Cache Prompt", + "default": false + }, + "type": { + "type": "string", + "const": "image", + "title": "Type", + "default": "image" + }, + "image_urls": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Image Urls" + } + }, + "type": "object", + "required": [ + "image_urls" + ], + "title": "ImageContent" + }, + "InitSessionRequest": { + "properties": { + "repository": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Repository" + }, + "git_provider": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProviderType" + }, + { + "type": "null" + } + ] + }, + "selected_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Branch" + }, + "initial_user_msg": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Initial User Msg" + }, + "image_urls": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Image Urls" + }, + "replay_json": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Replay Json" + }, + "suggested_task": { + "anyOf": [ + { + "$ref": "#/components/schemas/SuggestedTask" + }, + { + "type": "null" + } + ] + }, + "create_microagent": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateMicroagent" + }, + { + "type": "null" + } + ] + }, + "conversation_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Conversation Instructions" + }, + "mcp_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MCPConfig" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "type": "object", + "title": "InitSessionRequest" + }, + "InputMetadata": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the input parameter" + }, + "description": { + "type": "string", + "title": "Description", + "description": "Description of the input parameter" + } + }, + "type": "object", + "required": [ + "name", + "description" + ], + "title": "InputMetadata", + "description": "Metadata for task skill inputs." + }, + "InvitationCreate": { + "properties": { + "emails": { + "items": { + "type": "string", + "format": "email" + }, + "type": "array", + "title": "Emails" + }, + "role": { + "type": "string", + "title": "Role", + "default": "member" + } + }, + "type": "object", + "required": [ + "emails" + ], + "title": "InvitationCreate", + "description": "Request model for creating invitation(s)." + }, + "InvitationFailure": { + "properties": { + "email": { + "type": "string", + "title": "Email" + }, + "error": { + "type": "string", + "title": "Error" + } + }, + "type": "object", + "required": [ + "email", + "error" + ], + "title": "InvitationFailure", + "description": "Response model for a failed invitation." + }, + "InvitationResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "email": { + "type": "string", + "title": "Email" + }, + "role": { + "type": "string", + "title": "Role" + }, + "status": { + "type": "string", + "title": "Status" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "expires_at": { + "type": "string", + "title": "Expires At" + }, + "inviter_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Inviter Email" + } + }, + "type": "object", + "required": [ + "id", + "email", + "role", + "status", + "created_at", + "expires_at" + ], + "title": "InvitationResponse", + "description": "Response model for invitation details." + }, + "IterativeRefinementConfig": { + "properties": { + "success_threshold": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Success Threshold", + "description": "Score threshold (0-1) to consider task successful.", + "default": 0.6 + }, + "max_iterations": { + "type": "integer", + "minimum": 1.0, + "title": "Max Iterations", + "description": "Maximum number of iterations before giving up.", + "default": 3 + } + }, + "type": "object", + "title": "IterativeRefinementConfig", + "description": "Configuration for iterative refinement based on critic feedback.\n\nWhen attached to a CriticBase, the Conversation.run() method will\nautomatically retry the task if the critic score is below the threshold.\n\nExample:\n critic = APIBasedCritic(\n server_url=\"...\",\n api_key=\"...\",\n model_name=\"critic\",\n iterative_refinement=IterativeRefinementConfig(\n success_threshold=0.7,\n max_iterations=3,\n ),\n )\n agent = Agent(llm=llm, tools=tools, critic=critic)\n conversation = Conversation(agent=agent, workspace=workspace)\n conversation.send_message(\"Create a calculator module...\")\n conversation.run() # Will automatically retry if critic score < 0.7" + }, + "JiraLinkCreate": { + "properties": { + "workspace_name": { + "type": "string", + "title": "Workspace Name", + "description": "Name of the Jira workspace to link to" + } + }, + "type": "object", + "required": [ + "workspace_name" + ], + "title": "JiraLinkCreate" + }, + "JiraUserResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "keycloak_user_id": { + "type": "string", + "title": "Keycloak User Id" + }, + "jira_workspace_id": { + "type": "integer", + "title": "Jira Workspace Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "title": "Updated At" + }, + "workspace": { + "$ref": "#/components/schemas/JiraWorkspaceResponse" + } + }, + "type": "object", + "required": [ + "id", + "keycloak_user_id", + "jira_workspace_id", + "status", + "created_at", + "updated_at", + "workspace" + ], + "title": "JiraUserResponse" + }, + "JiraValidateWorkspaceResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "status": { + "type": "string", + "title": "Status" + }, + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "name", + "status", + "message" + ], + "title": "JiraValidateWorkspaceResponse" + }, + "JiraWorkspaceCreate": { + "properties": { + "workspace_name": { + "type": "string", + "title": "Workspace Name", + "description": "Workspace display name" + }, + "webhook_secret": { + "type": "string", + "title": "Webhook Secret", + "description": "Webhook secret for verification" + }, + "svc_acc_email": { + "type": "string", + "title": "Svc Acc Email", + "description": "Service account email" + }, + "svc_acc_api_key": { + "type": "string", + "title": "Svc Acc Api Key", + "description": "Service account API token" + }, + "is_active": { + "type": "boolean", + "title": "Is Active", + "description": "Indicates if the workspace integration is active", + "default": false + } + }, + "type": "object", + "required": [ + "workspace_name", + "webhook_secret", + "svc_acc_email", + "svc_acc_api_key" + ], + "title": "JiraWorkspaceCreate" + }, + "JiraWorkspaceResponse": { + "properties": { + "id": { + "type": "integer", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "jira_cloud_id": { + "type": "string", + "title": "Jira Cloud Id" + }, + "status": { + "type": "string", + "title": "Status" + }, + "editable": { + "type": "boolean", + "title": "Editable" + }, + "created_at": { + "type": "string", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "id", + "name", + "jira_cloud_id", + "status", + "editable", + "created_at", + "updated_at" + ], + "title": "JiraWorkspaceResponse" + }, + "KeywordTrigger": { + "properties": { + "type": { + "type": "string", + "const": "keyword", + "title": "Type", + "default": "keyword" + }, + "keywords": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Keywords" + } + }, + "type": "object", + "required": [ + "keywords" + ], + "title": "KeywordTrigger", + "description": "Trigger for keyword-based skills.\n\nThese skills are activated when specific keywords appear in the user's query." + }, + "LLM": { + "properties": { + "model": { + "type": "string", + "title": "Model", + "description": "Model name.", + "default": "claude-sonnet-4-20250514" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "API key." + }, + "base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Base Url", + "description": "Custom base URL." + }, + "api_version": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Version", + "description": "API version (e.g., Azure)." + }, + "aws_access_key_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Aws Access Key Id" + }, + "aws_secret_access_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Aws Secret Access Key" + }, + "aws_region_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Aws Region Name" + }, + "openrouter_site_url": { + "type": "string", + "title": "Openrouter Site Url", + "default": "https://docs.all-hands.dev/" + }, + "openrouter_app_name": { + "type": "string", + "title": "Openrouter App Name", + "default": "OpenHands" + }, + "num_retries": { + "type": "integer", + "minimum": 0.0, + "title": "Num Retries", + "default": 5 + }, + "retry_multiplier": { + "type": "number", + "minimum": 0.0, + "title": "Retry Multiplier", + "default": 8.0 + }, + "retry_min_wait": { + "type": "integer", + "minimum": 0.0, + "title": "Retry Min Wait", + "default": 8 + }, + "retry_max_wait": { + "type": "integer", + "minimum": 0.0, + "title": "Retry Max Wait", + "default": 64 + }, + "timeout": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Timeout", + "description": "HTTP timeout in seconds. Default is 300s (5 minutes). Set to None to disable timeout (not recommended for production).", + "default": 300 + }, + "max_message_chars": { + "type": "integer", + "minimum": 1.0, + "title": "Max Message Chars", + "description": "Approx max chars in each event/content sent to the LLM.", + "default": 30000 + }, + "temperature": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Temperature", + "description": "Sampling temperature for response generation. Defaults to 0 for most models and provider default for reasoning models." + }, + "top_p": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Top P", + "default": 1.0 + }, + "top_k": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Top K" + }, + "max_input_tokens": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Input Tokens", + "description": "The maximum number of input tokens. Note that this is currently unused, and the value at runtime is actually the total tokens in OpenAI (e.g. 128,000 tokens for GPT-4)." + }, + "max_output_tokens": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Output Tokens", + "description": "The maximum number of output tokens. This is sent to the LLM." + }, + "model_canonical_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Model Canonical Name", + "description": "Optional canonical model name for feature registry lookups. The OpenHands SDK maintains a model feature registry that maps model names to capabilities (e.g., vision support, prompt caching, responses API support). When using proxied or aliased model identifiers, set this field to the canonical model name (e.g., 'openai/gpt-4o') to ensure correct capability detection. If not provided, the 'model' field will be used for capability lookups." + }, + "extra_headers": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Extra Headers", + "description": "Optional HTTP headers to forward to LiteLLM requests." + }, + "input_cost_per_token": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Input Cost Per Token", + "description": "The cost per input token. This will available in logs for user." + }, + "output_cost_per_token": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Output Cost Per Token", + "description": "The cost per output token. This will available in logs for user." + }, + "ollama_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ollama Base Url" + }, + "stream": { + "type": "boolean", + "title": "Stream", + "description": "Enable streaming responses from the LLM. When enabled, the provided `on_token` callback in .completions and .responses will be invoked for each chunk of tokens.", + "default": false + }, + "drop_params": { + "type": "boolean", + "title": "Drop Params", + "default": true + }, + "modify_params": { + "type": "boolean", + "title": "Modify Params", + "description": "Modify params allows litellm to do transformations like adding a default message, when a message is empty.", + "default": true + }, + "disable_vision": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Vision", + "description": "If model is vision capable, this option allows to disable image processing (useful for cost reduction)." + }, + "disable_stop_word": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Disable Stop Word", + "description": "Disable using of stop word.", + "default": false + }, + "caching_prompt": { + "type": "boolean", + "title": "Caching Prompt", + "description": "Enable caching of prompts.", + "default": true + }, + "log_completions": { + "type": "boolean", + "title": "Log Completions", + "description": "Enable logging of completions.", + "default": false + }, + "log_completions_folder": { + "type": "string", + "title": "Log Completions Folder", + "description": "The folder to log LLM completions to. Required if log_completions is True.", + "default": "logs/completions" + }, + "custom_tokenizer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Tokenizer", + "description": "A custom tokenizer to use for token counting." + }, + "native_tool_calling": { + "type": "boolean", + "title": "Native Tool Calling", + "description": "Whether to use native tool calling.", + "default": true + }, + "force_string_serializer": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Force String Serializer", + "description": "Force using string content serializer when sending to LLM API. If None (default), auto-detect based on model. Useful for providers that do not support list content, like HuggingFace and Groq." + }, + "reasoning_effort": { + "anyOf": [ + { + "type": "string", + "enum": [ + "low", + "medium", + "high", + "xhigh", + "none" + ] + }, + { + "type": "null" + } + ], + "title": "Reasoning Effort", + "description": "The effort to put into reasoning. This is a string that can be one of 'low', 'medium', 'high', 'xhigh', or 'none'. Can apply to all reasoning models.", + "default": "high" + }, + "reasoning_summary": { + "anyOf": [ + { + "type": "string", + "enum": [ + "auto", + "concise", + "detailed" + ] + }, + { + "type": "null" + } + ], + "title": "Reasoning Summary", + "description": "The level of detail for reasoning summaries. This is a string that can be one of 'auto', 'concise', or 'detailed'. Requires verified OpenAI organization. Only sent when explicitly set." + }, + "enable_encrypted_reasoning": { + "type": "boolean", + "title": "Enable Encrypted Reasoning", + "description": "If True, ask for ['reasoning.encrypted_content'] in Responses API include.", + "default": true + }, + "prompt_cache_retention": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Prompt Cache Retention", + "description": "Retention policy for prompt cache. Only sent for GPT-5+ models; explicitly stripped for all other models.", + "default": "24h" + }, + "extended_thinking_budget": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Extended Thinking Budget", + "description": "The budget tokens for extended thinking, supported by Anthropic models.", + "default": 200000 + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Seed", + "description": "The seed to use for random number generation." + }, + "safety_settings": { + "anyOf": [ + { + "items": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Safety Settings", + "description": "Deprecated: Safety settings for models that support them (like Mistral AI and Gemini). This field is deprecated in 1.10.0 and will be removed in 1.15.0. Safety settings are designed for consumer-facing content moderation, which is not relevant for coding agents." + }, + "usage_id": { + "type": "string", + "title": "Usage Id", + "description": "Unique usage identifier for the LLM. Used for registry lookups, telemetry, and spend tracking.", + "default": "default" + }, + "litellm_extra_body": { + "additionalProperties": true, + "type": "object", + "title": "Litellm Extra Body", + "description": "Additional key-value pairs to pass to litellm's extra_body parameter. This is useful for custom inference endpoints that need additional parameters for configuration, routing, or advanced features. NOTE: Not all LLM providers support extra_body parameters. Some providers (e.g., OpenAI) may reject requests with unrecognized options. This is commonly supported by: - LiteLLM proxy servers (routing metadata, tracing) - vLLM endpoints (return_token_ids, etc.) - Custom inference clusters Examples: - Proxy routing: {'trace_version': '1.0.0', 'tags': ['agent:my-agent']} - vLLM features: {'return_token_ids': True}" + }, + "fallback_strategy": { + "anyOf": [ + { + "$ref": "#/components/schemas/FallbackStrategy" + }, + { + "type": "null" + } + ], + "description": "Optional fallback strategy for trying alternate LLMs on transient failure. Construct with FallbackStrategy(fallback_llms=[...]).Excluded from serialization; must be reconfigured after load." + } + }, + "type": "object", + "title": "LLM", + "description": "Language model interface for OpenHands agents.\n\nThe LLM class provides a unified interface for interacting with various\nlanguage models through the litellm library. It handles model configuration,\nAPI authentication,\nretry logic, and tool calling capabilities.\n\nExample:\n >>> from openhands.sdk import LLM\n >>> from pydantic import SecretStr\n >>> llm = LLM(\n ... model=\"claude-sonnet-4-20250514\",\n ... api_key=SecretStr(\"your-api-key\"),\n ... usage_id=\"my-agent\"\n ... )\n >>> # Use with agent or conversation" + }, + "LLMCompletionLogEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "filename": { + "type": "string", + "title": "Filename", + "description": "The intended filename for this log (relative to log directory)" + }, + "log_data": { + "type": "string", + "title": "Log Data", + "description": "The JSON-encoded log data to be written to the file" + }, + "model_name": { + "type": "string", + "title": "Model Name", + "description": "The model name for context", + "default": "unknown" + }, + "usage_id": { + "type": "string", + "title": "Usage Id", + "description": "The LLM usage_id that produced this log", + "default": "default" + }, + "kind": { + "type": "string", + "const": "LLMCompletionLogEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "filename", + "log_data" + ], + "title": "LLMCompletionLogEvent", + "description": "Event containing LLM completion log data.\n\nWhen an LLM is configured with log_completions=True in a remote conversation,\nthis event streams the completion log data back to the client through WebSocket\ninstead of writing it to a file inside the Docker container." + }, + "LLMCompletionLogEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "filename": { + "type": "string", + "title": "Filename", + "description": "The intended filename for this log (relative to log directory)" + }, + "log_data": { + "type": "string", + "title": "Log Data", + "description": "The JSON-encoded log data to be written to the file" + }, + "model_name": { + "type": "string", + "title": "Model Name", + "description": "The model name for context", + "default": "unknown" + }, + "usage_id": { + "type": "string", + "title": "Usage Id", + "description": "The LLM usage_id that produced this log", + "default": "default" + }, + "kind": { + "type": "string", + "const": "LLMCompletionLogEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "filename", + "log_data", + "kind" + ], + "title": "LLMCompletionLogEvent", + "description": "Event containing LLM completion log data.\n\nWhen an LLM is configured with log_completions=True in a remote conversation,\nthis event streams the completion log data back to the client through WebSocket\ninstead of writing it to a file inside the Docker container." + }, + "LLMSecurityAnalyzer": { + "properties": { + "kind": { + "type": "string", + "const": "LLMSecurityAnalyzer", + "title": "Kind" + } + }, + "type": "object", + "title": "LLMSecurityAnalyzer", + "description": "LLM-based security analyzer.\n\nThis analyzer respects the security_risk attribute that can be set by the LLM\nwhen generating actions, similar to OpenHands' LLMRiskAnalyzer.\n\nIt provides a lightweight security analysis approach that leverages the LLM's\nunderstanding of action context and potential risks." + }, + "LLMSummarizingCondenser": { + "properties": { + "llm": { + "$ref": "#/components/schemas/LLM" + }, + "max_size": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Max Size", + "default": 240 + }, + "max_tokens": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Tokens" + }, + "keep_first": { + "type": "integer", + "minimum": 0.0, + "title": "Keep First", + "default": 2 + }, + "minimum_progress": { + "type": "number", + "exclusiveMaximum": 1.0, + "exclusiveMinimum": 0.0, + "title": "Minimum Progress", + "default": 0.1 + }, + "hard_context_reset_max_retries": { + "type": "integer", + "exclusiveMinimum": 0.0, + "title": "Hard Context Reset Max Retries", + "default": 5 + }, + "hard_context_reset_context_scaling": { + "type": "number", + "exclusiveMaximum": 1.0, + "exclusiveMinimum": 0.0, + "title": "Hard Context Reset Context Scaling", + "default": 0.8 + }, + "kind": { + "type": "string", + "const": "LLMSummarizingCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "llm" + ], + "title": "LLMSummarizingCondenser", + "description": "LLM-based condenser that summarizes forgotten events.\n\nUses an independent LLM (stored in the `llm` attribute) for generating summaries\nof forgotten events. The optional `agent_llm` parameter passed to condense() is\nthe LLM used by the agent for token counting purposes, and you should not assume\nit is the same as the one defined in this condenser." + }, + "ListDirectoryAction-Input": { + "properties": { + "dir_path": { + "type": "string", + "title": "Dir Path", + "description": "The path to the directory to list. Defaults to current directory.", + "default": "." + }, + "recursive": { + "type": "boolean", + "title": "Recursive", + "description": "Whether to list subdirectories recursively (up to 2 levels).", + "default": false + }, + "kind": { + "type": "string", + "const": "ListDirectoryAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ListDirectoryAction", + "description": "Schema for list directory operation." + }, + "ListDirectoryAction-Output": { + "properties": { + "dir_path": { + "type": "string", + "title": "Dir Path", + "description": "The path to the directory to list. Defaults to current directory.", + "default": "." + }, + "recursive": { + "type": "boolean", + "title": "Recursive", + "description": "Whether to list subdirectories recursively (up to 2 levels).", + "default": false + }, + "kind": { + "type": "string", + "const": "ListDirectoryAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ListDirectoryAction", + "description": "Schema for list directory operation." + }, + "ListDirectoryObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "dir_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Dir Path", + "description": "The directory path that was listed." + }, + "entries": { + "items": { + "$ref": "#/components/schemas/FileEntry" + }, + "type": "array", + "title": "Entries", + "description": "List of files and directories found." + }, + "total_count": { + "type": "integer", + "title": "Total Count", + "description": "Total number of entries found.", + "default": 0 + }, + "is_truncated": { + "type": "boolean", + "title": "Is Truncated", + "description": "Whether the listing was truncated due to too many entries.", + "default": false + }, + "kind": { + "type": "string", + "const": "ListDirectoryObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ListDirectoryObservation", + "description": "Observation from listing a directory." + }, + "ListDirectoryObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "dir_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Dir Path", + "description": "The directory path that was listed." + }, + "entries": { + "items": { + "$ref": "#/components/schemas/FileEntry" + }, + "type": "array", + "title": "Entries", + "description": "List of files and directories found." + }, + "total_count": { + "type": "integer", + "title": "Total Count", + "description": "Total number of entries found.", + "default": 0 + }, + "is_truncated": { + "type": "boolean", + "title": "Is Truncated", + "description": "Whether the listing was truncated due to too many entries.", + "default": false + }, + "kind": { + "type": "string", + "const": "ListDirectoryObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ListDirectoryObservation", + "description": "Observation from listing a directory." + }, + "ListDirectoryTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ListDirectoryTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "ListDirectoryTool", + "description": "Tool for listing directory contents with metadata." + }, + "ListDirectoryTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ListDirectoryTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ListDirectoryTool", + "description": "Tool for listing directory contents with metadata." + }, + "LlmApiKeyResponse": { + "properties": { + "key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Key" + } + }, + "type": "object", + "required": [ + "key" + ], + "title": "LlmApiKeyResponse" + }, + "LocalWorkspace": { + "properties": { + "working_dir": { + "type": "string", + "title": "Working Dir", + "description": "The working directory for agent operations and tool execution. Accepts both string paths and Path objects. Path objects are automatically converted to strings." + }, + "kind": { + "type": "string", + "const": "LocalWorkspace", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "working_dir" + ], + "title": "LocalWorkspace", + "description": "Local workspace implementation that operates on the host filesystem.\n\nLocalWorkspace provides direct access to the local filesystem and command execution\nenvironment. It's suitable for development and testing scenarios where the agent\nshould operate directly on the host system.\n\nExample:\n >>> workspace = LocalWorkspace(working_dir=\"/path/to/project\")\n >>> with workspace:\n ... result = workspace.execute_command(\"ls -la\")\n ... content = workspace.read_file(\"README.md\")" + }, + "LoggingCallbackProcessor-Input": { + "properties": { + "kind": { + "type": "string", + "const": "LoggingCallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "title": "LoggingCallbackProcessor", + "description": "Example implementation which logs callbacks." + }, + "LoggingCallbackProcessor-Output": { + "properties": { + "kind": { + "type": "string", + "const": "LoggingCallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "LoggingCallbackProcessor", + "description": "Example implementation which logs callbacks." + }, + "LookupSecret": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description for this secret" + }, + "url": { + "type": "string", + "title": "Url" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Headers" + }, + "kind": { + "type": "string", + "const": "LookupSecret", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "LookupSecret", + "description": "A secret looked up from some external url" + }, + "MCPConfig": { + "properties": { + "sse_servers": { + "items": { + "$ref": "#/components/schemas/MCPSSEServerConfig" + }, + "type": "array", + "title": "Sse Servers" + }, + "stdio_servers": { + "items": { + "$ref": "#/components/schemas/MCPStdioServerConfig" + }, + "type": "array", + "title": "Stdio Servers" + }, + "shttp_servers": { + "items": { + "$ref": "#/components/schemas/MCPSHTTPServerConfig" + }, + "type": "array", + "title": "Shttp Servers" + } + }, + "additionalProperties": false, + "type": "object", + "title": "MCPConfig", + "description": "Configuration for MCP (Message Control Protocol) settings.\n\nAttributes:\n sse_servers: List of MCP SSE server configs\n stdio_servers: List of MCP stdio server configs. These servers will be added to the MCP Router running inside runtime container.\n shttp_servers: List of MCP HTTP server configs." + }, + "MCPSHTTPServerConfig": { + "properties": { + "url": { + "type": "string", + "title": "Url" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Key" + }, + "timeout": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Timeout", + "default": 60 + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "MCPSHTTPServerConfig", + "description": "Configuration for a MCP server that uses SHTTP.\n\nAttributes:\n url: The server URL\n api_key: Optional API key for authentication\n timeout: Timeout in seconds for tool calls (default: 60s)" + }, + "MCPSSEServerConfig": { + "properties": { + "url": { + "type": "string", + "title": "Url" + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Key" + } + }, + "type": "object", + "required": [ + "url" + ], + "title": "MCPSSEServerConfig", + "description": "Configuration for a single MCP server.\n\nAttributes:\n url: The server URL\n api_key: Optional API key for authentication" + }, + "MCPStdioServerConfig": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "command": { + "type": "string", + "title": "Command" + }, + "args": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Args" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Env" + } + }, + "type": "object", + "required": [ + "name", + "command" + ], + "title": "MCPStdioServerConfig", + "description": "Configuration for a MCP server that uses stdio.\n\nAttributes:\n name: The name of the server\n command: The command to run the server\n args: The arguments to pass to the server\n env: The environment variables to set for the server" + }, + "MCPToolAction-Input": { + "properties": { + "data": { + "additionalProperties": true, + "type": "object", + "title": "Data", + "description": "Dynamic data fields from the tool call" + }, + "kind": { + "type": "string", + "const": "MCPToolAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "MCPToolAction", + "description": "Schema for MCP input action.\n\nIt is just a thin wrapper around raw JSON and does\nnot do any validation.\n\nValidation will be performed by MCPTool.__call__\nby constructing dynamically created Pydantic model\nfrom the MCP tool input schema." + }, + "MCPToolAction-Output": { + "properties": { + "data": { + "additionalProperties": true, + "type": "object", + "title": "Data", + "description": "Dynamic data fields from the tool call" + }, + "kind": { + "type": "string", + "const": "MCPToolAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "MCPToolAction", + "description": "Schema for MCP input action.\n\nIt is just a thin wrapper around raw JSON and does\nnot do any validation.\n\nValidation will be performed by MCPTool.__call__\nby constructing dynamically created Pydantic model\nfrom the MCP tool input schema." + }, + "MCPToolDefinition-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "mcp_tool": { + "$ref": "#/components/schemas/mcp__types__Tool", + "description": "The MCP tool definition." + }, + "kind": { + "type": "string", + "const": "MCPToolDefinition", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "mcp_tool" + ], + "title": "MCPToolDefinition", + "description": "MCP Tool that wraps an MCP client and provides tool functionality." + }, + "MCPToolDefinition-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "mcp_tool": { + "$ref": "#/components/schemas/Tool-Output", + "description": "The MCP tool definition." + }, + "kind": { + "type": "string", + "const": "MCPToolDefinition", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "mcp_tool", + "kind", + "title" + ], + "title": "MCPToolDefinition", + "description": "MCP Tool that wraps an MCP client and provides tool functionality." + }, + "MCPToolObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "Name of the tool that was called" + }, + "kind": { + "type": "string", + "const": "MCPToolObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name" + ], + "title": "MCPToolObservation", + "description": "Observation from MCP tool execution." + }, + "MCPToolObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "Name of the tool that was called" + }, + "kind": { + "type": "string", + "const": "MCPToolObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "kind" + ], + "title": "MCPToolObservation", + "description": "Observation from MCP tool execution." + }, + "MeResponse": { + "properties": { + "org_id": { + "type": "string", + "title": "Org Id" + }, + "user_id": { + "type": "string", + "title": "User Id" + }, + "email": { + "type": "string", + "title": "Email" + }, + "role": { + "type": "string", + "title": "Role" + }, + "llm_api_key": { + "type": "string", + "title": "Llm Api Key" + }, + "max_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Iterations" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "llm_api_key_for_byor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Api Key For Byor" + }, + "llm_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Base Url" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status" + } + }, + "type": "object", + "required": [ + "org_id", + "user_id", + "email", + "role", + "llm_api_key" + ], + "title": "MeResponse", + "description": "Response model for the current user's membership in an organization." + }, + "Message": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "system", + "assistant", + "tool" + ], + "title": "Role" + }, + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content" + }, + "tool_calls": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/MessageToolCall" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Tool Calls" + }, + "tool_call_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Tool Call Id" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "reasoning_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reasoning Content", + "description": "Intermediate reasoning/thinking content from reasoning models" + }, + "thinking_blocks": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ThinkingBlock" + }, + { + "$ref": "#/components/schemas/RedactedThinkingBlock" + } + ] + }, + "type": "array", + "title": "Thinking Blocks", + "description": "Raw Anthropic thinking blocks for extended thinking feature" + }, + "responses_reasoning_item": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningItemModel" + }, + { + "type": "null" + } + ], + "description": "OpenAI Responses reasoning item from model output" + } + }, + "type": "object", + "required": [ + "role" + ], + "title": "Message" + }, + "MessageEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source" + }, + "llm_message": { + "$ref": "#/components/schemas/Message", + "description": "The exact LLM message for this message event" + }, + "llm_response_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this eventIf the source != 'agent', this field is None" + }, + "activated_skills": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Activated Skills", + "description": "List of activated skill name" + }, + "extended_content": { + "items": { + "$ref": "#/components/schemas/TextContent" + }, + "type": "array", + "title": "Extended Content", + "description": "List of content added by agent context" + }, + "sender": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sender", + "description": "Optional identifier of the sender. Can be used to track message origin in multi-agent scenarios." + }, + "critic_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticResult" + }, + { + "type": "null" + } + ], + "description": "Optional critic evaluation of this message and preceding history." + }, + "kind": { + "type": "string", + "const": "MessageEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "llm_message" + ], + "title": "MessageEvent", + "description": "Message from either agent or user.\n\nThis is originally the \"MessageAction\", but it suppose not to be tool call." + }, + "MessageEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source" + }, + "llm_message": { + "$ref": "#/components/schemas/Message", + "description": "The exact LLM message for this message event" + }, + "llm_response_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Response Id", + "description": "Completion or Response ID of the LLM response that generated this eventIf the source != 'agent', this field is None" + }, + "activated_skills": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Activated Skills", + "description": "List of activated skill name" + }, + "extended_content": { + "items": { + "$ref": "#/components/schemas/TextContent" + }, + "type": "array", + "title": "Extended Content", + "description": "List of content added by agent context" + }, + "sender": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sender", + "description": "Optional identifier of the sender. Can be used to track message origin in multi-agent scenarios." + }, + "critic_result": { + "anyOf": [ + { + "$ref": "#/components/schemas/CriticResult" + }, + { + "type": "null" + } + ], + "description": "Optional critic evaluation of this message and preceding history." + }, + "kind": { + "type": "string", + "const": "MessageEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "llm_message", + "kind" + ], + "title": "MessageEvent", + "description": "Message from either agent or user.\n\nThis is originally the \"MessageAction\", but it suppose not to be tool call." + }, + "MessageResponse": { + "properties": { + "message": { + "type": "string", + "title": "Message" + } + }, + "type": "object", + "required": [ + "message" + ], + "title": "MessageResponse" + }, + "MessageToolCall": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Canonical tool call id" + }, + "name": { + "type": "string", + "title": "Name", + "description": "Tool/function name" + }, + "arguments": { + "type": "string", + "title": "Arguments", + "description": "JSON string of arguments" + }, + "origin": { + "type": "string", + "enum": [ + "completion", + "responses" + ], + "title": "Origin", + "description": "Originating API family" + } + }, + "type": "object", + "required": [ + "id", + "name", + "arguments", + "origin" + ], + "title": "MessageToolCall", + "description": "Transport-agnostic tool call representation.\n\nOne canonical id is used for linking across actions/observations and\nfor Responses function_call_output call_id." + }, + "Metrics": { + "properties": { + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model", + "default": "default" + }, + "accumulated_cost": { + "type": "number", + "minimum": 0.0, + "title": "Accumulated Cost", + "description": "Total accumulated cost, must be non-negative", + "default": 0.0 + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task", + "description": "Maximum budget per task" + }, + "accumulated_token_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/TokenUsage" + }, + { + "type": "null" + } + ], + "description": "Accumulated token usage across all calls" + }, + "costs": { + "items": { + "$ref": "#/components/schemas/Cost" + }, + "type": "array", + "title": "Costs", + "description": "List of individual costs" + }, + "response_latencies": { + "items": { + "$ref": "#/components/schemas/ResponseLatency" + }, + "type": "array", + "title": "Response Latencies", + "description": "List of response latencies" + }, + "token_usages": { + "items": { + "$ref": "#/components/schemas/TokenUsage" + }, + "type": "array", + "title": "Token Usages", + "description": "List of token usage records" + } + }, + "type": "object", + "title": "Metrics", + "description": "Metrics class can record various metrics during running and evaluation.\nWe track:\n - accumulated_cost and costs\n - max_budget_per_task (budget limit)\n - A list of ResponseLatency\n - A list of TokenUsage (one per call)." + }, + "MetricsSnapshot": { + "properties": { + "model_name": { + "type": "string", + "title": "Model Name", + "description": "Name of the model", + "default": "default" + }, + "accumulated_cost": { + "type": "number", + "minimum": 0.0, + "title": "Accumulated Cost", + "description": "Total accumulated cost, must be non-negative", + "default": 0.0 + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task", + "description": "Maximum budget per task" + }, + "accumulated_token_usage": { + "anyOf": [ + { + "$ref": "#/components/schemas/TokenUsage" + }, + { + "type": "null" + } + ], + "description": "Accumulated token usage across all calls" + } + }, + "type": "object", + "title": "MetricsSnapshot", + "description": "A snapshot of metrics at a point in time.\n\nDoes not include lists of individual costs, latencies, or token usages." + }, + "MicroagentContentResponse": { + "properties": { + "content": { + "type": "string", + "title": "Content" + }, + "path": { + "type": "string", + "title": "Path" + }, + "triggers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Triggers", + "default": [] + }, + "git_provider": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git Provider" + } + }, + "type": "object", + "required": [ + "content", + "path" + ], + "title": "MicroagentContentResponse", + "description": "Response model for individual microagent content endpoint." + }, + "MicroagentResponse": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "path": { + "type": "string", + "title": "Path" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "name", + "path", + "created_at" + ], + "title": "MicroagentResponse", + "description": "Response model for microagents endpoint.\n\nNote: This model only includes basic metadata that can be determined\nwithout parsing microagent content. Use the separate content API\nto get detailed microagent information." + }, + "NeverConfirm": { + "properties": { + "kind": { + "type": "string", + "const": "NeverConfirm", + "title": "Kind" + } + }, + "type": "object", + "title": "NeverConfirm" + }, + "NoOpCondenser": { + "properties": { + "kind": { + "type": "string", + "const": "NoOpCondenser", + "title": "Kind" + } + }, + "type": "object", + "title": "NoOpCondenser", + "description": "Simple condenser that returns a view un-manipulated.\n\nPrimarily intended for testing purposes." + }, + "Observation-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolObservation-Input" + }, + { + "$ref": "#/components/schemas/FinishObservation-Input" + }, + { + "$ref": "#/components/schemas/ThinkObservation-Input" + }, + { + "$ref": "#/components/schemas/ApplyPatchObservation-Input" + }, + { + "$ref": "#/components/schemas/BrowserObservation-Input" + }, + { + "$ref": "#/components/schemas/DelegateObservation-Input" + }, + { + "$ref": "#/components/schemas/FileEditorObservation-Input" + }, + { + "$ref": "#/components/schemas/EditObservation-Input" + }, + { + "$ref": "#/components/schemas/ListDirectoryObservation-Input" + }, + { + "$ref": "#/components/schemas/ReadFileObservation-Input" + }, + { + "$ref": "#/components/schemas/WriteFileObservation-Input" + }, + { + "$ref": "#/components/schemas/GlobObservation-Input" + }, + { + "$ref": "#/components/schemas/GrepObservation-Input" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorObservation-Input" + }, + { + "$ref": "#/components/schemas/TaskTrackerObservation-Input" + }, + { + "$ref": "#/components/schemas/TerminalObservation-Input" + }, + { + "$ref": "#/components/schemas/ConsultTomObservation-Input" + }, + { + "$ref": "#/components/schemas/SleeptimeComputeObservation-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__definition__MCPToolObservation-Input__1": "#/components/schemas/MCPToolObservation-Input", + "openhands__sdk__tool__builtins__finish__FinishObservation-Input__1": "#/components/schemas/FinishObservation-Input", + "openhands__sdk__tool__builtins__think__ThinkObservation-Input__1": "#/components/schemas/ThinkObservation-Input", + "openhands__tools__apply_patch__definition__ApplyPatchObservation-Input__1": "#/components/schemas/ApplyPatchObservation-Input", + "openhands__tools__browser_use__definition__BrowserObservation-Input__1": "#/components/schemas/BrowserObservation-Input", + "openhands__tools__delegate__definition__DelegateObservation-Input__1": "#/components/schemas/DelegateObservation-Input", + "openhands__tools__file_editor__definition__FileEditorObservation-Input__1": "#/components/schemas/FileEditorObservation-Input", + "openhands__tools__gemini__edit__definition__EditObservation-Input__1": "#/components/schemas/EditObservation-Input", + "openhands__tools__gemini__list_directory__definition__ListDirectoryObservation-Input__1": "#/components/schemas/ListDirectoryObservation-Input", + "openhands__tools__gemini__read_file__definition__ReadFileObservation-Input__1": "#/components/schemas/ReadFileObservation-Input", + "openhands__tools__gemini__write_file__definition__WriteFileObservation-Input__1": "#/components/schemas/WriteFileObservation-Input", + "openhands__tools__glob__definition__GlobObservation-Input__1": "#/components/schemas/GlobObservation-Input", + "openhands__tools__grep__definition__GrepObservation-Input__1": "#/components/schemas/GrepObservation-Input", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorObservation-Input__1": "#/components/schemas/PlanningFileEditorObservation-Input", + "openhands__tools__task_tracker__definition__TaskTrackerObservation-Input__1": "#/components/schemas/TaskTrackerObservation-Input", + "openhands__tools__terminal__definition__TerminalObservation-Input__1": "#/components/schemas/TerminalObservation-Input", + "openhands__tools__tom_consult__definition__ConsultTomObservation-Input__1": "#/components/schemas/ConsultTomObservation-Input", + "openhands__tools__tom_consult__definition__SleeptimeComputeObservation-Input__1": "#/components/schemas/SleeptimeComputeObservation-Input" + } + } + }, + "Observation-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolObservation-Output" + }, + { + "$ref": "#/components/schemas/FinishObservation-Output" + }, + { + "$ref": "#/components/schemas/ThinkObservation-Output" + }, + { + "$ref": "#/components/schemas/ApplyPatchObservation-Output" + }, + { + "$ref": "#/components/schemas/BrowserObservation-Output" + }, + { + "$ref": "#/components/schemas/DelegateObservation-Output" + }, + { + "$ref": "#/components/schemas/FileEditorObservation-Output" + }, + { + "$ref": "#/components/schemas/EditObservation-Output" + }, + { + "$ref": "#/components/schemas/ListDirectoryObservation-Output" + }, + { + "$ref": "#/components/schemas/ReadFileObservation-Output" + }, + { + "$ref": "#/components/schemas/WriteFileObservation-Output" + }, + { + "$ref": "#/components/schemas/GlobObservation-Output" + }, + { + "$ref": "#/components/schemas/GrepObservation-Output" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorObservation-Output" + }, + { + "$ref": "#/components/schemas/TaskTrackerObservation-Output" + }, + { + "$ref": "#/components/schemas/TerminalObservation-Output" + }, + { + "$ref": "#/components/schemas/ConsultTomObservation-Output" + }, + { + "$ref": "#/components/schemas/SleeptimeComputeObservation-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__definition__MCPToolObservation-Output__1": "#/components/schemas/MCPToolObservation-Output", + "openhands__sdk__tool__builtins__finish__FinishObservation-Output__1": "#/components/schemas/FinishObservation-Output", + "openhands__sdk__tool__builtins__think__ThinkObservation-Output__1": "#/components/schemas/ThinkObservation-Output", + "openhands__tools__apply_patch__definition__ApplyPatchObservation-Output__1": "#/components/schemas/ApplyPatchObservation-Output", + "openhands__tools__browser_use__definition__BrowserObservation-Output__1": "#/components/schemas/BrowserObservation-Output", + "openhands__tools__delegate__definition__DelegateObservation-Output__1": "#/components/schemas/DelegateObservation-Output", + "openhands__tools__file_editor__definition__FileEditorObservation-Output__1": "#/components/schemas/FileEditorObservation-Output", + "openhands__tools__gemini__edit__definition__EditObservation-Output__1": "#/components/schemas/EditObservation-Output", + "openhands__tools__gemini__list_directory__definition__ListDirectoryObservation-Output__1": "#/components/schemas/ListDirectoryObservation-Output", + "openhands__tools__gemini__read_file__definition__ReadFileObservation-Output__1": "#/components/schemas/ReadFileObservation-Output", + "openhands__tools__gemini__write_file__definition__WriteFileObservation-Output__1": "#/components/schemas/WriteFileObservation-Output", + "openhands__tools__glob__definition__GlobObservation-Output__1": "#/components/schemas/GlobObservation-Output", + "openhands__tools__grep__definition__GrepObservation-Output__1": "#/components/schemas/GrepObservation-Output", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorObservation-Output__1": "#/components/schemas/PlanningFileEditorObservation-Output", + "openhands__tools__task_tracker__definition__TaskTrackerObservation-Output__1": "#/components/schemas/TaskTrackerObservation-Output", + "openhands__tools__terminal__definition__TerminalObservation-Output__1": "#/components/schemas/TerminalObservation-Output", + "openhands__tools__tom_consult__definition__ConsultTomObservation-Output__1": "#/components/schemas/ConsultTomObservation-Output", + "openhands__tools__tom_consult__definition__SleeptimeComputeObservation-Output__1": "#/components/schemas/SleeptimeComputeObservation-Output" + } + } + }, + "ObservationEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "observation": { + "$ref": "#/components/schemas/Observation-Input", + "description": "The observation (tool call) sent to LLM" + }, + "action_id": { + "type": "string", + "title": "Action Id", + "description": "The action id that this observation is responding to" + }, + "kind": { + "type": "string", + "const": "ObservationEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "observation", + "action_id" + ], + "title": "ObservationEvent" + }, + "ObservationEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "observation": { + "$ref": "#/components/schemas/Observation-Output", + "description": "The observation (tool call) sent to LLM" + }, + "action_id": { + "type": "string", + "title": "Action Id", + "description": "The action id that this observation is responding to" + }, + "kind": { + "type": "string", + "const": "ObservationEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "observation", + "action_id", + "kind" + ], + "title": "ObservationEvent" + }, + "OrgCreate": { + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "minLength": 1, + "title": "Name" + }, + "contact_name": { + "type": "string", + "title": "Contact Name" + }, + "contact_email": { + "type": "string", + "format": "email", + "title": "Contact Email" + } + }, + "type": "object", + "required": [ + "name", + "contact_name", + "contact_email" + ], + "title": "OrgCreate", + "description": "Request model for creating a new organization." + }, + "OrgMemberPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/OrgMemberResponse" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "OrgMemberPage", + "description": "Paginated response for organization members." + }, + "OrgMemberResponse": { + "properties": { + "user_id": { + "type": "string", + "title": "User Id" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + }, + "role_id": { + "type": "integer", + "title": "Role Id" + }, + "role": { + "type": "string", + "title": "Role" + }, + "role_rank": { + "type": "integer", + "title": "Role Rank" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status" + } + }, + "type": "object", + "required": [ + "user_id", + "email", + "role_id", + "role", + "role_rank", + "status" + ], + "title": "OrgMemberResponse", + "description": "Response model for a single organization member." + }, + "OrgMemberUpdate": { + "properties": { + "role": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Role" + } + }, + "type": "object", + "title": "OrgMemberUpdate", + "description": "Request model for updating an organization member." + }, + "OrgPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/OrgResponse" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + }, + "current_org_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Current Org Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "OrgPage", + "description": "Paginated response model for organization list." + }, + "OrgResponse": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "contact_name": { + "type": "string", + "title": "Contact Name" + }, + "contact_email": { + "type": "string", + "title": "Contact Email" + }, + "conversation_expiration": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Conversation Expiration" + }, + "agent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent" + }, + "default_max_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Default Max Iterations" + }, + "security_analyzer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Security Analyzer" + }, + "confirmation_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Confirmation Mode" + }, + "default_llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Llm Model" + }, + "default_llm_api_key_for_byor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Llm Api Key For Byor" + }, + "default_llm_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Llm Base Url" + }, + "remote_runtime_resource_factor": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Remote Runtime Resource Factor" + }, + "enable_default_condenser": { + "type": "boolean", + "title": "Enable Default Condenser", + "default": true + }, + "billing_margin": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Billing Margin" + }, + "enable_proactive_conversation_starters": { + "type": "boolean", + "title": "Enable Proactive Conversation Starters", + "default": true + }, + "sandbox_base_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Base Container Image" + }, + "sandbox_runtime_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Runtime Container Image" + }, + "org_version": { + "type": "integer", + "title": "Org Version", + "default": 0 + }, + "mcp_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Config" + }, + "search_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Search Api Key" + }, + "sandbox_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Api Key" + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task" + }, + "enable_solvability_analysis": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enable Solvability Analysis" + }, + "v1_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "V1 Enabled" + }, + "credits": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Credits" + }, + "is_personal": { + "type": "boolean", + "title": "Is Personal", + "default": false + } + }, + "type": "object", + "required": [ + "id", + "name", + "contact_name", + "contact_email" + ], + "title": "OrgResponse", + "description": "Response model for organization." + }, + "OrgUpdate": { + "properties": { + "name": { + "anyOf": [ + { + "type": "string", + "maxLength": 255, + "minLength": 1 + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "contact_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Contact Name" + }, + "contact_email": { + "anyOf": [ + { + "type": "string", + "format": "email" + }, + { + "type": "null" + } + ], + "title": "Contact Email" + }, + "conversation_expiration": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Conversation Expiration" + }, + "default_max_iterations": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Default Max Iterations" + }, + "remote_runtime_resource_factor": { + "anyOf": [ + { + "type": "integer", + "exclusiveMinimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Remote Runtime Resource Factor" + }, + "billing_margin": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Billing Margin" + }, + "enable_proactive_conversation_starters": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enable Proactive Conversation Starters" + }, + "sandbox_base_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Base Container Image" + }, + "sandbox_runtime_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Runtime Container Image" + }, + "mcp_config": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Config" + }, + "sandbox_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Api Key" + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number", + "exclusiveMinimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task" + }, + "enable_solvability_analysis": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enable Solvability Analysis" + }, + "v1_enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "V1 Enabled" + }, + "default_llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Llm Model" + }, + "default_llm_api_key_for_byor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Llm Api Key For Byor" + }, + "default_llm_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Default Llm Base Url" + }, + "search_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Search Api Key" + }, + "security_analyzer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Security Analyzer" + }, + "agent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent" + }, + "confirmation_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Confirmation Mode" + }, + "enable_default_condenser": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enable Default Condenser" + }, + "condenser_max_size": { + "anyOf": [ + { + "type": "integer", + "minimum": 20.0 + }, + { + "type": "null" + } + ], + "title": "Condenser Max Size" + } + }, + "type": "object", + "title": "OrgUpdate", + "description": "Request model for updating an organization." + }, + "OwnerType": { + "type": "string", + "enum": [ + "user", + "organization" + ], + "title": "OwnerType" + }, + "POSTProviderModel": { + "properties": { + "mcp_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MCPConfig" + }, + { + "type": "null" + } + ] + }, + "provider_tokens": { + "additionalProperties": { + "$ref": "#/components/schemas/ProviderToken" + }, + "propertyNames": { + "$ref": "#/components/schemas/ProviderType" + }, + "type": "object", + "title": "Provider Tokens", + "default": {} + } + }, + "type": "object", + "title": "POSTProviderModel", + "description": "Settings for POST requests" + }, + "POSTUploadFilesModel": { + "properties": { + "file_urls": { + "items": { + "type": "string" + }, + "type": "array", + "title": "File Urls" + }, + "skipped_files": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Skipped Files" + } + }, + "type": "object", + "required": [ + "file_urls", + "skipped_files" + ], + "title": "POSTUploadFilesModel", + "description": "Upload files response model" + }, + "PaginatedBranchesResponse": { + "properties": { + "branches": { + "items": { + "$ref": "#/components/schemas/Branch" + }, + "type": "array", + "title": "Branches" + }, + "has_next_page": { + "type": "boolean", + "title": "Has Next Page" + }, + "current_page": { + "type": "integer", + "title": "Current Page" + }, + "per_page": { + "type": "integer", + "title": "Per Page" + }, + "total_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Count" + } + }, + "type": "object", + "required": [ + "branches", + "has_next_page", + "current_page", + "per_page" + ], + "title": "PaginatedBranchesResponse" + }, + "PassCritic": { + "properties": { + "mode": { + "type": "string", + "enum": [ + "finish_and_message", + "all_actions" + ], + "title": "Mode", + "description": "When to run critic evaluation:\n- 'finish_and_message': Evaluate on FinishAction and agent MessageEvent (default, minimal performance impact)\n- 'all_actions': Evaluate after every agent action (WARNING: significantly slower due to API calls on each action)", + "default": "finish_and_message" + }, + "iterative_refinement": { + "anyOf": [ + { + "$ref": "#/components/schemas/IterativeRefinementConfig" + }, + { + "type": "null" + } + ], + "description": "Optional configuration for iterative refinement. When set, Conversation.run() will automatically retry the task if the critic score is below the success_threshold, up to max_iterations." + }, + "kind": { + "type": "string", + "const": "PassCritic", + "title": "Kind" + } + }, + "type": "object", + "title": "PassCritic", + "description": "Critic that always returns success.\n\nThis critic can be used when no evaluation is needed or when\nall instances should be considered successful regardless of their output." + }, + "PauseEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "user" + }, + "kind": { + "type": "string", + "const": "PauseEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "PauseEvent", + "description": "Event indicating that the agent execution was paused by user request." + }, + "PauseEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "user" + }, + "kind": { + "type": "string", + "const": "PauseEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "PauseEvent", + "description": "Event indicating that the agent execution was paused by user request." + }, + "PipelineCondenser": { + "properties": { + "condensers": { + "items": { + "$ref": "#/components/schemas/CondenserBase" + }, + "type": "array", + "title": "Condensers" + }, + "kind": { + "type": "string", + "const": "PipelineCondenser", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "condensers" + ], + "title": "PipelineCondenser", + "description": "A condenser that applies a sequence of condensers in order.\n\nAll condensers are defined primarily by their `condense` method, which takes a\n`View` and an optional `agent_llm` parameter, returning either a new `View` or a\n`Condensation` event. That means we can chain multiple condensers together by\npassing `View`s along and exiting early if any condenser returns a `Condensation`.\n\nFor example:\n\n # Use the pipeline condenser to chain multiple other condensers together\n condenser = PipelineCondenser(condensers=[\n CondenserA(...),\n CondenserB(...),\n CondenserC(...),\n ])\n\n result = condenser.condense(view, agent_llm=agent_llm)\n\n # Doing the same thing without the pipeline condenser requires more boilerplate\n # for the monadic chaining\n other_result = view\n\n if isinstance(other_result, View):\n other_result = CondenserA(...).condense(other_result, agent_llm=agent_llm)\n\n if isinstance(other_result, View):\n other_result = CondenserB(...).condense(other_result, agent_llm=agent_llm)\n\n if isinstance(other_result, View):\n other_result = CondenserC(...).condense(other_result, agent_llm=agent_llm)\n\n assert result == other_result" + }, + "PlanningFileEditorAction-Input": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to file or directory." + }, + "file_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Text", + "description": "Required parameter of `create` command, with the content of the file to be created." + }, + "old_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Str", + "description": "Required parameter of `str_replace` command containing the string in `path` to replace." + }, + "new_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Str", + "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert." + }, + "insert_line": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Insert Line", + "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`." + }, + "view_range": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "View Range", + "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file." + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "path" + ], + "title": "PlanningFileEditorAction", + "description": "Schema for planning file editor operations.\n\nInherits from FileEditorAction but restricts editing to PLAN.md only.\nAllows viewing any file but only editing PLAN.md." + }, + "PlanningFileEditorAction-Output": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The commands to run. Allowed options are: `view`, `create`, `str_replace`, `insert`, `undo_edit`." + }, + "path": { + "type": "string", + "title": "Path", + "description": "Absolute path to file or directory." + }, + "file_text": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Text", + "description": "Required parameter of `create` command, with the content of the file to be created." + }, + "old_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Str", + "description": "Required parameter of `str_replace` command containing the string in `path` to replace." + }, + "new_str": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Str", + "description": "Optional parameter of `str_replace` command containing the new string (if not given, no string will be added). Required parameter of `insert` command containing the string to insert." + }, + "insert_line": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Insert Line", + "description": "Required parameter of `insert` command. The `new_str` will be inserted AFTER the line `insert_line` of `path`." + }, + "view_range": { + "anyOf": [ + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "View Range", + "description": "Optional parameter of `view` command when `path` points to a file. If none is given, the full file is shown. If provided, the file will be shown in the indicated line number range, e.g. [11, 12] will show lines 11 and 12. Indexing at 1 to start. Setting `[start_line, -1]` shows all lines from `start_line` to the end of the file." + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "path", + "kind" + ], + "title": "PlanningFileEditorAction", + "description": "Schema for planning file editor operations.\n\nInherits from FileEditorAction but restricts editing to PLAN.md only.\nAllows viewing any file but only editing PLAN.md." + }, + "PlanningFileEditorObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The command that was run: `view`, `create`, `str_replace`, `insert`, or `undo_edit`." + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The file path that was edited." + }, + "prev_exist": { + "type": "boolean", + "title": "Prev Exist", + "description": "Indicates if the file previously existed. If not, it was created.", + "default": true + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content of the file before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content of the file after the edit." + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "PlanningFileEditorObservation", + "description": "Observation from planning file editor operations.\n\nInherits from FileEditorObservation - same structure, just different type." + }, + "PlanningFileEditorObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "create", + "str_replace", + "insert", + "undo_edit" + ], + "title": "Command", + "description": "The command that was run: `view`, `create`, `str_replace`, `insert`, or `undo_edit`." + }, + "path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Path", + "description": "The file path that was edited." + }, + "prev_exist": { + "type": "boolean", + "title": "Prev Exist", + "description": "Indicates if the file previously existed. If not, it was created.", + "default": true + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The content of the file before the edit." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The content of the file after the edit." + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "PlanningFileEditorObservation", + "description": "Observation from planning file editor operations.\n\nInherits from FileEditorObservation - same structure, just different type." + }, + "PlanningFileEditorTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "PlanningFileEditorTool", + "description": "A planning file editor tool with read-all, edit-PLAN.md-only access." + }, + "PlanningFileEditorTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "PlanningFileEditorTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "PlanningFileEditorTool", + "description": "A planning file editor tool with read-all, edit-PLAN.md-only access." + }, + "PluginSpec": { + "properties": { + "source": { + "type": "string", + "title": "Source", + "description": "Plugin source: 'github:owner/repo', any git URL, or local path" + }, + "ref": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Ref", + "description": "Optional branch, tag, or commit (only for git sources)" + }, + "repo_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Repo Path", + "description": "Subdirectory path within the git repository (e.g., 'plugins/my-plugin' for monorepos). Only relevant for git sources, not local paths." + }, + "parameters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Parameters", + "description": "User-provided values for plugin input parameters" + } + }, + "type": "object", + "required": [ + "source" + ], + "title": "PluginSpec", + "description": "Specification for loading a plugin into a conversation.\n\nExtends SDK's PluginSource with user-provided plugin configuration parameters.\nInherits source, ref, and repo_path fields along with their validation." + }, + "ProviderToken": { + "properties": { + "token": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Token" + }, + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "host": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Host" + } + }, + "type": "object", + "title": "ProviderToken" + }, + "ProviderType": { + "type": "string", + "enum": [ + "github", + "gitlab", + "bitbucket", + "forgejo", + "azure_devops", + "enterprise_sso" + ], + "title": "ProviderType" + }, + "ProvidersSetModel": { + "properties": { + "providers_set": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ProviderType" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Providers Set" + } + }, + "type": "object", + "title": "ProvidersSetModel" + }, + "ReadFileAction-Input": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to read." + }, + "offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Optional: The 0-based line number to start reading from. Use for paginating through large files." + }, + "limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Optional: Maximum number of lines to read. Use with 'offset' to paginate through large files." + }, + "kind": { + "type": "string", + "const": "ReadFileAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path" + ], + "title": "ReadFileAction", + "description": "Schema for read file operation." + }, + "ReadFileAction-Output": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to read." + }, + "offset": { + "anyOf": [ + { + "type": "integer", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Offset", + "description": "Optional: The 0-based line number to start reading from. Use for paginating through large files." + }, + "limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Limit", + "description": "Optional: Maximum number of lines to read. Use with 'offset' to paginate through large files." + }, + "kind": { + "type": "string", + "const": "ReadFileAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "kind" + ], + "title": "ReadFileAction", + "description": "Schema for read file operation." + }, + "ReadFileObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "type": "string", + "title": "File Path", + "description": "The file path that was read." + }, + "file_content": { + "type": "string", + "title": "File Content", + "description": "The content read from the file.", + "default": "" + }, + "is_truncated": { + "type": "boolean", + "title": "Is Truncated", + "description": "Whether the content was truncated due to size limits.", + "default": false + }, + "lines_shown": { + "anyOf": [ + { + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2 + }, + { + "type": "null" + } + ], + "title": "Lines Shown", + "description": "If truncated, the range of lines shown (start, end) - 1-indexed." + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Lines", + "description": "Total number of lines in the file." + }, + "kind": { + "type": "string", + "const": "ReadFileObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path" + ], + "title": "ReadFileObservation", + "description": "Observation from reading a file." + }, + "ReadFileObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "type": "string", + "title": "File Path", + "description": "The file path that was read." + }, + "file_content": { + "type": "string", + "title": "File Content", + "description": "The content read from the file.", + "default": "" + }, + "is_truncated": { + "type": "boolean", + "title": "Is Truncated", + "description": "Whether the content was truncated due to size limits.", + "default": false + }, + "lines_shown": { + "anyOf": [ + { + "prefixItems": [ + { + "type": "integer" + }, + { + "type": "integer" + } + ], + "type": "array", + "maxItems": 2, + "minItems": 2 + }, + { + "type": "null" + } + ], + "title": "Lines Shown", + "description": "If truncated, the range of lines shown (start, end) - 1-indexed." + }, + "total_lines": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Total Lines", + "description": "Total number of lines in the file." + }, + "kind": { + "type": "string", + "const": "ReadFileObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "kind" + ], + "title": "ReadFileObservation", + "description": "Observation from reading a file." + }, + "ReadFileTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ReadFileTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "ReadFileTool", + "description": "Tool for reading file contents with pagination support." + }, + "ReadFileTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ReadFileTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ReadFileTool", + "description": "Tool for reading file contents with pagination support." + }, + "ReasoningItemModel": { + "properties": { + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "summary": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Summary" + }, + "content": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Content" + }, + "encrypted_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Encrypted Content" + }, + "status": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Status" + } + }, + "type": "object", + "title": "ReasoningItemModel", + "description": "OpenAI Responses reasoning item (non-stream, subset we consume).\n\nDo not log or render encrypted_content." + }, + "RedactedThinkingBlock": { + "properties": { + "type": { + "type": "string", + "const": "redacted_thinking", + "title": "Type", + "default": "redacted_thinking" + }, + "data": { + "type": "string", + "title": "Data", + "description": "The redacted thinking content" + } + }, + "type": "object", + "required": [ + "data" + ], + "title": "RedactedThinkingBlock", + "description": "Redacted thinking block for previous responses without extended thinking.\n\nThis is used as a placeholder for assistant messages that were generated\nbefore extended thinking was enabled." + }, + "ReinstallWebhookRequest": { + "properties": { + "resource": { + "$ref": "#/components/schemas/ResourceIdentifier" + } + }, + "type": "object", + "required": [ + "resource" + ], + "title": "ReinstallWebhookRequest" + }, + "RemoteWorkspace": { + "properties": { + "working_dir": { + "type": "string", + "title": "Working Dir", + "description": "The working directory for agent operations and tool execution." + }, + "host": { + "type": "string", + "title": "Host", + "description": "The remote host URL for the workspace." + }, + "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Api Key", + "description": "API key for authenticating with the remote host." + }, + "read_timeout": { + "type": "number", + "title": "Read Timeout", + "description": "Timeout in seconds for reading operations of httpx.Client.", + "default": 600.0 + }, + "max_connections": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Connections", + "description": "Maximum number of connections for httpx.Client. None means no limit, useful for running many conversations in parallel." + }, + "kind": { + "type": "string", + "const": "RemoteWorkspace", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "working_dir", + "host" + ], + "title": "RemoteWorkspace", + "description": "Remote workspace implementation that connects to an OpenHands agent server.\n\nRemoteWorkspace provides access to a sandboxed environment running on a remote\nOpenHands agent server. This is the recommended approach for production deployments\nas it provides better isolation and security.\n\nExample:\n >>> workspace = RemoteWorkspace(\n ... host=\"https://agent-server.example.com\",\n ... working_dir=\"/workspace\"\n ... )\n >>> with workspace:\n ... result = workspace.execute_command(\"ls -la\")\n ... content = workspace.read_file(\"README.md\")" + }, + "Repository": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "full_name": { + "type": "string", + "title": "Full Name" + }, + "git_provider": { + "$ref": "#/components/schemas/ProviderType" + }, + "is_public": { + "type": "boolean", + "title": "Is Public" + }, + "stargazers_count": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Stargazers Count" + }, + "link_header": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Link Header" + }, + "pushed_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Pushed At" + }, + "owner_type": { + "anyOf": [ + { + "$ref": "#/components/schemas/OwnerType" + }, + { + "type": "null" + } + ] + }, + "main_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Main Branch" + } + }, + "type": "object", + "required": [ + "id", + "full_name", + "git_provider", + "is_public" + ], + "title": "Repository" + }, + "ResendEmailVerificationRequest": { + "properties": { + "user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "User Id" + }, + "is_auth_flow": { + "type": "boolean", + "title": "Is Auth Flow", + "default": false + } + }, + "type": "object", + "title": "ResendEmailVerificationRequest" + }, + "ResourceIdentifier": { + "properties": { + "type": { + "$ref": "#/components/schemas/GitLabResourceType" + }, + "id": { + "type": "string", + "title": "Id" + } + }, + "type": "object", + "required": [ + "type", + "id" + ], + "title": "ResourceIdentifier" + }, + "ResourceInstallationResult": { + "properties": { + "resource_id": { + "type": "string", + "title": "Resource Id" + }, + "resource_type": { + "type": "string", + "title": "Resource Type" + }, + "success": { + "type": "boolean", + "title": "Success" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + } + }, + "type": "object", + "required": [ + "resource_id", + "resource_type", + "success", + "error" + ], + "title": "ResourceInstallationResult" + }, + "ResourceWithWebhookStatus": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "name": { + "type": "string", + "title": "Name" + }, + "full_path": { + "type": "string", + "title": "Full Path" + }, + "type": { + "type": "string", + "title": "Type" + }, + "webhook_installed": { + "type": "boolean", + "title": "Webhook Installed" + }, + "webhook_uuid": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Webhook Uuid" + }, + "last_synced": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Last Synced" + } + }, + "type": "object", + "required": [ + "id", + "name", + "full_path", + "type", + "webhook_installed", + "webhook_uuid", + "last_synced" + ], + "title": "ResourceWithWebhookStatus" + }, + "ResponseLatency": { + "properties": { + "model": { + "type": "string", + "title": "Model" + }, + "latency": { + "type": "number", + "minimum": 0.0, + "title": "Latency", + "description": "Latency must be non-negative" + }, + "response_id": { + "type": "string", + "title": "Response Id" + } + }, + "type": "object", + "required": [ + "model", + "latency", + "response_id" + ], + "title": "ResponseLatency", + "description": "Metric tracking the round-trip time per completion call." + }, + "RuntimeStatus": { + "type": "string", + "enum": [ + "STATUS$STOPPED", + "STATUS$BUILDING_RUNTIME", + "STATUS$STARTING_RUNTIME", + "STATUS$RUNTIME_STARTED", + "STATUS$SETTING_UP_WORKSPACE", + "STATUS$SETTING_UP_GIT_HOOKS", + "STATUS$READY", + "STATUS$ERROR", + "STATUS$ERROR_RUNTIME_DISCONNECTED", + "STATUS$ERROR_LLM_AUTHENTICATION", + "STATUS$ERROR_LLM_SERVICE_UNAVAILABLE", + "STATUS$ERROR_LLM_INTERNAL_SERVER_ERROR", + "STATUS$ERROR_LLM_OUT_OF_CREDITS", + "STATUS$ERROR_LLM_CONTENT_POLICY_VIOLATION", + "CHAT_INTERFACE$AGENT_RATE_LIMITED_STOPPED_MESSAGE", + "STATUS$GIT_PROVIDER_AUTHENTICATION_ERROR", + "STATUS$LLM_RETRY", + "STATUS$ERROR_MEMORY" + ], + "title": "RuntimeStatus" + }, + "SandboxInfo": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id" + }, + "sandbox_spec_id": { + "type": "string", + "title": "Sandbox Spec Id" + }, + "status": { + "$ref": "#/components/schemas/SandboxStatus" + }, + "session_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Api Key", + "description": "Key to access sandbox, to be added as an `X-Session-API-Key` header in each request. In cases where the sandbox statues is STARTING or PAUSED, or the current user does not have full access the session_api_key will be None." + }, + "exposed_urls": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ExposedUrl" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Exposed Urls", + "description": "URLs exposed by the sandbox (App server, Vscode, etc...)Sandboxes with a status STARTING / PAUSED / ERROR may not return urls." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": [ + "id", + "created_by_user_id", + "sandbox_spec_id", + "status", + "session_api_key" + ], + "title": "SandboxInfo", + "description": "Information about a sandbox." + }, + "SandboxPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/SandboxInfo" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "SandboxPage" + }, + "SandboxSpecInfo": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "command": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Command" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "initial_env": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Initial Env", + "description": "Initial Environment Variables" + }, + "working_dir": { + "type": "string", + "title": "Working Dir", + "default": "/home/openhands/workspace" + } + }, + "type": "object", + "required": [ + "id", + "command" + ], + "title": "SandboxSpecInfo", + "description": "A template for creating a Sandbox (e.g: A Docker Image vs Container)." + }, + "SandboxSpecInfoPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/SandboxSpecInfo" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "SandboxSpecInfoPage" + }, + "SandboxStatus": { + "type": "string", + "enum": [ + "STARTING", + "RUNNING", + "PAUSED", + "ERROR", + "MISSING" + ], + "title": "SandboxStatus" + }, + "SecretRegistry": { + "properties": { + "secret_sources": { + "additionalProperties": { + "$ref": "#/components/schemas/SecretSource" + }, + "type": "object", + "title": "Secret Sources" + } + }, + "type": "object", + "title": "SecretRegistry", + "description": "Manages secrets and injects them into bash commands when needed.\n\nThe secret registry stores a mapping of secret keys to SecretSources\nthat retrieve the actual secret values. When a bash command is about to be\nexecuted, it scans the command for any secret keys and injects the corresponding\nenvironment variables.\n\nSecret sources will redact / encrypt their sensitive values as appropriate when\nserializing, depending on the content of the context. If a context is present\nand contains a 'cipher' object, this is used for encryption. If it contains a\nboolean 'expose_secrets' flag set to True, secrets are dunped in plain text.\nOtherwise secrets are redacted.\n\nAdditionally, it tracks the latest exported values to enable consistent masking\neven when callable secrets fail on subsequent calls." + }, + "SecretSource": { + "oneOf": [ + { + "$ref": "#/components/schemas/LookupSecret" + }, + { + "$ref": "#/components/schemas/StaticSecret" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__secret__secrets__LookupSecret-Input__1": "#/components/schemas/LookupSecret", + "openhands__sdk__secret__secrets__StaticSecret-Input__1": "#/components/schemas/StaticSecret" + } + } + }, + "Secrets-Input": { + "properties": { + "provider_tokens": { + "additionalProperties": { + "$ref": "#/components/schemas/ProviderToken" + }, + "propertyNames": { + "$ref": "#/components/schemas/ProviderType" + }, + "type": "object", + "title": "Provider Tokens" + }, + "custom_secrets": { + "additionalProperties": { + "$ref": "#/components/schemas/CustomSecret" + }, + "type": "object", + "title": "Custom Secrets" + } + }, + "type": "object", + "title": "Secrets" + }, + "Secrets-Output": { + "properties": { + "provider_tokens": { + "additionalProperties": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + {} + ] + }, + "type": "object" + }, + "type": "object", + "title": "Provider Tokens" + }, + "custom_secrets": { + "additionalProperties": { + "$ref": "#/components/schemas/CustomSecret" + }, + "type": "object", + "title": "Custom Secrets" + } + }, + "type": "object", + "title": "Secrets" + }, + "SecurityAnalyzerBase": { + "oneOf": [ + { + "$ref": "#/components/schemas/GraySwanAnalyzer" + }, + { + "$ref": "#/components/schemas/LLMSecurityAnalyzer" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__security__grayswan__analyzer__GraySwanAnalyzer-Input__1": "#/components/schemas/GraySwanAnalyzer", + "openhands__sdk__security__llm_analyzer__LLMSecurityAnalyzer-Input__1": "#/components/schemas/LLMSecurityAnalyzer" + } + } + }, + "SecurityRisk": { + "type": "string", + "enum": [ + "UNKNOWN", + "LOW", + "MEDIUM", + "HIGH" + ], + "title": "SecurityRisk", + "description": "Security risk levels for actions.\n\nBased on OpenHands security risk levels but adapted for agent-sdk.\nInteger values allow for easy comparison and ordering." + }, + "SendMessageRequest": { + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "system", + "assistant", + "tool" + ], + "title": "Role", + "default": "user" + }, + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content" + }, + "run": { + "type": "boolean", + "title": "Run", + "description": "Whether the agent loop should automatically run if not running", + "default": false + } + }, + "type": "object", + "title": "SendMessageRequest", + "description": "Payload to send a message to the agent.\n\nThis is a simplified version of openhands.sdk.Message." + }, + "SetTitleCallbackProcessor-Input": { + "properties": { + "kind": { + "type": "string", + "const": "SetTitleCallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "title": "SetTitleCallbackProcessor", + "description": "Callback processor which sets conversation titles." + }, + "SetTitleCallbackProcessor-Output": { + "properties": { + "kind": { + "type": "string", + "const": "SetTitleCallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "SetTitleCallbackProcessor", + "description": "Callback processor which sets conversation titles." + }, + "Settings": { + "properties": { + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "agent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent" + }, + "max_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Iterations" + }, + "security_analyzer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Security Analyzer" + }, + "confirmation_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Confirmation Mode" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "llm_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Llm Api Key" + }, + "llm_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Base Url" + }, + "user_version": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "User Version" + }, + "remote_runtime_resource_factor": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Remote Runtime Resource Factor" + }, + "secrets_store": { + "$ref": "#/components/schemas/Secrets-Input" + }, + "enable_default_condenser": { + "type": "boolean", + "title": "Enable Default Condenser", + "default": true + }, + "enable_sound_notifications": { + "type": "boolean", + "title": "Enable Sound Notifications", + "default": false + }, + "enable_proactive_conversation_starters": { + "type": "boolean", + "title": "Enable Proactive Conversation Starters", + "default": true + }, + "enable_solvability_analysis": { + "type": "boolean", + "title": "Enable Solvability Analysis", + "default": true + }, + "user_consents_to_analytics": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "User Consents To Analytics" + }, + "sandbox_base_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Base Container Image" + }, + "sandbox_runtime_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Runtime Container Image" + }, + "mcp_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MCPConfig" + }, + { + "type": "null" + } + ] + }, + "search_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Search Api Key" + }, + "sandbox_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Sandbox Api Key" + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task" + }, + "condenser_max_size": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Condenser Max Size" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + }, + "email_verified": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Email Verified" + }, + "git_user_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git User Name" + }, + "git_user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git User Email" + }, + "v1_enabled": { + "type": "boolean", + "title": "V1 Enabled", + "default": true + } + }, + "type": "object", + "title": "Settings", + "description": "Persisted settings for OpenHands sessions" + }, + "SharedConversation": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "created_by_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By User Id" + }, + "sandbox_id": { + "type": "string", + "title": "Sandbox Id" + }, + "selected_repository": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Repository" + }, + "selected_branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Selected Branch" + }, + "git_provider": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Git Provider" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "pr_number": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Pr Number" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "metrics": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Metrics" + }, + "parent_conversation_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Conversation Id" + }, + "sub_conversation_ids": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Sub Conversation Ids" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + } + }, + "type": "object", + "required": [ + "created_by_user_id", + "sandbox_id" + ], + "title": "SharedConversation", + "description": "Shared conversation info model with all fields from AppConversationInfo." + }, + "SharedConversationPage": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/SharedConversation" + }, + "type": "array", + "title": "Items" + }, + "next_page_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Page Id" + } + }, + "type": "object", + "required": [ + "items" + ], + "title": "SharedConversationPage" + }, + "SharedConversationSortOrder": { + "type": "string", + "enum": [ + "CREATED_AT", + "CREATED_AT_DESC", + "UPDATED_AT", + "UPDATED_AT_DESC", + "TITLE", + "TITLE_DESC" + ], + "title": "SharedConversationSortOrder" + }, + "Skill": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "content": { + "type": "string", + "title": "Content" + }, + "trigger": { + "anyOf": [ + { + "oneOf": [ + { + "$ref": "#/components/schemas/KeywordTrigger" + }, + { + "$ref": "#/components/schemas/TaskTrigger" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "keyword": "#/components/schemas/KeywordTrigger", + "task": "#/components/schemas/TaskTrigger" + } + } + }, + { + "type": "null" + } + ], + "title": "Trigger", + "description": "Trigger determines when skill content is auto-injected. None = no auto-injection (for AgentSkills: agent reads on demand; for legacy: full content always in system prompt). KeywordTrigger = auto-inject when keywords appear in user messages. TaskTrigger = auto-inject for specific tasks, may require user input." + }, + "source": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Source", + "description": "The source path or identifier of the skill. When it is None, it is treated as a programmatically defined skill." + }, + "mcp_tools": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Mcp Tools", + "description": "MCP tools configuration for the skill (repo skills only). It should conform to the MCPConfig schema: https://gofastmcp.com/clients/client#configuration-format" + }, + "inputs": { + "items": { + "$ref": "#/components/schemas/InputMetadata" + }, + "type": "array", + "title": "Inputs", + "description": "Input metadata for the skill (task skills only)" + }, + "is_agentskills_format": { + "type": "boolean", + "title": "Is Agentskills Format", + "description": "Whether this skill was loaded from a SKILL.md file following the AgentSkills standard. AgentSkills-format skills use progressive disclosure: always listed in with name, description, and location. If the skill also has triggers, content is auto-injected when triggered AND agent can read file anytime.", + "default": false + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "A brief description of what the skill does and when to use it. AgentSkills standard field (max 1024 characters)." + }, + "license": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "License", + "description": "The license under which the skill is distributed. AgentSkills standard field (e.g., 'Apache-2.0', 'MIT')." + }, + "compatibility": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Compatibility", + "description": "Environment requirements or compatibility notes for the skill. AgentSkills standard field (e.g., 'Requires git and docker')." + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata", + "description": "Arbitrary key-value metadata for the skill. AgentSkills standard field for extensibility." + }, + "allowed_tools": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Allowed Tools", + "description": "List of pre-approved tools for this skill. AgentSkills standard field (parsed from space-delimited string)." + }, + "resources": { + "anyOf": [ + { + "$ref": "#/components/schemas/SkillResources" + }, + { + "type": "null" + } + ], + "description": "Resource directories for the skill (scripts/, references/, assets/). AgentSkills standard field. Only populated for SKILL.md directory format." + } + }, + "type": "object", + "required": [ + "name", + "content" + ], + "title": "Skill", + "description": "A skill provides specialized knowledge or functionality.\n\nSkill behavior depends on format (is_agentskills_format) and trigger:\n\nAgentSkills format (SKILL.md files):\n- Always listed in with name, description, location\n- Agent reads full content on demand (progressive disclosure)\n- If has triggers: content is ALSO auto-injected when triggered\n\nLegacy OpenHands format:\n- With triggers: Listed in , content injected on trigger\n- Without triggers (None): Full content in , always active\n\nThis model supports both OpenHands-specific fields and AgentSkills standard\nfields (https://agentskills.io/specification) for cross-platform compatibility." + }, + "SkillResources": { + "properties": { + "skill_root": { + "type": "string", + "title": "Skill Root", + "description": "Root directory of the skill (absolute path)" + }, + "scripts": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Scripts", + "description": "List of script files in scripts/ directory (relative paths)" + }, + "references": { + "items": { + "type": "string" + }, + "type": "array", + "title": "References", + "description": "List of reference files in references/ directory (relative paths)" + }, + "assets": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Assets", + "description": "List of asset files in assets/ directory (relative paths)" + } + }, + "type": "object", + "required": [ + "skill_root" + ], + "title": "SkillResources", + "description": "Resource directories for a skill (AgentSkills standard).\n\nPer the AgentSkills specification, skills can include:\n- scripts/: Executable scripts the agent can run\n- references/: Reference documentation and examples\n- assets/: Static assets (images, data files, etc.)" + }, + "SlackV1CallbackProcessor-Input": { + "properties": { + "slack_view_data": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object", + "title": "Slack View Data" + }, + "kind": { + "type": "string", + "const": "SlackV1CallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "title": "SlackV1CallbackProcessor", + "description": "Callback processor for Slack V1 integrations." + }, + "SlackV1CallbackProcessor-Output": { + "properties": { + "slack_view_data": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "type": "object", + "title": "Slack View Data" + }, + "kind": { + "type": "string", + "const": "SlackV1CallbackProcessor", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "kind" + ], + "title": "SlackV1CallbackProcessor", + "description": "Callback processor for Slack V1 integrations." + }, + "SleeptimeComputeAction-Input": { + "properties": { + "kind": { + "type": "string", + "const": "SleeptimeComputeAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "SleeptimeComputeAction", + "description": "Action to index existing conversations for Tom's user modeling.\n\nThis triggers Tom agent's sleeptime_compute function which processes\nconversation history to build and update the user model." + }, + "SleeptimeComputeAction-Output": { + "properties": { + "kind": { + "type": "string", + "const": "SleeptimeComputeAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "SleeptimeComputeAction", + "description": "Action to index existing conversations for Tom's user modeling.\n\nThis triggers Tom agent's sleeptime_compute function which processes\nconversation history to build and update the user model." + }, + "SleeptimeComputeObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "message": { + "type": "string", + "title": "Message", + "description": "Result message from sleeptime compute", + "default": "" + }, + "sessions_processed": { + "type": "integer", + "title": "Sessions Processed", + "description": "Number of conversation sessions indexed", + "default": 0 + }, + "kind": { + "type": "string", + "const": "SleeptimeComputeObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "SleeptimeComputeObservation", + "description": "Observation from sleeptime compute operation." + }, + "SleeptimeComputeObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "message": { + "type": "string", + "title": "Message", + "description": "Result message from sleeptime compute", + "default": "" + }, + "sessions_processed": { + "type": "integer", + "title": "Sessions Processed", + "description": "Number of conversation sessions indexed", + "default": 0 + }, + "kind": { + "type": "string", + "const": "SleeptimeComputeObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "SleeptimeComputeObservation", + "description": "Observation from sleeptime compute operation." + }, + "SleeptimeComputeTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "SleeptimeComputeTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "SleeptimeComputeTool", + "description": "Tool for indexing conversations for Tom's user modeling." + }, + "SleeptimeComputeTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "SleeptimeComputeTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "SleeptimeComputeTool", + "description": "Tool for indexing conversations for Tom's user modeling." + }, + "StaticSecret": { + "properties": { + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description", + "description": "Optional description for this secret" + }, + "value": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Value" + }, + "kind": { + "type": "string", + "const": "StaticSecret", + "title": "Kind" + } + }, + "type": "object", + "title": "StaticSecret", + "description": "A secret stored locally" + }, + "SubscriptionAccessResponse": { + "properties": { + "start_at": { + "type": "string", + "format": "date-time", + "title": "Start At" + }, + "end_at": { + "type": "string", + "format": "date-time", + "title": "End At" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "cancelled_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Cancelled At" + }, + "stripe_subscription_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Stripe Subscription Id" + } + }, + "type": "object", + "required": [ + "start_at", + "end_at", + "created_at" + ], + "title": "SubscriptionAccessResponse" + }, + "Success": { + "properties": { + "success": { + "type": "boolean", + "title": "Success", + "default": true + } + }, + "type": "object", + "title": "Success" + }, + "SuggestedTask": { + "properties": { + "git_provider": { + "$ref": "#/components/schemas/ProviderType" + }, + "task_type": { + "$ref": "#/components/schemas/TaskType" + }, + "repo": { + "type": "string", + "title": "Repo" + }, + "issue_number": { + "type": "integer", + "title": "Issue Number" + }, + "title": { + "type": "string", + "title": "Title" + } + }, + "type": "object", + "required": [ + "git_provider", + "task_type", + "repo", + "issue_number", + "title" + ], + "title": "SuggestedTask" + }, + "SystemPromptEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "system_prompt": { + "$ref": "#/components/schemas/TextContent", + "description": "The system prompt text" + }, + "tools": { + "items": { + "$ref": "#/components/schemas/ToolDefinition-Input" + }, + "type": "array", + "title": "Tools", + "description": "List of tools as ToolDefinition objects" + }, + "dynamic_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "type": "null" + } + ], + "description": "Optional dynamic per-conversation context (runtime info, repo context, secrets). When provided, this is included as a second content block in the system message (not cached)." + }, + "kind": { + "type": "string", + "const": "SystemPromptEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "system_prompt", + "tools" + ], + "title": "SystemPromptEvent", + "description": "System prompt added by the agent.\n\nThe system prompt can optionally include dynamic context that varies between\nconversations. When ``dynamic_context`` is provided, it is included as a\nsecond content block in the same system message. Cache markers are NOT\napplied here - they are applied by ``LLM._apply_prompt_caching()`` when\ncaching is enabled, ensuring provider-specific cache control is only added\nwhen appropriate.\n\nAttributes:\n system_prompt: The static system prompt text (cacheable across conversations)\n tools: List of available tools\n dynamic_context: Optional per-conversation context (hosts, repo info, etc.)\n Sent as a second TextContent block inside the system message." + }, + "SystemPromptEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "agent" + }, + "system_prompt": { + "$ref": "#/components/schemas/TextContent", + "description": "The system prompt text" + }, + "tools": { + "items": { + "$ref": "#/components/schemas/ToolDefinition-Output" + }, + "type": "array", + "title": "Tools", + "description": "List of tools as ToolDefinition objects" + }, + "dynamic_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "type": "null" + } + ], + "description": "Optional dynamic per-conversation context (runtime info, repo context, secrets). When provided, this is included as a second content block in the system message (not cached)." + }, + "kind": { + "type": "string", + "const": "SystemPromptEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "system_prompt", + "tools", + "kind" + ], + "title": "SystemPromptEvent", + "description": "System prompt added by the agent.\n\nThe system prompt can optionally include dynamic context that varies between\nconversations. When ``dynamic_context`` is provided, it is included as a\nsecond content block in the same system message. Cache markers are NOT\napplied here - they are applied by ``LLM._apply_prompt_caching()`` when\ncaching is enabled, ensuring provider-specific cache control is only added\nwhen appropriate.\n\nAttributes:\n system_prompt: The static system prompt text (cacheable across conversations)\n tools: List of available tools\n dynamic_context: Optional per-conversation context (hosts, repo info, etc.)\n Sent as a second TextContent block inside the system message." + }, + "TaskItem": { + "properties": { + "title": { + "type": "string", + "title": "Title", + "description": "A brief title for the task." + }, + "notes": { + "type": "string", + "title": "Notes", + "description": "Additional details or notes about the task.", + "default": "" + }, + "status": { + "type": "string", + "enum": [ + "todo", + "in_progress", + "done" + ], + "title": "Status", + "description": "The current status of the task. One of 'todo', 'in_progress', or 'done'.", + "default": "todo" + } + }, + "type": "object", + "required": [ + "title" + ], + "title": "TaskItem" + }, + "TaskTrackerAction-Input": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "plan" + ], + "title": "Command", + "description": "The command to execute. `view` shows the current task list. `plan` creates or updates the task list based on provided requirements and progress. Always `view` the current list before making changes.", + "default": "view" + }, + "task_list": { + "items": { + "$ref": "#/components/schemas/TaskItem" + }, + "type": "array", + "title": "Task List", + "description": "The full task list. Required parameter of `plan` command." + }, + "kind": { + "type": "string", + "const": "TaskTrackerAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "TaskTrackerAction", + "description": "An action where the agent writes or updates a task list for task management." + }, + "TaskTrackerAction-Output": { + "properties": { + "command": { + "type": "string", + "enum": [ + "view", + "plan" + ], + "title": "Command", + "description": "The command to execute. `view` shows the current task list. `plan` creates or updates the task list based on provided requirements and progress. Always `view` the current list before making changes.", + "default": "view" + }, + "task_list": { + "items": { + "$ref": "#/components/schemas/TaskItem" + }, + "type": "array", + "title": "Task List", + "description": "The full task list. Required parameter of `plan` command." + }, + "kind": { + "type": "string", + "const": "TaskTrackerAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "TaskTrackerAction", + "description": "An action where the agent writes or updates a task list for task management." + }, + "TaskTrackerObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "plan" + ], + "title": "Command", + "description": "The command that was executed: \"view\" or \"plan\"." + }, + "task_list": { + "items": { + "$ref": "#/components/schemas/TaskItem" + }, + "type": "array", + "title": "Task List", + "description": "The current task list" + }, + "kind": { + "type": "string", + "const": "TaskTrackerObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "TaskTrackerObservation", + "description": "This data class represents the result of a task tracking operation." + }, + "TaskTrackerObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "type": "string", + "enum": [ + "view", + "plan" + ], + "title": "Command", + "description": "The command that was executed: \"view\" or \"plan\"." + }, + "task_list": { + "items": { + "$ref": "#/components/schemas/TaskItem" + }, + "type": "array", + "title": "Task List", + "description": "The current task list" + }, + "kind": { + "type": "string", + "const": "TaskTrackerObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "TaskTrackerObservation", + "description": "This data class represents the result of a task tracking operation." + }, + "TaskTrackerTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TaskTrackerTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "TaskTrackerTool", + "description": "A ToolDefinition subclass that automatically initializes a TaskTrackerExecutor." + }, + "TaskTrackerTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TaskTrackerTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "TaskTrackerTool", + "description": "A ToolDefinition subclass that automatically initializes a TaskTrackerExecutor." + }, + "TaskTrigger": { + "properties": { + "type": { + "type": "string", + "const": "task", + "title": "Type", + "default": "task" + }, + "triggers": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Triggers" + } + }, + "type": "object", + "required": [ + "triggers" + ], + "title": "TaskTrigger", + "description": "Trigger for task-specific skills.\n\nThese skills are activated for specific task types and can modify prompts." + }, + "TaskType": { + "type": "string", + "enum": [ + "MERGE_CONFLICTS", + "FAILING_CHECKS", + "UNRESOLVED_COMMENTS", + "OPEN_ISSUE", + "OPEN_PR", + "CREATE_MICROAGENT" + ], + "title": "TaskType" + }, + "TerminalAction-Input": { + "properties": { + "command": { + "type": "string", + "title": "Command", + "description": "The bash command to execute. Can be empty string to view additional logs when previous exit code is `-1`. Can be `C-c` (Ctrl+C) to interrupt the currently running process. Note: You can only execute one bash command at a time. If you need to run multiple commands sequentially, you can use `&&` or `;` to chain them together." + }, + "is_input": { + "type": "boolean", + "title": "Is Input", + "description": "If True, the command is an input to the running process. If False, the command is a bash command to be executed in the terminal. Default is False.", + "default": false + }, + "timeout": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Timeout", + "description": "Optional. Sets a maximum time limit (in seconds) for running the command. If the command takes longer than this limit, you\u2019ll be asked whether to continue or stop it. If you don\u2019t set a value, the command will instead pause and ask for confirmation when it produces no new output for 30 seconds. Use a higher value if the command is expected to take a long time (like installation or testing), or if it has a known fixed duration (like sleep)." + }, + "reset": { + "type": "boolean", + "title": "Reset", + "description": "If True, reset the terminal by creating a new session. Use this only when the terminal becomes unresponsive. Note that all previously set environment variables and session state will be lost after reset. Cannot be used with is_input=True.", + "default": false + }, + "kind": { + "type": "string", + "const": "TerminalAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "TerminalAction", + "description": "Schema for bash command execution." + }, + "TerminalAction-Output": { + "properties": { + "command": { + "type": "string", + "title": "Command", + "description": "The bash command to execute. Can be empty string to view additional logs when previous exit code is `-1`. Can be `C-c` (Ctrl+C) to interrupt the currently running process. Note: You can only execute one bash command at a time. If you need to run multiple commands sequentially, you can use `&&` or `;` to chain them together." + }, + "is_input": { + "type": "boolean", + "title": "Is Input", + "description": "If True, the command is an input to the running process. If False, the command is a bash command to be executed in the terminal. Default is False.", + "default": false + }, + "timeout": { + "anyOf": [ + { + "type": "number", + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Timeout", + "description": "Optional. Sets a maximum time limit (in seconds) for running the command. If the command takes longer than this limit, you\u2019ll be asked whether to continue or stop it. If you don\u2019t set a value, the command will instead pause and ask for confirmation when it produces no new output for 30 seconds. Use a higher value if the command is expected to take a long time (like installation or testing), or if it has a known fixed duration (like sleep)." + }, + "reset": { + "type": "boolean", + "title": "Reset", + "description": "If True, reset the terminal by creating a new session. Use this only when the terminal becomes unresponsive. Note that all previously set environment variables and session state will be lost after reset. Cannot be used with is_input=True.", + "default": false + }, + "kind": { + "type": "string", + "const": "TerminalAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "TerminalAction", + "description": "Schema for bash command execution." + }, + "TerminalObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Command", + "description": "The bash command that was executed. Can be empty string if the observation is from a previous command that hit soft timeout and is not yet finished." + }, + "exit_code": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Exit Code", + "description": "The exit code of the command. -1 indicates the process hit the soft timeout and is not yet finished." + }, + "timeout": { + "type": "boolean", + "title": "Timeout", + "description": "Whether the command execution timed out.", + "default": false + }, + "metadata": { + "$ref": "#/components/schemas/CmdOutputMetadata", + "description": "Additional metadata captured from PS1 after command execution." + }, + "full_output_save_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Output Save Dir", + "description": "Directory where full output files are saved" + }, + "kind": { + "type": "string", + "const": "TerminalObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command" + ], + "title": "TerminalObservation", + "description": "A ToolResult that can be rendered as a CLI output." + }, + "TerminalObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "command": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Command", + "description": "The bash command that was executed. Can be empty string if the observation is from a previous command that hit soft timeout and is not yet finished." + }, + "exit_code": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Exit Code", + "description": "The exit code of the command. -1 indicates the process hit the soft timeout and is not yet finished." + }, + "timeout": { + "type": "boolean", + "title": "Timeout", + "description": "Whether the command execution timed out.", + "default": false + }, + "metadata": { + "$ref": "#/components/schemas/CmdOutputMetadata", + "description": "Additional metadata captured from PS1 after command execution." + }, + "full_output_save_dir": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Full Output Save Dir", + "description": "Directory where full output files are saved" + }, + "kind": { + "type": "string", + "const": "TerminalObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "command", + "kind" + ], + "title": "TerminalObservation", + "description": "A ToolResult that can be rendered as a CLI output." + }, + "TerminalTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TerminalTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "TerminalTool", + "description": "A ToolDefinition subclass that automatically initializes a TerminalExecutor with auto-detection." + }, + "TerminalTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TerminalTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "TerminalTool", + "description": "A ToolDefinition subclass that automatically initializes a TerminalExecutor with auto-detection." + }, + "TextContent": { + "properties": { + "cache_prompt": { + "type": "boolean", + "title": "Cache Prompt", + "default": false + }, + "type": { + "type": "string", + "const": "text", + "title": "Type", + "default": "text" + }, + "text": { + "type": "string", + "title": "Text" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "text" + ], + "title": "TextContent" + }, + "ThinkAction-Input": { + "properties": { + "thought": { + "type": "string", + "title": "Thought", + "description": "The thought to log." + }, + "kind": { + "type": "string", + "const": "ThinkAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "thought" + ], + "title": "ThinkAction", + "description": "Action for logging a thought without making any changes." + }, + "ThinkAction-Output": { + "properties": { + "thought": { + "type": "string", + "title": "Thought", + "description": "The thought to log." + }, + "kind": { + "type": "string", + "const": "ThinkAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "thought", + "kind" + ], + "title": "ThinkAction", + "description": "Action for logging a thought without making any changes." + }, + "ThinkObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "kind": { + "type": "string", + "const": "ThinkObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "ThinkObservation", + "description": "Observation returned after logging a thought.\nThe ThinkAction itself contains the thought logged so no extra\nfields are needed here." + }, + "ThinkObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "kind": { + "type": "string", + "const": "ThinkObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "ThinkObservation", + "description": "Observation returned after logging a thought.\nThe ThinkAction itself contains the thought logged so no extra\nfields are needed here." + }, + "ThinkTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ThinkTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "ThinkTool", + "description": "Tool for logging thoughts without making changes." + }, + "ThinkTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "ThinkTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "ThinkTool", + "description": "Tool for logging thoughts without making changes." + }, + "ThinkingBlock": { + "properties": { + "type": { + "type": "string", + "const": "thinking", + "title": "Type", + "default": "thinking" + }, + "thinking": { + "type": "string", + "title": "Thinking", + "description": "The thinking content" + }, + "signature": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Signature", + "description": "Cryptographic signature for the thinking block" + } + }, + "type": "object", + "required": [ + "thinking" + ], + "title": "ThinkingBlock", + "description": "Anthropic thinking block for extended thinking feature.\n\nThis represents the raw thinking blocks returned by Anthropic models\nwhen extended thinking is enabled. These blocks must be preserved\nand passed back to the API for tool use scenarios." + }, + "TokenEvent-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source" + }, + "prompt_token_ids": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Prompt Token Ids", + "description": "The exact prompt token IDs for this message event" + }, + "response_token_ids": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Response Token Ids", + "description": "The exact response token IDs for this message event" + }, + "kind": { + "type": "string", + "const": "TokenEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "prompt_token_ids", + "response_token_ids" + ], + "title": "TokenEvent", + "description": "Event from VLLM representing token IDs used in LLM interaction." + }, + "TokenEvent-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source" + }, + "prompt_token_ids": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Prompt Token Ids", + "description": "The exact prompt token IDs for this message event" + }, + "response_token_ids": { + "items": { + "type": "integer" + }, + "type": "array", + "title": "Response Token Ids", + "description": "The exact response token IDs for this message event" + }, + "kind": { + "type": "string", + "const": "TokenEvent", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "source", + "prompt_token_ids", + "response_token_ids", + "kind" + ], + "title": "TokenEvent", + "description": "Event from VLLM representing token IDs used in LLM interaction." + }, + "TokenResponse": { + "properties": { + "token": { + "type": "string", + "title": "Token" + } + }, + "type": "object", + "required": [ + "token" + ], + "title": "TokenResponse" + }, + "TokenUsage": { + "properties": { + "model": { + "type": "string", + "title": "Model", + "default": "" + }, + "prompt_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Prompt Tokens", + "description": "Prompt tokens must be non-negative", + "default": 0 + }, + "completion_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Completion Tokens", + "description": "Completion tokens must be non-negative", + "default": 0 + }, + "cache_read_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Cache Read Tokens", + "description": "Cache read tokens must be non-negative", + "default": 0 + }, + "cache_write_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Cache Write Tokens", + "description": "Cache write tokens must be non-negative", + "default": 0 + }, + "reasoning_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Reasoning Tokens", + "description": "Reasoning tokens must be non-negative", + "default": 0 + }, + "context_window": { + "type": "integer", + "minimum": 0.0, + "title": "Context Window", + "description": "Context window must be non-negative", + "default": 0 + }, + "per_turn_token": { + "type": "integer", + "minimum": 0.0, + "title": "Per Turn Token", + "description": "Per turn tokens must be non-negative", + "default": 0 + }, + "response_id": { + "type": "string", + "title": "Response Id", + "default": "" + } + }, + "type": "object", + "title": "TokenUsage", + "description": "Metric tracking detailed token usage per completion call." + }, + "TomConsultTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TomConsultTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "TomConsultTool", + "description": "Tool for consulting Tom agent." + }, + "TomConsultTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "TomConsultTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "TomConsultTool", + "description": "Tool for consulting Tom agent." + }, + "Tool": { + "properties": { + "name": { + "type": "string", + "title": "Name", + "description": "Name of the tool class, e.g., 'TerminalTool'. Import it from an `openhands.tools.` subpackage.", + "examples": [ + "TerminalTool", + "FileEditorTool", + "TaskTrackerTool" + ] + }, + "params": { + "additionalProperties": true, + "type": "object", + "title": "Params", + "description": "Parameters for the tool's .create() method, e.g., {'working_dir': '/app'}", + "examples": [ + { + "working_dir": "/workspace" + } + ] + } + }, + "type": "object", + "required": [ + "name" + ], + "title": "Tool", + "description": "Defines a tool to be initialized for the agent.\n\nThis is only used in agent-sdk for type schema for server use." + }, + "Tool-Output": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "inputSchema": { + "additionalProperties": true, + "type": "object", + "title": "Inputschema" + }, + "outputSchema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Outputschema" + }, + "icons": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Icon" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Icons" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/mcp__types__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "_meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "execution": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecution" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "name", + "inputSchema" + ], + "title": "Tool", + "description": "Definition for a tool the client can call." + }, + "ToolDefinition-Input": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolDefinition-Input" + }, + { + "$ref": "#/components/schemas/FinishTool-Input" + }, + { + "$ref": "#/components/schemas/ThinkTool-Input" + }, + { + "$ref": "#/components/schemas/ApplyPatchTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserClickTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserCloseTabTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserGetContentTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserGetStateTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserGetStorageTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserGoBackTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserListTabsTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserNavigateTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserScrollTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserSetStorageTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserStartRecordingTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserStopRecordingTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserSwitchTabTool-Input" + }, + { + "$ref": "#/components/schemas/BrowserToolSet-Input" + }, + { + "$ref": "#/components/schemas/BrowserTypeTool-Input" + }, + { + "$ref": "#/components/schemas/DelegateTool-Input" + }, + { + "$ref": "#/components/schemas/FileEditorTool-Input" + }, + { + "$ref": "#/components/schemas/EditTool-Input" + }, + { + "$ref": "#/components/schemas/ListDirectoryTool-Input" + }, + { + "$ref": "#/components/schemas/ReadFileTool-Input" + }, + { + "$ref": "#/components/schemas/WriteFileTool-Input" + }, + { + "$ref": "#/components/schemas/GlobTool-Input" + }, + { + "$ref": "#/components/schemas/GrepTool-Input" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorTool-Input" + }, + { + "$ref": "#/components/schemas/TaskTrackerTool-Input" + }, + { + "$ref": "#/components/schemas/TerminalTool-Input" + }, + { + "$ref": "#/components/schemas/SleeptimeComputeTool-Input" + }, + { + "$ref": "#/components/schemas/TomConsultTool-Input" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__tool__MCPToolDefinition-Input__1": "#/components/schemas/MCPToolDefinition-Input", + "openhands__sdk__tool__builtins__finish__FinishTool-Input__1": "#/components/schemas/FinishTool-Input", + "openhands__sdk__tool__builtins__think__ThinkTool-Input__1": "#/components/schemas/ThinkTool-Input", + "openhands__tools__apply_patch__definition__ApplyPatchTool-Input__1": "#/components/schemas/ApplyPatchTool-Input", + "openhands__tools__browser_use__definition__BrowserClickTool-Input__1": "#/components/schemas/BrowserClickTool-Input", + "openhands__tools__browser_use__definition__BrowserCloseTabTool-Input__1": "#/components/schemas/BrowserCloseTabTool-Input", + "openhands__tools__browser_use__definition__BrowserGetContentTool-Input__1": "#/components/schemas/BrowserGetContentTool-Input", + "openhands__tools__browser_use__definition__BrowserGetStateTool-Input__1": "#/components/schemas/BrowserGetStateTool-Input", + "openhands__tools__browser_use__definition__BrowserGetStorageTool-Input__1": "#/components/schemas/BrowserGetStorageTool-Input", + "openhands__tools__browser_use__definition__BrowserGoBackTool-Input__1": "#/components/schemas/BrowserGoBackTool-Input", + "openhands__tools__browser_use__definition__BrowserListTabsTool-Input__1": "#/components/schemas/BrowserListTabsTool-Input", + "openhands__tools__browser_use__definition__BrowserNavigateTool-Input__1": "#/components/schemas/BrowserNavigateTool-Input", + "openhands__tools__browser_use__definition__BrowserScrollTool-Input__1": "#/components/schemas/BrowserScrollTool-Input", + "openhands__tools__browser_use__definition__BrowserSetStorageTool-Input__1": "#/components/schemas/BrowserSetStorageTool-Input", + "openhands__tools__browser_use__definition__BrowserStartRecordingTool-Input__1": "#/components/schemas/BrowserStartRecordingTool-Input", + "openhands__tools__browser_use__definition__BrowserStopRecordingTool-Input__1": "#/components/schemas/BrowserStopRecordingTool-Input", + "openhands__tools__browser_use__definition__BrowserSwitchTabTool-Input__1": "#/components/schemas/BrowserSwitchTabTool-Input", + "openhands__tools__browser_use__definition__BrowserToolSet-Input__1": "#/components/schemas/BrowserToolSet-Input", + "openhands__tools__browser_use__definition__BrowserTypeTool-Input__1": "#/components/schemas/BrowserTypeTool-Input", + "openhands__tools__delegate__definition__DelegateTool-Input__1": "#/components/schemas/DelegateTool-Input", + "openhands__tools__file_editor__definition__FileEditorTool-Input__1": "#/components/schemas/FileEditorTool-Input", + "openhands__tools__gemini__edit__definition__EditTool-Input__1": "#/components/schemas/EditTool-Input", + "openhands__tools__gemini__list_directory__definition__ListDirectoryTool-Input__1": "#/components/schemas/ListDirectoryTool-Input", + "openhands__tools__gemini__read_file__definition__ReadFileTool-Input__1": "#/components/schemas/ReadFileTool-Input", + "openhands__tools__gemini__write_file__definition__WriteFileTool-Input__1": "#/components/schemas/WriteFileTool-Input", + "openhands__tools__glob__definition__GlobTool-Input__1": "#/components/schemas/GlobTool-Input", + "openhands__tools__grep__definition__GrepTool-Input__1": "#/components/schemas/GrepTool-Input", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorTool-Input__1": "#/components/schemas/PlanningFileEditorTool-Input", + "openhands__tools__task_tracker__definition__TaskTrackerTool-Input__1": "#/components/schemas/TaskTrackerTool-Input", + "openhands__tools__terminal__definition__TerminalTool-Input__1": "#/components/schemas/TerminalTool-Input", + "openhands__tools__tom_consult__definition__SleeptimeComputeTool-Input__1": "#/components/schemas/SleeptimeComputeTool-Input", + "openhands__tools__tom_consult__definition__TomConsultTool-Input__1": "#/components/schemas/TomConsultTool-Input" + } + } + }, + "ToolDefinition-Output": { + "oneOf": [ + { + "$ref": "#/components/schemas/MCPToolDefinition-Output" + }, + { + "$ref": "#/components/schemas/FinishTool-Output" + }, + { + "$ref": "#/components/schemas/ThinkTool-Output" + }, + { + "$ref": "#/components/schemas/ApplyPatchTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserClickTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserCloseTabTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserGetContentTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserGetStateTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserGetStorageTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserGoBackTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserListTabsTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserNavigateTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserScrollTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserSetStorageTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserStartRecordingTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserStopRecordingTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserSwitchTabTool-Output" + }, + { + "$ref": "#/components/schemas/BrowserToolSet-Output" + }, + { + "$ref": "#/components/schemas/BrowserTypeTool-Output" + }, + { + "$ref": "#/components/schemas/DelegateTool-Output" + }, + { + "$ref": "#/components/schemas/FileEditorTool-Output" + }, + { + "$ref": "#/components/schemas/EditTool-Output" + }, + { + "$ref": "#/components/schemas/ListDirectoryTool-Output" + }, + { + "$ref": "#/components/schemas/ReadFileTool-Output" + }, + { + "$ref": "#/components/schemas/WriteFileTool-Output" + }, + { + "$ref": "#/components/schemas/GlobTool-Output" + }, + { + "$ref": "#/components/schemas/GrepTool-Output" + }, + { + "$ref": "#/components/schemas/PlanningFileEditorTool-Output" + }, + { + "$ref": "#/components/schemas/TaskTrackerTool-Output" + }, + { + "$ref": "#/components/schemas/TerminalTool-Output" + }, + { + "$ref": "#/components/schemas/SleeptimeComputeTool-Output" + }, + { + "$ref": "#/components/schemas/TomConsultTool-Output" + } + ], + "discriminator": { + "propertyName": "kind", + "mapping": { + "openhands__sdk__mcp__tool__MCPToolDefinition-Output__1": "#/components/schemas/MCPToolDefinition-Output", + "openhands__sdk__tool__builtins__finish__FinishTool-Output__1": "#/components/schemas/FinishTool-Output", + "openhands__sdk__tool__builtins__think__ThinkTool-Output__1": "#/components/schemas/ThinkTool-Output", + "openhands__tools__apply_patch__definition__ApplyPatchTool-Output__1": "#/components/schemas/ApplyPatchTool-Output", + "openhands__tools__browser_use__definition__BrowserClickTool-Output__1": "#/components/schemas/BrowserClickTool-Output", + "openhands__tools__browser_use__definition__BrowserCloseTabTool-Output__1": "#/components/schemas/BrowserCloseTabTool-Output", + "openhands__tools__browser_use__definition__BrowserGetContentTool-Output__1": "#/components/schemas/BrowserGetContentTool-Output", + "openhands__tools__browser_use__definition__BrowserGetStateTool-Output__1": "#/components/schemas/BrowserGetStateTool-Output", + "openhands__tools__browser_use__definition__BrowserGetStorageTool-Output__1": "#/components/schemas/BrowserGetStorageTool-Output", + "openhands__tools__browser_use__definition__BrowserGoBackTool-Output__1": "#/components/schemas/BrowserGoBackTool-Output", + "openhands__tools__browser_use__definition__BrowserListTabsTool-Output__1": "#/components/schemas/BrowserListTabsTool-Output", + "openhands__tools__browser_use__definition__BrowserNavigateTool-Output__1": "#/components/schemas/BrowserNavigateTool-Output", + "openhands__tools__browser_use__definition__BrowserScrollTool-Output__1": "#/components/schemas/BrowserScrollTool-Output", + "openhands__tools__browser_use__definition__BrowserSetStorageTool-Output__1": "#/components/schemas/BrowserSetStorageTool-Output", + "openhands__tools__browser_use__definition__BrowserStartRecordingTool-Output__1": "#/components/schemas/BrowserStartRecordingTool-Output", + "openhands__tools__browser_use__definition__BrowserStopRecordingTool-Output__1": "#/components/schemas/BrowserStopRecordingTool-Output", + "openhands__tools__browser_use__definition__BrowserSwitchTabTool-Output__1": "#/components/schemas/BrowserSwitchTabTool-Output", + "openhands__tools__browser_use__definition__BrowserToolSet-Output__1": "#/components/schemas/BrowserToolSet-Output", + "openhands__tools__browser_use__definition__BrowserTypeTool-Output__1": "#/components/schemas/BrowserTypeTool-Output", + "openhands__tools__delegate__definition__DelegateTool-Output__1": "#/components/schemas/DelegateTool-Output", + "openhands__tools__file_editor__definition__FileEditorTool-Output__1": "#/components/schemas/FileEditorTool-Output", + "openhands__tools__gemini__edit__definition__EditTool-Output__1": "#/components/schemas/EditTool-Output", + "openhands__tools__gemini__list_directory__definition__ListDirectoryTool-Output__1": "#/components/schemas/ListDirectoryTool-Output", + "openhands__tools__gemini__read_file__definition__ReadFileTool-Output__1": "#/components/schemas/ReadFileTool-Output", + "openhands__tools__gemini__write_file__definition__WriteFileTool-Output__1": "#/components/schemas/WriteFileTool-Output", + "openhands__tools__glob__definition__GlobTool-Output__1": "#/components/schemas/GlobTool-Output", + "openhands__tools__grep__definition__GrepTool-Output__1": "#/components/schemas/GrepTool-Output", + "openhands__tools__planning_file_editor__definition__PlanningFileEditorTool-Output__1": "#/components/schemas/PlanningFileEditorTool-Output", + "openhands__tools__task_tracker__definition__TaskTrackerTool-Output__1": "#/components/schemas/TaskTrackerTool-Output", + "openhands__tools__terminal__definition__TerminalTool-Output__1": "#/components/schemas/TerminalTool-Output", + "openhands__tools__tom_consult__definition__SleeptimeComputeTool-Output__1": "#/components/schemas/SleeptimeComputeTool-Output", + "openhands__tools__tom_consult__definition__TomConsultTool-Output__1": "#/components/schemas/TomConsultTool-Output" + } + } + }, + "ToolExecution": { + "properties": { + "taskSupport": { + "anyOf": [ + { + "type": "string", + "enum": [ + "forbidden", + "optional", + "required" + ] + }, + { + "type": "null" + } + ], + "title": "Tasksupport" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ToolExecution", + "description": "Execution-related properties for a tool." + }, + "UpdateConversationRequest": { + "properties": { + "title": { + "type": "string", + "maxLength": 200, + "minLength": 1, + "title": "Title", + "description": "New conversation title" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "title" + ], + "title": "UpdateConversationRequest", + "description": "Request model for updating conversation metadata." + }, + "User": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "login": { + "type": "string", + "title": "Login" + }, + "avatar_url": { + "type": "string", + "title": "Avatar Url" + }, + "company": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Company" + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + } + }, + "type": "object", + "required": [ + "id", + "login", + "avatar_url" + ], + "title": "User" + }, + "UserInfo": { + "properties": { + "language": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Language" + }, + "agent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Agent" + }, + "max_iterations": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Max Iterations" + }, + "security_analyzer": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Security Analyzer" + }, + "confirmation_mode": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Confirmation Mode" + }, + "llm_model": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Model" + }, + "llm_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Llm Api Key" + }, + "llm_base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Llm Base Url" + }, + "user_version": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "User Version" + }, + "remote_runtime_resource_factor": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Remote Runtime Resource Factor" + }, + "secrets_store": { + "$ref": "#/components/schemas/Secrets-Output" + }, + "enable_default_condenser": { + "type": "boolean", + "title": "Enable Default Condenser", + "default": true + }, + "enable_sound_notifications": { + "type": "boolean", + "title": "Enable Sound Notifications", + "default": false + }, + "enable_proactive_conversation_starters": { + "type": "boolean", + "title": "Enable Proactive Conversation Starters", + "default": true + }, + "enable_solvability_analysis": { + "type": "boolean", + "title": "Enable Solvability Analysis", + "default": true + }, + "user_consents_to_analytics": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "User Consents To Analytics" + }, + "sandbox_base_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Base Container Image" + }, + "sandbox_runtime_container_image": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Sandbox Runtime Container Image" + }, + "mcp_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MCPConfig" + }, + { + "type": "null" + } + ] + }, + "search_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Search Api Key" + }, + "sandbox_api_key": { + "anyOf": [ + { + "type": "string", + "format": "password", + "writeOnly": true + }, + { + "type": "null" + } + ], + "title": "Sandbox Api Key" + }, + "max_budget_per_task": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Max Budget Per Task" + }, + "condenser_max_size": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Condenser Max Size" + }, + "email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Email" + }, + "email_verified": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Email Verified" + }, + "git_user_name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git User Name" + }, + "git_user_email": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Git User Email" + }, + "v1_enabled": { + "type": "boolean", + "title": "V1 Enabled", + "default": true + }, + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + } + }, + "type": "object", + "title": "UserInfo", + "description": "Model for user settings including the current user id." + }, + "UserRejectObservation-Input": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "rejection_reason": { + "type": "string", + "title": "Rejection Reason", + "description": "Reason for rejecting the action", + "default": "User rejected the action" + }, + "rejection_source": { + "type": "string", + "enum": [ + "user", + "hook" + ], + "title": "Rejection Source", + "description": "Source of the rejection: 'user' for confirmation mode rejections, 'hook' for PreToolUse hook blocks", + "default": "user" + }, + "action_id": { + "type": "string", + "title": "Action Id", + "description": "The action id that this observation is responding to" + }, + "kind": { + "type": "string", + "const": "UserRejectObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "action_id" + ], + "title": "UserRejectObservation", + "description": "Observation when an action is rejected by user or hook.\n\nThis event is emitted when:\n- User rejects an action during confirmation mode (rejection_source=\"user\")\n- A PreToolUse hook blocks an action (rejection_source=\"hook\")" + }, + "UserRejectObservation-Output": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Unique event id (ULID/UUID)" + }, + "timestamp": { + "type": "string", + "title": "Timestamp", + "description": "Event timestamp" + }, + "source": { + "type": "string", + "enum": [ + "agent", + "user", + "environment" + ], + "title": "Source", + "default": "environment" + }, + "tool_name": { + "type": "string", + "title": "Tool Name", + "description": "The tool name that this observation is responding to" + }, + "tool_call_id": { + "type": "string", + "title": "Tool Call Id", + "description": "The tool call id that this observation is responding to" + }, + "rejection_reason": { + "type": "string", + "title": "Rejection Reason", + "description": "Reason for rejecting the action", + "default": "User rejected the action" + }, + "rejection_source": { + "type": "string", + "enum": [ + "user", + "hook" + ], + "title": "Rejection Source", + "description": "Source of the rejection: 'user' for confirmation mode rejections, 'hook' for PreToolUse hook blocks", + "default": "user" + }, + "action_id": { + "type": "string", + "title": "Action Id", + "description": "The action id that this observation is responding to" + }, + "kind": { + "type": "string", + "const": "UserRejectObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "tool_name", + "tool_call_id", + "action_id", + "kind" + ], + "title": "UserRejectObservation", + "description": "Observation when an action is rejected by user or hook.\n\nThis event is emitted when:\n- User rejects an action during confirmation mode (rejection_source=\"user\")\n- A PreToolUse hook blocks an action (rejection_source=\"hook\")" + }, + "ValidationError": { + "properties": { + "loc": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "type": "array", + "title": "Location" + }, + "msg": { + "type": "string", + "title": "Message" + }, + "type": { + "type": "string", + "title": "Error Type" + } + }, + "type": "object", + "required": [ + "loc", + "msg", + "type" + ], + "title": "ValidationError" + }, + "WebClientConfig": { + "properties": { + "app_mode": { + "$ref": "#/components/schemas/AppMode" + }, + "posthog_client_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Posthog Client Key" + }, + "feature_flags": { + "$ref": "#/components/schemas/WebClientFeatureFlags" + }, + "providers_configured": { + "items": { + "$ref": "#/components/schemas/ProviderType" + }, + "type": "array", + "title": "Providers Configured" + }, + "maintenance_start_time": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Maintenance Start Time" + }, + "auth_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Auth Url" + }, + "recaptcha_site_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Recaptcha Site Key" + }, + "faulty_models": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Faulty Models" + }, + "error_message": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error Message" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Updated At" + }, + "github_app_slug": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Github App Slug" + }, + "kind": { + "type": "string", + "const": "WebClientConfig", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "app_mode", + "posthog_client_key", + "feature_flags", + "providers_configured", + "maintenance_start_time", + "auth_url", + "recaptcha_site_key", + "faulty_models", + "error_message", + "updated_at", + "github_app_slug", + "kind" + ], + "title": "WebClientConfig" + }, + "WebClientFeatureFlags": { + "properties": { + "enable_billing": { + "type": "boolean", + "title": "Enable Billing", + "default": false + }, + "hide_llm_settings": { + "type": "boolean", + "title": "Hide Llm Settings", + "default": false + }, + "enable_jira": { + "type": "boolean", + "title": "Enable Jira", + "default": false + }, + "enable_jira_dc": { + "type": "boolean", + "title": "Enable Jira Dc", + "default": false + }, + "enable_linear": { + "type": "boolean", + "title": "Enable Linear", + "default": false + } + }, + "type": "object", + "title": "WebClientFeatureFlags" + }, + "WriteFileAction-Input": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to write to." + }, + "content": { + "type": "string", + "title": "Content", + "description": "The content to write to the file." + }, + "kind": { + "type": "string", + "const": "WriteFileAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "content" + ], + "title": "WriteFileAction", + "description": "Schema for write file operation." + }, + "WriteFileAction-Output": { + "properties": { + "file_path": { + "type": "string", + "title": "File Path", + "description": "The path to the file to write to." + }, + "content": { + "type": "string", + "title": "Content", + "description": "The content to write to the file." + }, + "kind": { + "type": "string", + "const": "WriteFileAction", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "file_path", + "content", + "kind" + ], + "title": "WriteFileAction", + "description": "Schema for write file operation." + }, + "WriteFileObservation-Input": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Path", + "description": "The file path that was written." + }, + "is_new_file": { + "type": "boolean", + "title": "Is New File", + "description": "Whether a new file was created.", + "default": false + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The previous content of the file (if it existed)." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The new content written to the file." + }, + "kind": { + "type": "string", + "const": "WriteFileObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "title": "WriteFileObservation", + "description": "Observation from writing a file." + }, + "WriteFileObservation-Output": { + "properties": { + "content": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/TextContent" + }, + { + "$ref": "#/components/schemas/ImageContent" + } + ] + }, + "type": "array", + "title": "Content", + "description": "Content returned from the tool as a list of TextContent/ImageContent objects. When there is an error, it should be written in this field." + }, + "is_error": { + "type": "boolean", + "title": "Is Error", + "description": "Whether the observation indicates an error", + "default": false + }, + "file_path": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "File Path", + "description": "The file path that was written." + }, + "is_new_file": { + "type": "boolean", + "title": "Is New File", + "description": "Whether a new file was created.", + "default": false + }, + "old_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Old Content", + "description": "The previous content of the file (if it existed)." + }, + "new_content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "New Content", + "description": "The new content written to the file." + }, + "kind": { + "type": "string", + "const": "WriteFileObservation", + "title": "Kind" + } + }, + "additionalProperties": false, + "type": "object", + "required": [ + "kind" + ], + "title": "WriteFileObservation", + "description": "Observation from writing a file." + }, + "WriteFileTool-Input": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "WriteFileTool", + "title": "Kind" + } + }, + "type": "object", + "required": [ + "description", + "action_type" + ], + "title": "WriteFileTool", + "description": "Tool for writing complete file contents." + }, + "WriteFileTool-Output": { + "properties": { + "description": { + "type": "string", + "title": "Description" + }, + "action_type": { + "type": "string", + "title": "Action Type" + }, + "observation_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observation Type" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/openhands__sdk__tool__tool__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "kind": { + "type": "string", + "const": "WriteFileTool", + "title": "Kind" + }, + "title": { + "type": "string", + "title": "Title", + "readOnly": true + } + }, + "type": "object", + "required": [ + "description", + "action_type", + "kind", + "title" + ], + "title": "WriteFileTool", + "description": "Tool for writing complete file contents." + }, + "mcp__types__Tool": { + "properties": { + "name": { + "type": "string", + "title": "Name" + }, + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Description" + }, + "inputSchema": { + "additionalProperties": true, + "type": "object", + "title": "Inputschema" + }, + "outputSchema": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Outputschema" + }, + "icons": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/Icon" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Icons" + }, + "annotations": { + "anyOf": [ + { + "$ref": "#/components/schemas/mcp__types__ToolAnnotations" + }, + { + "type": "null" + } + ] + }, + "_meta": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Meta" + }, + "execution": { + "anyOf": [ + { + "$ref": "#/components/schemas/ToolExecution" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": true, + "type": "object", + "required": [ + "name", + "inputSchema" + ], + "title": "Tool", + "description": "Definition for a tool the client can call." + }, + "mcp__types__ToolAnnotations": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title" + }, + "readOnlyHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Readonlyhint" + }, + "destructiveHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Destructivehint" + }, + "idempotentHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Idempotenthint" + }, + "openWorldHint": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Openworldhint" + } + }, + "additionalProperties": true, + "type": "object", + "title": "ToolAnnotations", + "description": "Additional properties describing a Tool to clients.\n\nNOTE: all properties in ToolAnnotations are **hints**.\nThey are not guaranteed to provide a faithful description of\ntool behavior (including descriptive properties like `title`).\n\nClients should never make tool use decisions based on ToolAnnotations\nreceived from untrusted servers." + }, + "openhands__sdk__tool__tool__ToolAnnotations": { + "properties": { + "title": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Title", + "description": "A human-readable title for the tool." + }, + "readOnlyHint": { + "type": "boolean", + "title": "Readonlyhint", + "description": "If true, the tool does not modify its environment. Default: false", + "default": false + }, + "destructiveHint": { + "type": "boolean", + "title": "Destructivehint", + "description": "If true, the tool may perform destructive updates to its environment. If false, the tool performs only additive updates. (This property is meaningful only when `readOnlyHint == false`) Default: true", + "default": true + }, + "idempotentHint": { + "type": "boolean", + "title": "Idempotenthint", + "description": "If true, calling the tool repeatedly with the same arguments will have no additional effect on the its environment. (This property is meaningful only when `readOnlyHint == false`) Default: false", + "default": false + }, + "openWorldHint": { + "type": "boolean", + "title": "Openworldhint", + "description": "If true, this tool may interact with an 'open world' of external entities. If false, the tool's domain of interaction is closed. For example, the world of a web search tool is open, whereas that of a memory tool is not. Default: true", + "default": true + } + }, + "type": "object", + "title": "openhands.sdk.tool.tool.ToolAnnotations", + "description": "Annotations to provide hints about the tool's behavior.\n\nBased on Model Context Protocol (MCP) spec:\nhttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/caf3424488b10b4a7b1f8cb634244a450a1f4400/schema/2025-06-18/schema.ts#L838" + } + }, + "securitySchemes": { + "APIKeyHeader": { + "type": "apiKey", + "in": "header", + "name": "X-Access-Token" + } + } + } +} \ No newline at end of file