Semantic layer for AI agents

An agent's answer is only as good as what it knows about your data

EKOS reads your schemas, stored procedures, ETL jobs, application code and documents, and compiles them into one semantic model: what each table and code value means, how tables join, where every fact was read, and which meanings a person has confirmed. Agents query it over MCP. No model call is needed to build it.

53.3→76.2%text-to-SQL execution accuracy on BIRD Mini-Dev, same model, 302 hold-out questions
0model calls to compile a 903-table Oracle ERP into the model
file:lineevidence on every table, column, key and meaning
Apache Ossieimport, export and review round trip, checked by Ossie's own validator
What the model holds

Six things an agent has to know before it writes a query

A schema dump answers the second of them. EKOS compiles all six, and marks the difference between what a source states and what was inferred from it.

QuestionIn EKOSWhere it comes from
What does it mean?Concept, code meaningTable and column comments, CHECK constraints, seed rows, filters in views, procedures and ETL steps, glossaries, an imported Ossie or LinkML model
Where is it?Table, columnDDL files, migration scripts, live catalogs of PostgreSQL, Oracle and ClickHouse, ORM models
What is connected?RelationshipDeclared foreign keys, plus candidate keys found in the data that stay candidates until a person accepts them
How is it calculated?Metric, transformationMetrics from an imported Ossie model, and the logic recovered from views, stored procedures, dbt, Pentaho and Talend jobs
Where does it come from?Evidence, lineageEvery object keeps the file and line, statement or commit it was read from; column lineage through SQL and ETL
Can I rely on it?Status, conflict, sign-offA meaning is a hypothesis until a person confirms it. Where two sources disagree, both claims are kept and the answer is marked disputed
How it is built

Compiled by parsers, reviewed by people, read by agents

The model is the output of deterministic passes, so the same sources give the same model. A language model is optional and only ever adds text that cites what it read.

Observe

Connectors read SQL files, live catalogs, code, ETL jobs, documents and Git history as they are. Secrets are redacted on the way in.

no model

Compile

Parsers recover tables, keys, routines, lineage and the meaning carried by constraints, comments and filters.

no model

Profile

Optional read-only queries count values and test candidate keys. Counts and code values leave the database, row data does not.

optional

Review

People confirm or reject meanings, settle conflicts and sign off the model. An agent cannot do this over MCP.

people only

Serve

Agents read the ledger over MCP, the CLI or Python. The same model exports to Apache Ossie, LinkML and dbt.

read-only
The result

A graph you can open, with the source of each fact beside it

This is LedgerSMB, an open-source accounting system, compiled from its repository: 12,058 objects, among them 184 tables and 556 stored routines. The table acc_trans is selected. Its panel shows the statements it was read from, with file and line.

EKOS console graph view of the LedgerSMB project with the acc_trans table selected; a side panel lists four pieces of evidence, each a SQL statement with its file and line
The EKOS web console, Graph page. Evidence for acc_trans: the CREATE TABLE statement and three COMMENT ON statements in sql/Pg-database.sql, lines 1142 and 1146 among them.
The neighbourhood of acc_trans at depth one: the table in the centre with 135 linked objects around it, coloured by kind
One step around acc_trans: 135 relationships to the routines that read and write it, the tables it references and the meanings attached to it.
EKOS console Semantics page listing business concepts recovered from LedgerSMB, each with its defining condition and a status chip: 38 hypothesis, 1 rejected, 8 confirmed
Recovered meanings, each with the condition it was derived from and its status: 38 hypotheses, 8 confirmed, 1 rejected.
Trust

When two sources disagree, EKOS says so

LedgerSMB labels order class 1 as sales_order in one place, customer in another and Sales Order in a third. EKOS keeps all three claims with their evidence and picks none. An answer that depends on a disputed fact carries disputed: true, so the agent can say so too.

EKOS console Conflicts page with three open conflicts in LedgerSMB: two code values with three different labels each and one table defined twice with different columns
Three open conflicts found while compiling LedgerSMB. Only a person can resolve one, and the decision is recorded with a reason.
An answer you can check

Same model, same question. One query knew what the column holds.

Across laboratory records with PLT > 400 for female patients whose patient profile lists an SLE diagnosis, what is the average ALB value rounded to four decimal places?

Raw schema in the prompt

SELECT ROUND(AVG(L.ALB), 4)
FROM Laboratory AS L
JOIN Patient AS P ON L.ID = P.ID
WHERE P.SEX = 'F'
  AND P.Diagnosis = 'SLE'
  AND L.PLT > 400

Wrong result. The diagnosis column holds lists such as SLE, APS, so an equality test drops most of the patients.

EKOS context in the prompt

SELECT ROUND(AVG(L.ALB), 4) AS avg_alb
FROM Laboratory AS L
JOIN Patient AS P ON L.ID = P.ID
WHERE P.SEX = 'F'
  AND P.Diagnosis LIKE '%SLE%'
  AND L.PLT > 400

