skills-templates/lobe-chat/SKILL.md
LobeChat - Open-source AI agent workspace with multi-provider LLM support, plugin system, knowledge base RAG, 505+ agents, and self-hosting options via Docker/Vercel
npx skillsauth add enuno/claude-command-and-control lobe-chatInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
LobeChat is an open-source, modern AI agent workspace that provides a unified platform for conversing with multiple AI systems. It supports 20+ LLM providers (OpenAI, Claude, Gemini, Ollama), features a plugin marketplace with 40+ plugins, an agent marketplace with 505+ pre-built agents, knowledge base with RAG, and flexible deployment options.
Key Value Proposition: Deploy a private, customizable AI chat interface with multi-model support, extensible plugins, file upload/RAG capabilities, and beautiful modern UI - all self-hosted or cloud-deployed.
┌─────────────────────────────────────────────────────────────────┐
│ LobeChat Workspace │
│ (Next.js + TypeScript) │
└─────────────────────────────────────────────────────────────────┘
│
┌─────────────────────┼─────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ AI Providers │ │ Agents │ │ Plugins │
├───────────────┤ ├───────────────┤ ├───────────────┤
│ • OpenAI │ │ • 505+ pre- │ │ • 40+ plugins │
│ • Claude │ │ built │ │ • Web search │
│ • Gemini │ │ • Custom │ │ • Code exec │
│ • Ollama │ │ • Marketplace │ │ • Weather │
│ • Azure │ │ • System │ │ • Custom SDK │
│ • Groq │ │ prompts │ │ │
│ • 20+ more │ │ │ │ │
└───────────────┘ └───────────────┘ └───────────────┘
│ │ │
└─────────────────────┼─────────────────────┘
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Knowledge Base│ │ Features │ │ Deployment │
├───────────────┤ ├───────────────┤ ├───────────────┤
│ • File upload │ │ • TTS/STT │ │ • Docker │
│ • RAG │ │ • Vision │ │ • Vercel │
│ • pgvector │ │ • Artifacts │ │ • Alibaba │
│ • Embeddings │ │ • DALL-E │ │ • Zeabur │
│ │ │ • MCP │ │ • Self-host │
└───────────────┘ └───────────────┘ └───────────────┘
| Metric | Value | |--------|-------| | GitHub Stars | 70.1k+ | | Forks | 14.4k+ | | Contributors | 313+ | | Total Commits | 8,248+ | | Plugins | 40+ | | Agents | 505+ | | Languages | TypeScript (98.5%) |
| Provider | Models | Notes | |----------|--------|-------| | OpenAI | GPT-4o, GPT-4, GPT-3.5 | Primary provider | | Anthropic | Claude 3.5, Claude 3 | Full model support | | Google | Gemini Pro, Gemini Flash | Vision support | | Azure OpenAI | All OpenAI models | Enterprise option | | Ollama | Llama, Mistral, etc. | Local models | | Groq | Llama, Mixtral | Fast inference | | Moonshot | Kimi models | Chinese provider | | 01 AI | Yi models | Chinese provider | | Together AI | Open source models | Many models | | ChatGLM | GLM-4 | Chinese provider | | Perplexity | pplx-* models | Search-enhanced | | Mistral | Mistral models | European provider | | DeepSeek | DeepSeek models | Coding focused |
# Deploy to Vercel (simplest option)
# Click "Deploy" button on GitHub repo or:
npx vercel --prod
# Quick start with local storage
docker run -d \
--name lobe-chat \
-p 3210:3210 \
-e OPENAI_API_KEY=sk-your-key \
lobehub/lobe-chat
# Full deployment with PostgreSQL
docker run -d \
--name lobe-chat-db \
-p 3210:3210 \
-e DATABASE_URL=postgres://user:pass@host:5432/lobechat \
-e KEY_VAULTS_SECRET=$(openssl rand -base64 32) \
-e OPENAI_API_KEY=sk-your-key \
lobehub/lobe-chat-database
# docker-compose.yml
version: '3.8'
services:
lobe-chat:
image: lobehub/lobe-chat-database
ports:
- "3210:3210"
environment:
- DATABASE_URL=postgres://postgres:password@db:5432/lobechat
- KEY_VAULTS_SECRET=${KEY_VAULTS_SECRET}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- NEXT_AUTH_SECRET=${NEXT_AUTH_SECRET}
depends_on:
- db
db:
image: pgvector/pgvector:pg16
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
- POSTGRES_DB=lobechat
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
# Generate secrets
export KEY_VAULTS_SECRET=$(openssl rand -base64 32)
export NEXT_AUTH_SECRET=$(openssl rand -base64 32)
export OPENAI_API_KEY=sk-your-key
# Start services
docker-compose up -d
| Variable | Description | Required |
|----------|-------------|----------|
| OPENAI_API_KEY | OpenAI API key | Yes (or other provider) |
| ACCESS_CODE | Password protection | No |
| PROXY_URL | Proxy for API requests | No |
| Variable | Description | Default |
|----------|-------------|---------|
| NEXT_PUBLIC_SERVICE_MODE | client or server | client |
| DATABASE_URL | PostgreSQL connection string | - |
| DATABASE_DRIVER | node or neon | node |
| KEY_VAULTS_SECRET | Encryption key for user data | Required for server mode |
# Set provider keys as needed
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=...
AZURE_API_KEY=...
GROQ_API_KEY=gsk_...
OLLAMA_PROXY_URL=http://localhost:11434
| Variable | Description | Example |
|----------|-------------|---------|
| FEATURE_FLAGS | Enable/disable features | +webSearch,-imageGen |
| DEFAULT_AGENT_CONFIG | Default agent settings | JSON config |
| SYSTEM_AGENT | System function models | JSON config |
| PLUGINS_INDEX_URL | Custom plugin marketplace | URL |
| AGENTS_INDEX_URL | Custom agent marketplace | URL |
# NextAuth (Docker)
NEXT_AUTH_SECRET=$(openssl rand -base64 32)
NEXTAUTH_URL=https://your-domain.com
# Clerk (Vercel)
CLERK_SECRET_KEY=sk_...
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_...
{
"meta": {
"name": "Code Assistant",
"description": "Expert programming assistant",
"avatar": "🤖",
"tags": ["coding", "development"]
},
"config": {
"systemRole": "You are an expert programmer...",
"model": "gpt-4o",
"params": {
"temperature": 0.3,
"max_tokens": 4096
},
"plugins": ["web-search", "code-interpreter"],
"tts": {
"enabled": true,
"voice": "alloy"
}
}
}
# Role Definition
You are [role name], an expert in [domain].
# Core Competencies
- [Skill 1]
- [Skill 2]
- [Skill 3]
# Guidelines
1. [Guideline 1]
2. [Guideline 2]
# Response Format
- Use markdown formatting
- Include code examples when relevant
- Cite sources when possible
# Constraints
- Do not [constraint 1]
- Always [requirement 1]
agents/ directoryPlugin
├── manifest.json # Plugin definition
├── api/
│ └── endpoint.ts # Server-side handlers
└── ui/
└── index.tsx # Optional frontend UI
# Clone official template
git clone https://github.com/lobehub/chat-plugin-template.git
cd chat-plugin-template
npm install
npm run dev
# Runs on http://localhost:3400
{
"identifier": "weather-plugin",
"version": "1.0.0",
"api": [
{
"url": "http://localhost:3400/api/weather",
"name": "getWeather",
"description": "Get current weather for a location",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "City name"
}
},
"required": ["city"]
}
}
],
"ui": {
"url": "http://localhost:3400",
"height": 400,
"width": 600
},
"gateway": "http://localhost:3400/api/gateway"
}
// api/weather.ts
import { createErrorResponse } from '@lobehub/chat-plugin-sdk';
export const runtime = 'edge';
export async function POST(req: Request) {
try {
const { city } = await req.json();
// Fetch weather data
const response = await fetch(
`https://api.weather.com/v1/current?city=${city}`
);
const data = await response.json();
return Response.json({
temperature: data.temp,
condition: data.condition,
city: city
});
} catch (error) {
return createErrorResponse(500, 'Failed to fetch weather');
}
}
// ui/index.tsx
import { fetchPluginMessage } from '@lobehub/chat-plugin-sdk/client';
export default function PluginUI() {
const [message, setMessage] = useState(null);
useEffect(() => {
fetchPluginMessage().then(setMessage);
}, []);
return (
<div>
{message && <pre>{JSON.stringify(message, null, 2)}</pre>}
</div>
);
}
# Install SDK
npm install @lobehub/chat-plugin-sdk @lobehub/chat-plugins-gateway
// Using gateway for local development
import { createGateway } from '@lobehub/chat-plugins-gateway';
const gateway = createGateway({
plugins: ['./manifest.json']
});
-- Enable pgvector
CREATE EXTENSION IF NOT EXISTS vector;
-- Vectors stored automatically by LobeChat
# Embedding provider (optional, uses OpenAI by default)
EMBEDDING_MODEL=text-embedding-3-small
# Vector search settings
VECTOR_SEARCH_LIMIT=10
VECTOR_SEARCH_THRESHOLD=0.7
LobeChat supports MCP for connecting to external tools and data sources.
# Environment variable
MCP_ENABLED=true
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-filesystem", "/path/to/files"]
},
"github": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-github"],
"env": {
"GITHUB_TOKEN": "your-token"
}
}
}
}
# Enable TTS
TTS_ENABLED=true
TTS_PROVIDER=openai # or edge, elevenlabs
# Enable STT
STT_ENABLED=true
STT_PROVIDER=openai # or browser
# DALL-E
DALL_E_ENABLED=true
# Image settings
AI_IMAGE_DEFAULT_IMAGE_NUM=4
Artifacts enable real-time creation and visualization of:
Visualize model reasoning steps for transparency in complex tasks.
Create non-linear dialogue trees, exploring multiple conversation paths.
# Basic
docker pull lobehub/lobe-chat
docker run -p 3210:3210 lobehub/lobe-chat
# With database
docker pull lobehub/lobe-chat-database
docker run -p 3210:3210 \
-e DATABASE_URL=... \
lobehub/lobe-chat-database
apiVersion: apps/v1
kind: Deployment
metadata:
name: lobe-chat
spec:
replicas: 3
selector:
matchLabels:
app: lobe-chat
template:
metadata:
labels:
app: lobe-chat
spec:
containers:
- name: lobe-chat
image: lobehub/lobe-chat-database
ports:
- containerPort: 3210
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: lobe-secrets
key: database-url
# Required
NEXT_AUTH_SECRET=$(openssl rand -base64 32)
NEXTAUTH_URL=https://your-domain.com
# OAuth Providers
GITHUB_ID=...
GITHUB_SECRET=...
GOOGLE_ID=...
GOOGLE_SECRET=...
CLERK_SECRET_KEY=sk_...
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_...
CLERK_WEBHOOK_SECRET=whsec_...
# Password protection
ACCESS_CODE=your-secret-code
Error: Failed to connect to OpenAI
Solutions:
PROXY_URL if behind firewallError: Connection refused to PostgreSQL
Solutions:
DATABASE_URL formatError: Plugin manifest not found
Solutions:
Error: Vector search failed
Solutions:
Error: NextAuth session invalid
Solutions:
NEXT_AUTH_SECRETNEXTAUTH_URL matches domainACCESS_CODE for public deploymentsopenssl rand -base64 32NEXT_PUBLIC_ASSET_PREFIXtools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.