Skip to content

Yanyutin753/LambChat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,115 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐑 LambChat

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

Python React FastAPI deepagents MongoDB Redis License

English · 简体中文 · Documentation · Contributing


LambChat AI Agent Platform

✨ Highlights

  • 🤖 Agent Runtime — Deep agent graphs, sub-agents, thinking mode, streaming output, and human approval
  • 🔧 MCP & Tools — System/user MCP, encrypted secrets, sandbox execution (Daytona/E2B/CubeSandbox)
  • 🧠 Memory & Skills — Cross-session memory, skill marketplace, GitHub sync, persona presets
  • 📱 Full-Stack Client — React 19 web, Capacitor mobile, Tauri desktop, PWA support
  • 🚀 Production Ready — FastAPI, auth/RBAC, realtime sync, Docker/K8s deployment
  • 🌍 Internationalization — English, Chinese, Japanese, Korean, Russian

Start Here

LambChat is more than a chatbot UI. It is a full-stack AI Agent system with agent runtime, model management, MCP tools, skills, memory, files, sharing, approvals, scheduled tasks, and production-ready deployment pieces in one project.

If you want to... Go here
See what LambChat can do Product Preview and Live Examples
Run it quickly Quick Start
Understand the system Architecture and Feature Map
Configure production pieces Configuration and Deployment
Contribute Development and Contributing

Why LambChat

Most agent products stop at "chat with tools." LambChat is designed for the longer path: configure models, connect tools safely, let agents create artifacts, persist useful context, share results, approve risky actions, and deploy the whole system for real users.

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

Live Examples

These shared sessions show the kind of end-to-end work LambChat is built for.

# Case What the agent does 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 Analyzes one reference image, generates 48 game UI icons across 9 categories, organizes them into folders, and saves the workflow as a reusable skill. View Session
6 E-Commerce Product Image Suite Runs audience analysis, visual strategy, main image generation, lifestyle scenes, detail shots, and combo images for a product keyword and marketplace. View Session
7 Multi-Agent E-Commerce Design Team 4 agents collaborate (creative director, designer, AI image engineer, reviewer) to produce a full set of brand e-commerce product images with strategy, generation, audit, and revision in one session. View Session
8 Daily AI Paper Digest (Scheduled Task) A scheduled task runs automatically every day to search arXiv across 5 research directions (VLA, World Models, LLM Reasoning, Multimodal, Agent), filter the latest papers, and generate a structured trend summary — zero manual intervention. View Session

Architecture

LambChat architecture

LambChat keeps the product surface and runtime infrastructure in one deployable system:

  • Frontend: React 19, Vite, TailwindCSS, PWA workers, Capacitor mobile builds, and Tauri desktop packaging.
  • Backend: FastAPI, SSE/WebSocket streaming, auth/RBAC, scheduler, storage services, model routing, and MCP management.
  • Agent runtime: deepagents/LangGraph execution, sub-agents, approvals, skills, memory, tools, and sandbox integrations.
  • Persistence and queues: MongoDB, Redis, optional PostgreSQL checkpoints, S3-compatible object storage, and arq workers.

Feature Map

Agent Runtime
  • deepagents architecture with compiled graph runtime and fine-grained state management.
  • Multiple agent types for core, fast, search, and team workflows.
  • Plugin registration through @register_agent("id") for custom agents.
  • Streaming output with native SSE support.
  • Sub-agents for multi-level delegation.
  • Thinking mode for Anthropic extended thinking.
  • Scheduled tasks with cron, interval, date, manual triggers, and persisted scheduler state.
  • Human approval with countdown timer, auto-extension, and urgent-state styling.
  • Persona presets with reusable configuration, permissions, and runtime binding.
  • /goal command — attach a rubric-guided objective to any run via /goal <objective>, with optional custom rubrics (/goal <objective> --- <rubric>), SSE event tracking, and auto-dismissal on completion.
