TokenRhythm/opensquilla
OpenSquilla — Token-Efficient AI Agent with same budget, higher intelligence density
OpenSquilla – a token‑efficient micro‑kernel AI agent
What it is – OpenSquilla is a locally‑run AI‑agent framework that routes each user turn to the cheapest LLM that can handle the request. It combines a lightweight on‑device model router (SquillaRouter), persistent memory, a sandboxed tool layer, built‑in web search and on‑device embeddings, all inside a single “turn loop”. The same loop powers a desktop GUI, a CLI, and chat‑channel integrations, so behaviour is identical no matter how you talk to the agent.
Why it matters – By automatically picking the most cost‑effective model for each turn, OpenSquilla reduces token spend while keeping capability. The router can also ensemble multiple models, a technique the authors claim outperforms the “Fable 5” benchmark.
Key components
| Component | Role |
|---|---|
| SquillaRouter | On‑device router that decides which LLM to call (supports ONNX Runtime, LightGBM, etc.) |
| Provider layer | Uniform API for >20 LLM providers (TokenRhythm, OpenRouter, OpenAI, Anthropic, Ollama, Gemini, Qwen/DashScope, …) |
| Persistent memory | Stores long‑term context across sessions |
| Layered sandbox | Isolates tool execution and retries, ensuring safe tool use |
| Built‑in web search & embeddings | Enables retrieval‑augmented generation without external services |
| Control console | Vue‑based web UI packaged in an Electron shell for desktop use |
Installation paths (choose one)
- Desktop installers – pre‑built .dmg (mac Apple Silicon) or .exe (Windows) that include the Vue console and all native runtimes. No Git or Node needed.
- Quick terminal install – recommended for all OSes. Uses the
uvPython‑package manager to install a wheel from the GitHub release:uv tool install --python 3.12 "opensquilla[recommended] @ https://github.com/TokenRhythm/opensquilla/releases/download/v0.5.4/opensquilla-0.5.4-py3-none-any.whl" opensquilla onboard opensquilla gateway run - Install from source – clone the repo (Git LFS pulls model assets), run the provided
scripts/install_source.sh/.ps1which builds the Vue UI, installs dependencies, and registers theopensquillacommand. - Develop from source – for contributors. Uses
uv syncto create a local editable environment, thenuv run opensquilla ….
Note – The router needs native runtimes (ONNX Runtime on Windows, libomp on macOS). The desktop installers bundle them; the terminal install may require you to install the Visual C++ redistributable (Windows) or
brew install libomp(macOS).
Typical workflow
# Set up the agent (once)
opensquilla onboard # creates config, generates install_id, runs telemetry opt‑out prompts
# Start the gateway (the long‑running process that handles turns)
opensquilla gateway run
# Interact via CLI, Web UI, or a connected channel (Slack, Discord, Matrix, etc.)
opensquilla chat "Summarize the latest news about AI safety"
The gateway will:
- Receive the user turn.
- Ask SquillaRouter which provider can answer within the token budget.
- Call the selected LLM, optionally augmenting the prompt with retrieved web results or embeddings.
- Store the turn in persistent memory and log the routing decision.
- Return the response to the originating interface.
Supported integrations (out‑of‑the‑box)
- Feishu, Telegram, DingTalk, QQ, WeCom, Slack, Discord
- Optional extras: Matrix (with optional end‑to‑end encryption), PDF generation via WeasyPrint, etc.
Privacy & telemetry
OpenSquilla sends pseudonymous telemetry on first start and once per day: install ID (hashed MAC/IP), version, OS, token‑usage aggregates, and install method. No content, API keys, or personal identifiers are transmitted. Telemetry and automatic update checks can be disabled via:
[privacy]
disable_network_observability = true
or the legacy env vars OPENSQUILLA_TELEMETRY_DISABLED / OPENSQUILLA_UPDATE_CHECK_DISABLED.
Licensing & community
- License: Apache 2.0 (permissive, allows commercial use).
- Documentation: Product guide, CLI reference, and a technical report (arXiv 2607.11399) are bundled in the repo.
- Release status: 0.5.4 (stable). Ongoing development is tracked on the
mainbranch; CI badges show automated testing. - Support: Issues can be opened on GitHub; the website
opensquilla.aiprovides links to the report, docs, and contact information.
Who might benefit?
- Developers who want a locally‑run, cost‑aware LLM agent without wiring together separate routers.
- Product teams needing a single binary that works on Windows/macOS/Linux and offers a ready‑made desktop UI.
- Teams with strict data‑privacy requirements, because the core routing and memory stay on‑device.
- Researchers interested in “agentic routing” and the data‑flywheel concept described in the accompanying technical report.
Quick start checklist
- Install
uv(or have Python 3.12+ and Node 22.12+ if building from source). - Choose an install path (desktop installer or
uv tool install). - Run
opensquilla onboardto generate config. - Start the gateway with
opensquilla gateway run. - Interact via
opensquilla chator open the web UI athttp://localhost:….
Bottom line: OpenSquilla is a real, production‑grade AI‑agent platform that focuses on token‑efficient routing, unified interfaces, and on‑device privacy. It is well‑documented, cross‑platform, and released under a permissive open‑source license.
Related
- Project
- Project
- Project
- Project