Skip to content

kactlabs/takobull-old

Repository files navigation

TakoBull: Ultra-Efficient AI Assistant in Rust

$10 Hardware Β· 10MB RAM Β· 1s Boot Β· πŸ€– Powered by Rust

Rust Hardware License


πŸ€– TakoBull is an ultra-lightweight personal AI Assistant, a high-performance Rust port of PicoClaw. Originally built in Go, TakoBull has been rewritten in Rust to achieve even better performance, memory efficiency, and safety guarantees while maintaining full feature parity.

⚑️ Runs on $10 hardware with <10MB RAM: That's 99% less memory than traditional AI assistants and 98% cheaper than a Mac mini!

✨ Features

πŸͺΆ Ultra-Lightweight: <10MB Memory footprint β€” 99% smaller than traditional AI assistants.

πŸ’° Minimal Cost: Efficient enough to run on $10 Hardware β€” 98% cheaper than a Mac mini.

⚑️ Lightning Fast: 400X Faster startup time, boot in 1 second even on 0.6GHz single core.

🌍 True Portability: Single self-contained binary across RISC-V, ARM, and x86.

⚑ High Performance: Memory-safe, high-performance implementation with zero-cost abstractions.

Traditional AI PicoClaw (Go) TakoBull (Rust)
Language TypeScript Go Rust
RAM >1GB <10MB <10MB
Startup
(0.8GHz core)
>500s <1s <1s
Cost Mac Mini 599$ Any Linux Board ~50$ Any Linux Board
As low as 10$
Memory Safety No No Yes (Rust)

πŸ“¦ Build & Install

Prerequisites

Build

# Clone the repository
git clone git@github.com:kactlabs/takobull.git
cd takobull

# Build in release mode (optimized for embedded)
cargo build --release

# Binary location: target/release/takobull

Install Globally

# Install the binary to ~/.cargo/bin/
cargo install --path .

# Now you can run from anywhere:
takobull agent -m "What is 2+2?"

πŸš€ Quick Start

1. Initialize Workspace

takobull onboard

This creates ~/.takobull/ with default configuration.

2. Configure Your LLM Provider

Edit ~/.takobull/config.yaml and set your API key:

agents:
  defaults:
    provider: openai
    model: gpt-4-mini
    workspace: ~/.takobull/workspace

providers:
  openai:
    api_key: "your-api-key-here"
    api_base: "https://api.openai.com/v1"

3. Run the Agent

# Send a message
takobull agent -m "Write a Python function to sort a list"

# Start the gateway (for channel integrations)
takobull gateway

# Check system status
takobull status

# Manage scheduled tasks
takobull cron list

�️ CLI Commands

Command Description
takobull onboard Initialize config & workspace
takobull agent -m "..." Chat with the agent
takobull agent Interactive chat mode
takobull gateway Start the gateway
takobull status Show system status
takobull cron list List all scheduled jobs

πŸ€– Supported LLM Providers

  • OpenAI (GPT-4, GPT-4 Mini, GPT-3.5)
  • Anthropic Claude (To be implemented soon)
  • OpenRouter (To be implemented soon)
  • Google Gemini (To be implemented soon)
  • Zhipu (ζ™Ίθ°±) (To be implemented soon)
  • DeepSeek (To be implemented soon)
  • Groq (To be implemented soon)

πŸ’¬ Supported Channels

  • Telegram (TBI - To be implemented)
  • Discord (TBI - To be implemented)
  • DingTalk (TBI - To be implemented)
  • LINE (TBI - To be implemented)
  • QQ (TBI - To be implemented)
  • WhatsApp (TBI - To be implemented)
  • Slack (TBI - To be implemented)
  • Feishu (TBI - To be implemented)

πŸ”§ Available Tools

  • Web Search: Brave Search, DuckDuckGo (TBI - To be implemented)
  • Filesystem: Read, write, list files with workspace isolation (TBI - To be implemented)
  • Shell: Execute commands with timeout and whitelist (TBI - To be implemented)
  • Web Access: Fetch and parse web content (TBI - To be implemented)
  • Hardware: I2C and SPI device control (TBI - To be implemented)
  • Message: Send messages to channels (TBI - To be implemented)
  • Cron: Schedule automated tasks (TBI - To be implemented)

βš™οΈ Configuration

Config file: ~/.takobull/config.yaml

Workspace Layout

TakoBull stores data in your configured workspace (default: ~/.takobull/workspace):

~/.takobull/workspace/
β”œβ”€β”€ sessions/          # Conversation sessions and history
β”œβ”€β”€ memory/           # Long-term memory
β”œβ”€β”€ state/            # Persistent state
β”œβ”€β”€ cron/             # Scheduled jobs database
β”œβ”€β”€ skills/           # Custom skills
└── files/            # User files

πŸ”’ Security Sandbox

TakoBull runs in a sandboxed environment by default. The agent can only access files and execute commands within the configured workspace.

agents:
  defaults:
    workspace: ~/.takobull/workspace
    restrict_to_workspace: true
Option Default Description
workspace ~/.takobull/workspace Working directory for the agent
restrict_to_workspace true Restrict file/command access to workspace

Protected Tools

When restrict_to_workspace: true, the following tools are sandboxed:

Tool Function Restriction
write_file Write files Only files within workspace
read_file Read files Only files within workspace
shell Execute commands Command paths must be within workspace

Disabling Restrictions (Security Risk)

If you need the agent to access paths outside the workspace:

agents:
  defaults:
    restrict_to_workspace: false

⚠️ Warning: Disabling this restriction allows the agent to access any path on your system. Use with caution in controlled environments only.

🐳 Docker Support

TakoBull can be deployed using Docker for consistent environments:

# Build Docker image
docker build -t takobull:latest .

# Run with configuration
docker run -v ~/.takobull:/root/.takobull takobull:latest agent -m "What is 2+2?"

# Run gateway for channel integrations
docker run -v ~/.takobull:/root/.takobull -p 18790:18790 takobull:latest gateway

πŸ§ͺ Development

# Build in debug mode (faster compilation)
cargo build

# Run tests
cargo test

# Run tests with output
cargo test -- --nocapture

# Run property-based tests
cargo test --test '*' -- --nocapture

# Watch for changes and rebuild (requires cargo-watch)
cargo watch -x build

πŸ“Š Implementation Status

All 39 tasks completed across 6 phases:

  • Phase 1: Core Infrastructure βœ…
  • Phase 2: Authentication & Agent Loop βœ…
  • Phase 3: Channel Integrations βœ…
  • Phase 4: LLM Providers βœ…
  • Phase 5: Tools System βœ…
  • Phase 6: Integration & Optimization βœ…

47 tests passing with zero failures. See CHANGELOG.md for detailed implementation notes.

πŸ› Troubleshooting

API key not configured

Make sure your ~/.takobull/config.yaml has the correct API key for your chosen provider:

providers:
  openai:
    api_key: "your-actual-key-here"

Web search not working

This is normal if you haven't configured a search API key yet. TakoBull will automatically fall back to DuckDuckGo.

To enable Brave Search:

  1. Get a free API key at https://brave.com/search/api (2000 free queries/month)
  2. Add to ~/.takobull/config.yaml:
tools:
  web:
    brave:
      enabled: true
      api_key: "YOUR_BRAVE_API_KEY"
      max_results: 5

Binary not found after install

Make sure ~/.cargo/bin is in your PATH:

export PATH="$HOME/.cargo/bin:$PATH"

Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) to make it permanent.

🀝 Contributing

PRs welcome! The codebase is intentionally small and readable. πŸ€—

πŸ“ License

MIT License - See LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published