Skip to main content
Every agent needs an orchagent.json file that defines its configuration, dependencies, and runtime limits.
Skills use a different format. Skills use a SKILL.md file with YAML frontmatter instead of orchagent.json. See Agent Types for the SKILL.md format.

Basic Structure

Versions are auto-assigned. You don’t need to specify a version field in your manifest. The server automatically assigns versions on each publish (v1, v2, v3…).

Required Fields

Behavior Fields

These fields control how and when the agent runs. The type field sets the default execution engine, but these declarations can override it.
runtime and loop are mutually exclusive — you cannot declare both. The type field sets the default execution engine: promptdirect_llm, toolcode_runtime, agentmanaged_loop. These declarations override the type default when present.

runtime

Declares that the agent runs custom code:

loop

Declares that the agent uses a managed LLM tool-use loop:

Optional Fields

Default Models

Control which LLM model runs your agent by default for each provider. The default_models field is an object mapping provider names to model IDs:

Model Resolution Order

When your agent runs, the model is resolved in this order:
  1. Caller overrideorch run --model <model> (highest priority)
  2. Agent defaultdefault_models[provider] from your manifest
  3. Platform default — built-in defaults per provider
Use default_models (plural object), not model (singular string). A common mistake is writing "model": "claude-sonnet-4-20250514" — this field is ignored. The correct format is "default_models": { "anthropic": "claude-sonnet-4-20250514" }.
Set default_models to control costs. For example, use a smaller model like claude-haiku-4-5-20251001 for simple tasks, and let callers override with --model when they need a more capable model.
orch publish and orch validate will warn if your model IDs don’t match known provider patterns (e.g. gpt-* for OpenAI, claude-* for Anthropic, gemini-* for Gemini). This catches typos and mismatches before they cause 404 errors at runtime.

Workspace Secrets

Declare the environment variables your agent needs at runtime using required_secrets, and variables that unlock additional features using optional_secrets. Both are matched by name against your workspace secrets vault and injected as env vars into the sandbox.
At runtime, your code reads them as environment variables:

How it works

  1. You declare required_secrets and optional_secrets in orchagent.json
  2. You add secrets to your workspace vault (dashboard or orch secrets set)
  3. At runtime, the platform matches secret names and injects them as env vars
  4. On-demand runs (orch run): returns a 400 MISSING_SECRETS error if any required secrets are missing from the vault. Optional secrets are injected if present, silently skipped if not.
  5. Service deploys (orch service deploy): auto-reads required_secrets and validates against the vault before deploying. No --secret flags needed.
  6. Schedules: same injection — required secrets must exist in the vault at execution time
  7. orch info: shows both required and optional secrets so users can discover all available configuration

Optional secrets

Use optional_secrets to declare env vars that aren’t needed to run but unlock additional features — notification webhooks, backup integrations, model overrides, tuning parameters, etc. Without this field, users have no way to discover these options except by reading the README.

Publish enforcement

orch publish blocks tool and agent types that don’t declare required_secrets. This ensures the Agent Requirements UI and service auto-resolution always have accurate data. Use --no-required-secrets to bypass this check if your agent genuinely needs no secrets. Prompt and skill types are exempt. optional_secrets is never enforced — it’s purely informational.
Do not add ORCHAGENT_SERVICE_KEY to required_secrets. The gateway auto-injects a temporary service key for agents with manifest dependencies. Adding your own overrides it and breaks orchestration.

Tool Type Fields

Additional fields for tool types (code runtime — runtime.command):

Bundle Configuration

Control what files are included in your code bundle:

Example

For E2B sandbox execution (recommended), only runtime.command (or entrypoint) is needed. The source_url and run_command fields are for local execution support.

Prompt Type Fields

Additional fields for prompt types (direct LLM — no runtime or loop):

Example

Agent Type Fields

Additional fields for agent types (managed loop):

Custom Tools Format

Each custom tool has:

Example

Agent types also get built-in tools automatically: bash, read_file, write_file, list_files, and submit_result. You don’t need to define these. See Agent Types for details.
If your agent declares manifest.dependencies, you must also define matching custom_tools. Without custom_tools, the LLM has no way to invoke dependencies — it will waste turns exploring the sandbox filesystem instead. Use orch scaffold orchestration to auto-generate custom_tools from your dependency list. This only applies to managed-loop agents; code_runtime agents call dependencies via the SDK directly.

Skill Composition

Agents can include skills by default using the default_skills field. Skills are injected into the agent’s prompt at runtime.
When called, the agent’s prompt is prepended with the content from each skill. Callers can override this behavior (unless skills are locked):
  • --skills org/skill - Add more skills
  • --skills-only org/skill - Replace default_skills entirely
  • --no-skills - Ignore all skills

Locking Skills

Add skills_locked: true to prevent callers from overriding your default skills:
See Orchestration - Locking Skills for details.

Manifest Section (for Orchestrator Agents)

Agents that call other agents need a manifest section:

Manifest Fields

Dependency Format

Orchestration Mode

Controls whether a managed-loop orchestrator must delegate to its declared dependencies or can solve tasks directly with built-in tools like bash.
Rules:
  • Only applies to managed-loop agents (type: "agent" or loop declared) with dependencies.
  • If dependencies is empty or absent, the field is ignored.
  • Orchestrators with dependencies default to "strict" unless you explicitly set "flexible".
  • In multi-agent chains, strict mode is inherited downward — a strict parent forces all downstream agents to run strict, regardless of their own setting.
To use flexible mode instead:
See Orchestration - Strict vs Flexible Mode for details on behavior, error codes, and chain inheritance.

Validation Rules

The platform validates manifests on publish:
  1. Dependencies exist - All declared dependencies must be registered
  2. No cycles - Dependency graph must be acyclic
  3. max_hops >= 1 - Required when dependencies are declared
  4. Version pins - Dependencies must specify exact versions
  5. No conflicts - runtime and loop cannot both be declared
  6. Run mode compatibility - always_on requires runtime.command or loop (cannot be used with direct_llm)

Complete Examples

Always-On Tool Type

On-Demand Agent Type (Managed Loop)

On-Demand Prompt Type (Direct LLM)

Orchestrator (Tool Type)