Agent roles
Five agents work together to produce documentation:Orchestrator
Coordinates the workflow, delegates tasks, and tracks overall progress
Research agent
Searches code and docs to discover what needs documenting
Planner agent
Creates structured outlines from research findings
Writer agent
Generates quality documentation from approved plans
User interaction agent
Formats information and gets user approvals
Orchestrator
The orchestrator is the top-level agent that coordinates all work. It never sees raw file content—only summaries and IDs from the blackboard.Responsibilities
- Parse user requests into doc targets
- Delegate research, planning, and writing to specialist agents
- Track session progress and prevent redundant work
- Handle multi-target workflows and dependencies
- Call
finish_sessionwhen all work is complete
Tools
The orchestrator has access to:- Session management:
create_doc_target,check_session_status,mark_target_complete - Delegation:
delegate_research,delegate_planning,delegate_writing,delegate_user_interaction - Blackboard:
blackboard_read_summary(read-only access) - Workflow:
finish_session
Session awareness
Before each decision, the orchestrator receives an injected session state summary:- Creating duplicate doc targets for the same request
- Re-researching when findings already exist
- Re-planning when an approved plan is ready
- Continuing to run after all targets are complete
The orchestrator uses the
planning model (GPT-5.2 by default) because it coordinates complex workflows with many decision points.Termination
The orchestrator stops when:- It calls
finish_session(preferred) - All doc targets reach status “complete” (safety net)
- It reaches the max step count of 30 (hard limit)
Research agent
The research agent discovers information about what to document by searching code and existing docs.Responsibilities
- Execute 5-8 targeted searches across code and docs
- Translate code findings into user-facing language
- Record findings to the blackboard with relevance scores
- Focus on product capabilities, not implementation details
Tools
The research agent has access to:- Code search:
code_search(regex),semantic_code_search(natural language) - Doc search:
search_docs - Blackboard:
blackboard_write_finding,blackboard_read_findings,mark_research_complete
Search strategy
The agent chooses search tools based on query type:Findings format
Each finding is written to the blackboard with structured metadata:The research agent uses the
fast model (Claude Haiku by default) because it performs many simple, high-volume operations.Termination
The research agent stops when:- It calls
mark_research_complete(preferred) - It reaches the max step count of 15 (hard limit)
Planner agent
The planner creates structured documentation outlines from research findings.Responsibilities
- Read findings for a doc target
- Analyze existing navigation structure
- Create a clear outline with sections mapped to findings
- Write the plan to the blackboard
- Submit the plan immediately without iteration
Tools
The planner has access to:- Doc structure:
read_nav(analyze navigation),read_doc(check existing pages) - Blackboard:
blackboard_read_findings,blackboard_write_plan,submit_plan
Planning principles
The planner follows specific guidelines encoded in its system prompt:- Reorganize over add: Consolidate messy docs rather than creating new pages
- Update over create: Prefer updating existing docs
- Consolidate over duplicate: Merge similar content
- Delete ruthlessly: Remove outdated or technical sections
- User intent over product structure: Organize by what users want to do
Navigation awareness
The planner callsread_nav to understand how docs are currently organized:
- Where new pages should go (which group)
- Whether to split content across pages or consolidate
- How to name pages to fit existing conventions
Example: Plan outline
Example: Plan outline
The planner uses the
fast model because planning is more about structure than prose quality.Termination
The planner stops when:- It calls
submit_plan(preferred) - It reaches the max step count of 12 (hard limit)
Writer agent
The writer generates quality documentation from approved plans.Responsibilities
- Read the approved plan and associated findings
- Read source files for context
- Write clear, user-facing documentation with proper structure
- Create or update MDX files
- Record artifacts to the blackboard
Tools
The writer has access to:- File operations:
read_file,read_doc,create_doc,update_doc - Navigation:
read_nav - Blackboard:
blackboard_read_plan,blackboard_read_finding,blackboard_write_artifact,mark_writing_complete - User interaction:
suggest_media(flag where images/videos would help)
Writing guidelines
The writer follows strict content principles: Audience: Non-technical users who want to know what they can do, not how it’s built Avoid:- Function names, component names, code internals
- Marketing speak (“powerful”, “seamlessly”, “robust”)
- Buzzwords (“leverage”, “utilize”, “streamline”)
- Filler phrases (“it’s important to note that”)
- Clear, actionable explanations
- Mintlify components for structure (
<Steps>,<Tabs>,<Accordion>) - Concrete examples and outcomes
- Sentence case for headings
Component usage
The writer knows when to use Mintlify components:<Steps>: Multi-step procedures with clear sequence<Tabs>: Same content differs by role/platform/version<Accordion>: Optional or advanced content users may skip<Card>/<CardGroup>: Navigation to related pages<Info>/<Warning>/<Tip>: Important callouts
Artifact creation
Every file the writer creates or updates becomes an artifact:The writer uses the
prose model (Claude Sonnet by default) because content quality is critical for user-facing documentation.Termination
The writer stops when:- It calls
mark_writing_complete(preferred) - It reaches the max step count of 20 (hard limit)
User interaction agent
The user interaction agent handles communication between Docbot and the user.Responsibilities
- Format plans and summaries in a clear, readable way
- Present options and questions to users
- Get approvals and feedback
- Return structured responses to the orchestrator
Tools
The user interaction agent has access to:- Interaction:
ask_user,present_options - Blackboard:
blackboard_read_plan,mark_interaction_complete
Approval workflow
When the orchestrator delegates plan approval:
The orchestrator receives the approval status and updates the blackboard accordingly.
The user interaction agent uses the
fast model because it’s formatting structured data, not generating prose.Termination
The user interaction agent stops when:- It calls
mark_interaction_complete(preferred) - It reaches the max step count of 10 (hard limit)
Agent communication
Agents don’t call each other directly—they communicate through the blackboard.Delegation flow
- Agents can run in different processes or even different machines
- Execution can be paused and resumed
- Session state persists across restarts (if using a persistent database)
Blackboard operations
Common blackboard operations by agent:| Agent | Read | Write |
|---|---|---|
| Orchestrator | Session summary | Doc targets, status updates |
| Research | Existing findings | New findings |
| Planner | Findings for target, existing docs | Plans |
| Writer | Plan, findings, files | Artifacts |
| User interaction | Plans, session summary | (none - read-only) |
Model selection
Each agent uses a different model based on its needs:- Orchestrator: Needs reasoning capability for complex workflows → expensive model
- Writer: Needs prose quality for user-facing docs → prose-focused model
- Research/planner/user: Structured tasks with clear prompts → cheap, fast model
Runtime configuration
You can customize agent behavior indocbot.config.jsonc:
maxRetries: How many times to retry failed tool callsproviderOptions: Provider-specific options (e.g., Anthropic cache control)