Skip to main content
orchagent offers three ways to use agents:

Quick Comparison: Cloud vs Local

Production apps call the HTTP API directly from code. The CLI is useful for testing.
Local download is on by default. New agents and skills are locally downloadable unless authors explicitly disable it using the --no-local-download flag at publish time or the toggle in the web UI.

Cloud Execution (orch run)

Run an agent on orchagent’s servers. This is the default mode.

What Happens

  1. CLI sends request to gateway (api.orchagent.io)
  2. Gateway authenticates your API key
  3. Gateway spins up an E2B sandbox (ephemeral)
  4. Agent code runs with input via stdin
  5. Agent runs with your stored LLM keys
  6. Response (stdout) returned through gateway

When to Use

  • Production - Reliable, managed infrastructure
  • Orchestration - Agents calling other agents
  • No local setup - Run without installing dependencies
  • Higher reliability - Auto-scaling, health checks

Requirements

  • orchagent account (free)
  • API key from dashboard
  • LLM key stored in account

Local Execution (orch run --local)

Download and run an agent on your machine.

What Happens

  1. CLI downloads agent code from registry
  2. Agent installs on your machine
  3. Agent runs locally
  4. Agent calls LLM using YOUR environment keys
  5. Results returned to terminal

When to Use

  • Development - Test agents before deploying
  • Privacy - Keep data on your machine
  • No account - Try agents without signing up
  • Debugging - See full execution locally

Requirements

  • Agent must have source_url or pip_package in manifest
  • Agent must have allow_local_download enabled by its author
  • LLM API key in environment variable
  • For orchestrators: dependencies must also be downloadable

Architecture Diagrams

Local Execution

Server Execution

Handling Dependencies

Local with Dependencies

Orchestrator agents have dependencies. When running locally:
Auto-download:

Server with Dependencies

On the server, dependencies are handled automatically. The gateway routes calls between agents.

Installing Agents as Sub-Agents (orch install)

A third option: export agents as configuration files for AI coding tools like Claude Code or Cursor.
What happens:
  1. CLI downloads agent metadata from registry
  2. Converts to target format (Claude Code, Cursor, AGENTS.md)
  3. Writes configuration file to AI tool directory
When to use install:
  • You want Claude Code or Cursor to delegate tasks to specialized agents
  • You want sub-agents available across all your projects
  • You’re building a team workflow with shared agents
Key difference from run:
  • run executes the agent immediately and returns results
  • install creates files that your AI tool reads later
See CLI Commands for full details.

Service Deployment (orch service deploy)

A fourth mode: deploy agents as always-on services (run_mode: "always_on") that run continuously on Cloud Run.

How It Differs

See Always-On Services for full documentation.

CLI Commands Summary

Choosing the Right Mode

Use Local (--local or orch dev) When

  • You want to keep data on your machine
  • You’re developing or debugging an agent (use orch dev for hot-reload)
  • You want to try an agent without an account
  • The agent doesn’t have complex dependencies
  • The agent author has enabled allow_local_download

Use Cloud (Default) When

  • You’re building production integrations
  • The agent has dependencies (orchestrator)
  • You want managed infrastructure
  • You need usage tracking and logs
  • The agent does not allow local download
  • You want usage tracking and logs

Development Server (orch dev)

For active development, use orch dev to start a local HTTP server with hot-reload:
This starts a server on http://localhost:4900 that:
  • Accepts POST requests with JSON input and runs your agent locally
  • Watches for file changes and reloads automatically
  • Works with all agent types (prompt, tool, agent)
See CLI Commands — dev for full options.

Mixed Mode

You can use all modes in your development workflow: