Production-Ready AI Agent Development Framework Powered by Claude Agent SDK
基于 Claude Agent SDK 构建的生产级 AI 智能体开发框架
Agent Kit is a comprehensive AI agent development framework that integrates Claude Agent SDK, providing a complete solution from frontend to backend. This project aims to help developers quickly build, deploy, and scale production-grade AI Agent applications. It includes built-in multi-channel access via WebSocket, Discord, and Telegram, with unified session routing and message handling.
|
|
|
- Introduction
- Architecture
- Quick Start
- Project Structure
- Core Features
- Configuration
- Third-Party IM Integration
- API Documentation
- Development Guide
- Contributing
- License
- Python: 3.11 or higher
- Node.js: 24.0 or higher
- Docker & Docker Compose: Latest version
- Agent API Key: Get from Anthropic or Bigmodel
1️⃣ Clone the repository
git clone https://github.com/leemysw/agent-kit.git
cd agent-kit2️⃣ Configure environment variables
# Copy environment variable template
cp example.env .env
# Edit .env file and add your API key3️⃣ Start services
make start
╰─ make start
TAG=0.1.2 docker compose -f deploy/docker-compose.yml up -d
[+] Running 3/3
✔ Container deploy-agent-kit-1 Started 1.8s
✔ Container deploy-web-1 Started 0.9s
✔ Container deploy-nginx-1 Running 0.0s
✅ Agent Kit is running!
🌐 Web UI: http://localhost
📋 Logs: run 'make logs' to view service logs4️⃣ Access the application
- Application URL: http://localhost
1️⃣ Clone the repository
git clone https://github.com/leemysw/agent-kit.git
cd agent-kit2️⃣ Backend setup
# Install Python dependencies
pip install -r agent/requirements.txt
# Configure environment variables
cp example.env .env
# Edit .env file and add your API keyConfigure .env file:
# Claude API configuration
ANTHROPIC_API_KEY=your_api_key_here
ANTHROPIC_BASE_URL=https://api.anthropic.com or https://open.bigmodel.cn/api/anthropic
ANTHROPIC_MODEL=claude-3-5-sonnet-20241022 or glm-5
# Server configuration
HOST=0.0.0.0
PORT=8010
DEBUG=true
WORKERS=1Initialize database:
# Run database migrations to create tables
alembic upgrade head3️⃣ Frontend setup
cd web
# Install dependencies
npm install
# Configure environment variables
cp example.env .env.local
# Edit .env.local fileConfigure .env.local file:
# Development environment configuration
NEXT_PUBLIC_API_URL=http://localhost:8010/agent/v1
NEXT_PUBLIC_WS_URL=ws://localhost:8010/agent/v1/chat/ws
NEXT_PUBLIC_DEFAULT_CWD=/opt/app/playground
NEXT_PUBLIC_DEFAULT_MODEL=glm-54️⃣ Run the project
# Start backend (in project root directory)
python main.py
# Start frontend (in web directory)
npm run dev5️⃣ Access the application
- Application URL: http://localhost:3000
agent-kit/
├── agent/ # Backend service
│ ├── api/ # API routes
│ ├── core/ # Core configuration
│ ├── service/ # Business logic
│ │ ├── websocket_handler.py # WebSocket handler
│ │ └── session_manager.py # Session management
│ ├── shared/ # Shared modules
│ └── utils/ # Utility functions
├── web/ # Frontend application
│ ├── src/
│ │ ├── app/ # Next.js pages
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom Hooks
│ │ ├── lib/ # Utility library
│ │ ├── store/ # Zustand state management
│ │ └── types/ # TypeScript types
├── alembic/ # Database migrations
├── deploy/ # Deployment files
├── docs/ # Documentation
│ ├── websocket-session-flow.md # WebSocket flow
│ └── guides/ # Claude Agent SDK guides
├── main.py # Application entry point
└── README.md # This file
- ✅ WebSocket real-time communication
- ✅ Streaming response support
- ✅ Session persistence
- ✅ Message history management
- ✅ Multi-session support
- ✅ Session search and filtering
- ✅ Claude Agent SDK integration
- ❌ Custom tool calling (in development)
- ❌ Slash command system (in development)
- ❌ Skills system (in development)
- ❌ MCP protocol support (in development)
- ✅ Fine-grained tool permission control
- ✅ User confirmation mechanism
| Config Item | Description | Default Value |
|---|---|---|
ANTHROPIC_API_KEY |
Claude API key | - |
ANTHROPIC_BASE_URL |
API base URL | https://api.anthropic.com |
ANTHROPIC_MODEL |
Model to use | glm-5 |
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 8010 |
DEBUG |
Debug mode | false |
WORKERS |
Number of workers | 1 |
| Config Item | Description | Default Value |
|---|---|---|
NEXT_PUBLIC_API_URL |
Backend API URL | http://localhost:8010/agent/v1 |
NEXT_PUBLIC_WS_URL |
WebSocket URL | ws://localhost:8010/agent/v1/chat/ws |
NEXT_PUBLIC_DEFAULT_CWD |
Working directory | /opt/app/playground |
NEXT_PUBLIC_DEFAULT_MODEL |
Default model | glm-5 |
The backend currently supports three message entry channels:
WebSocket(Web UI)Discord(agent/service/channel/discord_channel.py)Telegram(agent/service/channel/telegram_channel.py)
# Discord
DISCORD_ENABLED=true
DISCORD_BOT_TOKEN=your_discord_bot_token
DISCORD_ALLOWED_GUILDS=123456789012345678,987654321098765432
DISCORD_TRIGGER_WORD=@agent-kit
# Telegram
TELEGRAM_ENABLED=true
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_ALLOWED_USERS=12345678,87654321Channels are registered automatically at app startup based on DISCORD_ENABLED/TELEGRAM_ENABLED.
All IM channels share the same session key pattern:
agent:<agentId>:<channel>:<chatType>:<ref>[:topic:<threadId>]
Examples:
- Discord group chat:
agent:main:dg:group:<guild_id>:<channel_id> - Telegram direct message:
agent:main:tg:dm:<user_id>
- Discord not responding: ensure Message Content Intent is enabled for the bot.
- Telegram not receiving messages: check privacy mode and make sure the current user is included in
TELEGRAM_ALLOWED_USERS. DISCORD_TRIGGER_WORD: the current implementation strips the trigger word if present, but does not require it.
For detailed guides and API documentation, please visit:
- Frontend API Documentation - React components, types, and API interfaces
- WebSocket Session Flow - WebSocket session and data flow
- Guides - Comprehensive guides for various features
- Session Management - Session creation, management, and message handling
- Streaming vs Single Mode - AI response mode comparison
- Custom Tools - Creating and using custom AI tools
- Slash Commands - Custom slash command development
- Skills Guide - Skill system usage and development
- MCP Integration - Model Context Protocol integration
- Hosting Guide - Production deployment and configuration
- Permissions Management - Permission control and security settings
All forms of contributions are welcome!
If you find a bug or have a new feature suggestion, please submit it through GitHub Issues.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Claude Agent SDK - Core AI framework
Made with ❤️ by leemysw
If this project helps you, please give it a ⭐️ Star!


