Skip to main content
POST
/
v1
/
agents
Create Agent
curl --request POST \
  --url https://app.opencomputer.dev/v1/agents \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "id": "<string>",
  "display_name": "<string>",
  "core": "<string>",
  "config": {},
  "config.snapshot": "<string>",
  "config.entrypoint": "<string>",
  "config.agent_config": {},
  "config.env": {},
  "config.elasticity": {},
  "config.idle_timeout_s": 123,
  "secrets": {}
}
'
{
  "id": "my-hermes",
  "display_name": "my-hermes",
  "core": "hermes",
  "channels": [],
  "packages": [],
  "secret_store": "agent:my-hermes",
  "config": null,
  "created_at": "2026-04-09T10:30:00Z",
  "updated_at": "2026-04-09T10:30:00Z"
}
Create a new agent. For managed agents, pass core to get a pre-configured runtime. For raw agents, pass config with your own snapshot and entrypoint. CLI equivalent: oc agent create <id> [--core <core>] [--secret KEY=VALUE]
id
string
required
Agent ID. Must be DNS-safe (lowercase alphanumeric + hyphens).
display_name
string
Human-readable display name
core
string
Managed core (hermes or openclaw). Mutually exclusive with config.
config
object
Raw agent configuration. Mutually exclusive with core.
config.snapshot
string
Snapshot to boot the sandbox from
config.entrypoint
string
Command to run on sandbox start
config.agent_config
object
Alternative to entrypoint — uses sandbox.agent.start() with system_prompt and allowed_tools
config.env
object
Environment variables
config.elasticity
object
Memory elasticity. baseline_mb and max_mb.
config.idle_timeout_s
integer
Idle timeout in seconds
secrets
object
Key-value map of secrets to set on creation
{
  "id": "my-hermes",
  "display_name": "my-hermes",
  "core": "hermes",
  "channels": [],
  "packages": [],
  "secret_store": "agent:my-hermes",
  "config": null,
  "created_at": "2026-04-09T10:30:00Z",
  "updated_at": "2026-04-09T10:30:00Z"
}