EKOSdocs
Docs / Introduction Learn

How EKOS Works

An end-to-end walk from raw files to a cited answer.

Source code, databases, binaries and documents flow through the EKOS compiler into enterprise knowledge, used by human review and AI agents
Source code, databases, binaries and documents flow through the EKOS compiler into enterprise knowledge, used by human review and AI agents

One pass through the pipeline

  1. ekos build walks the project's [[sources]] (or the paths in [observe]), redacts secrets and PII, and stores content-addressable observation artifacts. It also writes a File object per observed file, and reads the catalog of each live database in [[databases]] (Oracle, PostgreSQL, ClickHouse) in a read-only session.
  2. ekos recover runs one analyzer per source kind — SQL DDL, views, PL/pgSQL and PL/SQL routines and triggers, migration scripts as schema history, Rust/Python/JavaScript/Elixir/Perl/Java sources, Git history and ticket ids, GitHub issues, Confluence pages, documents, dbt projects, Pentaho jobs, crate topology, live database catalogs — and emits typed KIR (Knowledge Intermediate Representation) objects, relationships and evidence.
  3. ekos resolve merges duplicates. Exact-name duplicates from the same source kind merge; fuzzy matches whose names agree word for word become reviewable unconfirmed SameAs relationships instead of silent merges. Objects read from a live database are never merged.
  4. ekos compile turns resolved KIR into the Canonical Knowledge Model (CKM), including derived objects such as concentration risks and ConflictingEvidence items where two sources disagree.
  5. ekos commit appends the CKM to the ledger, then builds search indexes and subsystem rollups, links data lineage, routines, schema changes and tickets to tables, compares code with the live database, derives each table's write behaviour and writes the cross-reference integrity index (ekos check refs). LLM descriptions and embeddings follow if enabled.
  6. Query. ekos mcp serve exposes the ledger read-only to agents; ekos ask, ekos query and ekos ekl do the same from a terminal, and the web console serves the same projects to people and, through its MCP gateway, to agents with an API token.

Each pipeline command writes a JSON-lines run log, one line per step with its counts, ending with the number of model calls it made.

Details for each stage: Compilation Pipeline.