Enterprise-grade multi-agent research system powered by VoltAgent
Documentation β’ VoltOps Platform β’ Discord β’ Examples
Mastervolt Deep Research is a sophisticated multi-agent orchestration system built on VoltAgent that automates complex research workflows. It combines specialized AI agents, semantic memory, intelligent tooling, and custom web scraping to conduct comprehensive research, verify facts, analyze data, and generate publication-ready reports.
- π€ Multi-Agent Orchestration - PlanAgent-supervised coordination of 14+ specialized agents
- π§ Semantic Memory - LibSQL-backed vector storage with Google text embeddings
- π Custom Web Scraping - Purpose-built web scraper toolkit for research data collection
- π Data Analysis - ArXiv integration, data conversion, filesystem operations, and visualization
- β Fact Checking - Automated verification with custom claim checking and bias detection tools
- π Report Generation - PhD-level research reports with citations and structured formatting
- π¨ Rich AI UI System - Specialized
ai-elementsfor visualizing agent thoughts, tool executions, and artifacts - π¨βπ» Expanded Agent Suite - New specialized agents for Coding, Data Science, and Content Curation
- π¬ Interactive Chat Interface - Built-in Next.js chat interface for real-time agent interaction
- π A2A Communication - Agent-to-agent message passing and shared state management
- π Observability - OpenTelemetry tracing with VoltOps platform integration
- π― Type Safety - Zod schema validation throughout the workflow chain
%%{init: {'theme': 'dark', 'themeVariables': { 'background': 'transparent', 'primaryColor': '#8B5CF6', 'lineColor': '#3B82F6', 'primaryTextColor': '#ffffff', 'nodeBkg': '#0b0b0d', 'clusterBkg': 'transparent', 'edgeLabelBackground': 'transparent', 'sectionBkgColor': 'transparent', 'altSectionBkgColor': 'transparent', 'textColor': '#ffffff', 'fontFamily':'"Inter", Arial, sans-serif', 'stroke': '#3B82F6' }}}%%
graph TB
User[User] -->|Submits Research Topic| PlanAgent[Plan Agent]
PlanAgent -->|Generates Queries| Assistant[Assistant Agent]
PlanAgent -->|Scrapes Web Data| Scrapper[Scrapper Agent]
PlanAgent -->|Analyzes Data| DataAnalyzer[Data Analyzer Agent]
PlanAgent -->|Verifies Facts| FactChecker[Fact Checker Agent]
PlanAgent -->|Synthesizes Info| Synthesizer[Synthesizer Agent]
PlanAgent -->|Writes Report| Writer[Writer Agent]
Scrapper -->|Web Content| DataAnalyzer
DataAnalyzer -->|Insights| Synthesizer
FactChecker -->|Verified Claims| Synthesizer
Synthesizer -->|Structured Data| Writer
Writer -->|Final Report| User
subgraph "Memory Layer"
Memory[(LibSQL Memory)]
Vector[(Vector Store)]
end
PlanAgent -.->|Stores Context| Memory
Assistant -.->|Embeddings| Vector
Writer -.->|Retrieves| Memory
subgraph "Observability"
VoltOps[VoltOps Platform]
Telemetry[(Traces DB)]
end
PlanAgent -.->|Metrics| Telemetry
Telemetry -.->|Syncs| VoltOps
%%{init: {'theme': 'dark', 'themeVariables': { 'background': 'transparent', 'primaryColor': '#8B5CF6', 'lineColor': '#3B82F6', 'primaryTextColor': '#ffffff', 'nodeBkg': '#0b0b0d', 'clusterBkg': 'transparent', 'edgeLabelBackground': 'transparent', 'sectionBkgColor': 'transparent', 'altSectionBkgColor': 'transparent', 'textColor': '#ffffff', 'fontFamily':'"Inter", Arial, sans-serif', 'stroke': '#3B82F6' }}}%%
graph LR
subgraph "Agents Layer"
A1[Assistant Agent]
A2[Writer Agent]
A3[Plan Agent]
A4[Data Analyzer]
A5[Fact Checker]
A6[Synthesizer]
A7[Scrapper]
end
subgraph "Tools & Toolkits"
T1[Reasoning Toolkit]
T2[Debug Tool]
T3[ArXiv Toolkit]
T4[Web Scraper Toolkit]
T5[Data Conversion Toolkit]
T6[Filesystem Toolkit]
T7[Visualization Toolkit]
end
subgraph "External Services"
E1[Google AI / Gemini]
E2[OpenAI]
E3[MCP]
end
A1 --> T1
A1 --> T2
A3 --> T1
A4 --> T3
A4 --> T5
A4 --> T7
A7 --> T4
A7 --> T6
A1 --> E1
A2 --> E1
A3 --> E1
A4 --> E1
A5 --> E1
A6 --> E1
A7 --> E1
A4 --> E2
A3 --> E3
- Node.js 18+
- npm, pnpm, or yarn
- Google Generative AI API key (required)
- Supabase account (optional, for A2A task storage)
# Clone the repository
git clone https://github.com/ssdeanx/Mastervolt-Deep-Research.git
cd Mastervolt-Deep-Research
# Install dependencies
npm install
# Set up environment variables
cp .env.example .envEdit .env with your API keys:
GOOGLE_GENERATIVE_AI_API_KEY='your_google_generative_ai_api_key_here'
# Optional: For A2A task storage
# SUPABASE_URL='your_supabase_url_here'
# SUPABASE_KEY='your_supabase_key_here'# Development mode with auto-reload (Agents)
npm run dev
# Start Next.js UI (Chat Interface)
npm run next
# Build for production
npm run build
# Start production server
npm startYou can interact with the agents through the built-in Chat Interface:
- Start the Next.js application:
npm run next - Open http://localhost:3000 in your browser
- Use the chat interface to submit research topics
Alternatively, use the VoltOps Platform for workflow management.
Purpose: Orchestrates the entire research workflow and coordinates all specialized agents. Replaces the previous Director Agent.
Tools:
- Reasoning Toolkit (think-only mode)
- Filesystem Toolkit (ls, read, write, edit, grep)
Key Features:
- Supervises 6+ sub-agents
- Custom handoff guidelines for workflow optimization
- Full stream event forwarding for real-time monitoring
- Manages research tasks and subtasks
Purpose: Implements code features, fixes bugs, and refactors code with a focus on TypeScript and VoltAgent patterns.
Tools:
code_analysis_toolkit- Structural analysis of codebasefilesystem_toolkit- File operationsgit_toolkit- Version control operationstest_toolkit- Test execution and validation
Key Features:
- Low temperature (0.2) for precision
- Specialized prompts for implementation tasks
- Lifecycle hooks for operation tracking
Purpose: Performs statistical analysis, exploratory data analysis (EDA), and generates data-driven hypotheses.
Tools:
data_processing_toolkit- Data cleaning, normalization, and aggregationthink_only_toolkit- Reasoning capabilities
Key Features:
- Dynamic model selection (Flash vs. Preview) based on complexity
- Statistical methodology enforcement (p-values, effect sizes)
- Automated data quality assessment
Purpose: Generates effective search queries and coordinates research strategy
Tools:
get_weather- Example custom tool for weather queries- Reasoning Toolkit (think-only mode)
- Debug Tool - Context inspection and logging
Key Features:
- Query optimization for comprehensive research coverage
- Integration with semantic memory for context-aware queries
- Customizable search strategies via prompt parameters
Purpose: Extracts and collects data from web sources using custom web scraper toolkit
Tools: Web Scraper Toolkit with:
scrape_webpage_markdown- Full webpage conversion to clean Markdownextract_code_blocks- Code extraction with surrounding contextextract_structured_data- Headings, links, tables, lists, metadataextract_text_content- Clean text extractionbatch_scrape_pages- Recursive batch scraping with depth control
Key Features:
- Respects robots.txt and rate limiting
- Graceful error handling with retry logic
- Configurable depth for link following
- Pattern-based URL filtering (include/exclude)
- Markdown output with embedded code blocks
Purpose: Analyzes research data, extracts patterns, and generates data-driven insights
Tools:
analyze_data_patterns- Pattern, trend, correlation, and anomaly detectionextract_key_insights- Insight extraction with focus areas- Reasoning Toolkit (think-only mode)
- ArXiv Toolkit:
arxiv_search- Academic paper search via arXiv APIarxiv_pdf_extract- PDF text extraction with page limits
Key Features:
- Multi-type analysis (patterns, trends, correlations, anomalies)
- Focus-specific insight generation
- Data quality assessment and recommendations
- Lower temperature (0.3) for consistent analysis
Purpose: Verifies information accuracy, detects bias, and ensures research integrity
Tools:
verify_claim- Claim verification with confidence scoringcross_reference_sources- Multi-source consistency analysisdetect_bias- Bias detection with credibility scoring- Reasoning Toolkit (think-only mode)
Key Features:
- Multi-level confidence ratings (High/Medium/Low)
- Source cross-referencing for consensus detection
- Content-type specific bias analysis (academic, article, report, social media)
- Credibility scoring (0-100 scale)
- Very low temperature (0.2) for factual consistency
Purpose: Combines multiple research streams, resolves contradictions, creates unified narratives
Tools:
synthesize_information- Multi-source integration with theme extractionresolve_contradictions- Contradiction identification and resolutioncreate_unified_narrative- Coherent narrative construction- Reasoning Toolkit (think-only mode)
Key Features:
- Thematic integration across sources
- Evidence-based contradiction resolution
- Gap identification and recommendations
- Moderate temperature (0.4) for creative synthesis
Purpose: Composes comprehensive research reports with citations and structured formatting
Tools: None (focused on pure writing and synthesis)
Key Features:
- PhD-level academic writing capability
- Quality levels from elementary (10%) to expert (100%)
- Markdown formatting with proper structure
- Citation management with footnote notation
- Tone and style customization
- Comprehensive instructions for research report standards
src/
βββ app/ # Next.js App Router (UI)
β βββ api/ # API Routes (Chat, Health, Messages)
β βββ dashboard/ # User Dashboard & Protected Routes
β βββ documentation/ # Project Documentation
β βββ ... # Feature pages (About, Pricing, Features)
βββ components/ # React Components
β βββ ai-elements/ # AI UI System (Conversation, Tools, Artifacts)
β βββ ui/ # Design System (Shadcn/Radix primitives)
β βββ chat-interface.tsx # Main Chat Interface
βββ lib/ # Shared Utilities
β βββ resumable-stream.ts # Resumable stream adapters
β βββ utils.ts # Common helpers
βββ voltagent/ # Multi-agent system (Backend)
β βββ index.ts # VoltAgent initialization
β βββ agents/ # 14+ Specialized Agents
β β βββ plan.agent.ts # Deep Research Orchestrator
β β βββ coding.agent.ts # Coding & Implementation
β β βββ data-scientist.agent.ts # Data Analysis & Modeling
β β βββ judge.agent.ts # Quality Evaluation
β β βββ ... (assistant, writer, scrapper, etc.)
β βββ config/ # Configuration
β β βββ mcp.ts # MCP Client Config
β β βββ observability.ts # OpenTelemetry Setup
β β βββ ...
β βββ tools/ # 15+ Domain Toolkits
β β βββ web-scraper-toolkit.ts
β β βββ knowledge-graph-toolkit.ts
β β βββ code-analysis-toolkit.ts
β β βββ ...
β βββ workflows/ # Workflow Chains
β βββ experiments/ # Live Evals & Regression Tests# Run all tests
npm test
# Run tests with coverage
npm run test -- --coverage
# Run specific test pattern
npm run test -- -t "agent"# Lint code
npm run lint# Run evaluations
npm run eval| Technology | Version | Purpose |
|---|---|---|
| VoltAgent Core | ^2.1.5 | Multi-agent orchestration framework |
| TypeScript | 5.9.3 | Type-safe language with strict mode |
| AI SDK | ^6.0.42 | Multi-model AI provider abstraction |
| Google AI SDK | ^3.0.10 | Gemini model integration (primary) |
| OpenAI SDK | ^3.0.12 | GPT model integration (optional) |
| LibSQL | ^2.0.2 | SQLite-based memory & vector storage |
| Zod | 4.1.13 | Runtime schema validation |
| Vitest | 4.0.17 | Testing framework |
| OpenTelemetry | 0.210.0 | Observability & tracing |
| Cheerio | 1.1.2 | HTML parsing for web scraping |
| JSDOM | 27.4.0 | DOM simulation |
| Turndown | 7.2.2 | HTML to Markdown conversion |
| fast-xml-parser | 5.3.3 | XML parsing and building |
| Next.js | 16.1.4 | React Framework for UI |
| React | 19.2.3 | UI Library |
Each agent maintains persistent memory with semantic search capabilities:
- Working Memory: User-scoped context with Zod schemas
- Vector Storage: LibSQL-backed embedding storage
- Semantic Retrieval: Google text-embedding-004 for similarity search
- Caching: Embedding cache for performance optimization (1000 entries, 1 hour TTL)
Agents communicate via the A2A (Agent-to-Agent) protocol:
- Message passing between agents
- Shared state management via Supabase task store
- Event broadcasting
- Request/response patterns
- Task persistence and retrieval
Full tracing and monitoring via OpenTelemetry:
- Automatic trace collection
- VoltOps platform integration
- LibSQL observability adapter
- Sampling strategies (50% ratio-based)
- Batch export to cloud (512 events per batch, 4-second intervals)
Type-safe workflow composition with Zod schemas:
const workflow = createWorkflowChain({
id: 'research-assistant',
name: 'Research Assistant Workflow',
purpose: 'Comprehensive research automation',
input: z.object({ topic: z.string() }),
result: z.object({ text: z.string() }),
})
.andThen({
id: 'research',
execute: async ({ data }) => {
/* ... */
},
})
.andThen({
id: 'writing',
execute: async ({ data, getStepData }) => {
/* ... */
},
})- Lightweight Stack: Uses JSDOM, Cheerio, and Turndown (no headless browser required)
- Full webpage to Markdown conversion
- Code block extraction with context
- Structured data extraction (headings, links, tables, lists)
- Clean text extraction
- Batch scraping with recursive link following
- normalize_data: Flatten nested structures
- detect_format: Auto-detect JSON/CSV/XML/YAML
- convert_format: Format conversion
- validate_schema: Schema validation with error reporting
- aggregate_data: Grouping and statistics
- clean_data: Handling missing values and duplicates
- TypeScript structural analysis (via
ts-morph) - Python code analysis
- Symbol extraction and reference finding
- Graph creation and management
- Relationship mapping
- Centrality and community detection analysis
- Pattern/trend/correlation/anomaly analysis
- Key insight extraction with focus areas
- Claim verification with confidence levels
- Cross-reference analysis for consensus
- Bias detection with credibility scoring
- Multi-source information synthesis
- Contradiction resolution with multiple strategies
- Unified narrative creation
- Academic paper search via arXiv API
- PDF text extraction with page limits
- CSV to JSON conversion
- JSON to CSV conversion
- XML parsing
- XML building
- Glob pattern file finding
- Batch file reading
- File statistics and metadata
- Excalidraw to SVG conversion
- SVG to JSON conversion
- JSON to SVG conversion
- SVG optimization
- Academic Research: Literature review automation, citation management, arXiv integration
- Market Intelligence: Competitive analysis, trend identification via web scraping
- Technical Documentation: API documentation generation, knowledge base creation
- Investigative Journalism: Fact-checking with bias detection, source verification, report compilation
- Due Diligence: Company research, risk assessment, compliance verification
- VoltAgent Documentation: voltagent.dev/docs
- VoltOps Platform: console.voltagent.dev
- Discord Community: s.voltagent.dev/discord
- Blog: voltagent.dev/blog
Built with VoltAgent - the open-source TypeScript framework for building and orchestrating AI agents.