Agent Types
BioAgents includes 7 core agents:File Upload Agent
Parses and stores uploaded datasets with AI-generated descriptions
Planning Agent
Creates research plans based on user questions and current state
Literature Agent
Searches scientific literature across multiple backends
Analysis Agent
Performs data analysis on uploaded datasets
Hypothesis Agent
Generates research hypotheses from findings
Reflection Agent
Extracts insights and updates methodology
Discovery Agent
Identifies novel scientific claims with evidence
Reply Agent
Generates user-facing responses
Agent Architecture
Independent Functions
Each agent is a self-contained function that:- Takes specific inputs
- Performs a single responsibility
- Returns structured outputs
- Does not directly modify global state
State Management
Agents read from and write to two types of state:- Message State: Ephemeral, tied to a single message
- Conversation State: Persistent across the entire conversation
Agent Collaboration
Chat Mode
In chat mode, agents execute sequentially:Deep Research Mode
In deep research mode, agents execute in an iterative cycle:Creating Custom Agents
You can create custom agents for specialized tasks. See the Custom Agents guide for details.Agent Template
Best Practices
Keep agents focused
Keep agents focused
Each agent should have a single, clear responsibility. Don’t create “god agents” that do everything.
Make agents reusable
Make agents reusable
Design agents to work across different routes and contexts. Avoid route-specific logic.
Use structured outputs
Use structured outputs
Return TypeScript types with clear fields. This makes agents composable and testable.
Log extensively
Log extensively
Use structured logging for debugging and monitoring. Include timing information.
Handle errors gracefully
Handle errors gracefully
Catch errors and return informative error messages. Don’t let one agent crash the entire workflow.
Next Steps
Architecture
Understand the overall system design
Deep Research
Learn about the iterative research cycle
Custom Agents
Build your own specialized agents