Documentation v1.0

AgentGraph Kit Docs

Everything you need to build, deploy, and scale your multi-agent AI SaaS application.

Back to Home

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

terminal
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.local

2Required API Keys

OpenAI(LLM & Embeddings)
Tavily(Web Search)
Supabase(Database)
Pinecone(Vector DB)

3Launch with Docker

terminal
docker-compose up

# ✓ Backend running on localhost:8000
# ✓ Frontend running on localhost:3000
# ✓ All agents initialized

Agent 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.

USER_MESSAGE
SUPERVISOR NODE
Researcher
Tavily Search
RAG Specialist
Pinecone
Finalize
Synthesis

Adding a New Agent

Register a new worker by adding a node to the LangGraph workflow:

backend/app/agents/workflow.py
# 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.

TableColumnTypeDescription
usersidTEXTClerk User ID (Primary Key)
creditsINTAvailable credit balance
conversationsidUUIDConversation identifier
messagesJSONBChat history array

Tools & RAG Pipeline

RAG Pipeline

📄 Upload✂️ Chunk (1000)🧠 Embed🌲 Pinecone
rag_search

Queries Pinecone for semantically similar document chunks.

tavily_search

Performs 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

Webhook Endpoints
# Local testing
stripe listen --forward-to localhost:8000/api/webhook/stripe

# Production endpoint
https://your-domain.com/api/webhook/stripe