Skip to content

isLinXu/crablet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

212 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ€ Crablet

A Production-Ready AI Agent Operating System Built from Scratch in Rust

"Building the next-generation intelligent assistant infrastructure,
making AI as ubiquitous as water โ€” fluid, adaptive, and ceaseless."

Rust Version License Tokio Architecture RAG Auth Canvas

Top Language Repo Size Stars Last Commit

English | ไธญๆ–‡

Why Crablet โ€ข Architecture โ€ข Memory โ€ข GraphRAG โ€ข Canvas โ€ข Swarm โ€ข Quick Start โ€ข Docs


๐ŸŒŸ Why Crablet?

Crablet is not another chatbot wrapper. It is a complete AI Agent Operating System written entirely in Rust โ€” a system that provides production-ready cognitive infrastructure for Large Language Models with genuine thinking, planning, memory, tool use, and multi-agent collaboration.

Traditional LLM Wrappers Crablet
Stateless request/response Persistent layered memory (working โ†’ episodic โ†’ semantic)
Single-step tool calls ReAct reasoning loops with middleware pipeline
Flat retrieval (keyword search) GraphRAG combining vector search + knowledge graph traversal
No output structuring Canvas โ€” live structured artifact rendering
Sequential processing Swarm โ€” 100+ concurrent collaborative agents
Python GC pauses Zero-GC Rust with Tokio async runtime

Language Composition

Language Share Role
๐Ÿฆ€ Rust 65.2% Core engine, cognitive layers, memory, tools
๐ŸŸฆ TypeScript 28.8% Frontend, Web UI, Dashboard
๐ŸŒ HTML 4.7% Templates, Canvas rendering
๐Ÿ Python 0.8% MCP servers, skill scripts
๐Ÿณ Dockerfile 0.2% Container definitions

๐Ÿง  Three-Tier Cognitive Architecture

Crablet's most distinctive feature is its biologically-inspired three-tier cognitive routing system. Inspired by Dual Process Theory, every input is automatically classified and routed by the Cognitive Router to the optimal processing layer:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     INPUT CHANNELS                                โ”‚
โ”‚    CLI โ”‚ Web UI โ”‚ Telegram โ”‚ DingTalk โ”‚ Feishu โ”‚ HTTP Webhook     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              GATEWAY LAYER  (Axum + WebSocket)                    โ”‚
โ”‚    JSON-RPC โ”‚ REST API โ”‚ SSE Streaming โ”‚ Auth โ”‚ Rate Limiting      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    EVENT BUS                                       โ”‚
โ”‚              Tokio Broadcast Channel (lock-free)                   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                โ”‚                   โ”‚
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚   SYSTEM  1    โ”‚ โ”‚  SYSTEM  2  โ”‚ โ”‚    SYSTEM  3     โ”‚
  โ”‚  Intuitive     โ”‚ โ”‚  Analytical โ”‚ โ”‚  Collaborative   โ”‚
  โ”‚                โ”‚ โ”‚             โ”‚ โ”‚                  โ”‚
  โ”‚ Trie + Levensh.โ”‚ โ”‚ ReAct Engineโ”‚ โ”‚  Swarm Agents    โ”‚
  โ”‚    < 10 ms     โ”‚ โ”‚   2 โ€“ 10 s  โ”‚ โ”‚     10 s +       โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                โ”‚                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    FOUNDATION LAYER                                 โ”‚
โ”‚   Memory โ”‚ GraphRAG โ”‚ Tools โ”‚ Safety Oracle โ”‚ Canvas โ”‚ Skills      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โšก System 1 โ€” Intuitive Response (< 10ms)

The fastest path, designed for high-frequency, low-complexity interactions:

  • IntentTrie โ€” O(L) prefix-tree intent lookup
  • Levenshtein fuzzy matching โ€” tolerates typos and spelling variations
  • Semantic cache โ€” memoized responses for repeated queries
  • Ideal for: greetings, FAQs, system commands, cached results

๐Ÿ”ฌ System 2 โ€” Deep Analysis (2โ€“10s)

The workhorse for complex reasoning tasks, built on a full ReAct pipeline with a pluggable middleware chain:

[Safety Oracle]
    โ†’ [CostGuard]
    โ†’ [SemanticCache]
    โ†’ [Planning]
    โ†’ [RAG Middleware]
    โ†’ [SkillContext]
    โ†’ [ReAct Core: Thought โ†’ Action โ†’ Observation loop]
    โ†’ [Canvas Post-processor]
    โ†’ [Streaming Pipeline]

Additional System 2 capabilities:

  • Tree of Thoughts (ToT) โ€” parallel branch exploration for open-ended problems
  • MCTS (Monte Carlo Tree Search) โ€” UCB1-guided thought exploration with LLM simulation
  • Multimodal โ€” image and audio understanding integrated into reasoning

๐ŸŒ System 3 โ€” Swarm Collaboration (10s+)

