AgentKit
January 4, 2026 Β· View on GitHub
Modern multi-agent AI assistant with LangGraph & AG-UI
π TiαΊΏng Viα»t | English
Build powerful AI applications with real-time streaming, interactive UI components, and multi-agent orchestration.

β¨ Features
- ποΈ A2UI Protocol: Agents generate interactive UI components (checkboxes, forms, buttons) in chat
- π¨ Canvas Mode: Full-screen workspace for complex agent workflows
- π Multi-Agent Orchestration: LangGraph-powered workflow management
- β‘ Real-time Streaming: AG-UI protocol with instant agent feedback
- π¬ Thread Management: Persistent conversation threads with SQLite/PostgreSQL
- π― Modern Stack: NextJS + Shadcn UI + FastAPI + LangGraph
- π Multi-LLM Support: Ollama, Azure OpenAI, Gemini, and more
- π‘οΈ Type-Safe: TypeScript frontend, Python type hints backend
- π Observability: Optional LangFuse integration
π Getting Started
Prerequisites
- Python 3.10+ and Node.js 18+
- Ollama (or configure Azure OpenAI/Gemini):
curl -fsSL https://ollama.com/install.sh | sh ollama pull qwen:7b
Backend Setup
cd backend
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment (optional)
cp .env.example .env
# Edit .env for Azure OpenAI, Gemini, or PostgreSQL
# Run database migrations
python migrate.py
# Start server
python main.py
β
Backend running at http://localhost:8000
Frontend Setup
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
β
Frontend running at http://localhost:3000
ποΈ Database Configuration
SQLite (default - zero config):
DATABASE_URL=sqlite+aiosqlite:///./agentkit.db
PostgreSQL (production):
DATABASE_URL=postgresql+asyncpg://user:password@localhost:5432/agentkit
Run migrations after any config change:
python migrate.py
π LLM Provider Configuration
Edit .env in backend directory:
Ollama (default):
DEFAULT_PROVIDER=ollama
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=qwen:7b
Azure OpenAI:
DEFAULT_PROVIDER=azure-openai
AZURE_OPENAI_API_KEY=your_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_DEPLOYMENT=gpt-5-mini
Gemini:
DEFAULT_PROVIDER=gemini
GEMINI_API_KEY=your_key
GEMINI_MODEL=gemini-2.5-flash
ποΈ Architecture
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β Frontend βββββββββββ AG-UI ββββββββββΊβ Backend β
β (NextJS) β SSE β Protocol β HTTP β (FastAPI) β
βββββββββββββββ ββββββββββββββββ βββββββββββββββ
β
βΌ
βββββββββββββββ
β LangGraph β
β Agents β
βββββββββββββββ
β
βΌ
βββββββββββββββ
β LLM Providerβ
β (Ollama/ β
β Azure/ β
β Gemini) β
βββββββββββββββ
Backend Stack:
- FastAPI + LangGraph + AG-UI Protocol
- SQLAlchemy (async) + SQLite/PostgreSQL
- Ollama/Azure OpenAI/Gemini
Frontend Stack:
- NextJS 14 + TypeScript + Shadcn UI
- AG-UI client for event streams
- LocalStorage for thread persistence
π Documentation
- Multi-Agent Architecture
- Database Setup
- A2UI Protocol
- Canvas Mode
- Implementation Plans
- Knowledge Base
π οΈ Development
Project Structure
agentkit/
βββ backend/ # FastAPI + LangGraph backend
β βββ agents/ # Agent implementations
β βββ graphs/ # LangGraph workflows
β βββ api/ # REST endpoints
β βββ database/ # SQLAlchemy models & migrations
β βββ llm/ # LLM provider integrations
β βββ protocols/ # AG-UI protocol implementation
β βββ main.py # Entry point
βββ frontend/ # NextJS frontend
β βββ app/ # App router pages
β βββ components/ # React components
β βββ services/ # API client
β βββ types/ # TypeScript types
βββ .docs/ # Documentation
API Endpoints
Chat: POST /api/chat - Stream agent responses
Threads: GET/POST /api/threads - Manage conversations
Messages: GET /api/threads/{id}/messages - Get thread history
Health: GET /health - Server status
Adding New Agents
- Create agent in
backend/agents/ - Define graph in
backend/graphs/ - Register in
backend/agents/agent_registry.py - Update frontend components if needed
See agents.md for detailed guide.
π§ͺ Testing
Backend:
cd backend
pytest
Frontend:
cd frontend
npm test
π License
MIT License - see LICENSE file for details
π€ Contributing
Contributions welcome! Please read our contributing guidelines first.
π Show Your Support
If you find AgentKit useful, please consider giving it a star βοΈ