$ fssg build --deterministic --validate |

Argument-Level Provenance for AI Tool Calls

AI Engineering

A tool call can be perfectly valid JSON and still carry the wrong authority.

Consider an agent asked to review a deployment report. The user names the project. A retrieved page supplies a cluster name. The model infers that “latest” means production. A runtime default adds force: true. The final call passes its schema:

{
  "tool": "deploy.release",
  "arguments": {
    "project": "atlas",
    "cluster": "eu-prod-2",
    "version": "latest",
    "force": true
  }
}

Schema validation can prove that every field has the right type. It cannot prove that a web page was allowed to choose a production cluster, that the model was allowed to resolve an ambiguous version, or that a default was allowed to weaken a safety check.

This is why I think AI runtimes need argument-level provenance. Not one origin label for the whole request. A source and authority record for every consequential value.

One call, four decision makers

Tool-call pipelines usually collapse several stages into one object:

user goal -> retrieved data -> model proposal -> runtime defaults -> tool arguments

By execution time, the values look equal. They are not.

  • project may come directly from the authorized user request.
  • cluster may come from an untrusted document.
  • version may be a model inference.
  • force may be injected by configuration.

OWASP recommends treating external data—documents, API responses, email, retrieved content—as untrusted and independently validating consequential actions. That is necessary, but “this call used untrusted data” is often too coarse. Most useful calls combine trusted and untrusted inputs. Blocking the whole call loses useful work; trusting the whole call launders authority.

The policy question is narrower: which source controlled which field?

A provenance map beside the call

I would keep the executable arguments clean and place provenance in a parallel envelope:

{
  "call_id": "call_01K...",
  "tool": "deploy.release",
  "arguments": {
    "project": "atlas",
    "cluster": "eu-prod-2",
    "version": "latest",
    "force": true
  },
  "provenance": {
    "/project": {
      "source": "user.request:/project",
      "authority": "task-scope",
      "transform": "exact"
    },
    "/cluster": {
      "source": "retrieval:doc_72#/cluster",
      "authority": "evidence-only",
      "transform": "exact"
    },
    "/version": {
      "source": "model.inference:step_8",
      "authority": "proposal-only",
      "transform": "semantic-resolution"
    },
    "/force": {
      "source": "runtime.default:deploy.force",
      "authority": "config-default",
      "transform": "default"
    }
  }
}

JSON Pointer is useful here because it identifies nested values without redesigning every tool schema. The map can also carry source digests, timestamps, parser versions, confidence signals, and transformation chains. The minimum useful record answers three questions:

  1. Where did this value originate?
  2. How was it transformed?
  3. What authority may that origin exercise?

This is related to quarantining tool output, but it solves a later boundary. Quarantine controls how external material enters the system. Argument provenance controls what happens after trusted and untrusted material have been combined into one proposed action.

Validation does not upgrade authority

This distinction matters because validation is frequently treated as trust promotion.

Suppose eu-prod-2 exists in the deployment inventory. The value is now factually valid. It still does not follow that the retrieved page may select it as a target. Existence, truth, and authority are different properties.

A parser can confirm shape. A lookup can confirm existence. A signature can confirm origin. None of those checks answer whether that origin may control this operation.

I would express the policy separately:

rules:
  - argument: /project
    allowed_authority: [task-scope, signed-plan]

  - argument: /cluster
    when: "classification == production"
    allowed_authority: [user-explicit, approved-plan]

  - argument: /version
    allowed_authority: [user-explicit, release-manifest]
    deny_transform: [semantic-resolution]

  - argument: /force
    allowed_value: false
    override_authority: break-glass-approval

Now the runtime can return a typed refusal:

ARGUMENT_AUTHORITY_MISMATCH
path: /cluster
required: user-explicit | approved-plan
received: evidence-only

The model may then propose a safe next step: ask the user to select a cluster, load an approved deployment plan, or produce a dry-run artifact. It cannot repair the mismatch by merely asserting greater confidence.

Provenance must survive transformation

The hard part is not attaching a label at the connector. It is preserving that label through extraction, joins, summaries, templates, and model-generated rewrites.

A useful propagation rule is conservative:

result authority <= least-authoritative consequential input

If an agent joins a user-approved project with a cluster found in external text, the resulting target does not inherit the user’s authority. If a model summarizes three sources, the summary should reference all three or explicitly mark provenance as incomplete. If a value is copied exactly, record exact; if normalized, record the transform; if inferred, say so.

When provenance is lost, the runtime should not silently label the value “model-generated” and continue. Lost provenance is its own state:

PROVENANCE_INCOMPLETE

That state may be acceptable for drafting prose. It should block a production target, payment destination, recipient list, deletion selector, credential scope, or memory write until a stronger source supplies the field.

This complements action approval receipts. A receipt binds approval to the final action. The provenance map tells the approver how that action was assembled. Approval without this view can become a clean signature over contaminated parameters.

A practical enforcement sequence

I would place the mechanism between proposal and authorization:

Stage Runtime responsibility
Capture Label user fields, retrieved artifacts, policy values, and defaults before merging
Propagate Preserve labels through deterministic transforms; record model inference explicitly
Materialize Emit arguments and the parallel provenance map
Validate Check schema, resource existence, freshness, and source integrity
Authorize Evaluate allowed authority per consequential argument
Approve Show values with origin and transformation, not only a friendly summary
Execute Bind the accepted provenance digest into the execution receipt

The final digest matters. If arguments or provenance change after approval, the approval no longer matches. The system should recompute the action identity and request authorization again.

In a contract-oriented architecture such as FACET, this belongs outside model improvisation. Types describe values. Runtime policy describes permissions. Provenance connects the value presented to policy with the path that produced it. I am describing an architectural extension, not claiming that current FACET tooling already implements this envelope.

What the map cannot prove

Argument provenance is not a truth oracle. A trusted user can make a mistake. A signed source can be compromised. A model can derive the wrong value from clean evidence. Instrumentation can miss a transform. Coarse labels can create false confidence.

It also carries cost. Connectors need stable source identities. Transformations need propagation semantics. Tool policies need to identify consequential fields. Logs must preserve useful lineage without copying secrets.

So I would start with actions where one wrong parameter changes the blast radius: production targets, filesystem paths, outbound recipients, payment destinations, permission scopes, destructive selectors, and durable memory writes. Read-only search terms do not need the same ceremony.

The claim is deliberately narrow: provenance makes mixed authority inspectable and enforceable. It does not make every source correct or every action safe.

A tool call is a decision graph

An agent tool call looks like a flat object because APIs need a flat object. Operationally, it is a decision graph compressed into parameters.

If the runtime stores only the final JSON, it remembers what was requested and forgets who decided each part. That is not enough for systems that retrieve hostile content, infer missing details, inherit configuration, and then act with real capabilities.

I want the executor to ask one question before every consequential call:

Does each argument carry authority equal to its effect?

Schema validation tells me whether the call is well-formed. Argument-level provenance tells me whether its decisions came from places allowed to make them. AI engineering needs both.

Sources

FACET AI CLI Terminal
facet@ai:~$