Home
Softono
LambChat

LambChat

Open source Python
181
Stars
32
Forks
1
Issues
0
Watchers
6 days
Last Commit

About LambChat

<div align="center"> # ๐Ÿ‘ LambChat **An open-source AI Agent platform for building, running, and sharing agents that actually do the work** [![Python](https://img.shields.io/badge/Python-3.12+-blue.svg)]() [![React](https://img.shields.io/badge/React-19-green.svg)]() [![FastAPI](https://img.shields.io/badge/FastAPI-Latest-orange.svg)]() [![deepagents](https://img.shields.io/badge/deepagents-Latest-purple.svg)]() [![MongoDB](https://img.shields.io/badge/MongoDB-Latest-green.svg)]() [![Redis](https://img.shields.io/badge/Redis-Latest-red.svg)]() [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [English](README.md) ยท [็ฎ€ไฝ“ไธญๆ–‡](README_CN.md) ยท [Documentation](https://yanyutin753.github.io/LambChat/en/) ยท [Contributing](CONTRIBUTING.md) <br> <img src="docs/images/readme/hero.webp" alt="LambChat AI Agent Platform" width="920"> </div> --- ## ๐ŸŒŸ Why LambChat LambChat is built for teams who want more than a chatbot UI. It gives you a complete AI Agent system with model management, ...

Platforms

Web Self-hosted

Languages

Python

๐Ÿ‘ LambChat

An open-source AI Agent platform for building, running, and sharing agents that actually do the work

[Python]() [React]() [FastAPI]() [deepagents]() [MongoDB]() [Redis]() License

English ยท ็ฎ€ไฝ“ไธญๆ–‡ ยท Documentation ยท Contributing


LambChat AI Agent Platform

๐ŸŒŸ Why LambChat

LambChat is built for teams who want more than a chatbot UI. It gives you a complete AI Agent system with model management, MCP connectivity, skills, storage, sharing, approvals, and deployment-ready backend/frontend infrastructure in one project.

Agent Runtime Tools and MCP Skills and Memory Production Infra
Deep agent graphs, streaming output, sub-agents, thinking mode, scheduled runs, and human approval. System and user MCP, encrypted secrets, tool cache, upload/reveal tools, and sandbox execution. Skill marketplace, GitHub sync, persona presets, model routing, and MongoDB-backed memory. FastAPI, React 19, auth/RBAC, tracing, health checks, arq tasks, realtime sync, and deployment assets.

๐Ÿ“ธ Product Preview

Chat and execution Skills marketplace Operations console
Streaming agent response
Streaming agent work
Skill marketplace
Reusable skills
MCP configuration
MCP and tools
File library
Rich file library
Model configuration
Model routing
Mobile responsive view
Responsive UI
View the full screenshot gallery
Login
Login
Register
Register
Password Reset
Password Reset
Email Verification
Email Verification
Registration Pending
Registration Pending
Chat
Chat
Streaming
Streaming
Share
Share
Skills
Skills
Marketplace
Marketplace
MCP
MCP Config
Agents
Agents
Models
Models
Channels
Channels
Files
Files
Persona
Persona
Memory
Memory
Notifications
Notifications
Settings
Settings
Feedback
Feedback
Shared
Shared Session
Roles
Roles
Users
Users
Tablet
Tablet

๐ŸŽฌ Use Cases

# Case Description Demo
1 Supply Chain PDF Report Generates a polished PDF efficiency report with charts, benchmark comparisons, and delivery, inventory, fulfillment, and logistics analysis from a single prompt. View Session
2 Godfather Fan Website Builds a responsive English promo site for The Godfather trilogy with a cinematic visual direction, marquee hero section, generated images, and multi-device polish. View Session
3 Story Breakdown from Image Understands visual input, identifies the stories shown in an image, and produces detailed plot-by-plot explanations with multimodal reasoning. View Session
4 EV Market Trend Analysis Turns recent 2025-2026 electric vehicle data into a structured market analysis covering growth, regional performance, and key industry takeaways. View Session
5 ๐ŸŽฎ Batch Game UI Icon Generation Feed it one reference image and it analyzes the art style, generates 48 game UI icons across 9 categories (candies, buttons, labels, currencies, characters, skills, navigation, frames, specials), auto-organizes them into folders, and saves the workflow as a reusable skill for next time. View Session
6 ๐Ÿฅง E-Commerce Product Image Suite Enter a product keyword (e.g., "durian") and a target platform (Taobao / JD / Pinduoduo), and the Agent runs the full pipeline: audience analysis โ†’ visual strategy โ†’ auto-generate main image, lifestyle scene, detail shots, and combo images โ€” a complete set of product-ready visuals in one shot. View Session