For tasks that require decomposition, parallelism, and coordination across multiple specialised agents:

  • SwarmOrchestrator decomposes goals into a TaskGraph
  • Individual agents run in isolated Tokio tasks (100+ concurrent)
  • Agents communicate via typed message channels (Task, Result, StatusUpdate, Broadcast, Error)
  • SharedBlackboard for cross-agent state sharing
  • Built-in DebateModerator for structured multi-agent argumentation
  • VotingAgent for democratic consensus on proposals
  • TaskGraph templates โ€” reusable multi-step workflow definitions

๐Ÿงฉ Memory System

Crablet implements a three-tier hierarchical memory architecture that mirrors how humans organize knowledge:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     MEMORY HIERARCHY                        โ”‚
โ”‚                                                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚   Working    โ”‚  โ”‚   Episodic    โ”‚  โ”‚    Semantic     โ”‚ โ”‚
โ”‚  โ”‚   Memory     โ”‚  โ”‚   Memory      โ”‚  โ”‚    Memory       โ”‚ โ”‚
โ”‚  โ”‚              โ”‚  โ”‚               โ”‚  โ”‚                 โ”‚ โ”‚
โ”‚  โ”‚ VecDeque     โ”‚  โ”‚   SQLite      โ”‚  โ”‚  Neo4j / SQLite โ”‚ โ”‚
โ”‚  โ”‚ + Tiktoken   โ”‚  โ”‚   WAL Mode    โ”‚  โ”‚  Knowledge      โ”‚ โ”‚
โ”‚  โ”‚ Token Budget โ”‚  โ”‚   Sessions    โ”‚  โ”‚    Graph        โ”‚ โ”‚
โ”‚  โ”‚   O(1)       โ”‚  โ”‚  + Messages   โ”‚  โ”‚  + D3 Export    โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚         โ”‚                  โ”‚                   โ”‚           โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜           โ”‚
โ”‚                   MEMORY CONSOLIDATOR                       โ”‚
โ”‚         LLM-powered background summarization loop           โ”‚
โ”‚         Triggers: every 20 messages OR 1 hour TTL           โ”‚
โ”‚         Output: long-term vector embeddings                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Working Memory

  • Token-budgeted context window โ€” tracks exact token count using tiktoken-rs (cl100k_base tokenizer)
  • Smart compression โ€” preserves system message + last N exchanges; drops oldest messages when budget exceeded
  • Expiry TTL โ€” auto-evicts idle sessions (is_expired(Duration))
  • Consolidator hook โ€” plugs into MemoryConsolidator for seamless promotion to long-term memory

Episodic Memory

  • SQLite-backed persistence โ€” WAL journal mode, 64MB cache, optimized pragmas for high-throughput writes
  • Transactional writes โ€” save_message_transactional ensures consistency across concurrent sessions
  • Session management โ€” UUID-based session IDs with per-channel tracking
  • Chronological recall โ€” get_history(session_id, limit) returns messages in conversation order

Semantic Memory (Knowledge Graph)

  • Dual backend โ€” SqliteKnowledgeGraph (zero-dependency) or Neo4jKnowledgeGraph (enterprise scale)
  • Entity + relation modeling โ€” add_entity, add_relation, find_related with directional traversal
  • D3.js export โ€” export_d3_json() produces graph visualization data for the Web UI dashboard
  • Batch entity lookups โ€” find_entities_batch for efficient bulk graph queries

Memory Consolidator

The background MemoryConsolidator runs as a persistent Tokio task and:

  1. Triggers every 20 messages or every 1 hour per session
  2. Fetches the last 50 messages and generates an LLM summary
  3. Stores the summary as a timestamped embedding in the Vector Store (type: "conversation_summary")
  4. Tags memories with importance and access_count for future decay/retrieval scoring

๐Ÿ“š GraphRAG Knowledge Engine

Crablet's RAG system goes far beyond simple vector similarity โ€” it combines dense retrieval with structured knowledge graph reasoning:

Query Input
    โ”‚
    โ–ผ
Vector Search (fastembed / Qdrant)
    โ”‚           โ†•  cosine similarity
    โ–ผ
Entity Extraction (Rule + Phrase + Hybrid modes)
    โ”‚
    โ–ผ
Knowledge Graph Traversal (Neo4j / SQLite)
    โ”‚  โ†’ finds related entities and relations
    โ–ผ
Graph-Augmented Reranking
    โ”‚  score = vector_score ร— 0.7 + graph_boost ร— 0.3
    โ”‚  graph_boost = coverage ร— 0.4 + relation_weight ร— 0.25
    โ”‚              + centrality ร— 0.15 + graph_signal ร— 0.2
    โ–ผ
Retrieved Context (documents + KG relations injected)

Key RAG Features

Feature Implementation
Embedding backends fastembed (AllMiniLM-L6-v2, 384-dim, local) or Qdrant cloud
Vector store SQLite (default), Qdrant (via qdrant-support feature), In-Memory (tests)
Chunking strategies RecursiveCharacterChunker (500 chars, 50 overlap) + MarkdownChunker (heading-aware)
Entity extraction Rule (tokenization), Phrase (bigram windows), Hybrid (both)
Graph backends SqliteKnowledgeGraph or Neo4jKnowledgeGraph (feature-gated)
Centrality scoring Normalized in-/out-degree centrality for entity relevance ranking
Document types Text, Markdown (structure-aware), PDF (pdf-extract), Multimodal
Embedder pool 2 concurrent fastembed workers (Tokio blocking tasks)
Reranking Graph-signal-weighted cosine reranking before final top-k selection

