Reversible Agent Privacy (Tool Loop)

Architecture and implementation guide for Spendplane's opt-in Reversible Agent Privacy Add-On: run-scoped placeholder vaults, selective per-tool argument restoration, cross-run token rejection, and metadata-only audit logs.

Complete multi-step agent tool workflows without exposing raw customer records

Blind redaction (replacing everything with asterisks) breaks autonomous agents: if a CRM lookup returns masked values, the next billing or support tool call has no valid identifier to query. Spendplane's Reversible Agent Privacy Add-On solves this at the Project Gateway boundary using run-scoped placeholder tokenization, selective field-level tool argument restoration, and metadata-only audit trails.

How a protected customer-to-invoice tool loop runs

An agent checks an invoice status via two internal tools while the external model and persistent audit logs never receive raw identifiers.

  1. 01

    A user prompt or initial CRM tool response introduces a sensitive identifier (for example cust_8492_live and alice@acme.test). Spendplane assigns deterministic run-scoped tokens ([CUSTOMER_ID_01], [EMAIL_02]) inside a single vault for that run.

  2. 02

    Subsequent tool results reuse [CUSTOMER_ID_01] for the same customer and increment monotonically ([CUSTOMER_ID_03]) for newly discovered records, preventing placeholder collisions across turns.

  3. 03

    When the model invokes an authorized tool such as get_invoice_status with { customer_id: "[CUSTOMER_ID_01]" }, Spendplane checks caller role, tool name, and approved field paths—restoring the real ID inside the downstream tool call only if all policy checks pass.

  4. 04

    The model receives the returned invoice status alongside [CUSTOMER_ID_01], session storage retains only scrubbed content, telemetry keeps request/response previews null in metadata-only mode, and final rehydration happens only at the caller egress.

Three architectural guarantees enforced by the Add-On

  • Run-scoped token vault: one shared binding table per run eliminates _01 collisions and guarantees entity continuity across multiple tool calls.
  • Selective tool-argument rehydration: resolves placeholders only for allowlisted tools, fields, and caller roles while blocking foreign/cross-run references (e.g. [CUSTOMER_ID_99]) before execution.
  • Pre-storage scrubbing & metadata-only logging: stores scrubbed placeholders instead of raw PII in project_sessions and omits request_preview/response_preview from usage telemetry when enabled.

How to enable and configure it

Reversible Agent Privacy is shipped as an opt-in add-on in Governance Shield so teams can roll it out per workspace, per project, or per gateway request without altering existing non-agent traffic.

Dashboard toggle

Governance Shield → Detection Capabilities

Enable Reversible Agent Privacy (Tool Loop) and keep Metadata-Only Request & Response Logs checked to drop prompt/reply previews from audit records while preserving token, cost, and redaction counts.

Per-request or tenant policy

{
  "reversible_agent_redaction": true,
  "authorized_tool_args": {
    "get_invoice_status": {
      "allowedFields": ["customer_id"],
      "allowedRoles": ["owner", "admin"]
    }
  }
}

Defense-in-depth comparison across Spendplane layers

LayerWhat it inspectsBest fit
Zero-Cert AI VPN Tunnel (No CA)Device network connections, AI harvester domains (AI Shield), HTTP headers, and tunnel volume without root CA certificates.Zero-friction endpoint protection and blocking unauthorized AI endpoints across devices.
Browser Extension & Standard GatewayDirect prompt and response text prior to third-party LLM egress.Preventing interactive PII/secret leaks in chat web apps and single-turn API calls.
Reversible Agent Privacy Add-OnFull multi-turn prompt, tool result, tool call argument allowlists, session history, and metadata telemetry.Production billing, CRM, and support agents that must invoke internal tools using protected identifiers.

Considering a trial phase or evaluation?

Get in touch with our team to discuss your architecture.