Skip to content

Data model

The tables of the gateway's Postgres schema and what each holds.

Applies to EngineCloud
View as Markdown

The gateway keeps everything in one Postgres schema, sypnia_ai.

TableHolds
projectseach project’s settings: whether model names are allowed directly, the zero-retention rule
route_versionsevery version of a project’s routes, as written, with who applied it and when
keyskeys: name, prefix, a slow hash of the secret (never the secret), scopes, caps, last use, revocation
provider_keysyour own provider keys, encrypted, or the AWS role to assume
originssites allowed to use browser tokens
limits, limit_leasesthe limits, and the leases each copy of the gateway holds
callsone row per call: task, route version, case, the person’s id hashed, model, attempts, tokens, credits, result, timings, trace id. Split by day; days older than the retention are dropped whole
usage_dailytotals per day, case, task, key, person and model, kept as long as the organization
stored_bodieswhere a kept question and answer are, and when they are deleted
cache_entriesthe response cache’s index and expiry
auditroute changes, key changes, reads of kept bodies, deletions of people

What a person wrote is never in Postgres: kept bodies and cached answers live encrypted in object storage, and the tables only point to them.

    Search pages, sections and terms