AI Audit Trail
Keep a reviewable record of what the AI saw, produced, recommended, and actually did.
What it adds
A per-run record of inputs, sources, configuration, output, approvals, and executed actions, restricted and retained by purpose.
What your agent is told to do
5
What your agent is told to do
5-
1
Write one record per run covering the feature invoked, the configuration and prompt version in force, the sources retrieved, the tools called, the output produced, who approved it, and what was carried out.
-
2
Distinguish a draft from an executed action explicitly in the record. A trail that shows only what text was produced cannot answer the question that matters in a review, which is whether anything happened.
-
3
Redact at the moment of writing. Strip credentials, tokens, and payment details before the record is stored, and keep only the personal content genuinely needed to understand the decision.
-
4
Make records append-only, permission-restricted, and tamper-evident, and link out to the retrieval capture owned by Retrieval Debugger rather than duplicating chunk-level detail here. A trail the operator who caused the event can quietly edit proves nothing.
-
5
Set retention per purpose rather than one global window, since routine assistance, safety review, billing reconciliation, and regulated workflows justify different periods. Do not keep every prompt and response indefinitely because it was easier than deciding.
Edge cases it handles
8
Edge cases it handles
8- The record must capture the configuration and prompt version used, the sources supplied, the tools invoked, who approved the result, and the outcome. Any one of those missing makes an incident unreconstructable.
- Prompts and outputs carry secrets and personal data by accident. Redact before storage rather than at display time, because a redaction applied in the view still leaves the original in the database and in backups.
- A suggestion the user rejected, a draft never sent, and an action executed against live data must be visually and structurally distinct in the trail.
- Records must be append-only with modification detectable, and readable only by roles entitled to see the underlying content, since the trail aggregates material from across the app.
- Retention has to be set separately for ordinary usage, safety investigations, billing evidence, and regulated activity, because a single window is either too short for one of them or too long for the rest.
- A run that failed, timed out, was refused by the model, or was cancelled partway still needs a record. The absence of an entry must never be the only evidence that something went wrong.
- If writing the audit record fails, decide deliberately whether the action proceeds or is blocked, and apply the stricter choice to anything consequential.
- A deletion request from a user has to reach this trail as well. Define what is removed and what is retained under a legal obligation, and be able to state which is which.
Definition of done
9
Definition of done
9- Every AI run produces a record, including failed, refused, and cancelled runs.
- Each record identifies the configuration and prompt version, the sources retrieved, the tools called, and the approver.
- Drafts, rejected suggestions, and executed actions are distinguishable in the trail.
- Credentials and payment details are removed before the record is stored, not hidden at display time.
- Records are append-only, tamper-evident, and readable only by authorized roles.
- Retention periods are configured separately per purpose and enforced by deletion.
- Chunk-level retrieval detail is linked from Retrieval Debugger rather than duplicated.
- The feature matches the existing design system.
- No existing functionality is broken.
Related features
AI PII Redaction
AI PII Redaction
Catch personal information in text before it leaves the app, and mask it.
What it does
A redaction pass over text and attachments on the paths that share, export, or forward content to another system.
How it works
- 1 Identify every path where text leaves its original context: exports, share links, support handoffs, outbound webhooks, and anything sent to a model provider. Redaction belongs on those boundaries, not scattered through the UI.
- 2 Run two detectors together and merge their results. Pattern matching handles the formats with a fixed shape, and a model pass handles the cases only context reveals, such as a name and a home address written into a free-text note.
- 3 Treat the model as one signal, not the decision. Anything the model alone flags must carry lower confidence than a deterministic match, and the feature must keep working with pattern detection only when the model is unavailable.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/ai-pii-redaction
Model Fallback
Model Fallback
Keep AI features working when the primary model provider fails.
What it does
A bounded retry path that reruns a failed AI task on a compatible alternative model and discloses the substitution.
How it works
- 1 Classify failures before reacting. Provider outages, capacity rejections, rate limiting, and timeouts are worth retrying elsewhere; a refusal, an invalid request, or an authentication error will fail identically on any destination and must surface immediately.
- 2 Honour rate limiting with backoff before moving on. Retrying instantly against a provider that asked you to wait deepens the outage and can extend the penalty period.
- 3 Allow fallback only to models that can honour the same output shape and the same tool behaviour as the original. A substitute that returns a different structure turns a provider outage into a data problem inside the app.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/model-fallback
Prompt Injection Defense
Prompt Injection Defense
Stop instructions hidden in documents, pages, and tool output from steering the AI.
What it does
A boundary between the app's own instructions and untrusted content, backed by enforced tool permissions and confirmation for consequential actions.
How it works
- 1 Enumerate every route by which content the app did not author reaches a model: uploaded files, retrieved passages, fetched pages, records from connected accounts, and the results of tool calls.
- 2 Keep the app's own rules in the trusted portion of the request and enclose untrusted content in a clearly delimited region labelled as material to be analysed rather than instructions to be obeyed.
- 3 Enforce what the model may reach outside the model. Tool permissions, tenant scoping, and rate limits must hold even when the model has been completely persuaded — an instruction telling the model not to delete things is not a control.
Copy the prompt
No account needed
Add this feature to my app:
https://addthisfeature.com/x/prompt-injection-defense
How it works
-
1
Copy the link
Grab the Markdown instruction URL for this feature.
-
2
Give it to your AI
Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.
-
3
It inspects, then implements
Your agent reads your existing app first, then adds the feature to fit it.
Works with your stack
These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.
Need it tighter than that? Customize the feature and tell it exactly what you're running.