Supported Document Formats

crablet knowledge extract --file document.pdf      # PDF ingestion
crablet knowledge extract --file notes.md          # Markdown-aware chunking
crablet knowledge extract --file code.rs           # Source code indexing
crablet knowledge query "Rust async patterns"      # Semantic search

๐ŸŽจ Canvas โ€” Live Artifacts

Canvas is Crablet's real-time structured output rendering system. Rather than returning plain text, System 2 automatically detects and publishes rich artifacts to an interactive canvas that users can view, edit, and export.

Canvas Component Types

enum CanvasComponent {
    Markdown  { content: String },
    Code      { language: String, content: String, filename: Option<String> },
    Mermaid   { chart: String },       // Auto-rendered flow/sequence diagrams
    DataTable { headers, rows, title }, // Structured tabular data
    Html      { content: String },      // Live HTML preview (UI mockups)
}

How Canvas Works

  1. Auto-detection โ€” detect_and_publish_canvas() scans every LLM response for structured blocks
  2. Artifact routing โ€” detected artifacts are published to the EventBus as AgentEvent::CanvasUpdate
  3. Session-scoped state โ€” CanvasManager maintains per-session CanvasState with ordered sections
  4. Real-time streaming โ€” artifacts are streamed to the frontend via SSE (Server-Sent Events)
  5. CRUD operations โ€” add_component, update_component, remove_component for interactive editing

Supported Artifact Triggers

