Skip to main content
Native macOS · Swift · Apple Silicon · v0.2.0 · MIT licensed core

Token compression
for AI coding
agents.

Senkani is a native macOS binary that sits between your coding agent and your filesystem. Every file read is compressed, every shell output filtered, every symbol search answered from a local index — before a single token reaches the model. Claude Code, Cursor, Copilot, any MCP-compatible agent.

Compression layer

Perception shrinks before the LLM sees it.

Senkani compresses at three places: the tool output (filter pipeline), the tool call itself (smart denials for redundant re-reads), and the model's response (terse mode). All three run in the same binary. All three are measurable.

  • 24+ command filters. npm install: 428 lines → 2. git clone: 312 → 4. Mutating commands pass through unchanged.
  • Symbol-level reads. Outline by default (50 tokens); full content only when you pass full: true.
  • Smart denials. Re-read the same file 40 s later? The hook answers from cache; the LLM never sees the redundant call.
How it works
MCP intelligence

19 tools your agent actually wants.

Every senkani MCP tool is designed for a specific friction point in an agent-driven coding session. Compressed reads, filtered shells, symbol lookups, sandboxed parse, local embed + vision, budget-bounded repo bundles.

  • Perception toolssenkani_read, senkani_search, senkani_fetch, senkani_outline, senkani_explore, senkani_deps. Backed by 25-language tree-sitter index + FTS5.
  • Local MLsenkani_embed (MiniLM, 384-dim) + senkani_vision (Gemma). Zero API cost. Fully offline.
  • Externalsenkani_web (JS-rendered + SSRF-guarded) and senkani_repo (GitHub, host-allowlisted).
Browse every tool
Workspace

17 panes. One canvas. Your layout.

A horizontal canvas of typed panes. Each pane is a primitive — Terminal, Code Editor, Browser, Hook Timeline, Analytics, Knowledge Base, Sprint Review — and you arrange them however makes sense for what you're doing right now. Senkani persists the layout per project.

  • ⌘K command palette. Open any pane, run any action, switch themes, in one keystroke.
  • Per-pane toggles. F/C/S/I/T controls run independent compression per pane — a terse research pane next to a full-fidelity build pane.
  • Sub-3 ms renders. SwiftTerm + Metal on M-series. p50 ~2.1 ms, p99 ~3.4 ms.
See every pane
Compound learning

It gets better the more you use it.

Senkani mines your own sessions for patterns and surfaces four artifact types — filter rules, context docs, instruction patches, workflow playbooks. Proposals flow .recurring → .staged → .applied. You accept or reject each one; nothing touches instructions without explicit OK.

  • Laplace-smoothed confidence gates every promotion. Threshold 0.7 by default, with ≥3 distinct sessions of evidence.
  • Instruction patches never auto-apply. Schneier gate — human-in-the-loop for anything touching the agent's tool hints.
  • Sprint + quarterly cadence. senkani learn review weekly; senkani learn audit quarterly to retire stale applied artifacts.
How the learning flows
Knowledge base

A project graph that survives hand-edits.

Every project gets a knowledge base — entities, links, decisions — stored as markdown at .senkani/knowledge/*.md. SQLite is a rebuilt index, not the source of truth. Hand-edit the markdown; the index follows. Corrupt the SQLite; rebuild from markdown.

  • FTS5 search + BM25 ranking. senkani_knowledge or senkani kb search.
  • Enrichment validator flags information loss, contradiction, excessive rewrite before any Gemma enrichment commits.
  • Rollback + timeline. Every change is append-only history; senkani kb rollback reverts; senkani kb timeline shows the full chronology.
How the KB stays coherent
Security posture

A trust boundary, not a plugin host.

v0.2.0 defaults are all secure: prompt-injection guard on, SSRF hardening on, secret redaction on, schema migrations versioned + crash-safe. Opt-outs are explicit env vars, not hidden flags. Every defense increments a counter you can inspect via senkani stats --security.

  • SSRF guard. DNS-pre-resolve + redirect re-validation + WKContentRuleList subresource blocklist. 169.254.169.254 and friends are unreachable.
  • 13 secret-detector families + entropy fallback. 1 MB benign input: ~25 ms. Every tool output scanned before the model sees it.
  • Socket-auth handshake. Opt-in via SENKANI_SOCKET_AUTH=on. Flipping to on by default next release.
Read the full posture
Measured, not claimed

Numbers from senkani bench on your hardware.

Every number here is reproducible. Run senkani bench to verify on your machine.

80.37×
Fixture suite compression — 10 tasks × 7 configs, 256 iterations. Synthetic ceiling.
1,510
Passing unit tests. Every MCP tool, every filter rule, every denial path.
25
Tree-sitter languages indexed. Exact line ranges, container hierarchy, incremental.
<5ms
Hook-relay active latency. Under 1 ms on passthrough. Measured p99.