# Source: https://docs.warp.dev/reference/api-and-sdk/api-and-sdk/models.md

# Models

## The RunAgentRequest object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunAgentRequest":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"The prompt/instruction for the agent to execute"},"config":{"$ref":"#/components/schemas/AmbientAgentConfig"},"title":{"type":"string","description":"Custom title for the run (auto-generated if not provided)"},"team":{"type":"boolean","description":"Make the run visible to all team members, not only the calling user","default":false}}},"AmbientAgentConfig":{"type":"object","description":"Configuration for an ambient agent run","properties":{"name":{"type":"string","description":"Config name for searchability and traceability"},"model_id":{"type":"string","description":"LLM model to use (uses team default if not specified)"},"base_prompt":{"type":"string","description":"Custom base prompt for the agent"},"environment_id":{"type":"string","description":"UID of the environment to run the agent in"},"mcp_servers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MCPServerConfig"},"description":"Map of MCP server configurations by name"}}},"MCPServerConfig":{"type":"object","description":"Configuration for an MCP server. Must have exactly one of: warp_id, command, or url.\n","properties":{"warp_id":{"type":"string","description":"Reference to a Warp shared MCP server by UUID"},"command":{"type":"string","description":"Stdio transport - command to run"},"args":{"type":"array","items":{"type":"string"},"description":"Stdio transport - command arguments"},"url":{"type":"string","format":"uri","description":"SSE/HTTP transport - server URL"},"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for the server"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"HTTP headers for SSE/HTTP transport"}}}}}}
```

## The RunAgentResponse object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunAgentResponse":{"type":"object","required":["run_id","state"],"properties":{"run_id":{"type":"string","description":"Unique identifier for the created run"},"state":{"$ref":"#/components/schemas/RunState"}}},"RunState":{"type":"string","enum":["QUEUED","PENDING","CLAIMED","INPROGRESS","SUCCEEDED","FAILED"],"description":"Current state of the run:\n- QUEUED: Run is waiting to be picked up\n- PENDING: Run is being prepared\n- CLAIMED: Run has been claimed by a worker\n- INPROGRESS: Run is actively being executed\n- SUCCEEDED: Run completed successfully\n- FAILED: Run failed\n"}}}}
```

