Aegis

Created By
fuwasegua month ago
A deterministic context compiler for AI coding agents. Aegis replaces RAG with a Directed Acyclic Graph (DAG) to strictly enforce software architecture and reduce token consumption by up to 12x.
Overview

Aegis: The Deterministic Context Compiler for AI Agents

As codebases grow, AI coding agents (like Cursor, Claude Code, and Codex) struggle to find the right architectural guidelines. Traditional RAG (Retrieval-Augmented Generation) suffers from a "semantic gap"—searching for feature keywords often fails to retrieve abstract architectural rules or domain models. This leads to poor code quality, hallucinated architectures, and massive token waste as agents endlessly grep through repositories.

Aegis solves this by shifting the paradigm from "probabilistic search" to **"deterministic compilation." **Instead of relying on vector embeddings, Aegis uses a Directed Acyclic Graph (DAG) backed by SQLite to map file paths and layers directly to your Markdown documentation. When an agent plans to edit a specific file, Aegis deterministically traverses the dependency graph and compiles the exact architectural context required for that specific task.

# 🛡️ Key Features

  • Deterministic Context Routing: Say goodbye to AI hallucinations. Aegis maps file paths (e.g., app/UseCases/**) to specific guidelines. Same input, same context. 100% reproducible.

  • Transitive Dependency Resolution: If usecase_guidelines.md depends on entity_guidelines.md, Aegis automatically resolves the edges and fetches both. It feeds the AI exactly what it needs, nothing more.

  • Dual Surface Architecture (Agent vs. Admin): Strict separation of concerns. The agent surface provides read-only context and allows agents to report missing rules. The admin surface is reserved for humans to review and approve knowledge base updates.

  • Human-in-the-Loop Knowledge Evolution: Agents can self-review and trigger aegis_observe if they lack context. Aegis proposes DAG updates based on these observations, but canonical knowledge is only updated upon human approval.

  • Massive Token Efficiency: By directly injecting the correct context, Aegis eliminates the hidden costs of agent exploration. In real-world benchmarks, it reduced token consumption by 12x and improved response times by 3.5x.

  • Optional Local SLM Expansion: Opt-in to the built-in node-llama-cpp engine (Qwen) to extract intent tags from the agent's plan, providing semantic context expansion without compromising the deterministic core.

Stop searching. Start compiling. Aegis acts as your automated Tech Lead, aggressively shielding your codebase's integrity by forcing AI agents to read the rules before they write the code.

Server Config

{
  "mcpServers": {
    "aegis": {
      "command": "npx",
      "args": [
        "-y",
        "@fuwasegu/aegis",
        "--surface",
        "agent"
      ]
    },
    "aegis-admin": {
      "command": "npx",
      "args": [
        "-y",
        "@fuwasegu/aegis",
        "--surface",
        "admin"
      ]
    }
  }
}
Project Info
Created At
a month ago
Updated At
a month ago
Author Name
fuwasegu
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Quizlar
@quizlar

Quizlar is the learning MCP server. It turns whatever source the user brings — a YouTube lecture, a PDF, a URL, a textbook passage, or a pasted block of notes — into flashcards, then runs interactive quizzes with FSRS spaced-repetition scheduling so the material actually sticks. Every tool maps one-to-one to something a real learner does: ingest, quiz, track progress, review what's due. Built as a voice-first tutor (LiveKit + Deepgram + ElevenLabs); the MCP surface exposes the same primitives the voice agent uses internally, so your agent gets production-grade grading, STT-aware answer parsing, and the same FSRS scheduler that powers the consumer app. Three use cases: 1. "Quiz me on X." Call quiz_me(topic) — a composite tool that builds the deck and starts the quiz in one step. Then loop submit_answer → end_quiz. Grading is tier-1 exact match → phonetic fuzz → short LLM fallback (the same pipeline that ships in the voice product). 2. Study from a YouTube lecture. create_deck_from_youtube pulls the transcript, clusters it into concepts, and generates cards proportional to the video length. Poll get_job_status, then run the quiz loop. 3. Daily spaced-repetition review. get_study_recommendations returns exactly the cards due under the user's FSRS schedule, prioritised across all decks. Quizlar is the scheduler of record — your agent executes the plan instead of reinventing one each session. Auth: Bearer token (sk-qz-<32 chars>) for headless installs, or full OAuth 2.1 / DCR / PKCE for one-click clients (Smithery, Claude Connector). Mint keys at https://quizlar.app/settings/api-keys. 22 tools total. Voice and text equal-status. Education-first.

11 hours ago