Skip to main content
Glama

๐Ÿ”’ 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:

  1. 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.10 standard library โ€” zero external pip supply-chain risk. Only the optional desktop floating pet requires pip install -e ".[desktop]" (PySide6>=6.6).

  2. Loopback-First Daemon & Hardened Edge Node:

    • The HTTP/MCP daemon binds to 127.0.0.1 by default (never exposing open ports to the public internet).

    • EdgeNodeServer (shinobu node) hard-rejects 0.0.0.0 and any public IP, restricts execution to --allowed-root, and strictly forbids shell=True.

  3. 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.

  4. 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.

  5. Plain-Text Auditable Source Only: Distributed strictly as readable Python source code (no closed-source binary installers).

  6. 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_core

Related 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 /v1 clients, and exposed back into any fresh AI IDE or agent session via shinobu mcp-serve / POST /mcp.

Core engineering highlights:

  1. 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 official agy CLI (persistent stream-json worker, default engine for shinobu node, with --add-dir / --settings / --dangerously-skip-permissions controls and silent Windows CREATE_NO_WINDOW spawning) or the official google-antigravity Python SDK (lazy-loaded optional extra .[agy-sdk] supporting gemini / openai_local / litert modes). All runtime state and session maps stay isolated under $SHINOBU_HOME/runtime/ without polluting your main Antigravity workspace, while remaining equally compatible with standard openai_compat endpoints (cloud APIs / Ollama / vLLM) and --engine hybrid.

  2. 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 /v1 frontend โ€” switching surfaces never resets memory, schedule, or voice state.

  3. 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; ModelComplexityClassifier selects thinking effort dynamically (0ms short-circuit on greetings/ceilings, 600ms fail-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 to auto effort, complemented by shinobu sleep memory distillation.

  4. 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 hybrid cloud hosting โ€” routing tasks (with end-to-end per-turn reasoning_effort propagation) to your local PC's native agy_cli edge node while awake and falling back to the cloud engine in seconds when your PC sleeps.

  5. Native Bidirectional MCP Hub (Client + Server): Discover and non-destructively install curated zero-key community MCP presets via shinobu mcp (including safe agy bridging), or expose Shinobu's own memory and reminder tools back to external AI IDEs and agents via shinobu mcp-serve (stdio) or remote POST /mcp.

  6. 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.

  7. Fault-Isolated Microkernel & Built-In Self-Diagnostics: External private packs attach via Python entry_points with strict per-plugin fault isolation (a broken extension never crashes the kernel), complemented by shinobu doctor for one-command native agy_sdk/agy_cli driver, 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 ui

In 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 pet

The 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

mock (works offline out of the box)

Local native agy_cli (shinobu serve --engine agy_cli, non-proxy)

pip install -e ".[agy-sdk]" (agy_sdk), standard openai_compat, or cloud/edge hybrid

๐Ÿ–ฅ๏ธ UI Shell & Avatars

Built-in Web Memory Console (shinobu ui)

.[desktop] floating pet (shinobu pet) + shinobu avatar multi-expression avatar packs

High-end community shell Project AIRI (with launcher & walkthrough: deploy/airi_tts_guide.md)

๐Ÿ”Š Voice TTS & Colab

Silent by default (graceful notice, never blocks chat)

Daily free zero-key pip install -e ".[tts-edge]" + shinobu tts-gateway local OpenAI-compatible gateway

Colab GPU IndexTTS-2.5 voice cloning (notebooks/README.md) or cloud GCP Chirp 3: HD

๐Ÿงฉ Tools & Plugins

0 external processes, 0 extra packages

shinobu mcp --presets curated zero-key community MCP presets

External packages via Python shinobu.plugins entry points for isolated custom personas, sensors, or hooks

# 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:

  1. Zero Public Inbound Ports: Deploy shinobu serve --engine hybrid on a small VM (e.g., GCP e2-small on Standard Tier for 200 GiB/month free egress) and expose HTTPS strictly inside your private tailnet via Tailscale Serve.

  2. 4-Lock Telegram Mobile Bridge: Run shinobu telegram to 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.

  3. Local PC Edge Tentacle: Run shinobu node on your workstation. While your PC is online, the cloud hybrid router 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.

  4. Automated SQLite Hot Backups: Daily online .backup snapshots 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

shinobu init

Setup

Initialize soul templates and the local SQLite memory store.

shinobu chat

Local CLI

Chat directly with Shinobu in single-turn or interactive terminal mode.

shinobu sleep

Consolidation

Distill, consolidate, and cleanly close the active conversation episode.

shinobu serve

Local / Cloud

Start the 127.0.0.1 loopback HTTP/SSE/MCP daemon (supports --engine hybrid, etc.).

shinobu ui

Local

Open the zero-dependency Web Memory Console hosted by the running daemon.

shinobu pet

Local (Optional)

Launch the transparent floating desktop pet & chat drawer (requires .[desktop]).

shinobu avatar

Local (Optional)

Validate and import a custom multi-expression PNG/WebP avatar pack (--source, --name, --force).

shinobu tts-gateway

Voice (Optional)

Start the local OpenAI-compatible /v1/audio/speech TTS gateway (Colab GPU upstream + .[tts-edge] fallback).

shinobu compat

External UIs

Print local OpenAI /v1 compatible endpoint and event stream details (model ID: shinobu).

shinobu mcp

MCP Client

Inspect, probe, and non-destructively install curated zero-key community MCP presets or bridge MCP servers.

shinobu mcp-serve

MCP Server

Expose Shinobu as an outbound stdio MCP server for external AI clients and IDEs.

shinobu node

Edge Tentacle

Register this PC over Tailscale/private network (--cloud-url, --bind-host, --allowed-root).

shinobu telegram

Cloud / Local

Start the 4-lock isolated Telegram long-polling bridge.

shinobu status / doctor

Diagnostics

Inspect home/plugins/daemon state or run driver, isolation, and redacted credential health checks.

Telegram Built-in Commands

Command

Description

/session / /sessions / /archive

Open the conversation management and archive panel.

/new

Start a new conversation immediately (quickly archives the current one).

/sleep

Consolidate memories and archive the current conversation.

/brain [cloud|hybrid|local] / /mode

Inspect or switch the reasoning engine (cloud, hybrid, or local).

/think [default|off|low|medium|high] / /effort

Inspect or adjust thinking effort (default restores automatic adaptive ratchet, or lock off, low, medium, or high).

/status

Inspect runtime health, active engine, and pending approval count.

/nodes

List currently online local PC / Colab GPU edge nodes.

/voice [on|off]

Check or toggle on-demand voice note replies.

/remind / /reminders

List pending reminders from the SQLite timemap schedule table.

/remind <10m|2h|HH:MM|ISO> <text>

Schedule a new reminder (relative duration, local HH:MM, or ISO-8601).

/help / /commands

Show the grouped command quick reference, aliases, usage examples, and current voice toggle state.

Core HTTP / MCP & Agent Tool Contracts

Interface

Purpose

GET /v1/models & POST /v1/chat/completions

OpenAI /v1 compatible chat endpoint with strict loopback-origin CORS policy (default model shinobu).

POST /api/tts

Synthesize speech ({"text", "mood", "fmt": "ogg_opus"|"mp3"|"wav"}); returns raw audio bytes or 503 {"error": "tts_unavailable"}.

GET / POST /api/timemap

Query and create scheduled reminders stored in SQLite timemap.

POST /mcp

Remote Model Context Protocol (MCP) JSON-RPC endpoint (protected by bearer token over Tailscale).

build_memory_tools (5 tools)

Memory read/write plus tail-appended schedule_reminder and list_reminders (zero L0 prefix mutation).

๐Ÿ”Œ 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 or assets/ 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 tools
shinobu_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

    A3.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    All tools use a consistent `shinobu_` prefix followed by a concise snake_case verb/noun. The pattern is predictable and easy to scan.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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
    • A
      license
      B
      quality
      B
      maintenance
      Evidence-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.
      11
      1
      MIT