HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://unifiedharnessprotocol.org/schema/uhp-2026-09-28.schema.json",
"title": "Unified Harness Protocol",
"description": "Object definitions for UHP 2026-09-28. Generated from uhp-2026-09-28.openapi.yaml by build.py — do not edit by hand.",
"$defs": {
"Discovery": {
"type": "object",
"required": [
"object",
"protocol",
"versions",
"default_version",
"conformance_class",
"capabilities"
],
"properties": {
"object": {
"type": "string",
"const": "uhp.discovery"
},
"protocol": {
"type": "string",
"const": "uhp"
},
"versions": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"default_version": {
"type": "string"
},
"conformance_class": {
"type": "string",
"enum": [
"core",
"extended",
"full"
]
},
"capabilities": {
"$ref": "#/$defs/Capabilities"
},
"plugin_schemas": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"description": "The Agent Plugins manifest schema identifiers this server installs. Present and non-empty\nwhen `capabilities.plugins` is true.\n",
"examples": [
[
"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"
]
]
},
"implementation": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
},
"Capabilities": {
"type": "object",
"description": "Named booleans. A server reports `false` for a capability it does not implement rather than\nomitting it, so a client can distinguish \"not supported\" from \"server predates this field\".\nA client treats an absent key as `false`.\n",
"properties": {
"streaming": {
"type": "boolean"
},
"sessions": {
"type": "boolean"
},
"cancellation": {
"type": "boolean"
},
"files_input": {
"type": "boolean"
},
"files_output": {
"type": "boolean"
},
"session_listing": {
"type": "boolean"
},
"harness_management": {
"type": "boolean"
},
"session_sharing": {
"type": "boolean"
},
"idempotency": {
"type": "boolean"
},
"plugins": {
"type": "boolean",
"description": "The server installs Agent Plugins packages into harnesses, serves their files, and exports\na harness as a package. Optional at every class.\n"
},
"environments": {
"type": "boolean",
"description": "The server holds environments: a project's files and installed dependencies, built once,\nread-only at a fixed path in every session that names one. Optional at every class.\n"
}
},
"additionalProperties": {
"type": "boolean"
}
},
"Harness": {
"type": "object",
"required": [
"id",
"name",
"base"
],
"properties": {
"id": {
"type": "string",
"pattern": "^chrn_"
},
"object": {
"type": "string",
"const": "harness"
},
"name": {
"type": "string"
},
"base": {
"type": "string",
"description": "Opaque. Not enumerated by this specification — a client must treat it as a string, or the\nprotocol would need revising every time a harness is released.\n",
"examples": [
"codex",
"claude-code",
"hermes"
]
},
"baseLabel": {
"type": "string"
},
"defaultModel": {
"type": "string"
},
"systemPrompt": {
"type": "string"
},
"mcpServers": {
"type": "array",
"items": {
"$ref": "#/$defs/McpServer"
}
},
"skills": {
"type": "array",
"items": {
"$ref": "#/$defs/Skill"
}
},
"plugins": {
"type": "array",
"items": {
"$ref": "#/$defs/Plugin"
},
"description": "Installed plugins. Their servers and skills join the harness's own for every turn;\n`mcpServers` and `skills` above report only what was written to them directly.\n"
},
"environment": {
"type": "string",
"description": "The environment (`henv_`) this harness's tasks read, mounted read-only at its `mount`;\nempty when none. A task may name another with its own `environment` field.\n"
},
"disabledTools": {
"type": "array",
"items": {
"type": "string"
}
},
"maxStep": {
"type": [
"integer",
"null"
]
},
"timeoutSeconds": {
"type": [
"integer",
"null"
]
},
"createdAt": {
"type": "integer",
"description": "Unix milliseconds"
}
},
"additionalProperties": true
},
"McpServer": {
"type": "object",
"required": [
"name",
"url"
],
"description": "A remote MCP server attached to a harness. Only enabled entries are connected for a turn; a\ndisabled entry must not be contacted at all. An unreachable server must not fail the task.\nUnchanged from 2026-08-11: a process (stdio) server is declared inside a plugin, see\nPluginMcpServer.\n",
"properties": {
"name": {
"type": "string",
"description": "Sanitised to a CLI-safe identifier by the server."
},
"url": {
"type": "string",
"format": "uri"
},
"transport": {
"type": "string",
"enum": [
"http",
"sse"
],
"default": "http"
},
"enabled": {
"type": "boolean",
"default": true
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"auth": {
"type": "string",
"description": "Bearer token, or a server-side reference the server resolves. A server must never return\na resolved credential to a client.\n"
}
},
"additionalProperties": true
},
"PluginMcpServer": {
"type": "object",
"required": [
"name"
],
"description": "An MCP server a plugin's mcp.json declares, derived by the server. The harness MCP server\nobject plus the `stdio` transport: `url` is required for `http` and `sse`, `command` for\n`stdio`. Placeholders are reported unexpanded; `enabled` is always true, the plugin's own\n`enabled` governs.\n",
"properties": {
"name": {
"type": "string"
},
"transport": {
"type": "string",
"enum": [
"http",
"sse",
"stdio"
],
"default": "http",
"description": "`http` is Streamable HTTP (`streamable-http` in mcp.json); `sse` the older HTTP+SSE\ntransport; `stdio` a process the server launches inside the agent's sandbox.\n"
},
"url": {
"type": "string",
"format": "uri",
"description": "Endpoint (`http` and `sse`)."
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Fixed request headers (`http` and `sse`). Never subject to placeholder expansion."
},
"command": {
"type": "string",
"description": "One executable token (`stdio`): a bare name resolved on the sandbox's search path, or a\nplugin-relative path beginning with `./`. Never a shell string, never expanded.\n"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"description": "Arguments (`stdio`). `${PLUGIN_ROOT}` and `${PLUGIN_DATA}` expand at run time."
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "Environment overlay (`stdio`). Must not name PLUGIN_ROOT or PLUGIN_DATA; the server sets\nthose. Values expand at run time.\n"
},
"cwd": {
"type": "string",
"description": "Working directory (`stdio`). Defaults to the plugin root; must stay within the plugin\nroot or PLUGIN_DATA.\n"
},
"enabled": {
"type": "boolean",
"default": true
}
},
"allOf": [
{
"if": {
"properties": {
"transport": {
"const": "stdio"
}
},
"required": [
"transport"
]
},
"then": {
"required": [
"command"
]
},
"else": {
"required": [
"url"
]
}
}
],
"additionalProperties": true
},
"Skill": {
"type": "object",
"required": [
"name"
],
"description": "A skill is a FOLDER, not a file. A server must materialise the whole folder where the agent\ncan read it — materialising only SKILL.md breaks every skill carrying references, scripts or\ndata. Round-tripping a harness through GET and PUT must not lose skill contents.\n",
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean",
"default": true,
"description": "false suppresses the skill, including one inherited from the base."
},
"files": {
"type": "array",
"items": {
"$ref": "#/$defs/SkillFile"
},
"description": "The bundle. Must contain a SKILL.md."
},
"content": {
"type": "string",
"description": "Shorthand for a single-file bundle whose only member is SKILL.md."
},
"blob": {
"type": "string",
"description": "Server-assigned handle for a bundle stored out of line. A client receives it, passes it\nback unchanged, and reads the files from the skill files endpoint.\n"
}
},
"additionalProperties": true
},
"SkillFile": {
"type": "object",
"required": [
"path"
],
"description": "One file of a skill folder or of a plugin package.",
"properties": {
"path": {
"type": "string",
"description": "Relative to the skill's own folder, or to the plugin root; nested directories are\nsupported. A server must reject a path that escapes the folder.\n",
"examples": [
"SKILL.md",
"references/codes.md",
"assets/logo.png"
]
},
"content": {
"type": "string",
"description": "Text content."
},
"content_b64": {
"type": "string",
"description": "Base64 for binary content; preserved byte-for-byte."
}
},
"additionalProperties": true
},
"FileList": {
"type": "object",
"required": [
"files"
],
"properties": {
"files": {
"type": "array",
"items": {
"$ref": "#/$defs/SkillFile"
}
}
}
},
"Plugin": {
"type": "object",
"required": [
"name"
],
"description": "An Agent Plugins package installed into a harness: `plugin.json` at the root, MCP servers in\n`mcp.json`, skills under `skills/`. A client writes `files` (or passes back `blob`) and\noptionally `name` and `enabled`; the server derives `manifest`, `mcpServers`, `skills` and\n`skipped` from the package on every write and ignores those fields on input. A refused\npackage leaves the harness unchanged.\n",
"properties": {
"name": {
"type": "string",
"pattern": "^(?!.*(--|\\.\\.))[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",
"maxLength": 64,
"description": "The manifest's `name`. Optional on write; if sent it must equal the manifest's."
},
"enabled": {
"type": "boolean",
"default": true,
"description": "false keeps the plugin installed and inert; nothing in it is materialised or contacted."
},
"files": {
"type": "array",
"items": {
"$ref": "#/$defs/SkillFile"
},
"description": "The package. Must contain `plugin.json` at its root."
},
"blob": {
"type": "string",
"description": "Server-assigned handle for a package stored out of line. A client passes it back unchanged\nand reads the files from the plugin files endpoint.\n"
},
"manifest": {
"$ref": "#/$defs/PluginManifest"
},
"mcpServers": {
"type": "array",
"items": {
"$ref": "#/$defs/PluginMcpServer"
},
"description": "Derived from `mcp.json`. Placeholders are reported unexpanded; `enabled` is always true,\nthe plugin's own `enabled` governs.\n"
},
"skills": {
"type": "array",
"items": {
"$ref": "#/$defs/PluginSkill"
},
"description": "Derived from `skills/`, one entry per immediate child directory with a SKILL.md."
},
"skipped": {
"type": "array",
"items": {
"$ref": "#/$defs/PluginSkipped"
},
"description": "What the server found and could not load. Present on every plugin object the server\nreturns, empty when nothing was skipped.\n"
}
},
"additionalProperties": true
},
"PluginManifest": {
"type": "object",
"required": [
"$schema",
"name"
],
"description": "`plugin.json`, parsed. Mirrors the Agent Plugins 1.0.0 manifest schema\n(https://agent-plugins.org/schemas/1.0.0/plugin.schema.json, Apache-2.0) field for field, and\npermits additional properties because a UHP client ignores fields it does not know. The\nschema a manifest's own `$schema` names is authoritative; a server validates against that.\n",
"properties": {
"$schema": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"pattern": "^(?!.*(--|\\.\\.))[a-z0-9]([a-z0-9.-]*[a-z0-9])?$"
},
"version": {
"type": "string"
},
"description": {
"type": "string"
},
"author": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"url": {
"type": "string"
}
},
"additionalProperties": true
},
"homepage": {
"type": "string"
},
"repository": {
"type": "string"
},
"license": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "string"
}
},
"extensions": {
"type": "object",
"description": "Client-specific data keyed by reverse-domain namespace, per Agent Plugins §8.",
"additionalProperties": {
"type": "object"
}
}
},
"additionalProperties": true
},
"PluginSkill": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "The SKILL.md frontmatter name",
"equal to the directory name.": null
},
"description": {
"type": "string"
}
},
"additionalProperties": true
},
"PluginSkipped": {
"type": "object",
"required": [
"path",
"reason"
],
"properties": {
"path": {
"type": "string",
"description": "Where in the package, e.g. `skills/broken`, `mcp.json#/mcpServers/redline`, `plugin.json#/vendorField`.",
"examples": [
"skills/broken",
"mcp.json#/mcpServers/redline"
]
},
"reason": {
"type": "string",
"description": "One sentence."
}
},
"additionalProperties": true
},
"HarnessCreate": {
"type": "object",
"required": [
"base"
],
"properties": {
"name": {
"type": "string"
},
"base": {
"type": "string"
},
"default_model": {
"type": "string"
},
"system_prompt": {
"type": "string"
},
"mcp_servers": {
"type": "array",
"items": {
"$ref": "#/$defs/McpServer"
}
},
"skills": {
"type": "array",
"items": {
"$ref": "#/$defs/Skill"
}
},
"plugins": {
"type": "array",
"items": {
"$ref": "#/$defs/Plugin"
},
"description": "Requires the `plugins` capability. Each item needs `files` or `blob`."
},
"environment": {
"type": "string",
"description": "An environment id of the caller's scope",
"or empty. Requires the `environments` capability.": null
},
"disabled_tools": {
"type": "array",
"items": {
"type": "string"
}
},
"max_step": {
"type": [
"integer",
"null"
]
},
"timeout_seconds": {
"type": [
"integer",
"null"
]
}
},
"additionalProperties": true
},
"ModelCatalog": {
"type": "object",
"required": [
"backends"
],
"properties": {
"backends": {
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"default",
"models"
],
"properties": {
"default": {
"type": "string"
},
"models": {
"type": "array",
"items": {
"$ref": "#/$defs/Model"
}
}
}
}
}
}
},
"HarnessModels": {
"type": "object",
"required": [
"models"
],
"properties": {
"harness_id": {
"type": "string"
},
"backend": {
"type": "string"
},
"default": {
"type": "string"
},
"fallback": {
"type": "string"
},
"models": {
"type": "array",
"items": {
"$ref": "#/$defs/Model"
}
}
}
},
"Model": {
"type": "object",
"required": [
"id",
"available"
],
"properties": {
"id": {
"type": "string"
},
"label": {
"type": "string"
},
"backend": {
"type": "string"
},
"available": {
"type": "boolean",
"description": "Computed, not asserted: true means the server can serve this model for this harness right\nnow. Listing a model as available and then failing the task is the worst outcome for a\nclient, because a user has already chosen it.\n"
},
"default": {
"type": "boolean"
}
},
"additionalProperties": true
},
"CreateResponseRequest": {
"type": "object",
"required": [
"input"
],
"properties": {
"input": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
],
"description": "A bare string is shorthand for one user message."
},
"model": {
"type": "string",
"description": "Canonical model id. Omitted means the harness default."
},
"metadata": {
"type": "object",
"description": "Client metadata, the extension point of the Responses surface. `harness_id` selects the\nconfigured harness; `environment` names the environment this task reads, overriding the\nharness's (capability `environments`), refused with `environment_not_found` or\n`environment_not_ready` before the task starts.\n",
"properties": {
"harness_id": {
"type": "string"
},
"environment": {
"type": "string"
}
},
"additionalProperties": true
},
"stream": {
"type": "boolean",
"default": false
},
"previous_response_id": {
"type": [
"string",
"null"
]
},
"instructions": {
"type": "string"
},
"store": {
"type": "boolean",
"default": true
},
"max_output_tokens": {
"type": [
"integer",
"null"
]
},
"max_step": {
"type": [
"integer",
"null"
],
"description": "Agent step (tool-call round) budget"
},
"timeout_seconds": {
"type": [
"integer",
"null"
],
"description": "Wall-clock budget"
},
"tools": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "Reserved and ignored. Accepted for wire compatibility, never acted on, and reported in\n`metadata.ignored_fields` on the response. A UHP harness invokes and executes tools\nitself and reports them in `output`; there is no input path for a tool result, so the\nclient-executed tool loop this field implies cannot be completed by a conformant server.\nConfigure tools on the harness instead — see Harnesses §4.1. Tasks §1.4.\n"
},
"include": {
"type": "array",
"items": {
"type": "string"
},
"description": "Reserved and ignored. Accepted for wire compatibility, never acted on, and reported in\n`metadata.ignored_fields` on the response. No values are enumerated, so any string a\nserver recognised would be one it named itself. Tasks §1.4.\n"
},
"background": {
"type": "boolean",
"default": false
}
},
"additionalProperties": true
},
"Response": {
"type": "object",
"required": [
"id",
"object",
"created_at",
"status",
"output",
"model"
],
"properties": {
"id": {
"type": "string",
"pattern": "^resp_"
},
"object": {
"type": "string",
"const": "response"
},
"created_at": {
"type": "integer",
"description": "Unix seconds"
},
"status": {
"$ref": "#/$defs/ResponseStatus"
},
"error": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/Error"
}
],
"description": "Non-null only when status is `failed`."
},
"incomplete_details": {
"type": [
"object",
"null"
],
"additionalProperties": true
},
"previous_response_id": {
"type": [
"string",
"null"
]
},
"model": {
"type": "string",
"description": "The model that actually ran."
},
"output": {
"type": "array",
"items": {
"$ref": "#/$defs/OutputItem"
}
},
"store": {
"type": "boolean"
},
"usage": {
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/Usage"
}
],
"description": "null when the server cannot account for usage. A fabricated zero would be worse than an\nhonest absence, because a client cannot tell it from a free task.\n"
},
"metadata": {
"type": "object",
"properties": {
"session_id": {
"type": "string"
},
"environment": {
"type": "string",
"description": "The environment the task read, when it read one (capability `environments`)."
},
"requested_model": {
"type": "string",
"description": "Present when the server ran a different model than was requested."
},
"model_fallback": {
"type": "boolean"
},
"model_fallback_reason": {
"type": "string"
},
"ignored_fields": {
"type": "array",
"items": {
"type": "string"
},
"description": "Request fields the server did not act on, by name, in any order. Required when the\nrequest carried `tools` or `include`, which are reserved and ignored. A silently\nignored field is indistinguishable from an honoured one. Tasks §1.1 and §1.4.\n"
}
},
"additionalProperties": true
}
},
"additionalProperties": true
},
"ResponseStatus": {
"type": "string",
"enum": [
"in_progress",
"completed",
"failed",
"incomplete",
"cancelled"
],
"description": "`incomplete` means a budget stopped the work and is usually worth continuing.\n`failed` means it could not be done. `cancelled` means the client asked for a stop, and must\nnever be reported as `failed`.\n"
},
"OutputItem": {
"type": "object",
"required": [
"type"
],
"description": "A client must tolerate item types it does not recognise. A client that renders only `message`\nitems and ignores the rest is a valid client.\n",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string",
"examples": [
"message",
"reasoning",
"function_call",
"function_call_output"
]
},
"status": {
"type": "string"
},
"role": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"$ref": "#/$defs/ContentPart"
}
},
"summary": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"call_id": {
"type": "string"
},
"name": {
"type": "string"
},
"arguments": {
"type": "string",
"description": "JSON",
"as a string": null
},
"output": {
"type": "string"
}
},
"additionalProperties": true
},
"ContentPart": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"examples": [
"output_text"
]
},
"text": {
"type": "string"
},
"annotations": {
"type": "array",
"items": {
"$ref": "#/$defs/Annotation"
}
}
},
"additionalProperties": true
},
"Annotation": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"const": "container_file_citation"
},
"container_id": {
"type": "string"
},
"file_id": {
"type": "string"
},
"filename": {
"type": "string"
},
"download_url": {
"type": "string",
"format": "uri"
},
"start_index": {
"type": "integer"
},
"end_index": {
"type": "integer"
}
},
"additionalProperties": true
},
"Usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0
},
"output_tokens": {
"type": "integer",
"minimum": 0
},
"total_tokens": {
"type": "integer",
"minimum": 0
},
"cache_read_tokens": {
"type": "integer",
"minimum": 0
},
"cache_write_tokens": {
"type": "integer",
"minimum": 0
}
},
"additionalProperties": true
},
"SessionShare": {
"type": "object",
"description": "A published read-only view of a session (Sessions §5). `url` may be relative, resolving\nagainst the base URL the caller is already using — a server behind a proxy cannot know its\npublic origin, and a base-relative path survives every fronting. The share's id MUST NOT\nfunction as a credential for the rest of the API.\n",
"required": [
"id",
"url"
],
"properties": {
"id": {
"type": "string"
},
"url": {
"type": "string"
},
"object": {
"type": "string",
"description": "SHOULD be \"session.share\""
},
"enabled": {
"type": "boolean"
}
},
"additionalProperties": true
},
"TurnItem": {
"type": "object",
"description": "One turn of a session's history (Sessions §3). Previously an object with no stated shape,\nwhich kept every conformance check at \"the endpoint answered 200\" and made transcript\nrebuilding an exercise in one implementation's habits.\n",
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"description": "The response id, usable with GET /v1/responses/{id}"
},
"status": {
"type": "string"
},
"user": {
"type": "string"
},
"assistant": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
}
},
"additionalProperties": true
},
"Environment": {
"type": "object",
"required": [
"id",
"name",
"slug",
"status",
"mount"
],
"properties": {
"id": {
"type": "string",
"pattern": "^henv_"
},
"object": {
"type": "string",
"const": "environment"
},
"name": {
"type": "string"
},
"slug": {
"type": "string",
"description": "The path segment sessions see; derived from the name at creation and fixed after."
},
"description": {
"type": "string"
},
"entry": {
"type": "string",
"description": "How the project is run, in the owner's words; repeated to the agent."
},
"status": {
"type": "string",
"enum": [
"empty",
"building",
"ready",
"failed"
],
"description": "`ready` means a built version is active and tasks may read it. `empty` means nothing\nwas built yet; `building` and `failed` describe the latest build.\n"
},
"mount": {
"type": "string",
"description": "Where a session finds the environment, read-only. `/env/<slug>` on the reference server."
},
"version": {
"type": [
"integer",
"null"
],
"description": "The active build",
"the one sessions read; null until one is ready.": null
},
"latestVersion": {
"type": [
"integer",
"null"
]
},
"files": {
"type": "object",
"description": "The source's size (what the owner put in, before any build).",
"properties": {
"count": {
"type": "integer",
"minimum": 0
},
"bytes": {
"type": "integer",
"minimum": 0
}
}
},
"packages": {
"type": "array",
"description": "What the active build installed, as the package managers report it.",
"items": {
"$ref": "#/$defs/EnvironmentPackage"
}
},
"declared": {
"type": "object",
"description": "What the owner declared, per manager, as the build installs it beside the project's own\nmanifests: `pip` (`name==1.0`), `npm` (`[email protected]`), `apt` (`name`). Each entry carries\nthe spec as written and its parsed name and version.\n",
"properties": {
"pip": {
"type": "array",
"items": {
"$ref": "#/$defs/DeclaredPackage"
}
},
"npm": {
"type": "array",
"items": {
"$ref": "#/$defs/DeclaredPackage"
}
},
"apt": {
"type": "array",
"items": {
"$ref": "#/$defs/DeclaredPackage"
}
}
}
},
"runtime": {
"type": "object",
"description": "The interpreter a build makes the virtual environment with; empty means the server's default.",
"properties": {
"python": {
"type": "string",
"examples": [
"3.12"
]
}
}
},
"versions": {
"type": "array",
"items": {
"$ref": "#/$defs/EnvironmentVersion"
}
},
"build": {
"description": "The latest build's status, or null before the first.",
"oneOf": [
{
"type": "null"
},
{
"$ref": "#/$defs/EnvironmentVersion"
}
]
},
"createdAt": {
"type": "integer",
"description": "Unix milliseconds"
},
"updatedAt": {
"type": "integer",
"description": "Unix milliseconds"
}
},
"additionalProperties": true
},
"DeclaredPackage": {
"type": "object",
"required": [
"spec"
],
"properties": {
"spec": {
"type": "string",
"description": "As written: moviepy==2.1.1, [email protected], ffmpeg"
},
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"additionalProperties": true
},
"EnvironmentPackageCheck": {
"type": "object",
"required": [
"manager",
"name",
"spec",
"exists"
],
"description": "What the manager's registry says about a spec, before any build.",
"properties": {
"object": {
"type": "string",
"const": "environment.package"
},
"manager": {
"type": "string",
"enum": [
"pip",
"npm",
"apt"
]
},
"name": {
"type": "string"
},
"spec": {
"type": "string"
},
"exists": {
"type": [
"boolean",
"null"
],
"description": "null when the registry could not be asked"
},
"latest": {
"type": "string"
},
"version": {
"type": "string",
"description": "The exact pin when it is published; empty otherwise"
},
"error": {
"type": "string",
"description": "In words: why the spec was refused, or why the registry could not be asked"
}
},
"additionalProperties": true
},
"EnvironmentRuntimes": {
"type": "object",
"description": "What a build can be made with on this server, and nothing that is not there.",
"properties": {
"python": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"3.12",
"3.13"
]
]
},
"node": {
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"22"
]
]
},
"os": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
}
},
"apt": {
"type": "boolean",
"description": "Whether apt packages can be declared here."
}
},
"additionalProperties": true
},
"EnvironmentPackage": {
"type": "object",
"required": [
"manager",
"name"
],
"properties": {
"manager": {
"type": "string",
"examples": [
"pip",
"npm"
]
},
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"additionalProperties": true
},
"EnvironmentVersion": {
"type": "object",
"required": [
"version",
"status"
],
"properties": {
"version": {
"type": "integer",
"minimum": 1
},
"status": {
"type": "string",
"enum": [
"building",
"ready",
"failed",
"unknown"
]
},
"started_at": {
"type": [
"integer",
"null"
]
},
"finished_at": {
"type": [
"integer",
"null"
]
},
"error": {
"type": "string"
},
"files": {
"type": "integer"
},
"bytes": {
"type": "integer"
},
"packages": {
"type": "integer",
"description": "How many packages the build installed."
}
},
"additionalProperties": true
},
"EnvironmentBuild": {
"type": "object",
"required": [
"id",
"version",
"status"
],
"description": "A build's record; the log is the installers' own output, capped by the server.",
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string",
"const": "environment.build"
},
"version": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"building",
"ready",
"failed"
]
},
"started_at": {
"type": [
"integer",
"null"
]
},
"finished_at": {
"type": [
"integer",
"null"
]
},
"error": {
"type": "string"
},
"stage": {
"type": "string",
"description": "The step a running build is on; empty once it ended"
},
"log": {
"type": "string"
},
"packages": {
"type": "array",
"items": {
"$ref": "#/$defs/EnvironmentPackage"
}
},
"files": {
"type": "integer"
},
"bytes": {
"type": "integer"
}
},
"additionalProperties": true
},
"EnvironmentCreate": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Must start with a letter or digit; the slug derives from it."
},
"description": {
"type": "string"
},
"entry": {
"type": "string"
},
"packages": {
"type": "object",
"description": "Declared packages per manager, as spec strings; omitted on update means unchanged.",
"properties": {
"pip": {
"type": "array",
"items": {
"type": "string"
}
},
"npm": {
"type": "array",
"items": {
"type": "string"
}
},
"apt": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"runtime": {
"type": "object",
"properties": {
"python": {
"type": "string"
}
}
}
},
"additionalProperties": true
},
"EnvironmentList": {
"type": "object",
"required": [
"environments"
],
"properties": {
"environments": {
"type": "array",
"items": {
"$ref": "#/$defs/Environment"
}
}
},
"additionalProperties": true
},
"EnvironmentFileEntry": {
"type": "object",
"required": [
"path",
"dir"
],
"properties": {
"path": {
"type": "string",
"description": "Relative to the environment's root."
},
"dir": {
"type": "boolean"
},
"bytes": {
"type": "integer",
"minimum": 0
},
"mtime": {
"type": "integer",
"description": "Unix seconds."
}
},
"additionalProperties": true
},
"EnvironmentFileList": {
"type": "object",
"required": [
"entries"
],
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/$defs/EnvironmentFileEntry"
}
},
"count": {
"type": "integer",
"description": "Files",
"not directories.": null
},
"bytes": {
"type": "integer"
}
},
"additionalProperties": true
},
"EnvironmentImport": {
"type": "object",
"description": "The JSON form of an import: a git repository. The other form is the archive itself as the\nrequest body (a zip or a tar, any content type but `application/json`).\n",
"properties": {
"git": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
},
"ref": {
"type": "string",
"description": "A branch or tag; the default branch when omitted."
}
}
},
"replace": {
"type": "boolean",
"default": false,
"description": "Clear the source before importing."
}
},
"additionalProperties": true
},
"EnvironmentImportResult": {
"type": "object",
"properties": {
"written": {
"type": "integer"
},
"skipped": {
"type": "integer",
"description": "Members that must not land (links",
"escapes) and were dropped.": null
},
"count": {
"type": "integer"
},
"bytes": {
"type": "integer"
}
},
"additionalProperties": true
},
"Session": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string",
"const": "session"
},
"harness_id": {
"type": "string"
},
"environment": {
"type": "string",
"description": "The environment the session's turns read",
"when one did.": null
},
"title": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "integer"
},
"updated_at": {
"type": "integer"
}
},
"additionalProperties": true
},
"SessionList": {
"type": "object",
"required": [
"sessions"
],
"properties": {
"sessions": {
"type": "array",
"items": {
"$ref": "#/$defs/Session"
}
},
"next_cursor": {
"type": [
"string",
"null"
],
"description": "null on the last page. A client must not be required to detect the end by receiving fewer\nitems than requested — that heuristic is wrong whenever a page is exactly full.\n"
}
},
"additionalProperties": true
},
"File": {
"type": "object",
"required": [
"id",
"filename"
],
"properties": {
"id": {
"type": "string"
},
"object": {
"type": "string",
"const": "file"
},
"container_id": {
"type": "string"
},
"filename": {
"type": "string"
},
"bytes": {
"type": "integer",
"minimum": 0
},
"created_at": {
"type": "integer"
}
},
"additionalProperties": true
},
"ErrorEnvelope": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"$ref": "#/$defs/Error"
},
"detail": {
"type": "string",
"deprecated": true,
"description": "A human-readable alias of `error.message`, retained for clients written against\nimplementations that predate this envelope. Carries no information not in `error`.\n"
}
},
"additionalProperties": true
},
"Error": {
"type": "object",
"required": [
"type",
"code",
"message"
],
"properties": {
"type": {
"type": "string",
"enum": [
"invalid_request_error",
"authentication_error",
"permission_error",
"rate_limit_error",
"harness_error",
"server_error"
]
},
"code": {
"type": "string",
"description": "Specific and machine-readable. Servers may define additional codes for conditions this\nspecification does not cover, and must namespace them with a vendor prefix so a future\nversion cannot collide with them.\n",
"examples": [
"unsupported_protocol_version",
"invalid_input",
"harness_not_found",
"response_not_found",
"session_not_found",
"plugin_not_found",
"file_not_found",
"session_expired",
"harness_mismatch",
"session_busy",
"plugin_conflict",
"file_too_large",
"model_unavailable",
"unsupported_base",
"plugin_invalid",
"unsupported_plugin_schema",
"environment_not_found",
"environment_not_ready",
"environment_busy",
"environment_exists",
"environment_invalid",
"environment_unavailable",
"unsupported_transport",
"missing_credential",
"invalid_credential",
"insufficient_scope",
"rate_limited",
"quota_exhausted",
"harness_error",
"harness_unavailable",
"provider_error",
"timeout",
"cancelled",
"preview_unavailable",
"preview_failed"
]
},
"message": {
"type": "string",
"description": "One sentence, safe to show a user. Must not contain credentials, internal hostnames, file\npaths, or stack traces.\n"
},
"param": {
"type": [
"string",
"null"
],
"description": "Dotted path to the offending field."
},
"detail": {
"type": [
"object",
"null"
],
"additionalProperties": true
}
},
"additionalProperties": true
},
"Event": {
"type": "object",
"required": [
"type",
"sequence_number"
],
"description": "One streamed event. `sequence_number` starts at 0 and increases by exactly 1 per event, so a\nclient can detect a dropped event rather than silently rendering a gap.\n",
"properties": {
"type": {
"type": "string",
"examples": [
"response.created",
"response.in_progress",
"response.output_item.added",
"response.output_item.done",
"response.content_part.added",
"response.content_part.done",
"response.output_text.delta",
"response.output_text.done",
"response.output_text.annotation.added",
"response.reasoning_summary_part.added",
"response.reasoning_summary_text.delta",
"response.reasoning_summary_part.done",
"response.function_call_arguments.delta",
"response.function_call_arguments.done",
"response.completed",
"response.incomplete",
"response.failed",
"error"
]
},
"sequence_number": {
"type": "integer",
"minimum": 0
},
"response": {
"$ref": "#/$defs/Response"
},
"item": {
"$ref": "#/$defs/OutputItem"
},
"part": {
"$ref": "#/$defs/ContentPart"
},
"annotation": {
"$ref": "#/$defs/Annotation"
},
"delta": {
"type": "string"
},
"text": {
"type": "string"
},
"arguments": {
"type": "string"
},
"item_id": {
"type": "string"
},
"output_index": {
"type": "integer",
"minimum": 0
},
"content_index": {
"type": "integer",
"minimum": 0
},
"summary_index": {
"type": "integer",
"minimum": 0
},
"annotation_index": {
"type": "integer",
"minimum": 0
},
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"param": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": true
}
}
}