Menu

I built AegisBrain: A local memory bus and token arbitrage engine for AI coding agents
📰

I built AegisBrain: A local memory bus and token arbitrage engine for AI coding agents

DEV Community: ai·PRIYANSHU GHOSH·6 days ago
#TtUfPNhE
#devtoai#devto#dev#local#tokens
Reading 0:00
15s threshold

I built AegisBrain (GPLv3) to solve two practical frustrations I kept encountering while using AI coding agents (Claude Code, Gemini CLI, Cursor, and Antigravity):

Context Amnesia & Token Waste: Every time an agent starts a new session or compacts context, it typically crawls multi-megabyte JSONL session transcripts (often 40k–60k tokens) just to recall past architectural decisions, rules, and invariants. This wastes tokens and increases latency.

Frontier Token Waste on Boilerplate: Paying frontier model API pricing to generate repetitive boilerplate, DTOs, and unit test suites felt inefficient when quantized local models (such as Qwen 2.5 Coder 7B/14B or Hermes on Ollama) can synthesize raw code locally for free.

How it works:

Sub-Second Neural Memory Bus (< 25ms):

Instead of dumping full session histories into the prompt, AegisBrain indexes decisions, code anchors, and invariants into a local SQLite database using FTS5 (Full-Text Search) with a Porter stemmer in WAL mode.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.