Correct result. The context names the stored values that match SLE, so the model writes the filter the data needs.

Question 383 of the BIRD Mini-Dev hold-out split, database thrombosis_prediction, Claude Haiku 5.5 on both sides. Both queries and all 302 questions are in the full report. Benchmark © the BIRD team, CC BY-SA 4.0.

Measured

Each layer of knowledge and checking adds accuracy

Execution accuracy on the BIRD Mini-Dev hold-out split: 302 questions that were not used for tuning, 11 databases, one model throughout (Claude Haiku 5.5). Only what the model is given changes.

ComparisonDifference95% intervalMcNemar pCost of the run
EKOS context vs raw schema+10.6 points+4.3 to +16.90.0014$0.30 vs $0.20
Agent with checks vs context with descriptions+4.6 points0.0 to +9.30.06$0.78 vs $0.35
Agent with checks vs raw schema+22.9 points$0.78 vs $0.20

The last step is not significant at the 5% level on this split, and the report says so. On the full BIRD dev set (1,534 questions, one answer per question, no fine-tuning) the same setup scores 66.2% with Claude Haiku 5.5 for $3.20, and 74.3% with Claude Sonnet 5.5 on a 300-question sample. Method, per-database results and every failed question: BIRD Mini-Dev report, how a question is answered, reproduction repository.

Portable

Apache Ossie in, Apache Ossie out

EKOS exports the compiled model as an Apache Ossie semantic model and reads Ossie models others wrote (guide). A table is exported as an observed fact. A meaning is exported with its review status, so nobody downstream mistakes a hypothesis for a definition. Edit statuses in the file and ekos import ossie turns the edits into review decisions.

ekos export ossie, LedgerSMB, excerpt

- name: account_link_description
  source: account_link_description
  primary_key:
  - description
  description: |-
    This is a lookup table which provide basic
    information as to categories and dropdowns
    of accounts. ...
  ai_context:
    instructions: 'Business concept
      "AccountLinkDescriptionSummary"
      (hypothesis, unreviewed):
      account_link_description.summary IS TRUE'
  fields:
  - name: summary
    expression: { sql: summary }
    datatype: Boolean
  custom_extensions:
  - vendor_name: EKOS
    data: '{"kind":"Table","status":"observed",
      "evidence":["sql/Pg-database.sql:128"], ...}'
EKOS console Apache Ossie tab for LedgerSMB: 201 datasets and 201 relationships, the account_link dataset open with its fields, two relationships and one unreviewed business concept
The same model in the console: 201 datasets, 881 fields, 201 relationships. The excerpt is shortened and re-wrapped; the export is one command and makes no model call.
  • Exports are checked against Apache Ossie's own validate.py in CI.
  • An imported model's synonyms, declared joins and metrics feed text-to-SQL, ekos ask and the dbt semantic-layer export. A metric is never invented.
  • Where an imported model names a column the schema lacks, that is reported as a conflict.
  • The same meanings export to LinkML for teams that keep their vocabulary there.
Use it from your agent

MCP, command line or Python, all read-only

JobMCP tools
Findekos_search, ekos_ekl, ekos_state: objects by text, meaning or a typed query, with evidence
Meaningekos_semantics_lookup, ekos_semantics_gaps: what a term or code means, with its review status in words
Connectionsekos_neighborhood, ekos_dependents, ekos_impact, ekos_relationships
Trustekos_conflicts, ekos_signoff_status, ekos_audit
Answersekos_query, ekos_retrieve: a compiled answer and the evidence set behind it, no model call
SQLekos_sql_check: lint a query against the schema, keys and stored values before it runs
Exchangeekos_ossie_export

Any MCP client

ekos mcp serve --workspace .
# or over HTTP for URL-only clients
ekos mcp serve --workspace . --http 127.0.0.1:7410

Any MCP client connects to it, over stdio, TCP or HTTP. MCP guide

Python, in-process

pip install ekos

import ekos
kb = ekos.open(".")
hit = kb.search("acc_trans")[0]
print(kb.get(hit.id).evidence)

Reads a compiled ledger without a server. Python guide

Where it fits

It pays off when the data is larger than the prompt

Use it when

  • The schema has hundreds of tables and the names do not explain themselves.
  • Meaning lives in code: procedures, ETL jobs, constraints, seed data.
  • Several systems describe the same thing differently.
  • Answers must show where they came from.

You may not need it when

  • There is one small, well-named schema and a fixed set of questions.
  • A maintained semantic model already covers every question asked.

What it does not do

  • It does not confirm a definition for you. That is a person's decision.
  • It does not invent a metric or a join. What no source states stays a gap.
  • It does not send your data anywhere. It runs on your machine.

Compile your own schema in a few minutes

One binary, open source, MIT licence. Point it at a repository or a database and open the graph.