Skip to content

Latest commit

Β 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🀡 Jeeves

A fully self-hosted, distributed AI assistant for Raspberry Pi 5
Lives in Discord. Controls your PC. Orchestrates AI agents to build software on your behalf.
$0/month. No cloud. No API keys.

Pi 5 Python Discord Ollama LM Studio License


What is Jeeves?

Jeeves is a production-grade, fully self-hosted AI assistant that runs across a Raspberry Pi 5 (always-on brain) and a Windows PC (heavy compute). It connects to your Discord servers and gives you a personal AI that:

  • πŸ’¬ Chats with persistent per-server memory and conversation history
  • 🧠 Routes tasks intelligently β€” fast Pi models for chat, powerful PC models for code
  • 🌐 Scrapes the web β€” content extraction, price monitoring, DuckDuckGo search
  • πŸ–₯️ Controls VS Code / Cursor on your PC over LAN β€” read, write, run files
  • πŸ€– Orchestrates Continue + Cursor β€” Jeeves plans via SPEC.md, agents build
  • πŸ”§ MCP Agent Mode β€” natural language multi-tool orchestration via the PC's 14B model
  • πŸ“… Manages your calendar (Google Calendar)
  • πŸ“§ Reads and sends email (IMAP/SMTP)
  • πŸ“± Builds Android apps autonomously via Gemini API
  • 🎨 Generates UI/UX design systems
  • πŸ“Ί Controls Chromecast (volume, mute)
  • πŸ“‘ Streams live updates to Discord during long-running tasks
  • πŸ—ƒοΈ BrainDB β€” SQLite-backed memory, tool audit log, task queue, project tracking
  • β˜€οΈ Morning briefing β€” daily digest of calendar + email + system stats
  • πŸ“˜ 978+ skills β€” auto-injected into coding tasks based on project type

You can rename it. "Jeeves" is the default activation word and persona. Change it to anything in the server config.


Architecture

Discord (multiple servers)
         β”‚
         β–Ό
pi-discord-bot.service          ← asyncio Discord client
         β”‚  POST /ask
         β–Ό
pi-assistant.service            ← HTTP daemon :8001
         β”‚
         β”œβ”€β”€ Tool Registry       ← tool_registry.py (NEW)
         β”‚     β”œβ”€β”€ coding-agent  β†’ !task, "build me", "create a", ...
         β”‚     β”œβ”€β”€ tools-list    β†’ !tools, !help tools
         β”‚     └── (extensible via *_tool.py drop-ins)
         β”‚
         β”œβ”€β”€ Tool layer          ← assistant_tools.py
         β”‚     β”œβ”€β”€ !scrape
         β”‚     β”œβ”€β”€ !browse
         β”‚     β”œβ”€β”€ !email
         β”‚     β”œβ”€β”€ !calendar
         β”‚     β”œβ”€β”€ !android
         β”‚     β”œβ”€β”€ !design
         β”‚     └── !cast
         β”‚
         β”œβ”€β”€ Brain pipeline      ← brain_pipeline.py
         β”‚     β”œβ”€β”€ Model caps + generation params per model
         β”‚     β”œβ”€β”€ keep_alive (model stays warm in Ollama)
         β”‚     β”œβ”€β”€ Per-server memory (BrainDB + markdown)
         β”‚     └── Ollama /v1/chat/completions
         β”‚
         β”œβ”€β”€ Task router         ← task_router.py
         β”‚     β”œβ”€β”€ Pi local:   qwen2.5:0.5b  (chat, default)
         β”‚     β”œβ”€β”€ Pi local:   qwen2.5:1.5b  (reasoning)
         β”‚     β”œβ”€β”€ Pi local:   qwen2.5-coder:3b (code)
         β”‚     β”œβ”€β”€ PC agent:   Qwen2.5-Coder-14B via LM Studio
         β”‚     └── MCP agent:  "jeeves agent: ..." β†’ tool loop
         β”‚
         └── BrainDB             ← brain_db.py (SQLite WAL)
               β”œβ”€β”€ Conversation history
               β”œβ”€β”€ Tasks, plans, subtasks
               β”œβ”€β”€ Agent runs + events
               β”œβ”€β”€ Tool audit log
               β”œβ”€β”€ Memory notes
               └── Project + file index

Skill System (skill_injector.py):
  978+ skills β†’ keyword scoring β†’ top-3 injected into every SPEC.md
  Interactive selection (β‰₯5 candidates): Discord menu β†’ user picks

