AgentGraph Kit Docs
Everything you need to build, deploy, and scale your multi-agent AI SaaS application.
What is AgentGraph Kit?
AgentGraph Kit is a production-ready SaaS boilerplate for building AI-powered multi-agent applications. It uses the LangGraph Supervisor Pattern to orchestrate specialized agents that work together to handle complex tasks.
LangGraph
Multi-agent orchestration with the Supervisor pattern for intelligent routing.
FastAPI Backend
High-performance Python API with async support and automatic docs.
Supabase
PostgreSQL database with ready-to-use schemas for users and chat history.
Pinecone RAG
Vector search for document retrieval with OpenAI embeddings.
Clerk Auth
Complete authentication with middleware integration for protected routes.
Stripe Payments
Credit-based billing with webhook handlers for automatic top-ups.
Quick Start
Get your multi-agent application running in under 5 minutes.
1Clone & Configure
git clone https://github.com/your-repo/agentgraph-kit.git
cd agentgraph-kit
# Backend configuration
cp backend/.env.example backend/.env
# Frontend configuration
cp frontend/.env.example frontend/.env.local2Required API Keys
3Launch with Docker
docker-compose up
# ✓ Backend running on localhost:8000
# ✓ Frontend running on localhost:3000
# ✓ All agents initializedAgent Architecture
We use the Supervisor Pattern where a central LLM router (GPT-4o) intelligently decides which specialized worker to call based on the user's intent.
Adding a New Agent
Register a new worker by adding a node to the LangGraph workflow:
# 1. Define your agent function
def create_my_agent():
# Your agent logic here
pass
# 2. Register in the workflow
workflow.add_node("MyNewAgent", create_my_agent())
workflow.add_edge("MyNewAgent", "supervisor")Database Schema
Supabase (PostgreSQL) handles all persistence. The schema is included in supabase_schema.sql.
| Table | Column | Type | Description |
|---|---|---|---|
| users | id | TEXT | Clerk User ID (Primary Key) |
| credits | INT | Available credit balance | |
| conversations | id | UUID | Conversation identifier |
| messages | JSONB | Chat history array |
Tools & RAG Pipeline
RAG Pipeline
rag_searchQueries Pinecone for semantically similar document chunks.
tavily_searchPerforms live web searches for real-time information.
Stripe Payments
Credit-based billing with automatic webhook handlers for top-ups.
Local Development
Use the Stripe CLI to forward webhooks to localhost:8000/api/webhook/stripe
# Local testing
stripe listen --forward-to localhost:8000/api/webhook/stripe
# Production endpoint
https://your-domain.com/api/webhook/stripe