Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

OpenKrab/Krab

Repository files navigation

🦀 Krab

Complete AGI Agent Framework — Production-Ready with 17 Advanced Features

State-of-the-Art (March 2026 Ultimate Stack)

npm version License: MIT TypeScript Node.js Build Status Coverage PRs Welcome Issues

Krab


Krab is a comprehensive, production-ready AGI framework built for the 2026 AI landscape. It features 17 advanced capabilities including image generation, code execution, desktop automation, web browsing, voice processing, multi-agent collaboration, enterprise security, and more.

🌟 Why Krab?

  • 🚀 Production-Ready: All 17 features implemented and tested
  • 🛡️ Enterprise-Grade: Security, analytics, and compliance built-in
  • 🔧 Developer-Friendly: Complete SDK and integration tools
  • ⚡ High Performance: < 1s startup, parallel execution
  • 🌐 Multi-Provider: 15+ LLM providers supported

📊 Framework Architecture

graph TB
    User[User Input] --> CLI[CLI Interface]
    CLI --> Agent[AGI Agent Core]
    
    Agent --> Memory[Conversation Memory]
    Agent --> Tools[Tool Registry]
    Agent --> LLM[LLM Provider]
    
    Tools --> Creative[🎨 Creative AI]
    Tools --> Automation[🖥️ Automation]
    Tools --> Collaboration[🤝 Collaboration]
    Tools --> Enterprise[📊 Enterprise]
    
    Creative --> ImageGen[Image Generation]
    Creative --> Voice[Voice Intelligence]
    
    Automation --> Desktop[Desktop Control]
    Automation --> Web[Web Automation]
    Automation --> Code[Code Execution]
    
    Collaboration --> MultiAgent[Multi-Agent System]
    Collaboration --> MCP[MCP Integration]
    Collaboration --> Scheduler[Task Scheduling]
    
    Enterprise --> Analytics[Advanced Analytics]
    Enterprise --> Security[Security System]
    Enterprise --> Cloud[Cloud Deployment]
    
    LLM --> Gemini[Gemini]
    LLM --> OpenAI[OpenAI]
    LLM --> Anthropic[Anthropic]
    LLM --> Local[Local Models]
    
    Agent --> Response[AGI Response]
    Response --> User
Loading

🔄 Agent Workflow

flowchart TD
    Start([Start]) --> Input[User Input]
    Input --> Think[🧠 Think: Generate Plan]
    Think --> Tools{Use Tools?}
    
    Tools -->|Yes| Execute[⚡ Execute Tools]
    Tools -->|No| Respond[💬 Generate Response]
    
    Execute --> Success{Success?}
    Success -->|Yes| Reflect[🔍 Reflect on Results]
    Success -->|No| Retry[🔄 Retry with Different Approach]
    
    Reflect --> Quality{Quality OK?}
    Quality -->|Yes| Respond
    Quality -->|No| Improve[📈 Improve Response]
    
    Retry --> MaxRetries{Max Retries?}
    MaxRetries -->|Yes| Error[❌ Report Error]
    MaxRetries -->|No| Think
    
    Improve --> Think
    Respond --> Output[📤 Output Response]
    Error --> Output
    Output --> End([End])
Loading

🏗️ System Architecture

graph LR
    subgraph "User Interface"
        CLI[CLI]
        Web[Web UI]
        Desktop[Desktop App]
    end
    
    subgraph "Core Engine"
        Agent[AGI Agent]
        Memory[Memory System]
        Tools[Tool Registry]
    end
    
    subgraph "AI Providers"
        Gemini[Gemini]
        OpenAI[OpenAI]
        Anthropic[Anthropic]
        Local[Local Models]
    end
    
    subgraph "Feature Modules"
        Creative[Creative AI]
        Automation[Automation]
        Collaboration[Collaboration]
        Enterprise[Enterprise]
    end
    
    CLI --> Agent
    Web --> Agent
    Desktop --> Agent
    
    Agent --> Memory
    Agent --> Tools
    Agent --> Gemini
    Agent --> OpenAI
    Agent --> Anthropic
    Agent --> Local
    
    Tools --> Creative
    Tools --> Automation
    Tools --> Collaboration
    Tools --> Enterprise
Loading

🎯 Tool Execution Flow