## The ListRunsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"ListRunsResponse":{"type":"object","required":["runs","page_info"],"properties":{"runs":{"type":"array","items":{"$ref":"#/components/schemas/RunItem"}},"page_info":{"$ref":"#/components/schemas/PageInfo"}}},"RunItem":{"type":"object","required":["run_id","title","state","prompt","created_at","updated_at"],"properties":{"run_id":{"type":"string","description":"Unique identifier for the run"},"title":{"type":"string","description":"Human-readable title for the run"},"state":{"$ref":"#/components/schemas/RunState"},"prompt":{"type":"string","description":"The prompt/instruction for the agent"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the run was created (RFC3339)"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the run was last updated (RFC3339)"},"started_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the agent started working on the run (RFC3339)"},"status_message":{"$ref":"#/components/schemas/RunStatusMessage"},"source":{"$ref":"#/components/schemas/RunSourceType"},"session_id":{"type":"string","description":"UUID of the shared session (if available)"},"session_link":{"type":"string","format":"uri","description":"URL to view the agent session"},"creator":{"$ref":"#/components/schemas/RunCreatorInfo"},"agent_config":{"$ref":"#/components/schemas/AmbientAgentConfig"}}},"RunState":{"type":"string","enum":["QUEUED","PENDING","CLAIMED","INPROGRESS","SUCCEEDED","FAILED"],"description":"Current state of the run:\n- QUEUED: Run is waiting to be picked up\n- PENDING: Run is being prepared\n- CLAIMED: Run has been claimed by a worker\n- INPROGRESS: Run is actively being executed\n- SUCCEEDED: Run completed successfully\n- FAILED: Run failed\n"},"RunStatusMessage":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable status message"}}},"RunSourceType":{"type":"string","enum":["LINEAR","API","SLACK","LOCAL","SCHEDULED_AGENT"],"description":"Source that created the run:\n- LINEAR: Created from Linear integration\n- API: Created via the Warp API\n- SLACK: Created from Slack integration\n- LOCAL: Created from local CLI/app\n- SCHEDULED_AGENT: Created by a scheduled agent\n"},"RunCreatorInfo":{"type":"object","properties":{"type":{"type":"string","enum":["user","service_account"],"description":"Type of the creator principal"},"uid":{"type":"string","description":"Unique identifier of the creator"}}},"AmbientAgentConfig":{"type":"object","description":"Configuration for an ambient agent run","properties":{"name":{"type":"string","description":"Config name for searchability and traceability"},"model_id":{"type":"string","description":"LLM model to use (uses team default if not specified)"},"base_prompt":{"type":"string","description":"Custom base prompt for the agent"},"environment_id":{"type":"string","description":"UID of the environment to run the agent in"},"mcp_servers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MCPServerConfig"},"description":"Map of MCP server configurations by name"}}},"MCPServerConfig":{"type":"object","description":"Configuration for an MCP server. Must have exactly one of: warp_id, command, or url.\n","properties":{"warp_id":{"type":"string","description":"Reference to a Warp shared MCP server by UUID"},"command":{"type":"string","description":"Stdio transport - command to run"},"args":{"type":"array","items":{"type":"string"},"description":"Stdio transport - command arguments"},"url":{"type":"string","format":"uri","description":"SSE/HTTP transport - server URL"},"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for the server"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"HTTP headers for SSE/HTTP transport"}}},"PageInfo":{"type":"object","required":["has_next_page"],"properties":{"has_next_page":{"type":"boolean","description":"Whether there are more results available"},"next_cursor":{"type":"string","description":"Opaque cursor for fetching the next page"}}}}}}
```

## The RunItem object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunItem":{"type":"object","required":["run_id","title","state","prompt","created_at","updated_at"],"properties":{"run_id":{"type":"string","description":"Unique identifier for the run"},"title":{"type":"string","description":"Human-readable title for the run"},"state":{"$ref":"#/components/schemas/RunState"},"prompt":{"type":"string","description":"The prompt/instruction for the agent"},"created_at":{"type":"string","format":"date-time","description":"Timestamp when the run was created (RFC3339)"},"updated_at":{"type":"string","format":"date-time","description":"Timestamp when the run was last updated (RFC3339)"},"started_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the agent started working on the run (RFC3339)"},"status_message":{"$ref":"#/components/schemas/RunStatusMessage"},"source":{"$ref":"#/components/schemas/RunSourceType"},"session_id":{"type":"string","description":"UUID of the shared session (if available)"},"session_link":{"type":"string","format":"uri","description":"URL to view the agent session"},"creator":{"$ref":"#/components/schemas/RunCreatorInfo"},"agent_config":{"$ref":"#/components/schemas/AmbientAgentConfig"}}},"RunState":{"type":"string","enum":["QUEUED","PENDING","CLAIMED","INPROGRESS","SUCCEEDED","FAILED"],"description":"Current state of the run:\n- QUEUED: Run is waiting to be picked up\n- PENDING: Run is being prepared\n- CLAIMED: Run has been claimed by a worker\n- INPROGRESS: Run is actively being executed\n- SUCCEEDED: Run completed successfully\n- FAILED: Run failed\n"},"RunStatusMessage":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable status message"}}},"RunSourceType":{"type":"string","enum":["LINEAR","API","SLACK","LOCAL","SCHEDULED_AGENT"],"description":"Source that created the run:\n- LINEAR: Created from Linear integration\n- API: Created via the Warp API\n- SLACK: Created from Slack integration\n- LOCAL: Created from local CLI/app\n- SCHEDULED_AGENT: Created by a scheduled agent\n"},"RunCreatorInfo":{"type":"object","properties":{"type":{"type":"string","enum":["user","service_account"],"description":"Type of the creator principal"},"uid":{"type":"string","description":"Unique identifier of the creator"}}},"AmbientAgentConfig":{"type":"object","description":"Configuration for an ambient agent run","properties":{"name":{"type":"string","description":"Config name for searchability and traceability"},"model_id":{"type":"string","description":"LLM model to use (uses team default if not specified)"},"base_prompt":{"type":"string","description":"Custom base prompt for the agent"},"environment_id":{"type":"string","description":"UID of the environment to run the agent in"},"mcp_servers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MCPServerConfig"},"description":"Map of MCP server configurations by name"}}},"MCPServerConfig":{"type":"object","description":"Configuration for an MCP server. Must have exactly one of: warp_id, command, or url.\n","properties":{"warp_id":{"type":"string","description":"Reference to a Warp shared MCP server by UUID"},"command":{"type":"string","description":"Stdio transport - command to run"},"args":{"type":"array","items":{"type":"string"},"description":"Stdio transport - command arguments"},"url":{"type":"string","format":"uri","description":"SSE/HTTP transport - server URL"},"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for the server"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"HTTP headers for SSE/HTTP transport"}}}}}}
```

