KELS

Give AI agents tools, not database credentials.

KELS lets apps and AI agents read MongoDB through reviewed, signed queries.

For teams on MongoDB. Your data never leaves your network.

visits-by-week · clinic-0042200 4 rows
visits-by-week · clinic-0077403 TENANT_DENIED
"month": {"$ne": null}422 TYPE_MISMATCH
patients-due-follow-up202 APPROVAL_REQUIRED
visits-by-week · clinic-0042200 4 rows
Requests from AI agents, checked by the KELS agent in your network

Try it: a clinic’s AI assistant asks KELS

Example requests and sample data. Pick one and see what the agent sends and what KELS answers.

The agent sends POST /v1/execute
{
  "query_id": "visits-by-week", "query_version": 3,
  "data_tenant_id": "clinic-0042",
  "parameters": {
    "month": { "type": "date", "value": "2026-10-01T00:00:00Z" } }
}
KELS answers 200 OK
{
  "status": "ok",
  "data": { "row_count": 4, "rows": [
    { "week": "2026-10-05", "visits": 41 },
    { "week": "2026-10-12", "visits": 37 }, …
  ] },
  "decision": { "outcome": "ALLOW" }
}

ALLOWThe query was reviewed and published earlier. KELS checks the signature, adds this clinic’s filter itself and returns only the fields the query was approved for.

Shortened for reading: real query IDs are UUIDs, and requests also carry a purpose code.

Today an AI agent that needs data gets a password to all of it.

To let an agent answer questions from your database, most teams hand it a connection string. From then on it can read anything that user can read, for any customer, and nobody sees which queries it runs.

The questionWith a connection stringWith KELS
What can it run?Any query it writes, including ones nobody has looked atOnly queries a person reviewed, tested and published, called by ID
Whose records?Every customer in the databaseOnly the customer it was granted; KELS adds that filter itself
Passwords, tokens, ID numbers?Returned if the query asks for themRestricted fields can never be queried; sensitive ones can need an approval
Where do credentials live?In the agent’s prompt, config or toolsOnly in the KELS agent inside your network; the AI agent holds an API key you can revoke
What can you see afterwards?Database logs, if they were onEvery run with who, which query, which customer and why, in a tamper-evident audit trail

Three parts. Only the one inside your network touches your data.

The KELS agent runs next to your database. It starts every connection to the KELS cloud; nothing in the cloud can reach into your network.

KELS cloud

The portal where your team classifies fields, reviews and publishes queries, approves requests and reads the audit trail.

Your network

Your app or AI agent

Calls a published query by its ID, with typed values and an API key.

KELS agent

Checks the signature, the key, the customer and every value, then runs the query and filters the result.

Your MongoDB

Unchanged. KELS only needs one user with the read role.

What the KELS cloud sees

  • Field names, types and index names
  • Hints such as “looks like an email”, never the email
  • The queries your team publishes
  • Run records: which query, status, row counts, timings

What never leaves your network

  • Document values and result rows
  • The values passed into queries
  • Connection strings, hosts, users and passwords
  • The agent’s own audit log, which you keep

From a database to a safe tool in four steps

Your team sets it up once per question. After that, the app or agent calls it like any other API.

  1. Connect the database

    Install the KELS agent on a small Linux machine next to MongoDB with one package and a guided setup. An admin approves each database in the portal.

    Done once, by your platform team

    sudo apt install ./kels-agent_0.3.1-1_amd64.deb
    sudo kels-agent setup --cloud <the address the portal shows>
  2. Mark what is sensitive

    KELS lists every field and suggests a level from what it sees: emails, phone numbers, card numbers, Aadhaar and Social Security numbers. You confirm with one click. Fields nobody has classified are never returned.

    Done by whoever owns the data

    FieldLevelWhy
    visit_dateOrdinaryDate
    phoneSensitiveLooks like a phone number
    ssnRestrictedSocial Security number shape
  3. Write it, test it, have someone else publish it

    A query is drafted in the portal, run against staging, and published by a different person from its author. KELS gives it an ID and a version, signs it, and writes a plain-English summary of exactly what it returns.

    Done by an engineer and a reviewer

    1. DraftValidated against the catalog
    2. StagingRun on test data
    3. ReviewA second person
    4. PublishedSigned, version 3
  4. Call it from your app or AI agent

    The portal hands you ready-to-run code. It sends the query ID, the customer and typed values to your KELS agent. Values can only ever be values, so they cannot change what the query does.

    Done by your app, an AI agent, or a script

    kels_query.sh
    curl -X POST "$KELS_AGENT_URL/v1/execute" \
      -H "X-Kels-Api-Key: $KELS_API_KEY" \
      -H "Idempotency-Key: $(uuidgen)" \
      -H "Content-Type: application/json" \
      -d '{"query_id": "…", "query_version": 3,
           "data_tenant_id": "clinic-0042",
           "purpose_code": "care_planning",
           "parameters": {"month": {"type": "date",
             "value": "2026-10-01T00:00:00Z"}}}'

    Also in Python, Java, Kotlin, Go, C#, Node.js and Rust. The portal writes the code for each query. No KELS SDK to install.

