AI Knowledge Layer for Enterprise Systems
An open-source knowledge layer for AI agents: EKOS compiles code, SQL, docs and Git history into evidence-backed knowledge agents query over MCP.
AI agents are good at reasoning and bad at remembering. Every session they rediscover your systems from scratch: they grep the repository, open files, guess which table is the real one, and forget all of it when the session ends. An AI knowledge layer sits between your systems and your agents. It holds what is already known about those systems, in a form an agent can query directly, and it says where each fact came from.
EKOS is an open-source knowledge layer built as a knowledge compiler. It reads your systems, compiles what it finds into structured, traceable knowledge, and serves it to agents over the Model Context Protocol (MCP).
Why retrieval over raw text is not enough
Retrieval-augmented generation (RAG) indexes chunks of text and hands the closest ones to a model. That works for prose. It fits enterprise systems poorly, for three reasons:
- Structure is lost. A foreign key, a call from one function to another, or a view that reads three tables is a relationship. A text chunk is not one.
- Nothing is checkable. A retrieved chunk is evidence, not a conclusion, and an answer stitched from chunks rarely says which line it rests on.
- The work is repeated. Every question re-reads source code that was already read last time.
EKOS does the reading once. It compiles source code into objects, relationships and evidence, and agents query that result.
What EKOS compiles
| Source | What becomes knowledge |
|---|---|
| Source code — Rust, Python, JavaScript/TypeScript, Elixir, Perl | modules, symbols, signatures, the call graph |
| SQL — PostgreSQL, MySQL, SQL Server, Snowflake, Databricks, ClickHouse | tables, columns, keys, views, stored procedures, triggers, column-level lineage |
| ETL and analytics — dbt, Pentaho | models, transformations, filters, data lineage |
| Git and GitHub | history, authorship, co-change, issues and pull requests |
| Documentation — Markdown, PDF, DOCX, HTML, Confluence | sections, glossaries, links from docs to the code they describe |
The whole list, with configuration, is in Knowledge Sources.
Every answer carries its evidence
Each compiled fact keeps the evidence it came from: a file, a line and the fragment itself. Knowledge is stored in an append-only ledger, so nothing is overwritten. You can ask what a fact looked like last month, and which run wrote it. When EKOS is unsure, for example whether two similarly named tables are the same thing, it records an unconfirmed claim for a person to review. It never merges them silently. See Provenance and Human Review.
How it works
- Observe: connectors read code, schemas, history and documents without interpreting them. Secrets and personal data are redacted before anything is stored.
- Compile: deterministic passes recover structure: tables, calls, lineage, documentation links.
- Resolve: the same thing seen in several places becomes one object.
- Commit: the result goes into the append-only knowledge ledger.
- Query: agents read it over MCP, read-only.
More detail: How EKOS Works and System Overview.
Connect an agent
curl -fsSL https://raw.githubusercontent.com/alexeyban/EKOS/main/install.sh | sh
cd /path/to/project && ekos init --detect
ekos build && ekos recover && ekos resolve && ekos compile && ekos commit
claude mcp add ekos -- ekos --config "$PWD/ekos.toml" mcp serve --workspace "$PWD"
The same server works with VS Code / GitHub Copilot, Visual Studio and ChatGPT over HTTP: see MCP server for enterprise knowledge.