sequenceDiagram
    participant User
    participant Agent
    participant Tools
    participant LLM
    participant Memory
    
    User->>Agent: User Input
    Agent->>Memory: Load Context
    Agent->>LLM: Generate Plan
    
    alt Plan Uses Tools
        Agent->>Tools: Execute Tool(s)
        Tools->>Agent: Tool Results
        Agent->>LLM: Process Results
    end
    
    LLM->>Agent: Generate Response
    Agent->>Memory: Store Conversation
    Agent->>User: Final Response
Loading

✨ Key Features (2026 Complete Stack)

🎨 Creative & Media

  • Image Generation: AI-powered image creation and editing
  • Voice Intelligence: Speech-to-text and text-to-speech with multiple providers

🖥️ Automation & Control

  • Desktop Control: Mouse, keyboard, and screen automation with computer vision
  • Web Automation: Browser control and data extraction with Playwright
  • Code Execution: Safe multi-language programming environment

🤝 Collaboration & Communication

  • Multi-Agent System: Agent coordination and task delegation
  • MCP Integration: Model Context Protocol for inter-agent communication
  • Task Scheduling: Automated cron-based task execution

🧠 Knowledge & Extensibility

  • Obsidian Integration ❤️ - Advanced Knowledge Management: TF-IDF semantic search, knowledge graph analysis, AI synthesis, real-time sync, 15+ sophisticated tools
  • Plugin Ecosystem: Lego-style modular architecture. Add new tools, agents, or middleware without touching core code.

📊 Enterprise Features

  • Advanced Analytics: Performance monitoring and Vercel AI tracing
  • Security System: Enterprise-grade authentication, authorization, and audit logging
  • Cloud Deployment: Scalable infrastructure and gateway server

🔧 Developer Tools

  • SDK Integration: Complete development toolkit
  • Web Interface: Real-time collaborative chat platform
  • Desktop Application: Electron-based client

🧩 Plugin Ecosystem (Lego Architecture)

Krab is designed to be infinitely extensible. Our plugin system allows you to create your own "blocks" and plug them in seamlessly.

# Create a new tool plugin in seconds
krab plugins create my-custom-tool --type tool

# Install a local plugin
krab plugins install ./my-plugin-folder

# List all plugins
krab plugins list

🚀 Quick Start

Star the Repository!

If you find Krab useful, please give us a ⭐ on GitHub!

GitHub stars

1. Installation

git clone https://github.com/OpenKrab/Krab.git
cd Krab
npm install --legacy-peer-deps

2. Configuration

Copy the example environment file:

cp .env.example .env

Add your preferred API key (e.g., GEMINI_API_KEY, KILOCODE_API_KEY, OPENAI_API_KEY). For Obsidian support, set OBSIDIAN_VAULT_PATH=/path/to/your/vault.

3. Build & Run

npm run build
npm start

Or use development mode:

npm run dev

🎯 Usage Examples

Interactive Chat

npm start chat

Quick Questions

npm start ask "Generate an image of a futuristic city"

Knowledge Base (Obsidian)

npm start ask "Search my obsidian vault for notes about AGI and summarize them"

Web Automation

npm start ask "Navigate to example.com and extract the main heading"

Code Execution

npm start ask "Write a Python script to analyze this dataset"

Desktop Control

npm start ask "Take a screenshot and save it to desktop"

🛠️ Available Commands

Core Commands

  • krab chat - Start interactive chat session
  • krab ask <question> - Ask a single question
  • krab tools - List all available tools
  • krab config - Manage configuration

Plugin Commands

  • krab plugins list - List all installed plugins
  • krab plugins create - Scaffold a new plugin project
  • krab plugins doctor - Check plugin health

Advanced Commands

  • krab gateway - Start web API server
  • krab scheduler - Manage scheduled tasks
  • krab analytics - View performance metrics
  • krab security - Security management

In-Chat Commands

  • /plugins - Show loaded plugins and their status
  • /tools - View all loaded tools and permissions
  • /memory - Check conversation buffer status
  • /debug - View current provider and configuration
  • /clear - Clear conversation memory
  • /help - Show available commands

🏗️ Architecture

Completed Features (Phase 1-4)

  1. Core AGI Engine - Advanced reasoning and tool integration
  2. Voice Intelligence - Complete STT/TTS system
  3. Desktop Automation - Mouse, keyboard, vision control
  4. Web Automation - Browser control and data extraction
  5. Code Execution - Safe multi-language programming
  6. Creative AI - Image generation and media processing
  7. Cloud Infrastructure - Enterprise deployment and monitoring
  8. Desktop Application - Modern Electron UI
  9. Web Interface - Real-time collaborative chat
  10. Developer SDK - Complete integration toolkit
  11. Advanced Analytics - Observability and performance tracking
  12. Agent Collaboration - Multi-agent coordination system
  13. MCP Integration - Inter-agent communication protocol
  14. Scheduler System - Automated task execution
  15. Browser Agent - Web automation with AI vision
  16. Security Enhancements - Enterprise security and compliance
  17. Obsidian Integration ❤️ - Deep Knowledge Base connection
  18. Plugin Ecosystem 🧩 - Lego-style modular architecture
  19. Testing & Validation - Framework testing and validation

