Skill Composition
Skills are passive knowledge that can be injected into agents. Skills work for all agent execution patterns:- For direct LLM and managed loop agents: skill content is prepended to the agent’s prompt before the LLM call
- For tool types: skills are mounted as files at
$ORCHAGENT_SKILLS_DIR(see Agent Types)
Using default_skills
Agents can declare skills they always use:[skill 1 content] + [skill 2 content] + [agent prompt]
Caller Override
Callers can modify skill behavior (unless the author has locked skills):Locking Skills
Authors can lock skills to prevent caller overrides. This is useful for agents where specific skills are critical for correct behavior (security rules, compliance guidelines, etc.).skills_locked: true:
- Cloud (
orch run): Caller override flags (--skills,--skills-only,--no-skills) are silently ignored - Local (
orch run --local): CLI shows a warning and asks for confirmation before overriding
skills_locked is immutable after publish. To change it, publish a new version.Skills vs Agent Dependencies
| Skills | Agent Dependencies | |
|---|---|---|
| What they are | Knowledge injected into prompt | Agents called at runtime |
| When evaluated | Before LLM call | During execution |
| Declared in | default_skills | manifest.dependencies |
| Can be locked | Yes (skills_locked: true) | Always locked |
| Override when unlocked | Yes (—skills flags) | No (never) |
| Best for | Style guides, rules, domain knowledge | Complex workflows, multi-step tasks |
Agent Composition
Orchestrator agents call other agents to build complex workflows.Concepts
| Term | Definition |
|---|---|
| Orchestrator agent | An agent that calls other agents. Declares dependencies in its manifest. |
| Leaf agent | An agent with no dependencies. Does one focused task. |
| Dependency | An agent that an orchestrator is allowed to call. Must be declared explicitly. |
How It Works
- Gateway handles all routing, auth, and limits
- Caller’s rate limit: 1 call (top-level only)
- Sub-agent calls: validated against manifest limits and hop rules
- Call chains are tracked to prevent cycles
- Timeouts propagate through the chain
Creating an Orchestrator
Step 1: Declare Dependencies
Add amanifest section to your orchagent.json:
Step 2: Use the SDK
The orchagent SDK is available for both Python and JavaScript/TypeScript. Use whichever matches your agent’s language.- Python
- JavaScript
pip install orchagent-sdk- Service key authentication
- Call chain propagation
- Deadline propagation
- Max hops decrement
- Error wrapping
Most orchestrators use stdin/stdout with
AgentClient(). If you’re building a custom FastAPI server instead, use AgentClient.from_request(request) to propagate call chain and deadline from HTTP headers. See the SDK Documentation for details.Step 3: Set Environment Variables
Step 4: Publish
- All declared dependencies exist
- No cycles in dependency graph
max_hops >= 1when dependencies declared
Calling Dependencies
Basic Call
With Custom Endpoint
With Timeout Override
Error Handling
Common Patterns
orchagent provides templates to scaffold these patterns instantly:Serial Calls (Pipeline)
Call agents one after another, feeding each step’s output into the next:Parallel Calls (Fan-out)
Call multiple agents concurrently:Map-Reduce
Split input into items, process each in parallel, aggregate:Conditional Calls
Call based on previous results:Local Development
When you run an orchestrator locally withorch run, the CLI detects dependencies:
Local mode requires the orchagent-sdk package to be installed for dependency calls to work correctly.
Rate Limits
| What | Limit Applied |
|---|---|
| Top-level call | Caller’s 1000/day limit |
| Sub-agent calls | Orchestrator’s manifest + hop limits |
| Nested calls | Same orchestrator’s limits |
security-review which calls 3 agents:
- User’s daily count: +1 (just the top-level)
security-review’s downstream calls: +3 (no billing)
Troubleshooting
DEPENDENCY_NOT_ALLOWED
Your agent tried to call an agent not in its manifest. Fix: Add the dependency to your manifest’sdependencies array.
MAX_HOPS_EXCEEDED
Call chain is too deep. Fix: Increasemax_hops in manifest, or refactor to reduce nesting.
MAX_HOPS_TOO_LOW
Caller’smax_hops is lower than your agent’s min_required_hops.
Fix: Either lower your min_required_hops or document that callers need higher limits.
DEPENDENCY_CYCLE
A→B→C→A detected. Fix: Restructure your agents to avoid circular dependencies.STRICT_MODE_BASH_DISABLED
Your orchestrator tried to usebash but is running in strict mode.
Fix: Use your custom tools (dependency agents) instead. If you need bash, set orchestration_mode: "flexible" in your manifest and republish.
STRICT_MODE_DEPENDENCY_REQUIRED
Your orchestrator tried to submit results without calling any dependency. Fix: Call at least one custom tool before submitting. In strict mode, the agent must delegate to its declared dependencies.TIMEOUT
Request exceeded deadline. Fix: Increasetimeout_ms or optimize your agent’s logic.
Strict vs Flexible Mode
Managed-loop orchestrators with dependencies run in one of two orchestration modes: strict or flexible. This controls whether the agent must delegate to its declared dependencies or can solve tasks directly with built-in tools.Strict Mode (Default)
Orchestrators with dependencies default to strict mode. In strict mode:bashis not available — removed from the tool list entirely- Dependency calls are required — the agent must call at least one custom tool (dependency) before submitting results
- Built-in file tools (
read_file,write_file,list_files) remain available
Flexible Mode
Use flexible mode when your orchestrator needs the freedom to solve some tasks directly:bash) remain available. The agent can choose to use dependencies or solve tasks directly. Dependency allowlist enforcement still applies — the agent can only call agents listed in dependencies.
When to Use Each
| Use strict when… | Use flexible when… |
|---|---|
| Your agent exists to coordinate other agents | Your agent sometimes needs bash for lightweight tasks |
| You want predictable dependency-path execution | Dependencies are optional enhancements, not core workflow |
| You need the runtime DAG to match declared dependencies | You’re prototyping and want maximum freedom |
Chain Inheritance
In multi-agent chains, strict mode propagates one-way downward:Error Codes
If your agent violates strict mode rules, you’ll see these errors in the agent’s output:| Error | Cause | Fix |
|---|---|---|
STRICT_MODE_BASH_DISABLED | Agent attempted to use bash in strict mode | Use custom tools (dependencies) instead, or set orchestration_mode: "flexible" |
STRICT_MODE_DEPENDENCY_REQUIRED | Agent tried to submit results without calling any dependency | Call at least one custom tool before submitting |
Checking Your Mode
When you publish, the CLI echoes the effective orchestration mode:orchestration_mode: "flexible" in your manifest and republish.
Best Practices
- Keep agents focused - Each agent does one thing well
- Declare all deps - Undeclared calls are blocked
- Pin versions - Use exact versions (
v1), notlatest - Handle errors - Wrap calls in try/except
- Set reasonable timeouts - Account for all dependency calls
- Use parallel calls - Fan-out when deps are independent
- Test locally first - Use
orch run --with-depsduring development
Next Steps
Build an Orchestrator
Step-by-step tutorial with complete examples
SDK Reference
Complete API reference for the orchagent-sdk package
Agent Types
Learn about different agent types and when to use them