Trigger Artifact Type Example
```mermaid Flow diagram Architecture diagrams, sequence charts
```html + <div/html/body> HTML Preview UI mockups, dashboards
```rust/python/ts (>5 lines) Code snippet Generated code, scripts
DataTable JSON Data table Query results, comparisons
Markdown sections Rich text Reports, documentation

๐Ÿค– Multi-Agent Swarm

The Swarm system enables true multi-agent collaboration using Rust's ownership model to guarantee race-free concurrent execution:

Agent Roles (Pre-built)

Agent File Specialization
Researcher agent/researcher.rs Web search, information gathering
Coder agent/coder.rs Code generation and review
Analyst agent/analyst.rs Data analysis, pattern recognition
Reviewer agent/reviewer.rs Quality assurance, critique
Planner agent/planning.rs Task decomposition, goal trees
SecurityAgent agent/security.rs Vulnerability scanning, audit
VotingAgent agent/voting.rs Democratic consensus on proposals
DebateModerator agent/debate.rs Structured multi-round argumentation
HITL agent/hitl.rs Human-in-the-loop approval gates

Swarm Communication Model

// Typed message protocol โ€” compile-time safe
enum SwarmMessage {
    Task         { task_id, description, context, payload },
    Result       { task_id, content, payload },
    StatusUpdate { task_id, status },
    Broadcast    { topic, content },     // pub/sub via topic registry
    Error        { task_id, error },
}
  • Pub/Sub topics โ€” agents subscribe to named topics; Swarm::publish(topic, msg) fans out
  • Timeout protection โ€” every agent processing step has a 30-second hard timeout
  • Blackboard pattern โ€” SharedBlackboard (DashMap) for shared state without message passing
  • Persistence โ€” SwarmPersister saves task graphs and results to SQLite for crash recovery

๐Ÿ—‚๏ธ Project Structure

crablet/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.rs                       # Entry point + CLI command dispatch
โ”‚   โ”œโ”€โ”€ cognitive/                    # โ˜… Cognitive core
โ”‚   โ”‚   โ”œโ”€โ”€ router.rs                 # Meta-router: classifies & dispatches to S1/S2/S3
โ”‚   โ”‚   โ”œโ”€โ”€ system1.rs                # Intuitive layer (Trie + Levenshtein)
โ”‚   โ”‚   โ”œโ”€โ”€ system2/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs                # Deep reasoning orchestration
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ canvas.rs             # Canvas artifact auto-detection
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ multimodal.rs         # Vision + audio integration
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ post_process.rs       # Response post-processing
โ”‚   โ”‚   โ”œโ”€โ”€ system3.rs                # Swarm routing
โ”‚   โ”‚   โ”œโ”€โ”€ react.rs                  # ReAct Thoughtโ†’Actionโ†’Observation loop
โ”‚   โ”‚   โ”œโ”€โ”€ tot.rs                    # Tree of Thoughts
โ”‚   โ”‚   โ”œโ”€โ”€ mcts_tot.rs               # MCTS + UCB1 thought exploration
โ”‚   โ”‚   โ”œโ”€โ”€ streaming_pipeline.rs     # SSE streaming output
โ”‚   โ”‚   โ”œโ”€โ”€ llm/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ mod.rs                # LlmClient trait + OpenAI/Ollama/DashScope/Kimi/ZhiPu
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ cache.rs              # Semantic response cache (Moka LRU)
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ safety.rs             # Safety oracle injection
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ cost_guard.rs         # Token budget enforcement
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ semantic_cache.rs     # Query deduplication
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ planning.rs           # Goal decomposition
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ rag.rs                # RAG context injection
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ skill_context.rs      # Skill metadata injection
โ”‚   โ”‚   โ””โ”€โ”€ multimodal/               # Image + audio processing
โ”‚   โ”œโ”€โ”€ memory/                       # โ˜… Memory system
โ”‚   โ”‚   โ”œโ”€โ”€ working.rs                # Token-budgeted in-memory context
โ”‚   โ”‚   โ”œโ”€โ”€ episodic.rs               # SQLite session & message persistence
โ”‚   โ”‚   โ”œโ”€โ”€ semantic.rs               # Knowledge graph (SQLite + Neo4j)
โ”‚   โ”‚   โ”œโ”€โ”€ consolidator.rs           # Background LLM summarization loop
โ”‚   โ”‚   โ”œโ”€โ”€ manager.rs                # Unified memory access interface
โ”‚   โ”‚   โ””โ”€โ”€ shared.rs                 # SharedBlackboard for swarm agents
โ”‚   โ”œโ”€โ”€ knowledge/                    # โ˜… RAG engine
โ”‚   โ”‚   โ”œโ”€โ”€ vector_store.rs           # fastembed + SQLite/Qdrant vector store
โ”‚   โ”‚   โ”œโ”€โ”€ graph_rag.rs              # GraphRAG: vector + KG hybrid retrieval
โ”‚   โ”‚   โ”œโ”€โ”€ graph.rs                  # Knowledge graph CRUD
โ”‚   โ”‚   โ”œโ”€โ”€ chunking.rs               # Recursive + Markdown chunkers
โ”‚   โ”‚   โ”œโ”€โ”€ reranking.rs              # Graph-signal reranker
โ”‚   โ”‚   โ”œโ”€โ”€ extractor.rs              # Document text extraction
โ”‚   โ”‚   โ”œโ”€โ”€ pdf.rs                    # PDF parsing
โ”‚   โ”‚   โ”œโ”€โ”€ ingestion.rs              # Batch document ingestion pipeline
โ”‚   โ”‚   โ””โ”€โ”€ multimodal.rs             # Image/audio knowledge extraction
โ”‚   โ”œโ”€โ”€ gateway/                      # โ˜… API Gateway (Axum)
โ”‚   โ”‚   โ”œโ”€โ”€ server.rs                 # HTTP + WebSocket server setup
โ”‚   โ”‚   โ”œโ”€โ”€ websocket.rs              # Real-time WebSocket handler
โ”‚   โ”‚   โ”œโ”€โ”€ canvas.rs                 # Canvas component types
โ”‚   โ”‚   โ”œโ”€โ”€ canvas_manager.rs         # Per-session canvas state management
โ”‚   โ”‚   โ”œโ”€โ”€ rpc.rs                    # JSON-RPC 2.0 dispatcher
โ”‚   โ”‚   โ”œโ”€โ”€ session.rs                # Session lifecycle management
โ”‚   โ”‚   โ”œโ”€โ”€ ratelimit.rs              # Token bucket rate limiting (governor)
โ”‚   โ”‚   โ””โ”€โ”€ events.rs                 # SSE event streaming
โ”‚   โ”œโ”€โ”€ agent/                        # โ˜… Agent roles
โ”‚   โ”‚   โ”œโ”€โ”€ swarm.rs                  # Swarm orchestrator + channel mesh
โ”‚   โ”‚   โ”œโ”€โ”€ coordinator.rs            # Multi-agent task coordinator
โ”‚   โ”‚   โ”œโ”€โ”€ factory.rs                # Agent instantiation registry
โ”‚   โ”‚   โ”œโ”€โ”€ voting.rs                 # Consensus voting mechanism
โ”‚   โ”‚   โ”œโ”€โ”€ debate.rs                 # Multi-round debate moderator
โ”‚   โ”‚   โ”œโ”€โ”€ hitl.rs                   # Human-in-the-loop approval
โ”‚   โ”‚   โ”œโ”€โ”€ researcher.rs             # Research specialist
โ”‚   โ”‚   โ”œโ”€โ”€ coder.rs                  # Code generation specialist
โ”‚   โ”‚   โ”œโ”€โ”€ analyst.rs                # Data analysis specialist
โ”‚   โ”‚   โ”œโ”€โ”€ reviewer.rs               # Review & critique specialist
โ”‚   โ”‚   โ””โ”€โ”€ planning.rs               # Planning & decomposition
โ”‚   โ”œโ”€โ”€ tools/                        # Tool implementations
โ”‚   โ”‚   โ”œโ”€โ”€ bash.rs                   # Shell execution (SafetyOracle filtered)
โ”‚   โ”‚   โ”œโ”€โ”€ file.rs                   # File read/write/list
โ”‚   โ”‚   โ”œโ”€โ”€ search.rs                 # Web search (Serper / DuckDuckGo)
โ”‚   โ”‚   โ”œโ”€โ”€ http.rs                   # HTTP client tool
โ”‚   โ”‚   โ”œโ”€โ”€ vision.rs                 # Image analysis
โ”‚   โ”‚   โ”œโ”€โ”€ browser.rs                # Chromium browser automation
โ”‚   โ”‚   โ””โ”€โ”€ mcp.rs                    # MCP protocol tool bridge
โ”‚   โ”œโ”€โ”€ skills/                       # Plugin/skill management
โ”‚   โ”‚   โ”œโ”€โ”€ registry.rs               # Skill discovery and registration
โ”‚   โ”‚   โ”œโ”€โ”€ executor.rs               # YAML/Python/Node.js skill runner
โ”‚   โ”‚   โ”œโ”€โ”€ installer.rs              # Git-based skill installation
โ”‚   โ”‚   โ”œโ”€โ”€ openclaw.rs               # SKILL.md prompt-based skills
โ”‚   โ”‚   โ””โ”€โ”€ watcher.rs                # Hot-reload skill file watcher
โ”‚   โ”œโ”€โ”€ channels/                     # Input channel adapters
โ”‚   โ”‚   โ”œโ”€โ”€ cli/                      # Interactive CLI + subcommands
โ”‚   โ”‚   โ”œโ”€โ”€ domestic/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ dingtalk.rs           # DingTalk integration
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ feishu.rs             # Feishu/Lark integration
โ”‚   โ”‚   โ”œโ”€โ”€ international/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ telegram.rs           # Telegram Bot
โ”‚   โ”‚   โ”œโ”€โ”€ discord.rs                # Discord Gateway
โ”‚   โ”‚   โ””โ”€โ”€ universal/
โ”‚   โ”‚       โ””โ”€โ”€ http_webhook.rs       # Generic HTTP webhook
โ”‚   โ”œโ”€โ”€ auth/                         # Authentication & authorization
โ”‚   โ”‚   โ”œโ”€โ”€ oidc.rs                   # OpenID Connect / OAuth2 flow
โ”‚   โ”‚   โ”œโ”€โ”€ handlers.rs               # Login/callback HTTP handlers
โ”‚   โ”‚   โ””โ”€โ”€ middleware.rs             # JWT validation middleware
โ”‚   โ”œโ”€โ”€ safety/                       # Safety layer
โ”‚   โ”‚   โ”œโ”€โ”€ oracle.rs                 # Command allowlist/blocklist
โ”‚   โ”‚   โ””โ”€โ”€ mod.rs                    # Safety level config (Strict/Permissive/Disabled)
โ”‚   โ”œโ”€โ”€ sandbox/                      # Execution sandboxing
โ”‚   โ”‚   โ”œโ”€โ”€ docker.rs                 # Docker container isolation
โ”‚   โ”‚   โ””โ”€โ”€ local.rs                  # Process-level sandboxing
โ”‚   โ”œโ”€โ”€ scripting/                    # Lua 5.4 scripting engine
โ”‚   โ”‚   โ”œโ”€โ”€ engine.rs                 # mlua runtime integration
โ”‚   โ”‚   โ””โ”€โ”€ bindings.rs               # Rust โ†’ Lua API bindings
โ”‚   โ”œโ”€โ”€ audit/                        # Security audit agent
โ”‚   โ”œโ”€โ”€ protocols/
โ”‚   โ”‚   โ””โ”€โ”€ a2a.rs                    # Agent-to-Agent protocol
โ”‚   โ””โ”€โ”€ telemetry.rs                  # OpenTelemetry tracing + metrics
โ”œโ”€โ”€ frontend/                         # Web UI (TypeScript + React + TailwindCSS)
โ”œโ”€โ”€ skills/                           # Built-in skill definitions (SKILL.md)
โ”‚   โ”œโ”€โ”€ create_skills/
โ”‚   โ”œโ”€โ”€ find_skills/
โ”‚   โ”œโ”€โ”€ proactive_agent/
โ”‚   โ””โ”€โ”€ safe_run/
โ”œโ”€โ”€ mcp_servers/                      # Example MCP server scripts
โ”‚   โ”œโ”€โ”€ math_server.py
โ”‚   โ””โ”€โ”€ mcp_test_server.py
โ”œโ”€โ”€ migrations/                       # SQLite migration files
โ”œโ”€โ”€ config/config.toml                # Default configuration
โ”œโ”€โ”€ templates/index.html              # Web UI HTML template
โ”œโ”€โ”€ tests/                            # Integration & unit tests (25+ test files)
โ”œโ”€โ”€ Cargo.toml
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml
โ””โ”€โ”€ Justfile

โš™๏ธ LLM Provider Support

Crablet supports a wide range of LLM backends through a unified LlmClient trait:

Provider Authentication Streaming Tool Calls Notes
OpenAI OPENAI_API_KEY โœ… SSE โœ… Function Calling gpt-5.2, gpt-5.3, etc.
DashScope (Qwen) DASHSCOPE_API_KEY โœ… โœ… OpenAI-compatible endpoint
Ollama Local โœ… โœ… qwen2.5:14b default
Kimi (Moonshot) MOONSHOT_API_KEY โœ… โœ… Long-context specialist
ZhiPu (GLM) ZHIPU_API_KEY โœ… โœ… Chinese-optimized
Any OpenAI-compat OPENAI_API_BASE โœ… โœ… Custom base URL

๐Ÿš€ Quick Start

Prerequisites

  • Rust 1.80+ โ€” install via rustup
  • Docker (optional โ€” for Neo4j and sandbox execution)
  • Git

Option 1: One-Click Scripts (Recommended)

# 1. Clone
git clone https://github.com/isLinXu/crablet.git
cd crablet

# 2. Configure model settings anytime
./settings.sh
# Optional: non-interactive or skip model connectivity check
./settings.sh --non-interactive
./settings.sh --skip-verify

# 3. Install and start in one command
./one-click.sh

Common maintenance commands:

# Check service status
crablet status

# Deep clean build artifacts and cache (free up space)
./clean.sh

# Manual build and install CLI
./install.sh

# Show current configuration
crablet config

# Manage scheduled tasks
crablet task list

# Manage workflows
crablet workflow list

# Start services in debug mode (detailed logs)
./debug.sh

# Full uninstall
./uninstall.sh --full

Option 2: Local Build

# 1. Clone
git clone https://github.com/isLinXu/crablet.git
cd crablet

# 2. Fast build โ€” CLI + Web only (~5 min)
cargo build --release --no-default-features --features web

# 3. Full build โ€” all features (~15-20 min)
cargo build --release

# 4. Initialize config & database
./target/release/crablet init

# 5. Set your LLM API key
export OPENAI_API_KEY=sk-xxx
# or for DashScope/Qwen:
export DASHSCOPE_API_KEY=sk-xxx
export OPENAI_API_BASE=https://dashscope.aliyuncs.com/compatible-mode/v1

# 6. Start chatting
./target/release/crablet chat

๐Ÿ’ก Speed tip: Install sccache to cache Rust compilation artifacts across builds:

cargo install sccache
export RUSTC_WRAPPER=sccache

Option 3: Docker Compose (Recommended for full stack)

# Set your API key
export OPENAI_API_KEY=sk-xxx

# Launch Crablet + Neo4j
docker-compose up -d

# Open Web UI
open http://localhost:3000

Option 4: Docker Single Container

docker run -d \
  --name crablet \
  -p 3000:3000 \
  -p 18789:18789 \
  -e OPENAI_API_KEY=sk-xxx \
  -v ./data:/data \
  -v ./skills:/skills \
  crablet:latest

Option 5: Desktop App (macOS / Windows)

Double-click to launch โ€” no terminal, no Docker, no dev environment needed.

# 1. Clone & build sidecar
git clone https://github.com/isLinXu/crablet.git
cd crablet
just desktop-sidecar        # or: cargo build --release -p crablet --no-default-features --features web

# 2. Copy sidecar binary
just desktop-sidecar-copy   # copies to desktop/binaries/

# 3. Build desktop app
just desktop-dmg            # macOS: generates .dmg in target/release/bundle/dmg/
just desktop-build          # macOS: generates .app only

# Or use the shell script directly:
./desktop/build-desktop.sh

First launch: The app opens a splash screen where you can paste your OpenAI / DashScope API key. The key is saved to your system keychain โ€” no env vars needed.

How it works: The Tauri shell launches crablet serve-web --port 18799 as a sidecar process, waits for it to become ready, then navigates to the built-in Web UI. Closing the window gracefully terminates the sidecar.

๐Ÿ“ฆ Pre-built releases: Download DMG / EXE from GitHub Releases (tag-triggered CI builds).


๐Ÿ’ฌ CLI Reference

# Interactive multi-turn chat
crablet chat

# Single task execution
crablet run "Analyze this Rust code for performance bottlenecks"

# Unified Web UI + API gateway
crablet serve-web --port 18790

# Explicit gateway launch (same unified control plane)
crablet gateway --port 18790

# Vision / multimodal
crablet vision --image ./screenshot.png --query "Describe this diagram"

# Audio transcription
crablet audio --file meeting.wav

# Skill management
crablet skill list
crablet skill install https://github.com/user/my-skill.git
crablet skill create my-new-skill

# Knowledge base
crablet knowledge extract --file document.pdf
crablet knowledge extract --file notes.md
crablet knowledge query "How does GraphRAG work?"

# Security audit
crablet audit .
crablet audit ./src --format json    # CI/CD-friendly JSON output

# System status
crablet status

# Lua scripting
crablet script run examples/scripts/summarize_paper.lua

# Debug / introspection
crablet debug --show-memory
crablet debug --show-graph

๐Ÿ”Œ Plugin & Skill Ecosystem

Crablet provides four complementary extension mechanisms:

1. skill.yaml โ€” Cross-Language Skills (Python / Node.js / Shell)

name: weather
description: Get current weather for a city using OpenMeteo API
version: 1.0.0
parameters:
  type: object
  properties:
    city:
      type: string
      description: The city to get weather for
  required: [city]
entrypoint: python3 weather.py
timeout: 10
env:
  API_KEY: ${OPENMETEO_API_KEY}

2. SKILL.md โ€” Prompt-Driven Skills (OpenClaw Compatible)

---
name: python-expert
description: Expert Python coding assistant
version: 1.0.0
---

You are a Python expert. Always use type hints and docstrings.
When writing code, follow PEP 8 conventions.

3. MCP Protocol โ€” Model Context Protocol

# config.toml
[mcp_servers]
math_server  = { command = "python3", args = ["mcp_servers/math_server.py"] }
custom_tools = { command = "node",    args = ["./my-mcp-server/index.js"] }

4. Built-in Tool Library

Tool Description Safety
bash Shell command execution SafetyOracle allowlist
file Read / Write / List files Path sandboxing
web_search Web search (Serper / DuckDuckGo) Safe
http Arbitrary HTTP requests Safe
vision Image understanding (multimodal LLM) Safe
browser Chromium browser automation Docker sandbox
calculator Math expression evaluation Safe
weather Weather API Safe

โš™๏ธ Configuration Reference

Config file location: ~/.config/crablet/config.toml

# Database
database_url = "sqlite:crablet.db?mode=rwc"

# LLM settings
model_name  = "gpt-4o-mini"
max_tokens  = 4096
temperature = 0.7

# Logging
log_level = "info"   # trace | debug | info | warn | error

# Safety
[safety]
level             = "Strict"   # Strict | Permissive | Disabled
allowed_commands  = ["ls", "cat", "echo", "pwd"]
blocked_commands  = ["rm", "mv", "sudo", "chmod"]

# MCP servers
[mcp_servers]
math_server = { command = "python3", args = ["mcp_servers/math_server.py"] }

# GraphRAG entity extraction mode
# GRAPH_RAG_ENTITY_MODE = "rule" | "phrase" | "hybrid" (default)

# Concurrency limits
[limits]
max_concurrent_requests = 100
request_timeout         = 30

# OIDC / OAuth2 (optional)
oidc_issuer        = "https://your-tenant.auth0.com/"
oidc_client_id     = "your-client-id"
oidc_client_secret = "your-client-secret"
jwt_secret         = "your-app-secret"

# Observability
[telemetry]
enabled  = true
endpoint = "http://tempo:4317"

Environment Variables

Variable Description
OPENAI_API_KEY OpenAI API key
DASHSCOPE_API_KEY Alibaba DashScope (Qwen) API key
OPENAI_API_BASE Custom OpenAI-compatible base URL
OLLAMA_MODEL Local Ollama model name (default: qwen2.5:14b)
OLLAMA_API_BASE Ollama server URL (default: http://localhost:11434)
MOONSHOT_API_KEY Kimi (Moonshot AI) API key
ZHIPU_API_KEY ZhiPu GLM API key
SERPER_API_KEY Serper web search API key
DATABASE_URL SQLite or PostgreSQL connection string
QDRANT_URL Qdrant vector database URL
RUST_LOG Log level (info, debug, trace)
GRAPH_RAG_ENTITY_MODE Entity extraction mode: rule / phrase / hybrid

Feature Flags

cargo build --release --no-default-features --features <flags>
Feature Flag Description Default
web Axum HTTP server + Web UI + REST API โœ…
qdrant-support Qdrant vector database backend โœ…
knowledge Full RAG: fastembed + PDF + Neo4j + Qdrant โœ… (with knowledge)
audio Whisper speech-to-text โŒ
scripting Lua 5.4 scripting engine (mlua) โŒ
telemetry OpenTelemetry distributed tracing โŒ
sandbox Docker container isolation (bollard) โŒ
telegram Telegram Bot integration โŒ
discord Discord Gateway integration โŒ
browser Chromium browser automation โŒ
inference ONNX Runtime (local model inference) โŒ
full All features enabled โŒ

๐ŸŒ API Reference

WebSocket Gateway

Endpoint: ws://localhost:18789/ws

Send a message:

{
  "type": "UserInput",
  "content": "Write a Rust async function that reads a file"
}

Receive streaming events:

Event Type Description
ThoughtGenerated ReAct reasoning step (System 2 thinking)
ToolExecutionStarted Tool invocation initiated
ToolExecutionFinished Tool result received
ResponseGenerated Final agent response
CanvasUpdate New canvas artifact (type: mermaid / code / html / markdown)
SwarmActivity Inter-agent message in the swarm
MemoryConsolidated Background memory consolidation completed

REST API

Method Endpoint Description
POST /api/chat Single-turn chat completion
GET /api/status System health & stats
GET /api/dashboard Monitoring dashboard data
GET /api/knowledge List knowledge base documents
DELETE /api/knowledge?source=... Delete knowledge document
GET /api/canvas/:session_id Get canvas state for session
GET /auth/login Initiate OIDC login flow
GET /auth/callback OIDC callback handler
GET /api/me Current authenticated user

๐Ÿšข Deployment

Docker Compose (Full Stack with Neo4j)

version: '3.8'

services:
  crablet:
    image: crablet:latest
    ports:
      - "3000:3000"      # Web UI
      - "18789:18789"    # WebSocket Gateway
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - DATABASE_URL=sqlite:///data/crablet.db
      - RUST_LOG=info
    volumes:
      - ./data:/data
      - ./skills:/skills
    depends_on:
      - neo4j

  neo4j:
    image: neo4j:5
    ports:
      - "7474:7474"      # Neo4j Web UI
      - "7687:7687"      # Bolt protocol
    environment:
      - NEO4J_AUTH=neo4j/password
    volumes:
      - neo4j_data:/data

volumes:
  neo4j_data:

Production Configuration

# config.toml (production)
database_url = "postgresql://user:pass@localhost/crablet"
log_level    = "warn"

[safety]
level = "Strict"

[telemetry]
enabled  = true
endpoint = "http://otel-collector:4317"

[limits]
max_concurrent_requests = 100
request_timeout         = 30

Observability Stack

Crablet exports OpenTelemetry telemetry compatible with the full CNCF observability stack:

Component Integration
Distributed Tracing Jaeger / Tempo
Metrics Prometheus (crablet.request.duration, crablet.llm.tokens)
Dashboards Grafana
Log aggregation Loki / any OTLP-compatible backend

๐Ÿงช Testing

The project includes 25+ test files covering:

# Unit & integration tests
cargo test

# Specific test suites
cargo test memory_test
cargo test vector_store_integration_test
cargo test react_chain_test
cargo test system1_verify
cargo test safety_test
cargo test graph_rag_returns_augmented_context

# End-to-end tests
cargo test e2e_full
cargo test e2e_auth_audit

# Demo tests (run specific agent scenarios)
cargo test demo_debate
cargo test demo_voting
cargo test demo_rag

๐Ÿ“š Documentation

Document Description
Getting Started Installation, first run, and basic usage
Architecture Deep dive into the cognitive architecture
API Reference CLI, REST API, WebSocket, and JSON-RPC
Configuration All config options and environment variables
Deployment Docker, production setup, and observability
Skill Development Writing custom skills and MCP servers
Contributing How to contribute to the project
Roadmap Upcoming features and milestones

๐Ÿ—บ๏ธ Roadmap

โœ… Implemented

  • Three-tier cognitive architecture (System 1 / 2 / 3)
  • Layered memory: Working โ†’ Episodic โ†’ Semantic + LLM Consolidation
  • GraphRAG: vector store + knowledge graph hybrid retrieval
  • Canvas: live artifact rendering (Mermaid, Code, HTML, DataTable)
  • Multi-agent Swarm with VotingAgent, DebateModerator, HITL
  • MCTS-based Tree of Thoughts reasoning
  • OIDC/OAuth2 authentication (Auth0, Google, Keycloak)
  • REST + WebSocket + JSON-RPC gateway
  • Plugin ecosystem (YAML skills, SKILL.md, MCP protocol)
  • Security Audit Agent
  • Multi-channel: CLI, Telegram, DingTalk, Feishu, Discord, HTTP Webhook
  • OpenTelemetry tracing + Prometheus metrics
  • Docker + Docker Compose deployment

๐Ÿ”„ Near-term (1โ€“3 months)

  • High-performance gateway rewrite โ€” Axum-native, 3-5x throughput improvement
  • 20+ messaging channels โ€” WeChat Work, Slack, WhatsApp, Microsoft Teams, QQ
  • Agent Coordinator V2 โ€” Dynamic role assignment, context isolation, sub-agent spawning
  • Canvas Editor โ€” Interactive canvas with Monaco code editor + Mermaid live preview
  • Approval workflow โ€” crablet approve <code> human-in-the-loop API
  • One-line installer โ€” curl -fsSL https://crablet.dev/install.sh | sh

๐Ÿ”ฎ Mid-term

  • Multi-tenancy โ€” RBAC, org isolation, SSO (LDAP/OAuth2), GDPR compliance
  • Function Calling V2 โ€” Parallel tool execution (ParallelToolExecution)
  • Long context management โ€” 128K+ token compression + summarization
  • Procedural Memory โ€” Skill learning from successful task execution
  • Cron scheduler โ€” Time-based and event-triggered task automation
  • Cost analytics dashboard โ€” Per-model, per-user token cost tracking

๐ŸŒŸ Long-term (6โ€“12 months)

  • Crablet Skill Store โ€” crablet skill install/search/publish marketplace
  • Crablet Cloud โ€” Multi-tenant SaaS hosting with autoscaling

๐Ÿค Contributing

Contributions of all kinds are welcome! Please read CONTRIBUTING.md first.

# Fork & clone
git clone https://github.com/your-username/crablet.git
cd crablet

# Create a feature branch
git checkout -b feature/amazing-feature

# Make changes, add tests
cargo test

# Commit with conventional commits
git commit -m "feat(memory): add memory decay scoring for old summaries"

# Push and open a PR
git push origin feature/amazing-feature

Development Guidelines

  • Rust style: cargo fmt + cargo clippy before committing
  • Tests required: All new features must include integration tests
  • Feature flags: New optional dependencies must be feature-gated
  • Safety first: New tools must go through SafetyOracle
  • No blocking: All I/O must use tokio::spawn_blocking or async APIs

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see LICENSE for details.


If Crablet helps you build something awesome, please give it a โญ Star!


Built with ๐Ÿฆ€ Rust and โค๏ธ by isLinXu and contributors


Crablet โ€” because good AI infrastructure should be as reliable as a crab's shell,
and as fast as it scuttles sideways.

About

๐Ÿฆ€๐Ÿฆ€๐Ÿฆ€Crablet: Next-gen AI Assistant

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors