Agents
Create Agent
Create or update an agent definition
POST
POST /v1/agents upserts an agent by organization and slug. For sandbox-backed agents, create a sandbox first and pass its ID or name in sandbox. Mount a workspace on that sandbox when the agent needs durable storage and persistent filesystem memory across runs.
Request Body
string
required
URL-safe agent slug. Use lowercase letters, numbers, and hyphens.
string
Display name. Defaults to
slug.string
Human-readable description.
string
Model identifier. Defaults to the platform default when omitted.
string
Agent instructions.
array
Core tool names and Tool Hub slugs available to the agent.
string
Sandbox ID or name for
in_sandbox agents. If that sandbox has a workspace mounted, the agent can use the mount path as durable storage.string
default:"in_sandbox"
in_sandbox, managed, or local-mac.string
Required for
local-mac agents.array
Attached workspace or sandbox resources for
managed and local-mac agents.object
Environment variables. Secret references can be resolved server-side when configured.
number
Maximum agentic turns.
number
Maximum output tokens.
number
Sampling temperature.
Response
string
Agent ID.
string
Agent slug.
string
created or updated.number
Agent definition version.
string
Linked sandbox ID for sandbox-backed agents.
string
Compatibility URL for the per-agent run endpoint. New code should prefer
POST /v1/run.Notes
- The SDK does not expose
rt.runtimesorrt.deployments. Agent definitions are deployed withruntools deployor directPOST /v1/agents. - Use
rt.agent.run()orPOST /v1/runto execute an existing agent. in_sandboxagents require a linked sandbox. The run path wakes paused sandboxes when possible before dispatching.local-macagents require atargetDeviceIdfrom RunMesh.- For sandbox-backed agents, conversation threads preserve chat context and mounted workspaces preserve files.