Purpose and responsibility
The research agent:- Searches code using exact identifiers and semantic queries
- Searches existing documentation for related content
- Filters and translates technical findings into user-facing language
- Records findings to the blackboard with relevance scores
- Focuses on product capabilities and user workflows
Agent creation
research.ts
Tool requirements
research.ts
- DocTools - Search and read documentation files
- CodebaseTools (partial) - Search code with exact or semantic queries
- Blackboard read tools - Read existing findings
- Blackboard write tools - Write new findings and mark research complete
Workflow
Search strategy
The research agent uses the right search tool for each query:Code search (exact)
Usecode_search for exact identifiers or regex patterns:
- Type names, function names, constants
- Specific implementation patterns
- Exact string matches
Semantic code search
Usesemantic_code_search for conceptual or natural language queries:
- “where do we handle authentication”
- “how are notifications sent”
- “what validates user input”
Documentation search
Usesearch_docs to find related documentation:
- Existing pages about the same topic
- Pages that need updating
- Navigation structure and organization
Critical rules
- Use the appropriate search tool for each query type
- Translate code findings into user-facing language
- Focus on product capabilities and user workflows, not code structure
- Record what users can do, not implementation details
Finding format
Each finding recorded to the blackboard includes:- Summary - Clear description of what was found
- File path - Source location (if applicable)
- Relevance score - 0 to 1 indicating importance
- Type - One of:
code,doc,api, orconcept
Blackboard communication
The research agent writes findings to the blackboard:Output guidelines
- Be concise but complete
- Write findings for non-technical users
- Don’t ask for confirmation—proceed automatically
- Don’t use filler phrases like “I can help with…”
- Describe features in terms of what users can accomplish
Termination rules
The research agent stops when:mark_research_completeis called (expected termination)- The step count reaches 15 (safety limit)
research.ts
Model configuration
The research agent uses the fast model tier for high-volume reading:research.ts
config.agents.runtime.research.