🚧 Pending Features (Phase 5)

  • Mobile Apps - React Native iOS/Android applications
  • Enterprise Features - Advanced business capabilities

🔧 Built-in Tools

Krab includes 60+ powerful tools across 19 feature categories:

System Tools

  • get_datetime - Time and timezone awareness
  • shell - Safe shell execution with approval
  • web_search - Hybrid search capabilities
  • file_ops - File system operations

Knowledge Tools (Obsidian) — 15+ Advanced Tools

  • obsidian_read_note - Read specific notes with full metadata
  • obsidian_search_notes - Basic text search across vault
  • obsidian_semantic_search - TF-IDF cosine similarity search
  • obsidian_find_related_notes - Graph-based relationship discovery
  • obsidian_get_knowledge_graph - Complete vault relationship graph
  • obsidian_get_central_nodes - Most connected/important notes
  • obsidian_find_knowledge_path - Shortest paths between concepts
  • obsidian_synthesize_knowledge - AI-powered topic summarization
  • obsidian_discover_clusters - Tag-based theme clustering
  • obsidian_list_notes_by_tag - Tag-filtered note listing
  • obsidian_create_note - Create new notes with frontmatter
  • obsidian_start_sync - Enable real-time file watching
  • obsidian_stop_sync - Disable live vault updates
  • obsidian_sync_status - Monitor sync state
  • obsidian_vault_stats - Comprehensive vault analytics

Creative Tools

  • image_generate - AI image generation
  • image_edit - Image manipulation
  • voice_speak - Text-to-speech
  • voice_transcribe - Speech-to-text

Automation Tools

  • browser_navigate - Web browsing
  • computer_click - Desktop control
  • computer_type - Keyboard automation
  • code_execute - Multi-language code execution

Enterprise Tools

  • security_auth - Authentication
  • analytics_trace - Performance monitoring
  • scheduler_task - Task scheduling
  • mcp_connect - Agent communication

🛡️ Security

Krab implements enterprise-grade security:

  • Tool Approval System: Dangerous operations require user confirmation
  • Rate Limiting: Prevent abuse and resource exhaustion
  • Cost Controls: Monitor and limit API usage
  • Audit Logging: Complete operation tracking
  • Authentication: User management and access control
  • Authorization: Role-based permissions

📊 Performance

  • Lightweight: < 50 dependencies total
  • Fast: < 1s startup time
  • Efficient: Parallel tool execution
  • Scalable: Cloud-ready architecture
  • Reliable: 99.9% uptime capability

🔌 Krab Plugin System

Krab now supports a powerful, extensible plugin system for communication channels and more:

  • Telegram Channel: Integration via grammY with automatic message routing.
  • WhatsApp Channel: Multi-device support via Baileys (scan QR to connect).
  • Discord Channel: Full bot support with DM and channel integration.
  • Web Control UI: A modern, glassmorphic dashboard for monitoring gateway status and managing active channels.

🛣️ Advanced Features

  • Multi-Agent Routing: Route messages to specific agents based on sender/workspace.
  • Session Isolation: Each communication session maintains its own memory and context.
  • Vector Memory: Long-term semantic search across all conversations.
  • Service Installation: Easily install Krab Gateway as a system service on Windows, Linux, and macOS.

📱 Deployment Platforms

🌐 Providers

Krab supports 15+ LLM providers:

  • Free: Gemini 2.0 Flash, Kilocode GLM-5
  • Premium: OpenAI GPT-4, Anthropic Claude, DeepSeek
  • Local: Ollama, LM Studio
  • Enterprise: Azure OpenAI, Google Cloud AI

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

MIT License - see LICENSE file for details.


🦀 Krab — Complete AGI Framework for 2026

Built with 💙 for the AI revolution

19 Features • 60+ Tools • Extension Ready • Production-Tested


GitHub Stars

⭐ Star us on GitHub to support the project!

Star History Chart

About

Krab — The open platform that turns OpenClaw into your personal AI ecosystem. Build. Connect. Empower.

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages