Shinobu
Connects to Telegram as a single-user bot bridge for mobile chat, conversational reminders, voice playback, and approving local tasks, with group/forward/media isolation.
๐ Zero-Trust Security Self-Verification (Audit in 3 Seconds)
shinobu-core is built from day one with strict physical and protocol boundaries so you can inspect the entire runtime in seconds:
Zero Third-Party Core Dependencies (
dependencies = []): The core runtime, daemon, Web Memory Console, memory/reminder SQLite store, hybrid router, edge node, and Telegram bridge run 100% on the Python>= 3.10standard library โ zero externalpipsupply-chain risk. Only the optional desktop floating pet requirespip install -e ".[desktop]"(PySide6>=6.6).Loopback-First Daemon & Hardened Edge Node:
The HTTP/MCP daemon binds to
127.0.0.1by default (never exposing open ports to the public internet).EdgeNodeServer(shinobu node) hard-rejects0.0.0.0and any public IP, restricts execution to--allowed-root, and strictly forbidsshell=True.
KV-Cache-Friendly Frozen L0 Prefix: Built-in memory & reminder tools (
build_memory_tools) append tool schemas at the tail without mutating the frozen L0 system prompt prefix, preserving prompt KV-cache hit rates.Telegram 4-Lock Physical Isolation:
No groups: rejects all group/supergroup/channel messages;
Single-user allowlist: only the configured owner chat ID can interact;
No forwards: ignores forwarded messages to prevent indirect prompt injection;
Zero-media / never
getFile: drops media attachments and never downloads user photos/files from Telegram servers.
Plain-Text Auditable Source Only: Distributed strictly as readable Python source code (no closed-source binary installers).
3-Second Source Audit Command:
# PowerShell โ inspect all network, subprocess, bind-address, and Telegram media boundaries:
Get-ChildItem .\shinobu_core -Recurse -Filter *.py | Select-String -Pattern "HTTPConnection|urlopen|subprocess|getFile|0\.0\.0\.0|shell=True"# Linux / macOS
grep -rnE "HTTPConnection|urlopen|subprocess|getFile|0\.0\.0\.0|shell=True" ./shinobu_coreRelated MCP server: genpark-personal-agent-unified-autonomous-copilot-skill
โจ Design Philosophy & Key Strengths: Why It's Not Just a "Desktop Pet"
Most desktop pets and chat wrappers stop at being chat-only static character cards โ unable to do real engineering work and immediately losing context the moment you open a new window or switch apps. shinobu-core is built around the exact opposite philosophy: embedding Native Work Capability and Cross-Session Long-Term Working Memory into a zero-dependency microkernel, where the floating pet, Web Memory Console, and Telegram are simply different windows into one living working companion:
Native Work Capability (Far Beyond Small Talk): Powered by native Antigravity drivers, a bidirectional MCP tool hub, and a hardened local edge node (
--allowed-root+ L0/L1/L2 tiered approvals), Shinobu doesn't just sit on your screen โ it actively invokes tools, assists across your workspace, and lets you remotely approve local tasks from your phone.Cross-Session Long-Term Working Memory (Zero Context Reset Across Windows): Project context, preferences, distilled facts, and schedules persist in a local SQLite vault via sleep memory consolidation โ shared seamlessly across Desktop Pet, Web Console, Telegram, and external
/v1clients, and exposed back into any fresh AI IDE or agent session viashinobu mcp-serve/POST /mcp.
Core engineering highlights:
Native Non-Proxy Google Antigravity Drivers (
agy_cli&agy_sdk) + Multi-Engine Flexibility: Strictly zero reverse-proxying, zero traffic spoofing, and zero credential scraping โ connects directly through the officialagyCLI (persistentstream-jsonworker, default engine forshinobu node, with--add-dir/--settings/--dangerously-skip-permissionscontrols and silent WindowsCREATE_NO_WINDOWspawning) or the officialgoogle-antigravityPython SDK (lazy-loaded optional extra.[agy-sdk]supportinggemini/openai_local/litertmodes). All runtime state and session maps stay isolated under$SHINOBU_HOME/runtime/without polluting your main Antigravity workspace, while remaining equally compatible with standardopenai_compatendpoints (cloud APIs / Ollama / vLLM) and--engine hybrid.One Living Soul Across Every Surface (Not a Static Character Card): A single persistent brain and local SQLite memory vault simultaneously powers the built-in Web Memory Console (
shinobu ui), transparent desktop pet (shinobu pet), mobile Telegram (shinobu telegram), and any external OpenAI/v1frontend โ switching surfaces never resets memory, schedule, or voice state.KV-Cache-Friendly Frozen L0 Prefix + Adaptive Complexity Ratchet + Idle Auto-Archive: The core soul prefix is SHA-256 frozen and built-in tools are tail-appended;
ModelComplexityClassifierselects thinking effort dynamically (0msshort-circuit on greetings/ceilings,600msfail-open, upward-only per-episode ratchet, and tool-continuation effort reuse) with zero KV-cache thrashing. After 30 minutes of inactivity (SHINOBU_EPISODE_IDLE_ARCHIVE_SEC=1800), episodes auto-archive at zero token cost and reset toautoeffort, complemented byshinobu sleepmemory distillation.One Zero-Dependency Codebase: 3-Minute Local Play โ 7ร24 Hybrid Cloud: Pure Python standard library (
dependencies = []) runs standalone on a laptop in minutes, and scales seamlessly into--engine hybridcloud hosting โ routing tasks (with end-to-end per-turnreasoning_effortpropagation) to your local PC's nativeagy_cliedge node while awake and falling back to the cloud engine in seconds when your PC sleeps.Native Bidirectional MCP Hub (Client + Server): Discover and non-destructively install curated zero-key community MCP presets via
shinobu mcp(including safeagybridging), or expose Shinobu's own memory and reminder tools back to external AI IDEs and agents viashinobu mcp-serve(stdio) or remotePOST /mcp.Proactive Heartbeat, Natural-Language Reminders & Tri-Surface On-Demand TTS: Schedule reminders conversationally (
schedule_reminder/list_reminders) or via Telegram/remind, and trigger on-demand emotional voice playback (POST /api/tts) across Web, Desktop Pet, and Telegram with graceful degradation when no TTS backend is configured.Fault-Isolated Microkernel & Built-In Self-Diagnostics: External private packs attach via Python
entry_pointswith strict per-plugin fault isolation (a broken extension never crashes the kernel), complemented byshinobu doctorfor one-command nativeagy_sdk/agy_clidriver, isolation directory, adaptive complexity classifier, and redacted-secret health checks.
๐งญ Architecture: One Core, Local & Cloud Unified
The exact same shinobu-core package powers both a 3-minute pure-local companion and a 7ร24 cloud-hosted brain with local PC edge tentacles:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ shinobu-core (0 third-party deps) โ
โ Microkernel ยท Memory/Timemap SQLite ยท TTS โ
โ Orchestrator (Frozen L0 KV Prefix) ยท MCP โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Level 1: Pure Local Mode โ โ Level 2: 7ร24 Cloud Brain โ
โ (No cloud / no VPS needed) โ โ (Tailscale Serve, 0 ports) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โข shinobu serve (127.0.0.1) โ โ โข shinobu serve --engine โ
โ โข shinobu ui (Web Memory + โ Optional Edge Tentacle โ hybrid โ
โ click-to-speak TTS) โ โโโโโ shinobu node โโโโโโโโโบ โ โข shinobu telegram (4-Lock, โ
โ โข shinobu pet (Desktop Pet + โ (Private Tailscale Mesh; โ /remind, /voice, L1 Approve)โ
โ drawer TTS, PySide6 opt.) โ seamless fallback on sleep) โ โข POST /mcp & GCS daily backupโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโก Quick Start โ Level 1: Pure Local Experience (3 Minutes)
No cloud server, no public domain, and no Telegram bot required.
1. Install shinobu-core (Zero Dependencies)
git clone https://github.com/zanex-dev/shinobu.git
cd shinobu
pip install -e .2. Start the Local Loopback Daemon & Web Memory Console
# Optional: diagnose native Antigravity drivers (agy_cli / agy_sdk) and isolation dirs
shinobu doctor
# Terminal 1 โ start the local daemon on 127.0.0.1:18790
# Runs offline with default mock; switch to native non-proxy Antigravity or standard OpenAI APIs anytime:
shinobu serve --engine agy_cli # Official Antigravity CLI (non-proxy, isolated workspace)
# or: pip install -e ".[agy-sdk]" && shinobu serve --engine agy_sdk
# or: shinobu serve --engine openai_compat
# Terminal 2 โ open the built-in Web Memory Console
shinobu uiIn the Web Memory Console, you can chat, inspect memories & reminders, and click ๐ ๆ่ฏป (Speak) on any assistant bubble to play on-demand speech via POST /api/tts (gracefully shows a toast if no TTS backend is configured).
3. Optional: Launch the Desktop Floating Pet
Install the optional PySide6 UI extra only if you want the desktop pet window:
pip install -e ".[desktop]"
shinobu petThe pet chat drawer includes a ๐ ๆ่ฏป (Speak) button that synthesizes and plays the latest assistant reply (using native winsound on Windows with zero extra audio libraries, and graceful fallback hints on other platforms).
๐๏ธ Default Stack & Optional Ecosystem Menu
shinobu-core stays strictly zero-dependency (dependencies = []); every extra capability below is opt-in and non-mandatory:
Dimension | Default (Zero Dependencies) | Recommended Opt-In | Additional Options & Guides |
๐ง Brain Engine |
| Local native |
|
๐ฅ๏ธ UI Shell & Avatars | Built-in Web Memory Console ( |
| High-end community shell Project AIRI (with launcher & walkthrough: |
๐ Voice TTS & Colab | Silent by default (graceful notice, never blocks chat) | Daily free zero-key | Colab GPU IndexTTS-2.5 voice cloning ( |
๐งฉ Tools & Plugins | 0 external processes, 0 extra packages |
| External packages via Python |
# Optional Voice: install free Edge-TTS fallback and start local OpenAI-compatible TTS gateway (127.0.0.1:18791)
pip install -e ".[tts-edge]"
shinobu tts-gateway
# Connect a Colab GPU upstream (routes to GPU first, falls back to Edge-TTS when offline):
# shinobu tts-gateway --set-upstream https://<your-colab-tunnel-url>
# Optional Avatars: import a custom multi-expression PNG/WebP avatar pack
shinobu avatar --source ./my_avatars --name customโ๏ธ Level 2: 7ร24 Cloud Always-On Brain + Local Edge Node
When you are ready for an always-on companion reachable from your phone and capable of securely reaching your local PC while it is awake:
Zero Public Inbound Ports: Deploy
shinobu serve --engine hybridon a small VM (e.g., GCPe2-smallon Standard Tier for 200 GiB/month free egress) and expose HTTPS strictly inside your private tailnet via Tailscale Serve.4-Lock Telegram Mobile Bridge: Run
shinobu telegramto chat, toggle voice notes (/voice on//voice off), schedule reminders (/remind 20m stretch), inspect nodes (/nodes), and tap inline[โ Approve]/[โ Reject]buttons for L1 command approvals.Local PC Edge Tentacle: Run
shinobu nodeon your workstation. While your PC is online, the cloudhybridrouter seamlessly delegates supported tasks to your local engine; when your PC sleeps or exits, the cloud brain automatically falls back to its cloud engine without interruption.Automated SQLite Hot Backups: Daily online
.backupsnapshots synced to object storage (GCS).
๐ See the step-by-step deployment & pitfall guide: deploy/gcp_setup.md.
๐ CLI, Telegram & API Quick Reference
CLI Commands (shinobu)
Command | Mode | Description |
| Setup | Initialize soul templates and the local SQLite memory store. |
| Local CLI | Chat directly with Shinobu in single-turn or interactive terminal mode. |
| Consolidation | Distill, consolidate, and cleanly close the active conversation episode. |
| Local / Cloud | Start the |
| Local | Open the zero-dependency Web Memory Console hosted by the running daemon. |
| Local (Optional) | Launch the transparent floating desktop pet & chat drawer (requires |
| Local (Optional) | Validate and import a custom multi-expression PNG/WebP avatar pack ( |
| Voice (Optional) | Start the local OpenAI-compatible |
| External UIs | Print local OpenAI |
| MCP Client | Inspect, probe, and non-destructively install curated zero-key community MCP presets or bridge MCP servers. |
| MCP Server | Expose Shinobu as an outbound stdio MCP server for external AI clients and IDEs. |
| Edge Tentacle | Register this PC over Tailscale/private network ( |
| Cloud / Local | Start the 4-lock isolated Telegram long-polling bridge. |
| Diagnostics | Inspect home/plugins/daemon state or run driver, isolation, and redacted credential health checks. |
Telegram Built-in Commands
Command | Description |
| Open the conversation management and archive panel. |
| Start a new conversation immediately (quickly archives the current one). |
| Consolidate memories and archive the current conversation. |
| Inspect or switch the reasoning engine ( |
| Inspect or adjust thinking effort ( |
| Inspect runtime health, active engine, and pending approval count. |
| List currently online local PC / Colab GPU edge nodes. |
| Check or toggle on-demand voice note replies. |
| List pending reminders from the SQLite |
| Schedule a new reminder (relative duration, local |
| Show the grouped command quick reference, aliases, usage examples, and current voice toggle state. |
Core HTTP / MCP & Agent Tool Contracts
Interface | Purpose |
| OpenAI |
| Synthesize speech ( |
| Query and create scheduled reminders stored in SQLite |
| Remote Model Context Protocol (MCP) JSON-RPC endpoint (protected by bearer token over Tailscale). |
| Memory read/write plus tail-appended |
๐ Connecting External Frontends (SillyTavern / Open WebUI / VTuber Shells)
shinobu-core runs completely standalone with zero external frontend dependencies. If you still want to reuse the exact same soul and memory vault inside SillyTavern, Cherry Studio, Open WebUI, or local VTuber/pet shells (e.g. Project AIRI, Open-LLM-VTuber, VPetLLM), run shinobu compat and plug the loopback /v1 base URL and bearer token into your client.
Integration Tip: Treat external clients as a thin UI shell โ disable client-side vector memory / auto-summary / dynamic lorebook injectors, status-bar macros, and client TTS plugins so Shinobu remains the single source of truth for memory consolidation, TTS synthesis, and the frozen L0 KV-cache prefix (preventing split-brain memory conflicts or prompt cache busting).
๐งฉ Plugin Extension Boundary
shinobu-public (shinobu-core) is strictly a clean, generic, white-hat microkernel foundation. Personal personas, private sensors, custom hooks, or private notebooks belong in separate external packages loaded dynamically via Python entry points:
[project.entry-points."shinobu.plugins"]
my_extension = "my_pkg.plugin:create_plugin"โ ๏ธ Disclaimer & License
This project is an open-source technical framework for personal AI runtime orchestration and local/cloud automation. Users are solely responsible for configuring their own API credentials, cloud budgets, firewall rules, and compliance with third-party platform terms of service.
Never commit real API keys, bearer tokens, private Tailscale hostnames, or personal data into public forks.
Licensed under the PolyForm Noncommercial License 1.0.0 (
PolyForm-Noncommercial-1.0.0) โ free for personal, educational, and noncommercial use; commercial use, paid SaaS, bundling, or resale of the code orassets/artwork is strictly prohibited without prior written authorization from zanex-dev.Required Notice: Copyright (c) 2026 zanex (zanex-dev) (https://github.com/zanex-dev/shinobu)
Available Tools
5 toolsshinobu_bubbleB
Display a speech bubble on the local Shinobu desktop companion.
Inputs: text (required), mood, duration_sec.
shinobu_chatB
Send a chat message to the local Shinobu companion and return its response.
Inputs: text (required).
shinobu_recallB
Search Shinobu's local memory store for past episodes matching a query.
Inputs: query (required), limit.
shinobu_rememberA
Store or update a persistent fact in Shinobu's memory store (upserted by key).
Inputs: key (required), value (required), confidence.
shinobu_stateA
Query or update the local Shinobu companion's state and mood. Omit both 'state' and 'mood' to read the current snapshot.
Inputs: mood, state, reason.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 5 tools
Each tool maps to a distinct action on the companion: speech display, state/mood read/update, memory search, chat, and memory storage. The only mild proximity is between `shinobu_chat` and `shinobu_bubble`, but their descriptions clearly separate conversational response from speech-bubble display.
All tools use a consistent `shinobu_` prefix followed by a concise snake_case verb/noun. The pattern is predictable and easy to scan.
Five tools is well-scoped for a desktop companion: interaction, state, memory, and speech display. Each tool has a clear purpose without unnecessary surface area.
The surface covers chat, speech display, state/mood reading and updating, and memory recall/storage. Minor lifecycle gaps remain, such as deleting or forgetting a stored memory or clearing state, but core workflows are covered.
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Memory, reflection and safety for AI agents. Hosted or local, no vector database.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA pure SQLite structured long-term memory MCP server for AI agents, featuring adaptive Ebbinghaus forgetting curves, hierarchical memory tiers, trust feedback, and anomaly detectionโall fully offline with deterministic scoring.MIT
- FlicenseNot gradedqualityNot gradedmaintenanceProvides a zero-dependency MCP interface that equips personal AI agents with agenda tracking, autonomous sandbox execution, ambient cue handling, fast reflex intent processing, and episodic memory.-
- AlicenseBqualityBmaintenanceSovereign, deterministic, local-first context and DAG lifecycle engine with native stdio MCP server for autonomous AI coding agents.23MIT
- AlicenseBqualityBmaintenanceEvidence-governed coding agent memory and knowledge lifecycle MCP server for DeepSeek Harness (DSH), OpenAI Codex, and Google Antigravity. Provides local SQLite FTS5 + semantic hybrid retrieval, automatic session/compaction checkpointing, counter-example demotion, and a hard 1,200-char context budget guardrail with zero third-party Python dependencies.111MIT