Open source · MIT · Runs on your machine

Your AI agent sees a double of your data.
Never the real thing.

Sosie sits between your data and your AI agent. The agent, your app and its tests query it as they would your database or your API, and every value comes back as a realistic fake. The same real value is always the same fake, so joins hold and code written against the fakes runs on the real data.

$npx @sosie/cli
Get startedGitHub

Node 24 or 26 · PostgreSQL 15 to 18 · MySQL 8.4 and 9 · MongoDB 6.0 to 8.0 · SQL Server 2019 to 2025 · your team's REST and GraphQL APIs

In your databasestays there
full_nameemailstatustotal
Kim Lindqvistkim@lindqvist.sepaid749.20
Kim Lindqvistkim@lindqvist.seshipped3.38
Amara Okaforamara.okafor@hey.comshipped8274.94
What your agent seesthe same query
full_nameemailstatustotal
Janick Dachvan29@example.compaid512.87
Janick Dachvan29@example.comshipped7.06
Cristian Kuhlmanlora44@example.netshipped3916.25

Kim is Janick in every row, every table and every session, so the join holds. Totals keep their digits and scale. orders.status shows as it is, because the team's sosie.yml lets it pass.

Give your agent the real database. Keep the real data.

Agents write better code against real schemas, real relationships and real edge cases. Sosie gives them all of that, and keeps every name, email, key and number on your side.

Fake by default

Every value is faked by its field's type and format. A value passes unchanged only when sosie.yml lists its field.

Consistent

The same real value is always the same fake: across rows, tables and sessions, and from the database to the API. Foreign keys share fakes, so joins hold.

Query by what you saw

A fake the agent copies into a query, an id or an email, turns back into the real value before the query runs. Lookups and filters just work.

Read-only

Writes are refused, and the login can be read-only too. That promise is what makes it safe to point at production.

Nothing to change in the client

psql, mysql, mongosh and their drivers, Prisma and Drizzle on Postgres, a database's MCP server, curl and GraphQL clients connect to Sosie as to the real thing.

Runs where your data lives

On your machine, or a host your team chooses. Never a hosted service: your data goes to nobody, us included.

A local address in front of each source.

A core that knows no database decides every fake; each source speaks its upstream's own protocol. One store, keyed and sealed on your machine, keeps each fake consistent and lets a query by a fake find the real row.

Your side

  • AI agentSQL, HTTP or MCP
  • Your app and its tests
  • psql, mysql, mongosh, curl

Sosie, on 127.0.0.1

  • GuardReads only. A write is refused before it leaves Sosie.
  • Turn backA fake in the query becomes the real value it stands for.
  • ReadUpstream with a read-only login, a timeout and a row cap.
  • FakeEvery value by its field: the same real value, the same fake.

Your data

  • PostgreSQL15 to 18
  • MySQL8.4 and 9
  • MongoDB6.0 to 8.0
  • SQL Server2019 to 2025
  • Your REST APIwith or without OpenAPI
  • Your GraphQL APIby introspection or a schema file

How faking works, in detail →

Your database and your APIs, one person, one fake.

One Sosie serves every source of a project, each at an address of its own, each named in sosie.yml. A person's email is the same fake from the database and from the API, and sosie mcp serves them all.

Postgres, MySQL, MongoDB, SQL Server

Each database's own wire protocol. psql, mysql, mongosh, sqlcmd and their drivers work unchanged, and Drizzle and Prisma 7 on Postgres.

Postgres docs → ·MySQL → ·MongoDB → ·SQL Server →

sosie.yml
sources:
  shop:
    upstream: ${SHOP_URL}   # postgres://, mysql://, mongodb:// or sqlserver://

REST

GET and HEAD only, with Sosie's credentials, never the agent's. Fields come from the OpenAPI document, or from where values sit.

REST docs →
sosie.yml
  billing:
    upstream: ${BILLING_URL}
    headers:
      Authorization: Bearer ${BILLING_TOKEN}

GraphQL

Queries only, checked against the schema. Introspection is answered from the schema Sosie holds and never reaches the API.

GraphQL docs →
your terminal
npx @sosie/cli
  ✓ shop     db.internal:5432/shop, read-only: 42 tables, 3 views
  ✓ billing  api.internal/v1, read-only: OpenAPI 3.1, 24 schemas, 41 GET paths
  ✓ catalog  api.internal/graphql, read-only: 31 types, 12 queries
  ✓ Every value is faked; 3 fields pass (sosie.yml)

  shop:                      postgres://localhost:7674/shop
  billing:                   http://localhost:7675/v1
  catalog:                   http://localhost:7676/graphql

Check that nothing real reached a transcript.

sosie scan reads transcripts and logs and compares every run of words, by keyed hash, with the real values Sosie has seen. It never prints a real value, and exits 1 when it finds one, so CI can run it.

  • Nothing to set up. It reads the same store Sosie keeps, on the same machine.
  • Only distinctive values. Years, ports and line numbers are not findings.
  • What the agent was shown is not a finding. A fake is what it should see.
your terminal
npx @sosie/cli scan ~/.claude/projects
  ✓ No real values found in 412 files.

npx @sosie/cli scan logs/
  ✗ /home/kim/app/logs/agent.jsonl:1203  a real value from format:email
  1 real value found in 38 files.

One file, written for you. Reviewed like code.

sosie.yml is all there is to configure: the project's sources, and the fields that must stay real. Sosie writes it with your first source as it starts, naming the variable that holds the connection string, never the string. It is committed with the code and checked against each schema at start-up: a typo is an error that names it, never a value passing silently.

Every rule and format →

sosie.yml
# Fields whose values pass unchanged.
pass:
  - orders.status
  - countries.*

# Formats for fields Sosie cannot tell from their names.
format:
  users.handle: username

sources:
  shop:
    upstream: ${SHOP_URL}

What Sosie is not.

  • Not a service. It runs on your machine, or a host you choose. There is no account and nothing to send us.
  • Not a writer. It never changes your database, and sends an API only GET, HEAD and GraphQL queries.
  • Not a wall against an agent hunting for secrets on the machine Sosie runs on. For that, run Sosie on another host and give the agent only its address.
  • Not a filter on the agent's shell output. Sosie fakes what passes through it; sosie scan proves what reached the transcript.
  • Not blind to shape. Row counts, nulls, the rough size of values and the order of real values are visible.
  • Not a guess. The schema, or where a value sits, says what each value is. Automatic detection never decides that a value is safe.

The threat model →

Three commands. Sosie writes its own sosie.yml.

In your own terminal and your project's folder, not the agent's. The connection string is typed at a hidden prompt, or read from a variable you name: never written down.

npx @sosie/cliStart Sosie. The first time, it asks for your first source and writes sosie.yml; then it prints a local address for each source, for your agent, your app and psql.
claude plugin install sosie@sosieAfter claude plugin marketplace add monkilabs/sosie: Sosie's MCP server in Claude Code, and a skill that tells the agent how to read through it. Or connect any MCP client to npx @sosie/cli mcp, or point psql, your app or curl at the address.
npx @sosie/cli scan ~/.claude/projectsCheck that nothing real reached a transcript.

Sosie is French for a lookalike, after the servant in Molière's Amphitryon whose exact double the god Mercury becomes.