Models, Memory, and Skills
  • Multi-provider models for OpenAI, Anthropic, Google Gemini, and Kimi.
  • Model CRUD for creating, editing, deleting, reordering, and batch importing models in the UI.
  • Channel routing to reuse the same model through different channels with model_id.
  • Role-based model access through MODEL_ADMIN and per-role visibility.
  • Cross-session memory backed by native MongoDB storage.
  • Dual skills storage with file system storage plus MongoDB backup.
  • GitHub sync for importing custom skills.
  • Skill marketplace for browsing, installing, publishing, and bulk managing skills.
Tools, MCP, and Execution
  • System and user MCP for global and per-user tool configuration.
  • Encrypted storage for API keys and MCP secrets at rest.
  • Dynamic tool caching with manual refresh.
  • Multiple transports including SSE and HTTP.
  • Permission control at the transport and role level.
  • Sandbox integration with Daytona, E2B, and CubeSandbox.
  • Built-in tools for file reveal, project reveal, upload URLs, env vars, audio transcription, persona presets, and more.
Product Surface
  • File library with revealed files, code preview, favorites, and project filters.
  • Rich previews for PDF, Word, Excel, PPT, Markdown, Mermaid, Excalidraw, images, and video.
  • Project folders for organizing sessions with drag-and-drop.
  • Session sharing through public conversation links.
  • Feedback with thumbs rating, comments, session links, and run-level stats.
  • Notifications with in-app storage and delivery hooks.
Infrastructure and Realtime
  • Realtime sync with Redis, MongoDB dual-write, WebSocket, auto-reconnect, and shared-session updates.
  • Task runtime with local execution or Redis-backed arq queues.
  • Security with JWT, RBAC, bcrypt, OAuth, email verification, CAPTCHA, and sandbox controls.
  • Observability with LangSmith tracing, structured logging, health checks, and distributed memory diagnostics.
  • Channels with native Feishu integration and an extensible multi-channel architecture.
  • Internationalization for English, Chinese, Japanese, Korean, and Russian.

Quick Start

Prerequisites

  • Python 3.12+
  • uv (Python package manager)
  • Node.js 18+
  • pnpm 10+
  • MongoDB
  • Redis

Docker (Recommended)

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

cd deploy
cp .env.example .env
docker compose up -d

Open http://localhost:8000.

Local Development

Install dependencies:

cp .env.example .env
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

LLM models are configured through the Model Config UI after deployment. You do not need to put model keys in environment variables for the basic boot path.

Configuration

LambChat can be configured through the UI and environment variables. Start with .env.example, then set stable secrets before using it with real users.

Runtime settings stored in the database take precedence over environment variables. Environment variables are used as initial values or fallback values only when the corresponding database setting has not been set.

# Recommended: keep sessions valid across restarts
JWT_SECRET_KEY=your-stable-secret-key

# Recommended: keep saved MCP configs decryptable across restarts
MCP_ENCRYPTION_SALT=your-stable-encryption-salt

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

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

# Optional: scheduled tasks
ENABLE_SCHEDULED_TASK=true

# Optional: task execution backend
TASK_BACKEND=arq  # local or arq
Category What it controls
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 for Daytona, E2B, and CubeSandbox
Skills Skill system configuration
Tools Tool system settings
Tracing LangSmith and tracing
User User management, registration, default role
Memory Native memory system
Scheduler Dynamic scheduled tasks and runtime registration
Task Runtime Local execution or arq queue settings

Development

Code Quality

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

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

Contributors

License

License: MIT

Note — The project name "LambChat" and its logo may not be changed or removed.


🐑 LambChat

Built for people who want AI agents that can actually do the work.


GitHub
Repository
Email
Contact
Docs
Documentation
中文 README
中文 README

WeChat QR Code

💬 WeChat for deployment help, product feedback, and collaboration


Powered by LINUX DO — A New Ideal Community

About

LambChat — Enterprise Agent Infra for governed AI agents. Skills + MCP powered, Loop Agent ready, multi-tenant by design.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

203 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors