Guide

Before your first users

Half a day · Draft, not yet reviewed

Use this stage when you are about to let someone outside the team use the feature. Start from what the model can reach. A chat response, a retrieved document and a tool call need different checks because they can affect different parts of your product.

Treat uploaded and retrieved content as untrusted. Validate tool arguments on the server and take identity from the session. Run permission checks inside the tool, where a model reply cannot bypass them. For an action that cannot be undone, show the person the exact action and require approval tied to those arguments.

Check the output path too. Render model text without allowing it to fetch arbitrary remote content. If you run an open-weight model, inspect its provenance and lock what you approved before serving it.

Done means you can call the tool directly with bad arguments and a different user's record ID and watch the server reject it. You can change an approved action's arguments and show that the old approval no longer works.

Know the limit

These checks limit what a confused model can do. They do not make prompt injection disappear or establish that customer data stays separate across retrieval, memory and deletion.

Controls in this stage

  1. Run tools with the user's permissions, not the agent's

    30 min

    Every tool takes user and tenant identity from the session and checks the same permissions as the normal API.

  2. Ask before any action that cannot be undone

    45 min

    Irreversible actions need an explicit approval bound to the exact arguments, with an expiry checked at execution.

  3. Verify the open-weight model you pulled

    30 min

    Open-weight models are checked against their declared base, template changes are reviewed and approved artifacts are locked in CI.

  4. Render model output as untrusted

    30 min

    Model output cannot inject active HTML or load images and links from unapproved hosts, and model-written URLs are never fetched automatically.

  5. Validate every tool call on the server

    30 min

    Every tool validates its arguments on the server and recomputes prices and IDs from your own data.

  6. Treat retrieved and uploaded content as data, not instructions

    30 min

    Outside text is labeled as untrusted, hidden document text is checked, and tools that send data or change state are removed or gated.