Skip to content

Commit 65b7494

Browse files
docs(agents): finalize agent docs refresh and clean up content
Consolidate and refine agent documentation across pages (agent-reference, creating-new-agents, customizing-agents); clarify control flow, add domain-specific guidance, and normalize formatting. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
1 parent c14507a commit 65b7494

File tree

3 files changed

+13
-47
lines changed

3 files changed

+13
-47
lines changed

web/src/content/agents/agent-reference.mdx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ Complete reference for all agent configuration fields and tools.
1212
## Key Terms
1313

1414
**Agent Template:** JSON file defining agent behavior
15+
1516
**Spawnable Agents:** Sub-agents this agent can create
17+
1618
**Tool Names:** Capabilities (read files, run commands, etc.)
19+
1720
**Output Mode:** Response format (last message, report, all messages)
21+
1822
**Prompt Schema:** Input validation rules
1923

2024
## Agent Configuration
@@ -206,13 +210,15 @@ Programmatically control the agent's execution using a TypeScript generator func
206210

207211
**What You Can Yield:**
208212

213+
<MarkdownTable>
209214
| Yield Value | What It Does |
210215
|------------|-------------|
211216
| Tool call object | Execute a specific tool and get its result |
212-
| `'STEP'` | Run agent's LLM for one generation step |
213-
| `'STEP_ALL'` | Let agent run until completion |
214-
| `return` | End the agent's turn immediately |
215-
217+
| 'STEP' | Run agent's LLM for one generation step |
218+
| 'STEP_ALL' | Let agent run until completion |
219+
| return | End the agent's turn immediately |
220+
</MarkdownTable>
221+
216222
**Tool Call Pattern:**
217223
```typescript
218224
const { toolResult, toolError } = yield {
@@ -240,7 +246,7 @@ handleSteps: function* ({ agentState, prompt, params }) {
240246
}]
241247
}
242248
}
243-
249+
244250
// Let the agent take over from here
245251
yield 'STEP_ALL'
246252
}
@@ -282,7 +288,7 @@ JSON Schema definitions for validating prompt and params when spawning the agent
282288
toolName: 'read_files',
283289
input: { paths: files.slice(0, 10) }
284290
}
285-
291+
286292
// 3. Conditionally spawn different agents based on content
287293
if (fileContents?.includes('security')) {
288294
yield {

web/src/content/agents/creating-new-agents.mdx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -308,22 +308,3 @@ handleSteps: function* ({ agentState, prompt, params }) {
308308
- Agent needs creative freedom
309309
- Natural language understanding is key
310310
- Workflow is simple and linear
311-
312-
```
313-
**.agents/prompts/doc-writer-system.md**
314-
}
315-
316-
**.agents/prompts/migration-guidelines.md**
317-
You can also reference external files for prompts:
318-
319-
```typescript
320-
systemPrompt: {
321-
path: "./prompts/doc-writer-system.md"
322-
## Programmatic Agents
323-
**Coming Soon** - Use JavaScript/TypeScript for complex orchestration logic.
324-
## Best Practices
325-
1. **Start small** - Begin with simple agents before complex ones
326-
2. **Experiment** - Try different tool/prompt combinations
327-
3. **Share** - Version control your `.agents/` directory
328-
4. **Iterate** - Improve based on usage
329-
5. **Coordinate agents** - Use `spawnerPrompt` to help other agents understand when to spawn your agent

web/src/content/agents/customizing-agents.mdx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,7 @@ Create specialized agents from scratch using TypeScript files in the `.agents/`
2121

2222
Agents adapt to your specific workflow and project needs.
2323

24-
Keep in mind you'll get the most value from agents if you treat them as context window managers. Design them to orchestrate and sequence work so the right files, facts, and decisions are in scope at each step. Break tasks into steps and build agents around controlling that flow — instead of trying to replicate human specialties.
25-
26-
<MarkdownTable>
27-
| Aspect | Context manager agents | Specialty reviewer agents |
28-
| --- | --- | --- |
29-
| Primary job | Orchestrate multi-step workflows and manage context | Perform deep, targeted reviews or focused changes |
30-
| Best for | Cross-cutting tasks across many files/systems | Narrow audits or checks inside a workflow |
31-
| Spawns others | ✅ Often (researchers, reviewers, fixers) | ➖ Usually spawned by a manager |
32-
| State & checkpoints | Owns plan, state, and checkpoints | Stateless or minimal state |
33-
| Typical tools | read_files, code_search, spawn_agents, run_terminal_command, end_turn | read_files, code_search, str_replace (surgical diffs) |
34-
| Output style | Plans, orchestrated diffs, verification steps | Findings, specific diffs, pass/fail signals |
35-
| Examples | Migration Coordinator, PR Shepherd, Incident Triage Conductor, Release Cut Captain | Accessibility Reviewer, API Contract Enforcer, Performance Auditor, Security Reviewer |
36-
| When to use | Complex multi-file changes needing coordination | Precise validation or localized refactors |
37-
</MarkdownTable>
38-
39-
Design checklist (use this to shape agents around task breakdown and context control):
40-
- Define the end state: what must be true when done?
41-
- List concrete steps; group them into phases (plan → edit → verify)
42-
- For each step: what files/data must be in context? how will you prove success?
43-
- Decide which steps spawn subagents (reviewer, researcher, fixer) vs. inline logic
44-
- Capture state and checkpoints so you can resume/recover deterministically
45-
- Prefer small, surgical diffs; verify before moving to the next phase
24+
Keep in mind you'll get the most value from agents if you treat them as context window managers. Design them to orchestrate and sequence work so the right files, facts, and decisions are in scope at each step. Break tasks into steps and build agents around controlling that flow instead of trying to replicate human specialties.
4625

4726
**Tip:** Use specialty reviewers as spawnable subagents that your context-manager agent calls at the right time in the workflow.
4827

0 commit comments

Comments
 (0)