MCP Layer (mcp_registry.py + mcp_client.py):
  Tool catalogue β†’ LM Studio 14B β†’ tool calls β†’ Pi executes β†’ results β†’ final answer β†’ Discord

Streaming:
  coding_agent β†’ POST /notify β†’ queue β†’ Discord bot polls GET /notify β†’ channel.send()

Two-Tier Intelligence

Tier Hardware Models Role
Pi Brain Raspberry Pi 5 (8GB) qwen2.5:0.5b, qwen2.5:1.5b, qwen2.5-coder:3b Always-on, sub-second routing, chat, memory, planning
PC Brain Windows PC (i9 / RTX 4070 / 32GB) Qwen2.5-Coder-14B via LM Studio Heavy inference, multi-file code, MCP agent orchestration

The Pi handles everything instantly. The PC is only invoked for tasks that need serious reasoning or MCP agent mode.


Hardware Requirements

Component Minimum Recommended
Board Raspberry Pi 4 (4GB) Raspberry Pi 5 (8GB)
Storage 32GB SD card NVMe SSD (128GB+)
OS Raspberry Pi OS Bookworm 64-bit Ubuntu 24 64-bit
Network WiFi Ethernet
PC (optional) Any with Ollama i7+ / RTX GPU / 16GB+ RAM

Quick Start

git clone https://github.com/GeneralMillz/pi-claw.git
cd pi-claw
chmod +x install.sh
./install.sh

Full guide: docs/INSTALL.md


Commands

Core Chat

Command Description
jeeves <anything> Chat with the assistant
jeeves agent: <request> MCP agent mode β€” multi-tool orchestration via PC 14B
jeeves do: <request> Alias for agent mode

Web & Research

Command Description
!scrape <url> Extract main content from a URL
!scrape price <url> Extract price from a product page
!scrape search <query> DuckDuckGo search (ad-filtered)
!scrape css=<selector> <url> CSS selector extraction
!browse <url> Navigate with headless Chromium via Pinchtab
!browse snap <url> Interactive element snapshot with click refs
!browse click <ref> Click element by ref
!browse screenshot Capture viewport as Discord attachment

Coding & VS Code

Command Description
!task <description> Plan β†’ SPEC.md β†’ Continue/Cursor builds autonomously
!task <desc> --path /your/path Specify output directory
!task <desc> --cn Use cn CLI (fully autonomous, no clicking)
!vscode ping Check VS Code bridge on PC
!vscode ls <path> List directory on PC
!vscode read <path> Read file from PC
!vscode write <path> <content> Write file to PC
!vscode run <cmd> Run shell command on PC

Android Builder

Command Description
!android <description> Build Android app via Gemini API
!android stop Halt current build
!android status Show build phase and iteration count
!android ping Check Gemini + VS Code bridge

Calendar & Email

Command Description
!addevent | title | YYYY-MM-DD | HH:MM Add calendar event
!getevents | start | end Get calendar events
!email unread Check unread email
!email send | to | subject | body Send email

Skills

Command Description
!skill install Scan and index all skills
!skill search <query> Search skills by keyword
!skill list List installed skills
!skill count Count skills

System & Debug

Command Description
!tools List all registered tools
!latency Measure warm-path model response time
!modelinfo Show current model + config
!audit Show last 20 tool call logs
!help Full command list
!cast volume 50 Set Chromecast volume
!cast mute / unmute Mute/unmute Chromecast

Natural language also works for calendar, email, scrape, browse, and task triggers.


AI Models

Model Size Provider Role
qwen2.5:0.5b 394MB Ollama (Pi) Default chat β€” fast, snappy replies
qwen2.5:1.5b 986MB Ollama (Pi) Reasoning, planning
qwen2.5-coder:3b 1.9GB Ollama (Pi) Code generation (Pi-side fallback)
gemma3:4b 2.5GB Ollama (Pi) Design + summarization
Qwen2.5-Coder-14B 9GB Q4 LM Studio (PC) Heavy code, MCP agent orchestration
Qwen2.5-Coder-3B 2.1GB Q4 LM Studio (PC) Inline autocomplete in VS Code

All models run 100% locally. No OpenAI API. No subscriptions.


MCP Agent Mode

Jeeves includes a full MCP (Model Context Protocol) layer for natural language multi-tool orchestration:

