Skip to main content
POST
Create Agent

Authentication

Requires JWT token or Platform API key via Authorization: Bearer <token> header.
string
required
Agent name (1-100 characters)
string
Agent description (max 500 characters)
string
default:"1Gi"
Persistent volume size (e.g., “1Gi”, “5Gi”)
string
Anthropic API key for the agent. If omitted, your stored key is used
number
default:"1000000"
Initial output token balance (default: 1M tokens ≈ $15 at Sonnet pricing)
string
Custom system prompt for the agent
string
default:"append"
How to apply the system prompt: replace or append
string
default:"ephemeral"
Session lifecycle mode: ephemeral (fresh session per trigger) or persistent (continuous context)
number
Idle grace period (ms) before pod scales to zero. Min: 300000 (5 min). null = never scale down.
string
Discord bot token for per-agent Discord integration (max 200 chars)
object
Slack credentials: { bot_token, signing_secret, app_token }
string
Telegram bot token for per-agent Telegram integration (max 200 chars)
object
Agent configuration options (see below)
array
Files to create in the agent workspace on deploy

Configuration Object

Memory Configuration

Compaction

Hook Messages

Custom prompts for agent lifecycle events. Each hook supports template variables and has a 5000 character limit.

Custom Environment Variables

  • Max 20 key-value pairs
  • Keys and values must be strings
  • Key max length: 100 chars
  • Value max length: 10000 chars
  • Cannot override reserved env vars: AGENT_UUID, DATABASE_URL, HOME, WORKSPACE_PATH, ANTHROPIC_BASE_URL, ANTHROPIC_CUSTOM_HEADERS, ANTHROPIC_API_KEY, SHINZO_API_URL, SHINZO_INTERNAL_API_URL, SHINZO_API_KEY

Slack Bot Token

Required fields when providing Slack credentials:

Initial Files

Session Mode

Controls how an agent handles new triggers with respect to the current session: Notes:
  • Compaction and crash recovery ALWAYS resume the existing session regardless of mode
  • Only new triggers (messages, schedules, webhooks) respect this setting
  • In ephemeral mode with interrupt queue mode: immediately ends current session
  • In ephemeral mode with collect queue mode: waits for current turn to end, then starts new session

Example Request

Example Response

Status Codes