Run Deployment
/agent/v1/deployments/{deployment_id}/run● SupportedRequest parameters
deployment_idstringrequiredpath: Deployment id (depl_...), returned by deployments.create or deployments.list.
Returns
200
Manual triggers and cron schedules create sessions with pinned agent versions. Session creation errors are recorded and automatically pause the deployment; unpause to resume scheduling. Missed cron occurrences produce one catch-up run. Lists support deployment_id, has_error, trigger_type and all four created_at bounds, with keyset pagination.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Request
curl
curl -X POST https://api.deepraxis.com/agent/v1/deployments/depl_123/run \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.post(
f"{opts['base_url']}/v1/deployments/depl_123/run",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/deployments/depl_123/run`, {
method: "POST",
headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
});
console.log(resp.status, await resp.json());Response 200
{
"id": "drun_7c80cb5b32314569ba2827804ad4ab5f",
"type": "deployment_run",
"agent": {
"type": "agent",
"id": "agent_ec9fa4f9-2f07-4f50-a61c-c25a7951b3b9",
"version": 1
},
"created_at": "2026-10-22T15:25:48.204Z",
"deployment_id": "depl_0948554251a246cfa95ffe8ca529cbb6",
"trigger_context": {
"type": "manual"
},
"session_id": "sesn_5b4d94bd9c37441fb56a2bed89742c59",
"error": null
}Response
HTTP 200
Successful response
application/json
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this run (drun_...). |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | Agent id (agent_...). Pass it as agent when creating a session and as agent_id in agent calls. |
| agent.type | string | Always agent. A roster member that refers to an agent by id and pinned version. |
| agent.version | number | The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified. |
| created_at | string | A timestamp in RFC 3339 format |
| deployment_id | string | ID of the deployment that produced this run. |
| error | null | object | Why the run failed to create a session. The type identifies the failure; message is human-readable detail. |
| error.message | string | Human-readable error description. |
| error.type | string | Always environment_archived_error. The selected environment was archived. / Always agent_archived_error. The referenced agent was archived. / Always environment_not_found_error. The selected environment could not be found. / Always vault_not_found_error. A referenced credential vault could not be found. / Always vault_archived_error. A referenced credential vault was archived. / Always file_not_found_error. A referenced file could not be found. / Always memory_store_archived_error. A referenced memory store was archived. / Always skill_not_found_error. A referenced skill could not be found. / Always session_resource_not_found_error. A referenced session resource could not be found. / Always workspace_archived_error. The deployment workspace was archived. / Always organization_disabled_error. The owning organization was disabled. / Always session_rate_limited_error. Session creation exceeded the rate limit. / Always session_creation_rejected_error. Session creation was rejected because its parameters were invalid. / Always unknown_error. An unclassified server error. / Always self_hosted_resources_unsupported_error. The selected self-hosted environment does not support these resources. / Always mcp_egress_blocked_error. The environment network policy blocks a configured MCP server. |
| session_id | null | string | Populated on success. Null on creation failure. Exactly one of session_id or error is non-null. |
| trigger_context | object | Describes what triggered a deployment run, with trigger-specific metadata. |
| trigger_context.scheduled_at | string | A timestamp in RFC 3339 format |
| trigger_context.type | string | Always schedule. The cron schedule triggered this run at scheduled_at. / Always manual. An explicit request triggered this run or paused this deployment. |
| type | string | Always deployment_run. The result of one manual or scheduled deployment trigger. |
Before running the example
Create a deployment and replace depl_123 with its ID. Get drun_123 from Run deployment. Pause before testing unpause. After testing, wait for created sessions to become idle and delete them, then archive the deployment, environment and agent.