## The PageInfo object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"PageInfo":{"type":"object","required":["has_next_page"],"properties":{"has_next_page":{"type":"boolean","description":"Whether there are more results available"},"next_cursor":{"type":"string","description":"Opaque cursor for fetching the next page"}}}}}}
```

## The RunStatusMessage object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunStatusMessage":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable status message"}}}}}}
```

## The RunCreatorInfo object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunCreatorInfo":{"type":"object","properties":{"type":{"type":"string","enum":["user","service_account"],"description":"Type of the creator principal"},"uid":{"type":"string","description":"Unique identifier of the creator"}}}}}}
```

## The RunState object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunState":{"type":"string","enum":["QUEUED","PENDING","CLAIMED","INPROGRESS","SUCCEEDED","FAILED"],"description":"Current state of the run:\n- QUEUED: Run is waiting to be picked up\n- PENDING: Run is being prepared\n- CLAIMED: Run has been claimed by a worker\n- INPROGRESS: Run is actively being executed\n- SUCCEEDED: Run completed successfully\n- FAILED: Run failed\n"}}}}
```

## The RunSourceType object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"RunSourceType":{"type":"string","enum":["LINEAR","API","SLACK","LOCAL","SCHEDULED_AGENT"],"description":"Source that created the run:\n- LINEAR: Created from Linear integration\n- API: Created via the Warp API\n- SLACK: Created from Slack integration\n- LOCAL: Created from local CLI/app\n- SCHEDULED_AGENT: Created by a scheduled agent\n"}}}}
```

## The AmbientAgentConfig object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"AmbientAgentConfig":{"type":"object","description":"Configuration for an ambient agent run","properties":{"name":{"type":"string","description":"Config name for searchability and traceability"},"model_id":{"type":"string","description":"LLM model to use (uses team default if not specified)"},"base_prompt":{"type":"string","description":"Custom base prompt for the agent"},"environment_id":{"type":"string","description":"UID of the environment to run the agent in"},"mcp_servers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MCPServerConfig"},"description":"Map of MCP server configurations by name"}}},"MCPServerConfig":{"type":"object","description":"Configuration for an MCP server. Must have exactly one of: warp_id, command, or url.\n","properties":{"warp_id":{"type":"string","description":"Reference to a Warp shared MCP server by UUID"},"command":{"type":"string","description":"Stdio transport - command to run"},"args":{"type":"array","items":{"type":"string"},"description":"Stdio transport - command arguments"},"url":{"type":"string","format":"uri","description":"SSE/HTTP transport - server URL"},"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for the server"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"HTTP headers for SSE/HTTP transport"}}}}}}
```

## The MCPServerConfig object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"MCPServerConfig":{"type":"object","description":"Configuration for an MCP server. Must have exactly one of: warp_id, command, or url.\n","properties":{"warp_id":{"type":"string","description":"Reference to a Warp shared MCP server by UUID"},"command":{"type":"string","description":"Stdio transport - command to run"},"args":{"type":"array","items":{"type":"string"},"description":"Stdio transport - command arguments"},"url":{"type":"string","format":"uri","description":"SSE/HTTP transport - server URL"},"env":{"type":"object","additionalProperties":{"type":"string"},"description":"Environment variables for the server"},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"HTTP headers for SSE/HTTP transport"}}}}}}
```

## The Error object

```json
{"openapi":"3.0.0","info":{"title":"Warp Public Agent API","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message"}}}}}}
```