FOR BUILDERS & ARCHITECTS
Engine contracts grounded in tenant isolation.
Every authenticated endpoint resolves workspace identity from signed Better Auth sessions or API keys—never client-supplied headers.
Implemented platform surfaces.
| Surface | Behavior | Enforcement |
|---|---|---|
| /v1/chat/completions | Ranks relevant workspace knowledge in pgvector, routes to configured provider keys, and writes post-gate ledger entries. | 5 Safety Gates |
| /api/dispatch | Queues Temporal workflows that suspend cleanly in REVIEW_REQUIRED when operator approval applies. |
Temporal Signal |
| /api/knowledge/* | Indexes workspace notes and Drive text documents via tenant BYOK embeddings or bundled ONNX fallback. | pgvector <=> |
| Credential Vault | Wraps keys using AES-256-GCM with per-tenant HKDF subkeys; master key stays outside source code. | HKDF Subkeys |
| safeFetch Connectors | Resolves DNS once, validates every returned IP is public, pins sockets, and strips credentials cross-origin. | Pinned-DNS SSRF |
Fail-closed endpoints.
Requests blocked by any safety gate return cleanly before upstream token calls or ledger inserts.
POST /v1/chat/completions
Authorization: Bearer <tenant-api-key>
{
"model": "claude-sonnet-4",
"messages": [
{ "role": "user", "content": "List open approvals above $0.25." }
]
}
POST /api/cloud/import
Authorization: Bearer <tenant-api-key>
{
"provider": "google_drive",
"fileId": "<scoped-file-id>",
"target": "knowledge"
}