"jeeves agent: find the cheapest RTX 5090 and save it to memory"

  β†’ PC 14B model receives tool catalogue
  β†’ calls web_search("RTX 5090 cheapest price")
  β†’ calls memory_save("RTX 5090: $1,999 at B&H as of March 2026")
  β†’ returns final answer to Discord

All tool calls are logged to BrainDB's tool_audit table automatically.

See docs/MCP.md for the full reference.


Skill System

Every !task command automatically injects relevant skills from the 978-skill library into the SPEC before Continue builds. When 5 or more candidate skills are found, Jeeves sends a numbered menu to Discord so you can pick which ones to include.

πŸ“˜ Candidate skills found (6):
1. pygame-2d-games
2. game-development
3. python-patterns
4. oop-design
5. collision-detection
6. sprite-animation

Reply with numbers (e.g. "1,3"), "all", or Enter to auto-select top 3.

See docs/SKILLS.md for the full reference.


Documentation

Doc Contents
docs/INSTALL.md Full step-by-step installation guide
docs/CONFIGURATION.md Server config, memory, personas, models
docs/ARCHITECTURE.md System design, request lifecycle, streaming
docs/AUTONOMOUS_BUILD.md !task pipeline β€” coding_agent, VS Code bridge, Continue
docs/CONTINUE.md Continue + LM Studio setup and usage
docs/COPILOT.md GitHub Copilot alternative setup
docs/MCP.md MCP layer β€” registry, client, agent mode, tool catalogue
docs/SKILLS.md Skill system β€” library, injector, custom skills
docs/BROWSER.md Pinchtab browser tool β€” commands and setup
docs/SCRAPE.md Web scraping β€” content, price, search
docs/ANDROID.md Android builder via Gemini API
docs/CLAUDE_CODE_INTEGRATION.md Route Claude Code through Jeeves (zero API cost)
docs/DISCOVERY.md Discovery Layer β€” auto-index GitHub repos in /skills and /tools

Discovery Layer

Jeeves automatically indexes any GitHub repository you drop into /skills/ or /tools/ directories. The Discovery Layer scans these folders on a schedule, classifies each repo by type (skill, tool, or mixed), and displays them in the dashboard with search, filter, and stats.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Systemd timer (every 5 min)                                     β”‚
β”‚           ↓                                                      β”‚
β”‚ discover.py scans /skills/* and /tools/*                        β”‚
β”‚   β€’ Classifies by Option C hybrid rules                          β”‚
β”‚   β€’ Computes size and mtime recursively                         β”‚
β”‚   β€’ Writes discovery/index.json atomically                      β”‚
β”‚           ↓                                                      β”‚
β”‚ HTTP API (/api/discovery) + Dashboard Panel (DiscoveryView.js)  β”‚
β”‚   β€’ Search by name, path, or .md files                          β”‚
β”‚   β€’ Filter by type (skill, tool, mixed) or source               β”‚
β”‚   β€’ View metadata: file counts, size, modified date             β”‚
β”‚           ↓                                                      β”‚
β”‚ Zero impact on skill_injector, tool_registry, skills_manager    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Classification rules (Option C hybrid):

  • SKILL.md at depth 1 β†’ skill
  • Else README.md β†’ skill
  • Else β‰₯2 .md files β†’ skill
  • Else 1 .md file β†’ skill
  • Else .py files only β†’ tool
  • Else both .md + .py β†’ mixed
  • Else β†’ skip (ignored)

See docs/DISCOVERY.md for full technical reference.


Renaming Jeeves

{
  "activation_word": "atlas",
  "persona_file": "atlas.txt"
}

Create config/personas/atlas.txt with your custom persona. Done.


Project Status

Actively used in production. Current focus:

  • Two-tier Pi + PC inference routing
  • BrainDB β€” full SQLite event store
  • Web scraping via Scrapling
  • MCP registry + client layer
  • MCP agent mode with PC 14B orchestration
  • Continue/Cursor SPEC.md pipeline
  • keep_alive warm model management
  • Tool registry β€” priority-ordered extensible dispatch
  • Skill auto-injection with interactive Discord selection
  • Android builder via Gemini 2.0 Flash
  • MarkItDown universal document ingestion
  • MCP dashboard tool timeline UI
  • Scheduled price monitoring via BrainDB jobs
  • Voice input via Whisper

License

MIT β€” see LICENSE

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages