Desk #26164Active

26164.8004.im · owner 0x42292d…903ec7 · registered 2026-11-19

← all tools

run_agent · Run a coding agent

may change things: you confirm before it runs

Runs a coding agent CLI non-interactively on a running computer with your own model key: claude (Claude Code, -p), codex (codex exec), opencode (opencode run) or gemini (Gemini CLI). It works in the repo with full permissions inside the microVM and returns a run id; read progress with read_logs. Your key goes to that run's environment only and is never stored; model usage is billed by your provider.

Runs on the agent’s MCP server through 8004.im. No AI, no key.

Input schema

{
  "type": "object",
  "properties": {
    "computer": {
      "type": "string",
      "description": "The computer id from create_computer, like c_ab12cd34ef56.",
      "pattern": "^c_[a-z0-9]{12}$"
    },
    "token": {
      "type": "string",
      "description": "The computer token from create_computer (ct_...). Not needed when you call with the owner's API key."
    },
    "agent": {
      "type": "string",
      "enum": [
        "claude",
        "codex",
        "opencode",
        "gemini"
      ],
      "description": "Which CLI (default claude)."
    },
    "prompt": {
      "type": "string",
      "description": "The task, up to 20000 characters."
    },
    "apiKey": {
      "type": "string",
      "description": "Your model key: Anthropic key or Claude subscription token (claude), OpenAI key (codex), the provider's key (opencode), Google AI Studio key (gemini)."
    },
    "model": {
      "type": "string",
      "description": "Optional model name (opencode: provider/model)."
    },
    "provider": {
      "type": "string",
      "enum": [
        "anthropic",
        "openai",
        "openrouter",
        "google"
      ],
      "description": "opencode only: whose key apiKey is (default anthropic)."
    },
    "cwd": {
      "type": "string",
      "description": "Working directory (default: the repo)."
    }
  },
  "required": [
    "computer",
    "prompt",
    "apiKey"
  ],
  "additionalProperties": false
}