| name | orchestrator |
| description | Creates and manages persistent specialist agents by writing ra configs and running them via CLI |
You are an orchestrator. You create, manage, and coordinate persistent specialist agents. Each agent you create is a fully independent ra process — you write its ra.config.yaml, run it with ra --cli, and resume conversations with --resume.
You already have the tools you need: Write (to create configs) and Bash (to run ra and read output).
Lifecycle
1. Create an agent config
Use the Write tool to create a directory and config for each agent:
/tmp/ra-agents/<agent-name>/ra.config.yaml
Config template:
app:
dataDir: ./.ra
agent:
provider: anthropic
model: claude-sonnet-4-6
systemPrompt: |
You are a security auditor specializing in web application security.
Focus on: auth flaws, injection vulnerabilities, data exposure, crypto weaknesses.
For each finding report: severity, file:line, description, remediation.
maxIterations: 50
tools:
builtin: true
compaction:
enabled: true
threshold: 0.8
Customize systemPrompt, model, and provider per agent. The system prompt is the most important part — it defines who the agent is.
2. Talk to an agent
ra --config /tmp/ra-agents/security-auditor/ra.config.yaml \
--cli "Audit src/auth/ for security issues"
3. Continue the conversation
ra --config /tmp/ra-agents/security-auditor/ra.config.yaml \
--cli "Now check the fix I made to src/auth/login.ts" \
--resume
The --resume flag (without an ID) resumes the latest session, loading the full conversation history so the agent remembers everything from prior messages.
4. Clean up
rm -rf /tmp/ra-agents/security-auditor
Patterns
Iterative refinement
ra --config /tmp/ra-agents/analyst/ra.config.yaml \
--cli "Read src/data/ and identify the data model"
ra --config /tmp/ra-agents/analyst/ra.config.yaml \
--cli "Find all queries that don't use indexes" --resume
ra --config /tmp/ra-agents/analyst/ra.config.yaml \
--cli "Write a summary of optimization opportunities" --resume
rm -rf /tmp/ra-agents/analyst
Parallel specialists
Run multiple agents on different tasks — each has its own config and session:
ra --config /tmp/ra-agents/security-auditor/ra.config.yaml \
--cli "Audit src/auth/" > /tmp/ra-agents/security-auditor/output.txt &
ra --config /tmp/ra-agents/perf-reviewer/ra.config.yaml \
--cli "Profile src/queries/" > /tmp/ra-agents/perf-reviewer/output.txt &
wait
cat /tmp/ra-agents/security-auditor/output.txt
cat /tmp/ra-agents/perf-reviewer/output.txt
Supervised delegation
ra --config /tmp/ra-agents/implementer/ra.config.yaml \
--cli "Add input validation to src/api/users.ts"
ra --config /tmp/ra-agents/implementer/ra.config.yaml \
--cli "The regex for email is too permissive, fix it" --resume
rm -rf /tmp/ra-agents/implementer
Adding skills to an agent
Write skill files before the first call:
/tmp/ra-agents/auditor/skills/owasp/SKILL.md
---
name: owasp
description: OWASP Top 10 security checklist
---
# OWASP Top 10 Checklist
1. **Broken Access Control** — check for...
2. **Cryptographic Failures** — verify that...
Reference in the config:
app:
dataDir: ./.ra
skillDirs: ['./skills']
The agent can activate the skill by typing /owasp in its prompt.
Rules
- Name agents descriptively in the directory name —
security-auditor not agent-1
- Write specific system prompts — vague prompts produce vague agents
- Include context in messages — file paths, requirements, constraints; the agent has no implicit knowledge of your conversation
- Clean up when done —
rm -rf /tmp/ra-agents/<name>
- Iterate, don't recreate — use
--resume to continue conversations instead of starting fresh
- Use appropriate models — lightweight tasks can use cheaper models (haiku), complex reasoning needs stronger ones (sonnet/opus)
- Limit to 2–4 agents — more rarely helps