๐Ÿ—๏ธ Architecture

Architecture

โœจ Features

๐Ÿค– Agent Runtime
  • deepagents Architecture โ€” Compiled graph runtime with fine-grained state management
  • Multi-Agent Types โ€” Core, fast, and search agents
  • Plugin System โ€” @register_agent("id") decorator for custom agents
  • Streaming Output โ€” Native SSE support
  • Sub-agents โ€” Multi-level delegation
  • Thinking Mode โ€” Extended thinking for Anthropic models
  • Scheduled Tasks โ€” Cron, interval, date, and manual task triggers with persisted scheduler state
  • Human-in-the-Loop โ€” Approval system with countdown timer, auto-extension, and urgent-state styling
  • Persona Presets โ€” Reusable persona configuration with permissions and runtime binding
๐Ÿง  Model, Memory, and Skills
  • Multi-Provider Models โ€” OpenAI, Anthropic, Google Gemini, and Kimi
  • Full CRUD โ€” Create, edit, delete, reorder, and batch import models via UI
  • Channel Routing โ€” Route the same model through different channels with model_id
  • Role-based Access โ€” MODEL_ADMIN permission and per-role model visibility
  • Cross-session Memory โ€” Native MongoDB-backed memory system
  • Dual Skills Storage โ€” File system plus MongoDB backup
  • GitHub Sync โ€” Import custom skills from GitHub
  • Skill Marketplace โ€” Browse, install, publish, and manage skills in bulk
๐Ÿ”Œ Tools, MCP, and Execution
  • System + User MCP โ€” Global and per-user MCP configuration
  • Encrypted Storage โ€” API keys encrypted at rest
  • Dynamic Tool Caching โ€” Cache MCP tools with manual refresh
  • Multiple Transports โ€” SSE and HTTP
  • Permission Control โ€” Transport-level access policies
  • Sandbox Integration โ€” Daytona and E2B execution support
  • Built-in Tools โ€” File reveal, project reveal, upload URL, env vars, audio transcription, persona preset tools, and more
๐Ÿ“ Product Features
  • File Library โ€” Browse revealed files with code preview, favorites, and project-based filtering
  • Rich Previews โ€” PDF, Word, Excel, PPT, Markdown, Mermaid, Excalidraw, images, and video playback
  • Project Folders โ€” Organize sessions into projects with drag-and-drop
  • Session Sharing โ€” Generate public share links for conversations
  • Feedback โ€” Thumbs rating, text comments, session linking, and run-level stats
  • Notifications โ€” In-app notification storage and delivery hooks
๐Ÿ” Infra, Realtime, and Frontend
  • Realtime โ€” Redis + MongoDB dual-write, WebSocket, auto-reconnect, and shared-session updates
  • Task Runtime โ€” Local or Redis-backed arq execution with embedded worker lifecycle
  • Security โ€” JWT, RBAC, bcrypt, OAuth (Google/GitHub/Apple), email verification, CAPTCHA, and sandbox controls
  • Observability โ€” LangSmith tracing, structured logging, health checks, and distributed memory diagnostics
  • Channels โ€” Native Feishu integration plus an extensible multi-channel architecture
  • Frontend Stack โ€” React 19, Vite 6, TailwindCSS 3.4, PWA workers, Capacitor mobile builds, Tauri desktop shell, rich rendering, and responsive layouts
  • i18n โ€” English, Chinese, Japanese, Korean, and Russian

โš™๏ธ Configuration

Multiple setting categories can be configured through the UI or environment variables:

Category Description
Frontend Default agent, welcome suggestions, UI preferences
Agent Debug mode, logging level
Model Multi-provider model management, per-model config, channel routing
Session Session management, message history, SSE cache
Database MongoDB connection, optional PostgreSQL
Storage Persistent storage, S3/OSS/MinIO/COS
Security Encryption and security policies
Sandbox Code sandbox settings (Daytona / E2B)
Skills Skill system config
Tools Tool system settings
Tracing LangSmith and tracing
User User management, registration, default role
Memory Memory system (native)
Scheduler Dynamic scheduled tasks and runtime registration
Task Runtime Local execution or arq queue settings

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.12+
  • uv
  • Node.js 18+
  • pnpm 10+
  • MongoDB
  • Redis

Docker

git clone https://github.com/Yanyutin753/LambChat.git
cd LambChat

