Skip to main content

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
๐Ÿ“‹ 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 pricing in 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

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)
/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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crabagent-0.5.2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crabagent-0.5.2-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file crabagent-0.5.2.tar.gz.

File metadata

  • Download URL: crabagent-0.5.2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for crabagent-0.5.2.tar.gz
Algorithm Hash digest
SHA256 c140eb69da3bb9921d4c201041af30eaecb684804139b023bd39a6205a022d0b
MD5 94e34d4b740f1101e45e5edbede8ad2f
BLAKE2b-256 5a0f7a2aaeae5f433a389e929d5b35174c8dbe0a1aa9a7809d1b371022c7e5a2

See more details on using hashes here.

File details

Details for the file crabagent-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: crabagent-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for crabagent-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3fdc0b15a4b43f69daed372f53e8c89d3968de928835d99849058ef6e2ce4d9
MD5 629e9f7dca3fe5daec558209d1e0d9dd
BLAKE2b-256 b5407913e2131b3eb1aa3f373395f905f886f253d80928e925e1623a31b5ac46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page