CrabAgent - AI Agent Platform with dual-mode (CLI + Serve)
Project description
๐ฆ CrabAgent
AI Team Command Center โ Build a team of specialized AI agents, delegate tasks in parallel, and watch them work in real-time. All from a local web dashboard.
CrabAgent is a local-first AI agent platform. Run it from any project directory via CLI or browser. Your data stays local, your API keys are encrypted, and you pick any LLM provider.
What Makes It Different
| Feature | Description |
|---|---|
| ๐ค AI Team | Create custom agent profiles; delegate tasks to multiple agents in parallel; each agent can use its own model |
| ๐ง Team Memory | Persistent team knowledge + auto-extracted lessons; agents remember across sessions |
| ๐ Task Board | Real-time right-side panel showing each agent's status (running/done/error), progress, and tool calls |
| @mention Delegation | Type @researcher search for X and CrabAgent auto-delegates, or click agents from the toolbar |
| ๐ Parallel Execution | Multiple agents run simultaneously โ researcher searches while coder debugs while analyst compares |
| ๐ Result Compare | Side-by-side view of all agent outputs, with one-click Markdown export |
| โฑ Scheduled Tasks | Agents run autonomously on a cron schedule with push notifications |
| ๐ Browser Automation | Playwright-powered headless browser โ navigate, click, screenshot, extract |
| ๐ผ๏ธ Multimodal | Paste, upload, or drag images directly into chat; auto-detects vision-capable models |
| ๐ MCP Client | Connect external MCP servers (stdio + HTTP); tools auto-discover and prefix |
| ๐ฆ Snapshots | Auto-snapshot files before changes; rollback anytime without Git |
| ๐ Privacy | All data stays local; API keys encrypted at rest; no telemetry |
Quick Start
pip install 'crabagent[serve]'
crabagent init
# TUI โ interactive REPL with slash commands
crabagent
# Web UI
crabagent --serve # โ http://localhost:5210
# Default login: admin / xcl1989
# Single-query CLI
crabagent "organize this directory"
crabagent -p deepseek -m deepseek-chat "write a Python script"
AI Team โ Your Local Command Center
1. Build your team โ Sidebar โ ๐ค Team โ + New Agent. Define each agent's role, goal, backstory, and model override.
2. Delegate tasks โ Three ways to delegate:
- Type
@researcher find competitor pricingin the chat โ auto-detected and sent - Click the ๐ค button next to the input โ select agents โ enter task โ send
- Click an agent from the toolbar above the input to insert a
@mention
3. Watch in real-time โ The right-side Task Board shows every agent's progress:
- ๐ฃ Running โ purple pulsing card with live step count and timer
- ๐ข Done โ green card with elapsed time, tokens, and iteration count
- ๐ด Error โ red card with error summary
4. Review results โ Click any card to open the agent's full output, or click ๐ in the top toolbar for a split-pane comparison view of all results. Export to Markdown with one click.
5. Go parallel โ Use delegate_parallel to run multiple agents simultaneously, or the web delegation modal to assign different tasks to different agents.
Built-in agents:
| Agent | Role | Best For |
|---|---|---|
| ๐ Researcher | Web research | Search, browse, data collection |
| ๐ Analyst | Data analysis | Comparison, pattern detection, reports |
| ๐ป Coder | Code expert | Write, review, debug, refactor |
| ๐ Writer | Content writer | Write, edit, translate, format |
Team Memory
Agents share persistent memory across sessions. Two types:
| Type | Scope | Example |
|---|---|---|
Team Knowledge (team) |
All agents share | Tech stack, architecture decisions, user preferences |
Agent Lessons (lesson) |
Specific agent | Effective strategies, failed approaches, tool tips |
How it works:
- Agents use
memory_save()to store knowledge (e.g. user chooses a framework, records it) memory_recall(query)searches by keywords โ split-term matching finds partial hitsmemory_replace(key, old, new)lets agents edit existing memories precisely- Top team knowledge is auto-injected into system prompts on startup
- After sub-agent tasks complete, lessons are auto-extracted (high iterations โ efficiency tip, etc.)
CLI: /memory list ยท /memory search <query> ยท /memory clear
Scheduled Tasks
Tasks run autonomously on a cron schedule. Define them via conversation or the โฑ Tasks panel in the sidebar.
> Remind me to drink water every day at 11:00
> Check this product page every 30 minutes, notify me if price drops below 500
When a task completes, a notification appears in the bell icon. Click to jump to the execution's conversation โ full message history, screenshots, and tool outputs are preserved.
Browser Automation
Controlled via Playwright. Install with pip install 'crabagent[browser]' then playwright install chromium.
Available tools: browser_navigate, browser_click, browser_type, browser_screenshot, browser_extract, browser_scroll.
> Open https://news.ycombinator.com and show me the top 5 stories
> Search for "Python async" on Google and extract the results
The browser starts lazily (first call only), shares one instance per conversation, and auto-closes on session end. Screenshots appear inline in the chat.
Image / Multimodal Support
Paste (Ctrl+V), upload, or drag images into the chat. CrabAgent auto-detects whether the current model supports vision โ vision models get native multimodal content, non-vision models get a file-path placeholder.
- Max 5 images per message, 5MB each
- Supported: PNG, JPEG, GIF, WebP
- CLI:
/image /path/to/image.png What's in this image?
MCP Client
Connect external MCP servers via stdio or HTTP. Tools auto-discover with the prefix mcp__{server}__{tool} and are visually distinguished in the chat.
Manage servers from the MCP panel in the sidebar โ add, connect, disconnect, view tool counts and connection status.
Web Search & Custom Plugins
Web Search: Built-in web_search (DuckDuckGo, zero-config) and web_scrape. Optionally configure SearXNG for better results.
Custom Plugins: Drop a .py file in .crabagent/tools/:
name = "hello"
description = "Say hello to someone"
parameters = {
"type": "object",
"properties": {"name": {"type": "string", "description": "Name"}},
"required": ["name"],
}
requires_permission = False
def run(name: str) -> str:
return f"Hello, {name}!"
CLI Commands
| Command | Description |
|---|---|
/exit, /quit |
Exit |
/help |
Show help |
/clear |
Clear conversation context |
/model [name] |
Switch model |
/models |
List available models |
/provider [cmd] |
Manage LLM providers (list/add/remove/set-default) |
/sessions |
List recent sessions |
/session [id] |
Load a session |
/new |
Start new conversation |
/agents [cmd] |
Agent team management (list/add/edit/toggle/rm) |
/delegate [@agent] [task] |
Delegate task to agent(s) |
/memory [cmd] |
Team memory (list/search/clear) |
/molt [cmd] |
Snapshot list/show/rollback |
/todo [cmd] |
Manage task list |
/export |
Export conversation to Markdown |
/skills |
List available skills |
/image <path> [msg] |
Send an image |
Configuration
Set via environment variables or .env:
| Variable | Default | Description |
|---|---|---|
CRAB_DB_URL |
sqlite+aiosqlite:///./crabagent.db |
Database URL |
CRAB_JWT_SECRET |
Auto-generated | JWT signing key |
CRAB_SERVE_HOST |
0.0.0.0 |
Serve host |
CRAB_SERVE_PORT |
5210 |
Serve port |
CRAB_MAX_ITERATIONS |
50 |
Max agent iterations |
CRAB_MAX_TOKENS |
4096 |
Max response tokens |
CRAB_BROWSER_HEADLESS |
true |
Browser headless mode |
Installation
pip install 'crabagent[serve]' # Web UI + API
pip install 'crabagent[browser]' # Browser automation
pip install 'crabagent[dev]' # Testing + linting
Docker:
docker compose up -d
Project Structure
CrabAgent/
โโโ .crabagent/
โ โโโ skills/ # Domain skills (SKILL.md)
โ โโโ tools/ # Custom plugin tools
โ โโโ molts/ # File snapshots
โโโ src/crabagent/
โ โโโ cli/ # CLI entrypoint
โ โโโ core/agent/ # Agent loop, tools, context, compression
โ โโโ core/mcp/ # MCP client manager
โ โโโ serve/ # FastAPI + API + scheduler
โโโ frontend/ # React SPA
โโโ crabagent.db # SQLite database
โโโ Makefile
Development
make install # Build frontend + install (editable)
ruff check src/ tests/ # Lint
ruff format src/ tests/ # Format
pytest # Run tests
License
GNU Affero General Public License v3 (AGPLv3) for non-commercial use. Commercial use requires a separate license. Contact the author.
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crabagent-0.6.1.tar.gz.
File metadata
- Download URL: crabagent-0.6.1.tar.gz
- Upload date:
- Size: 323.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fe51c827a5b186ee81d70dbef36f600ad6d486933a3d475b884316ab299ced4
|
|
| MD5 |
31b2f52ce888a6616ce8227407670a21
|
|
| BLAKE2b-256 |
b19ef71829fa15b0c4c995f46b89d1f83159ea938d164d59ea126a9d036ca1d8
|
File details
Details for the file crabagent-0.6.1-py3-none-any.whl.
File metadata
- Download URL: crabagent-0.6.1-py3-none-any.whl
- Upload date:
- Size: 279.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a833cd3d5c083ea7e7e875f52410be186a2158988d4e4184f5a29784cef153e3
|
|
| MD5 |
5cae6adcb5a414647c1d2267aa106b83
|
|
| BLAKE2b-256 |
9fa36ea946b1b5c597cd26878723bebc73ba87c36c4cc978958e4c714b4d885b
|