cd deploy
cp .env.example .env   # Edit with your config
docker compose up -d

Open http://localhost:8000.

Local Development

Install dependencies:

cp .env.example .env   # Edit with your config
make install-all

Run the backend and frontend together:

make dev-all

Backend: http://127.0.0.1:8000 Frontend dev server: http://127.0.0.1:3001

You can also run them separately:

make dev            # FastAPI backend: uv run python main.py
make frontend-dev   # Vite frontend
๐Ÿ“ Required Configuration

Edit the .env file with the following recommended settings:

# Recommended: Set a stable JWT secret (auto-generated on each restart if unset, invalidating existing sessions)
JWT_SECRET_KEY=your-stable-secret-key

# Recommended: Set MCP encryption salt (auto-generated on each restart if unset, invalidating saved MCP configs)
MCP_ENCRYPTION_SALT=your-stable-encryption-salt

# Optional: Configure MongoDB connection
MONGODB_URL=mongodb://localhost:27017
MONGODB_DB=agent_state
MONGODB_USERNAME=admin
MONGODB_PASSWORD=your-mongo-password

# Optional: Configure Redis connection
REDIS_URL=redis://localhost:6379/0
REDIS_PASSWORD=your-redis-password

# Optional: enable scheduled tasks
ENABLE_SCHEDULED_TASK=true

# Optional: choose task execution backend
TASK_BACKEND=arq  # local or arq

::: tip LLM models are configured through the Model Config UI after deployment โ€” no environment variables needed. :::

Code Quality

make format       # Format (ruff format)
make lint         # Lint (ruff check)
make typecheck    # Type check (mypy)
make test         # Backend tests (pytest)
make check-all    # Run all checks (lint + typecheck + test)

Frontend, Mobile, and Docs

cd frontend
pnpm run build             # TypeScript + Vite build
pnpm run packaged:build    # Build packaged frontend assets
pnpm run mobile:sync       # Build and sync Capacitor projects
pnpm run package:desktop   # Package desktop app assets

cd ..
pnpm run docs:dev          # VitePress docs site
pnpm run docs:build

Project Structure

.
โ”œโ”€โ”€ main.py                  # Uvicorn entrypoint for src.api.main:app
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ agents/              # Core, fast, search, and team agent graphs
โ”‚   โ”œโ”€โ”€ api/                 # FastAPI app, middleware, and route modules
โ”‚   โ”‚   โ””โ”€โ”€ routes/          # Chat, auth, MCP, skills, files, scheduler, teams, etc.
โ”‚   โ”œโ”€โ”€ infra/               # Runtime services: auth, llm, mcp, scheduler, task, storage, memory
โ”‚   โ””โ”€โ”€ kernel/              # Settings, schemas, config definitions, and shared types
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/                 # React app source
โ”‚   โ”‚   โ”œโ”€โ”€ components/      # Chat, panels, pages, auth, skill, MCP, team, file UI
โ”‚   โ”‚   โ”œโ”€โ”€ services/        # API clients and browser service integrations
โ”‚   โ”‚   โ”œโ”€โ”€ stores/          # Frontend state stores
โ”‚   โ”‚   โ”œโ”€โ”€ i18n/            # Locale files and tests
โ”‚   โ”‚   โ””โ”€โ”€ workers/         # Browser/PWA workers
โ”‚   โ”œโ”€โ”€ android/             # Capacitor Android project
โ”‚   โ”œโ”€โ”€ ios/                 # Capacitor iOS project
โ”‚   โ”œโ”€โ”€ src-tauri/           # Tauri desktop shell
โ”‚   โ””โ”€โ”€ scripts/             # Frontend build, packaging, and i18n scripts
โ”œโ”€โ”€ docs/                    # VitePress documentation
โ”œโ”€โ”€ deploy/                  # Docker Compose deployment
โ”œโ”€โ”€ k8s/                     # Kubernetes manifests
โ”œโ”€โ”€ nginx/                   # Reverse proxy config
โ”œโ”€โ”€ scripts/                 # Sandbox and maintenance utilities
โ””โ”€โ”€ tests/                   # Backend, API, infra, agent, and unit tests

โญ Star History

Star History Chart

๐Ÿ“„ License

MIT โ€” Project name "LambChat" and its logo may not be changed or removed.


LambChat is built for people who want AI agents that can actually do the work.


Created by Clivia


GitHub ยท Email ยท ไธญๆ–‡ README



WeChat QR Code


WeChat for deployment help, product feedback, and collaboration

LINUX DO - A New Ideal Community