Technical overview

How the pieces fit.

How Prusik works under the hood: the tiers and their rules, the per-customer cell, the gate that every tool call passes, and what you can verify yourself.

Terms

The words the rest of this page uses.

Cell
One isolated deployment for one customer: VM, database, sandbox, keys, domain.
Tier
A named configuration row: model backend, egress rule, classifier, retention.
Source
Internal data a conversation can read: a connected integration or an uploaded file.
Binding
An admin rule giving an integration, or a part of one, a minimum tier.
Tool policy
Metadata declared once per tool or endpoint: effect, boundary, approval, taints.
Gate
The code path every tool call passes before it runs.
Firewall
The part of the gate that judges outbound payloads, using fixed checks and a classifier.
Taint flag
A per-workspace marker set by code: internal data was read, untrusted content was read.
Approval card
A preview rendered from validated arguments that a human approves, revises or stops.
Trust set
The parties that can read a conversation's content.

Tiers

The only things that differ between tiers are the model, what the firewall sees, and which integrations are reachable.

BasicGuardedSecret
ModelFrontier model on Vertex, EU region pinnedOpen-weight model in NEAR's enclaveOpen-weight model in NEAR's enclave
Agent loop runsServerServerBrowser
SourcesIntegrations bound to Basic, uploadsIntegrations bound to Basic or Guarded, uploadsUploads only
Web accessFree until internal data is read, then through the firewallAlways through the firewallNone
Classifier seesPayload, target, recent turnsPayload and targetNothing
SandboxNo egress when sources are onNo egressNone
Who can readGoogle as model host, the classifier vendor, Prusik, the cloud hostThe classifier vendor for outbound payloads only, Prusik, the cloud hostNobody but the user and the enclave, as long as the client code is honest
  1. A conversation gets its tier when it is created. The tier never changes.
  2. A conversation in a project inherits the project's tier. A project's tier never changes.
  3. A conversation can use an integration only if its tier is at or above the integration's minimum tier.
  4. A Basic conversation can be created "web only". It then has no sources at all, which replaces the old Open tier with a structural guarantee.
  5. There is no fallback across tiers. If a tier's model backend is down, its conversations fail.

The cell

One VM per customer. Nothing is shared.

Each customer gets a cell: one virtual machine with its own Postgres database, sandbox, keys and domain. Caddy terminates TLS in front of a FastAPI app bound to localhost. Basic and Guarded conversations use the agent loop on the server. Secret conversations only touch the relay, which adds the NEAR API key, forwards ciphertext and logs metadata.

Browser
  |-- Basic / Guarded: WebSocket + REST -------------------.
  |                                                         |
  '-- Secret: encrypts in the browser, sends ciphertext --. |
                                                          | |
Cell (one VM per customer) -------------------------------|-|-----
  Caddy (TLS) -> FastAPI app on 127.0.0.1                 | |
    Secret relay  <---------------------------------------' |
      adds the NEAR key, forwards ciphertext, logs metadata |
    Agent loop  <-------------------------------------------'
      -> Gate: tool policy, tier, taint flags, firewall, approval
           -> Classifier                 outbound payloads only
           -> Integrations               Gmail, Drive, Calendar, Slack
           -> Web tools                  web_search, web_fetch
           -> Sandbox (rootless Podman)  no egress when sources are on
      -> Model router: Vertex (Basic) | NEAR (Guarded)
    Audit log (hash chain) -> anchored in a bucket outside the database
    Postgres (one database)

The gate

The single most important structural fact: every tool call reaches its handler only through the gate.

One function, called from four places: the top of tool dispatch, the action request arm of the agent loop, the sandbox bridge, and inside the raw HTTP tools once the endpoint pattern is matched. A sandbox script calling a tool is gated exactly like the model calling it.

Every tool and endpoint declares a policy once: its effect (read or write), its boundary (internal or external), its approval rule (none, notify, required) and the taints it sets. A pinned test fails if a tool is added without one.

Inside the gate, first match wins:

  1. Tier and binding check. Fail: deny.
  2. Policy lookup. Missing: treat as external write.
  3. Internal read: allow.
  4. Internal write: none and notify execute, notify also shows a notice. Required creates an approval card.
  5. External read, no internal data read so far: fixed URL checks, then allow.
  6. External read, internal data already read: firewall. Allow, ask or deny.
  7. External write: firewall first, then always an approval card.

Two taint flags, internal data read and untrusted content read, are stored per workspace and set only by the gate from the policy's taints and by file upload. The model cannot set or clear them, and they are never cleared. Inbound mail is untrusted because anyone can send it. Guarded conversations behave as if internal data had been read from the start.

Firewall

Code first. The classifier answers three narrow questions and never overrides a structural deny.

Fixed checks run in code, always first: HTTPS only, no IP literals, no private, link-local or metadata addresses, a URL cap of 2,000 characters, a search query cap of 400, and no path or query segment over 64 characters that looks like base64 or hex. A request that fails these is denied without a classifier call.

What remains goes to the classifier as three questions, each answered with a calibrated probability:

  • leak: does the outbound payload contain specific non-public information beyond what a public lookup needs?
  • encoded: does the payload contain encoded, obfuscated or unusually structured data?
  • intent: is this request a plausible step toward what the user asked for in the recent turns? Asked only in Basic, which sends recent turns.

Code combines the answers. Deny if encoded is yes with confidence at least 0.6. Allow only if every question is clean with confidence at least 0.6. Everything else asks a human through an external-read card that shows the exact URL or query and the firewall's reasons. If the classifier is unavailable, misconfigured, rate-limited or given an oversized input, the answer is ask. Never allow.

Secret tier

The server is a courier.

In Secret the agent loop runs in the browser. Each request is encrypted there, end to end, to NEAR's enclave. The server adds the API key, forwards the ciphertext and records metadata. It never holds plaintext and never holds the key that could read it. Secret conversations have no integrations and no web access, and uploads are the only source.

The guarantee rests on the client code being honest: it holds as long as the code we serve does what this page describes. A signed bundle with reproducible builds, so you can check that yourself, is on the roadmap.

Audit and transparency

Users always see what a conversation touched.

The audit log is a hash chain anchored in a bucket outside the database. It records turn starts, tool proposals, gate decisions with their reasons and classifier answers, approvals requested and resolved, tool executions with result hash and size, taint changes, model calls with backend, region or attestation reference and token counts, secret requests, sign-ins, admin changes and impersonation.

In the UI every conversation shows a tier badge, a "who can read this" list built from the tier configuration, one chip per integration used, a red web access chip from the first external read onward, and state chips for the taint flags. The tool trace lists every call with its integration, effect and boundary. All of it comes from server state, never from model output.

What you can verify

Four things a security lead can see in a live session.

  1. For every conversation, which parties can read it and which tools it used.
  2. A web page with an injected instruction fails to exfiltrate internal data in the Basic tier.
  3. Work on bound sources in the Guarded tier with inference running in an enclave.
  4. Use the Secret tier and verify that the server stores and relays only ciphertext.

Eval results for the gate follow the first implementation, starting with the classifier's thresholds on a security suite of injection and exfiltration attempts. We will publish them here.

Want the full detail?

We will walk your team through the full specification, down to the gate order and the policy table.