Everything between the agent and your data

What ships today in KELS 0.3.1, grouped by when it does its work.

Knowing your data

Catalog without values
Field names, types, indexes and counts per collection, refreshed every few minutes. Samples are read from secondaries only.
Classification
Ordinary, Sensitive or Restricted per field, with suggestions and a review queue.
Drift detection
When a collection changes, queries that depend on it stop, and the portal says why in words.
Freshness per project
Choose how old the catalog may get before queries pause.

Before anything runs

Draft, stage, publish
Every query is tested on staging and published by someone other than its author.
Signed, versioned IDs
Callers name a query and version. The agent recompiles it and checks the signature before each run.
Plain-English summaries
Each version says what it filters, groups and returns.
Query building blocks
Filters (equal, not equal, in, not in, exists, ranges), grouping with count, sum, average, min and max, sorting, paging, and date buckets by day, week, month or year in any time zone.

Every time it runs

Customer isolation
The agent adds the tenant filter itself and checks the caller is granted that tenant.
Typed values
Each value must match its declared type and limits; nothing a caller sends can become an operator.
Approvals
Requests for sensitive data wait in an approvals inbox, with emails and auto-approve conditions you set. Each approval works once.
Result guard and row cap
Only approved fields come back, never more rows than your own limit.
Fails closed
Unknown fields, stale permissions or a lost link to the cloud stop queries instead of guessing.

Running and proving it

Agent in your network
Signed .deb and .rpm packages for Ubuntu, Debian, RHEL, Rocky, Alma and Amazon Linux, with a guided setup.
Self-checks
The agent checks its database privileges, links and clock every 15 minutes; run it again from the portal.
Keys, scopes and roles
One service principal per app or agent, with its own keys, sources, customers and purposes.
Audit trail
A hash-chained record of every change and run, with a trace ID on every error.

Who it is for

Teams on MongoDB who hold customer data and want to put it in front of apps or AI without handing out the keys.

Replacing the Atlas Data API

MongoDB ended the Atlas Data API and custom HTTPS endpoints in September 2025. KELS gives you HTTP calls by query ID, with no database credentials in the caller.

  • No driver in the caller
  • One API key per app, easy to rotate

Shipping AI over customer data

Give an assistant a set of safe questions it can ask. Each answer stays inside one customer’s records, and sensitive fields need a person’s approval.

  • Per-customer isolation enforced by the agent
  • Restricted fields refused, always

Security and compliance leads

Every query is reviewed, signed and audited, and customer data never leaves your network. KELS helps you meet HIPAA and SOC 2 access controls; your own audit still decides compliance.

  • Read-only database user
  • Evidence for every run

Questions people ask first

Anything else: write to us at hello@kels.io.

Does my data go to your cloud?

No. Documents, results and the values in requests stay in your network. The cloud sees field names, types and run records so your team can review and audit.

Do I have to change my database or my app?

Your database stays as it is; KELS only needs one read-only user. Your app replaces its database query with an HTTP call to the KELS agent.

What do I install?

One package on a Linux machine near the database (x86_64; Ubuntu, Debian, RHEL, Rocky, Alma or Amazon Linux). We suggest 2 CPUs and 2 GB of memory to start.

Which databases does it work with?

MongoDB replica sets, self-hosted or Atlas. KELS is tested on MongoDB 8.2.

Can an AI agent write its own queries?

Not today. Agents call queries your team has published. From KELS 1.0 an AI can draft queries, but your rules and a person still decide what runs.

Is KELS HIPAA compliant?

No product is compliant on its own. KELS helps you meet HIPAA and SOC 2 access controls with reviewed queries, least privilege and a full audit trail.

What does it cost?

Pilots are arranged with each team. Talk to us and we will work out what fits.

Run KELS on your own data for 8 weeks.

We are taking a small number of design partners. We help you set it up, and you get these limits for the pilot:

2agents, staging and production
10collections
5team seats
25published queries
100,000runs a month
Book a pilot or writeWrite to us at hello@kels.io

Not ready for a pilot?

Join the waitlist and we will write when KELS opens to everyone.