| iterations | ||
| public | ||
| .env.example | ||
| .gitattributes | ||
| .gitignore | ||
| archon_graph.py | ||
| crawl_pydantic_ai_docs.py | ||
| langgraph.json | ||
| LICENSE | ||
| pydantic_ai_coder.py | ||
| README.md | ||
| requirements.txt | ||
| site_pages.sql | ||
| streamlit_ui.py | ||
Archon - AI Agent Builder
🚀 **CURRENT VERSION** 🚀
[ 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.
Vision
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
Project Evolution
V1: Single-Agent Foundation
- Basic RAG-powered agent using Pydantic AI
- Supabase vector database for documentation storage
- Simple code generation without validation
- Learn more about V1
V2: Current - Agentic Workflow (LangGraph)
- 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
Future Iterations
- 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
Future Integrations
- Docker
- LangSmith
- MCP
- Other frameworks besides Pydantic AI
- Other vector databases besides Supabase
Getting Started with V2 (current version)
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.
Prerequisites
- Python 3.11+
- Supabase account and database
- OpenAI/OpenRouter API key or Ollama for local LLMs
- Streamlit (for web interface)
Installation
- 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.exampleto.env - Edit
.envwith 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
Quick Start
-
Set up the database:
- Execute
site_pages.sqlin 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!
Architecture
Current V2 Components
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
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)
);
Contributing
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, please feel free to submit a Pull Request.
License
For version-specific details: