| name | orchestrator-guide |
| description | Guide for working with the Agent Orchestrator — a CLI tool for AI-native SDLC automation. Use when writing or editing YAML manifests (Workspace, Agent, Workflow, StepTemplate, ExecutionProfile, SecretStore, EnvStore, Trigger, CRD), running orchestrator CLI commands, designing workflow step pipelines, writing CEL prehook/finalize expressions, configuring triggers (cron/event-driven task creation), or configuring self-bootstrap workflows. Triggers: any mention of orchestrator config, YAML manifests with "orchestrator.dev/v2", workflow steps, prehooks, finalize rules, task create/start/pause, orchestrator run, step filtering, direct assembly, agent capabilities, StepTemplate prompts, execution profiles, sandbox configuration, secret management, or trigger/cron scheduling. |
Agent Orchestrator Guide
CLI Command Reference (Dynamic)
Before reading static documentation, query the orchestrator itself:
orchestrator guide
orchestrator guide task
orchestrator guide --category resource
orchestrator guide --format json
The guide subcommand outputs up-to-date command descriptions with usage examples, grouped by functional category. Use it as your primary CLI reference.
Architecture (Client/Server)
The orchestrator uses a client/server model over gRPC:
orchestratord — daemon binary (gRPC server + embedded worker pool). Listens on UDS (~/.orchestratord/orchestrator.sock) by default, or TCP with --bind.
orchestrator — thin CLI client binary that forwards all commands to the daemon via gRPC.
Install via the one-line installer or download from GitHub Releases:
curl -fsSL https://raw.githubusercontent.com/c9r-io/orchestrator/main/install.sh | sh
Start the daemon first, then use the CLI:
orchestratord --foreground --workers 2
nohup orchestratord --foreground --workers 2 &
orchestratord --bind 0.0.0.0:9090 --workers 4
ps aux | grep orchestratord | grep -v grep
kill <pid>
Core Workflow
- Start the daemon:
orchestratord --foreground --workers 2
orchestrator init — initialize orchestrator runtime (creates ~/.orchestratord/ with DB, secrets, etc.)
orchestrator apply -f manifest.yaml --project <name> — load resources (daemon atomically hot-reloads an ArcSwap config snapshot, no restart needed)
orchestrator task create --name X --goal Y --workflow Z --project <name> — create and run (auto-enqueues to worker)
orchestrator task info <id> / task trace <id> / task logs <id> — inspect results
Lightweight Execution (orchestrator run)
orchestrator run --workflow sdlc --step fix --set ticket_paths=docs/ticket/T-0042.md
orchestrator run --workflow sdlc --step fix --detach
orchestrator run --template fix-ticket --agent-capability fix --set ticket_paths=docs/ticket/T-0042.md
task create also supports --step (repeatable) and --set key=value (repeatable) for step filtering and pipeline variable injection.
Resource Kinds
All resources use apiVersion: orchestrator.dev/v2 with metadata.name and spec.
| Kind | Scope | Purpose |
|---|
| Workspace | project | File system context: root_path, qa_targets, ticket_dir, self_referential |
| Agent | project | Execution unit: capabilities plus an explicit shell/cli, claude/cli, or codex/cli driver |
| StepTemplate | project | Prompt content with pipeline variables ({goal}, {diff}, {source_tree}, etc.) |
| Workflow | project | Step pipeline + loop policy + finalize rules + safety config |
| ExecutionProfile | project | Sandbox/isolation policy: fs_mode, network_mode, resource limits |
| SecretStore | project | Encrypted key-value pairs for sensitive data (API keys, tokens) |
| EnvStore | project | Plain key-value pairs for environment variables |
| WorkflowStore | project | Cross-task persistent key-value store (WP01) |
| Trigger | project | Cron-scheduled or event-driven automatic task creation |
| SourceTaskTemplate | project | Trusted Skill + task action + allowlisted source-goal renderer and preview |
| SourceTaskBinding | project | Exact authenticated reaction/channel/role policy selecting one SourceTaskTemplate; enabled Slack routing resolves a permalink and creates one canonical task |
| RuntimePolicy | singleton | Runner shell config, resume behavior, observability, redaction patterns |
| Project | cluster | Namespace for organizing resources |
| CustomResourceDefinition | cluster | Extensible resource types with JSON Schema + CEL validation |
| StoreBackendProvider | cluster | Custom workflow store backends |
Minimal Manifest Example
apiVersion: orchestrator.dev/v2
kind: Workspace
metadata:
name: default
spec:
root_path: "."
qa_targets: [docs/qa]
ticket_dir: docs/ticket
---
apiVersion: orchestrator.dev/v2
kind: Agent
metadata:
name: my_agent
spec:
capabilities: [qa]
command: "echo '{\"confidence\":0.9,\"quality_score\":0.9,\"artifacts\":[]}'"
driver:
provider: shell
transport: cli
---
apiVersion: orchestrator.dev/v2
kind: Workflow
metadata:
name: simple
spec:
steps:
- id: qa
enabled: true
loop:
mode: once
ExecutionProfile
Controls sandbox isolation for workflow steps. Referenced by name in step execution_profile field.
apiVersion: orchestrator.dev/v2
kind: ExecutionProfile
metadata:
name: sandbox_write
spec:
mode: sandbox
fs_mode: workspace_rw_scoped
writable_paths:
- docs
- core/src
- crates
network_mode: inherit
network_allowlist:
- api.example.com:443
max_memory_mb: 512
max_cpu_seconds: 60
max_processes: 4
max_open_files: 1024
Platform Behavior
| Feature | Linux | macOS |
|---|
mode: sandbox | namespace isolation | Seatbelt (sandbox-exec) |
network_mode: deny | nftables DROP | Seatbelt deny |
network_mode: allowlist | nftables per-target rules + auto DNS | Not supported (validation error) |
| Resource limits | setrlimit() | setrlimit() |
Production vs QA Profiles
- Production profiles: Use
network_mode: inherit — agents need API access for LLM calls.
- QA/fixture profiles: Use
network_mode: deny — tests verify sandbox enforcement.
Referenced in workflow steps:
steps:
- id: implement
execution_profile: sandbox_write
SecretStore & EnvStore
apiVersion: orchestrator.dev/v2
kind: SecretStore
metadata:
name: claude-opus
spec:
data:
ANTHROPIC_API_KEY: "sk-ant-..."
---
apiVersion: orchestrator.dev/v2
kind: EnvStore
metadata:
name: build-env
spec:
data:
CARGO_TERM_COLOR: "always"
RUST_BACKTRACE: "1"
Referenced in Agent spec via env:
kind: Agent
spec:
env:
- name: MY_VAR
value: "literal"
- fromRef: claude-opus
- name: API_KEY
refValue:
name: claude-opus
key: ANTHROPIC_API_KEY
Secret Key Management
Run orchestrator guide "secret key" for the full key lifecycle command reference.
Step Definition Quick Reference
- id: plan
scope: task
enabled: true
template: plan
builtin: self_test
command: "cargo check"
execution_profile: sandbox_write
max_parallel: 2
timeout_secs: 600
prehook:
engine: cel
when: "is_last_cycle"
behavior:
on_failure: { action: continue }
post_actions:
- type: store_put
store: context
key: result
from_var: plan_output
store_inputs: [{store: X, key: Y, as_var: Z}]
store_outputs: [{store: X, key: Y, from_var: Z}]
Auto-inferred from id: builtin IDs → builtin mode; agent IDs → capability mode. See references for full lists.
Agent Structured Output
Agents must produce JSON on stdout:
{"confidence": 0.95, "quality_score": 0.9, "artifacts": [{"kind": "analysis", "findings": [{"title": "X", "description": "Y", "severity": "info"}]}]}
Reference Files
Load these as needed for detailed specifications: