Back to Projects

CAG Deep Research

Multi-agent research automation with LangGraph orchestration.

LangGraphMulti-AgentRAGOllama
Code

Agent Pipeline

Query
Search
Analyze
Verify
Synthesize
Report

Query → 5+ specialized agents → Comprehensive research report

Specialized Agents

Orchestrator
Decomposes queries
Web Searcher
Finds sources
Analyzer
Extracts info
Fact Checker
Validates claims
Synthesizer
Combines findings
Editor
Refines output

Hexagonal Architecture

Domain (Core)
Research WorkflowAgent CoordinationState Machine
Ports (Interfaces)
LLMPortSearchPortStoragePort
Adapters (Impl)
OllamaOpenAITavilyPostgreSQL

Hybrid LLM Strategy

Local (Ollama)
Llama 3, Mistral

Content analysis, summarization, extraction — commodity tasks at 1/10th cost

Cloud (Fallback)
GPT-4, Claude

Fact-checking, synthesis, complex reasoning — premium tasks requiring quality

5+
Specialized Agents
50+
Sources per Query
~70%
Cost Reduction
<15m
Full Research Cycle
"Multi-agent systems excel when tasks have natural decomposition boundaries. Research has clear phases—search, analyze, verify, synthesize—that map perfectly to specialized agents."
Built in 10 days with hexagonal architecture