A multi-agent orchestration framework built on LangChain, LangGraph, and CrewAI patterns. It provides a supervisor-driven StateGraph that routes tasks to specialized agents -- Planner, Researcher, Coder, and Reviewer -- which collaborate through shared memory. The framework supports multiple LLM providers (OpenAI, Anthropic, Azure OpenAI), multiple vector store backends (ChromaDB, Pinecone, Weaviate), and includes tools for web search (Tavily, SerpAPI, DuckDuckGo), sandboxed code execution, and RAG retrieval. Designed for research workflows, development teams, and knowledge-base-backed customer support.
| Component | File | Purpose | Key Dependencies |
|---|---|---|---|
| Orchestrator | src/orchestrator.py | LangGraph StateGraph with supervisor routing | langgraph, langchain |
| Configuration | src/config.py | Dataclass-based config for LLM, vector store, agents | pydantic |
| Base Agent | src/agents/base_agent.py | Abstract base with LLM factory (OpenAI/Anthropic/Azure) | langchain-openai, langchain-anthropic |
| Planner | src/agents/planner.py | Task decomposition into sub-tasks | Base agent |
| Researcher | src/agents/researcher.py | Web search and RAG-based research | Web search tool, vector store |
| Coder | src/agents/coder.py | Code generation with sandboxed execution | Code executor tool |
| Reviewer | src/agents/reviewer.py | Code review and quality assurance | Base agent |
| Web Search | src/tools/web_search.py | Multi-provider web search (Tavily, SerpAPI, DDG) | tavily-python, duckduckgo-search |
| Code Executor | src/tools/code_executor.py | Sandboxed Python code execution | subprocess (stdlib) |
| Vector Store | src/tools/vector_store.py | RAG retrieval from ChromaDB/Pinecone/Weaviate | langchain-chroma, chromadb |
| Shared Memory | src/memory/conversation.py | Thread-safe shared memory for inter-agent communication | threading (stdlib) |
orchestrator.run().| Control | Implementation |
|---|---|
| API Key Management | Environment variables via python-dotenv; supports OpenAI, Anthropic, and Azure keys |
| Sandboxed Execution | Code executor runs Python in isolated subprocess with resource limits |
| Recursion Limit | Configurable graph recursion limit prevents runaway agent loops |
| Agent Timeout | Per-agent execution timeout (default 300s) |
| Thread Safety | Shared memory uses thread-safe locking for concurrent agent access |
| Input Validation | Pydantic v2 models for all configuration structures |
Clinical research teams with medical literature RAG. HIPAA-compliant data retrieval with filtered vector stores. Medical coding assistance agents.
Financial analysis research with regulatory document RAG. Automated due diligence report generation. Compliance review agents for SEC filings.
Policy analysis and legislative research. Classified-environment compatible with air-gapped LLM providers. Multi-agency knowledge base aggregation.
Product catalog research and competitive analysis. Customer support with product knowledge RAG. Automated content generation for marketing.
Developer documentation assistance. Automated code review and quality gates. Technical support with codebase-aware RAG retrieval.
| Variable | Required | Default | Description |
|---|---|---|---|
OPENAI_API_KEY | Yes* | -- | OpenAI API key (*or use another provider) |
ANTHROPIC_API_KEY | No | -- | Anthropic API key (alternative provider) |
AZURE_OPENAI_API_KEY | No | -- | Azure OpenAI API key (alternative provider) |
LLM_PROVIDER | No | openai | LLM provider: openai, anthropic, azure_openai |
LLM_MODEL | No | gpt-4o | Model identifier |
LLM_TEMPERATURE | No | 0.0 | Sampling temperature |
LLM_MAX_TOKENS | No | 4096 | Maximum output tokens |
TAVILY_API_KEY | No | -- | Tavily search API key (preferred search) |
SERPAPI_API_KEY | No | -- | SerpAPI key (fallback search) |
git clone https://github.com/your-org/langchain-multi-agent-framework.git
cd langchain-multi-agent-framework
python -m venv .venv
source .venv/bin/activate
pip install -e ".[search,dev]"
cp .env.example .env
python -m examples.research_team
# Install with preferred vector store:
pip install -e ".[search]" # ChromaDB (default)
pip install -e ".[search,pinecone]" # Pinecone
pip install -e ".[search,weaviate]" # Weaviate
# Run as async service:
# await orchestrator.arun("task")
| Repository | github.com/your-org/langchain-multi-agent-framework |
| README | README.md |
| Changelog | CHANGELOG.md |
| License | MIT License |