[ V2 - Agentic Workflow ] Using LangGraph + Pydantic AI for multi-agent orchestration and planning
Archon is an AI meta-agent designed to autonomously build, refine, and optimize other AI agents.
It serves both as a practical tool for developers and as an educational framework demonstrating the evolution of agentic systems. Archon will be developed in iterations, starting with just a simple Pydantic AI agent that can build other Pydantic AI agents, all the way to a full agentic workflow using LangGraph that can build other AI agents with any framework. Through its iterative development, Archon showcases the power of planning, feedback loops, and domain-specific knowledge in creating robust AI agents.
The current version of Archon is V2 as mentioned above - see V2 Documentation for details.
Archon demonstrates three key principles in modern AI development:
- Agentic Reasoning: Planning, iterative feedback, and self-evaluation overcome the limitations of purely reactive systems
- Domain Knowledge Integration: Seamless embedding of frameworks like Pydantic AI and LangGraph within autonomous workflows
- Scalable Architecture: Modular design supporting maintainability, cost optimization, and ethical AI practices
- Basic RAG-powered agent using Pydantic AI
- Supabase vector database for documentation storage
- Simple code generation without validation
- Learn more about V1
- Multi-agent system with planning and execution separation
- Reasoning LLM (O3-mini/R1) for architecture planning
- LangGraph for workflow orchestration
- Support for local LLMs via Ollama
- Learn more about V2
- V3: Self-Feedback Loop - Automated validation and error correction
- V4: Tool Library Integration - Pre-built external tool incorporation
- V5: Multi-Framework Support - Framework-agnostic agent generation
- V6: Autonomous Framework Learning - Self-updating framework adapters
- Docker
- LangSmith
- MCP
- Other frameworks besides Pydantic AI
- Other vector databases besides Supabase
Since V2 is the current version of Archon, all the code for V2 is in both the archon
and archon/iterations/v2-agentic-workflow
directories.
- Python 3.11+
- Supabase account and database
- OpenAI/OpenRouter API key or Ollama for local LLMs
- Streamlit (for web interface)
- Clone the repository:
git clone https://github.com/coleam00/archon.git
cd archon
- Install dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Configure environment:
- Rename
.env.example
to.env
- Edit
.env
with your settings:
BASE_URL=https://api.openai.com/v1 for OpenAI, https://api.openrouter.ai/v1 for OpenRouter, or your Ollama URL LLM_API_KEY=your_openai_or_openrouter_api_key OPENAI_API_KEY=your_openai_api_key # Required for embeddings SUPABASE_URL=your_supabase_url SUPABASE_SERVICE_KEY=your_supabase_service_key PRIMARY_MODEL=gpt-4o-mini # Main agent model REASONER_MODEL=o3-mini # Planning model
- Rename
-
Set up the database:
- Execute
site_pages.sql
in your Supabase SQL Editor - This creates tables and enables vector similarity search
- Execute
-
Crawl documentation:
python crawl_pydantic_ai_docs.py
- Launch the UI:
streamlit run streamlit_ui.py
Visit http://localhost:8501
to start building AI agents!
archon_graph.py
: LangGraph workflow and agent coordinationpydantic_ai_coder.py
: Main coding agent with RAG capabilitiescrawl_pydantic_ai_docs.py
: Documentation processorstreamlit_ui.py
: Interactive web interfacesite_pages.sql
: Database schema
CREATE TABLE site_pages (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
url TEXT,
chunk_number INTEGER,
title TEXT,
summary TEXT,
content TEXT,
metadata JSONB,
embedding VECTOR(1536)
);
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, please feel free to submit a Pull Request.
For version-specific details: