Skip to navigation

Publish the agent draft

View as Markdown

Publishes the current draft as the agents live version and opens a fresh draft at the next version number. Publishing writes the engine-compat shadow playbook document whose id IS the new agv_version id, soPOST /spaces/:spaceId/playbook-runscan start the agent withplaybookId: “<publishedVersionId>“unchanged. The previous version stops starting runs (its id answers 409playbook_not_active). Authorization: organization administrators only. A privateagent is visible only to its owner; every other caller gets 404. 409agent_archivedwhen the agent is archived — unarchive it first, publishing must never re-activate a hidden agent. 422 when the draft cannot run:harness_not_available, instructions_too_long_for_native, too_many_skills_for_native, sandbox_tool_on_native_harness, platform_tool_not_available_on_sandbox(a sandbox version may hold thefilesandspacesplatform tools only — the rest resolve in the run engine),tool_grants_nothing_on_sandbox(a sandbox version may not holdcode, a connector or delegation — none of them expands to a tool inside a container), unknown_model_policy, space_scope_not_supported_on_native, or engine_rejected_versionwhen the run engine's own validator refuses the version (that one carriesissues[], each with the failing path). Branch on error_code, never on the sentence. Response: { data: { agent, draft, published } }—agent.publishedVersionIdis theagv_` id.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

agentRefstringRequired

Response

The published agent and its fresh draft.
dataobject

Errors

404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error