A federated query engine. An AI toolkit built to build it. Agent coordination. Agent memory. Open source at the core.
Plugin-extendable AI toolkit for your terminal. Built to build SPOQE — now it's yours. Gives any LLM deep codebase understanding without burning through your context window.
One language to query SQL and SPARQL. Reusable macros for common patterns. Embeddable library from (almost) any language. No ORM.
Multi-source query planning and execution. One query across SPARQL, SQL, Elasticsearch, Notion, and HTTP APIs. Bridge planning for cross-source joins.
Write back to your sources. Same query language for reads and writes. Smart cache invalidation. Full audit trail.
Real-time agent coordination. Spindle is the pub/sub hub — agents publish findings to topics, others receive them as live injections. Gearn is the TUI — watch the hive, triage with a local LLM, promote what matters.
LLMs are expensive when they have to read your whole codebase to answer a question. We built spai to build SPOQE — now it's yours.
# Without spai: agent reads 47 files, burns 180k tokens just thinking # With spai: structured exploration, targeted reads $ spai shape src/federation/mod.rs # → 340 tokens. Agent knows the module structure. $ spai sig execute_plan # → 85 tokens. Agent knows the function contract. $ spai deps src/edna/plan.rs # → 120 tokens. Agent knows what this file touches. # Total: 545 tokens vs 180,000. Same answer. 99.7% less spend.
# Give your agents a knowledge graph memory — built on SPOQE $ spai memory # → Agent reads its briefing from prior conversations $ spai memory store '{:type :finding :about "plan.rs" :note "5800 lines, needs splitting"}' # → Persisted to the agent KG. Queryable. Durable. $ spai memory query '{:about "plan.rs"}' # → Every agent that ever looked at this file, and what they found.
Give your agents structured code understanding and durable memory without stuffing the context window. spai outputs EDN — designed for machine consumption.
Stop paying for AI tools that burn tokens reading code they already read yesterday. spai gives targeted answers. Your agents remember.
Onboard new developers faster. "What does this module do?" is one command, not a 30-minute code walk.
Extend spai with your own commands. Drop a script in the plugins directory and it's available to every agent on the system.
Free compiler. Paid federation. Enterprise governance.
# Install spai (available now) $ curl -fsSL https://raw.githubusercontent.com/spoqe/spai/main/install.sh | bash # Explore a codebase $ spai overview $ spai shape src/main.rs $ spai hotspots # Give your agents memory $ spai memory # Install SPOQE (compiler) $ cargo install spoqe # Compile a query $ spoqe compile '{:from [?p :foaf/Person] :select {:name [:foaf/name]}}' # Run with sources configured $ spoqe serve --sources sources.edn $ curl -X POST localhost:8181/query -H "Content-Type: application/edn" \ -d '{:from [?t :mo/Track] :source :kg :select {:title [:dc/title]} :limit 5}'