# Agents as executed contracts

> An agent that persists across sessions is a walk through the loop, not a persona, as shown in a verifying agent].

Page: Methodology · Collaborate
Canonical: https://banes-lab.com/disciplined-methodology/collaborate#agents-as-executed-contracts

This section is stop 75 of 102 in the learning route. Previous: [36 - The developer and the model](https://banes-lab.com/disciplined-methodology/collaborate/the-human-and-the-ai.md). Next: [38 - Coordination is software](https://banes-lab.com/disciplined-methodology/collaborate/coordination-is-software.md). It builds on [01 - The loop](https://banes-lab.com/disciplined-methodology/start/the-loop.md), [09 - A seat is a contract](https://banes-lab.com/disciplined-methodology/start/a-seat-is-a-contract.md), [14 - Execute the template](https://banes-lab.com/disciplined-methodology/plan/execute-the-template.md), [27 - Verify the verifier](https://banes-lab.com/disciplined-methodology/verify/verify-the-verifier.md).

An agent that persists across sessions is a walk through [the loop](https://banes-lab.com/disciplined-methodology/start/the-loop.md), not a persona, as shown in [B1·a a verifying agent](https://banes-lab.com/disciplined-methodology/collaborate#agents-as-executed-contracts-panel-a). The [agent templates](https://banes-lab.com/pag/templates/templates-agents.md) on the grammar page are walked rather than adopted, which applies the rule described in [a seat is a contract](https://banes-lab.com/disciplined-methodology/start/a-seat-is-a-contract.md) to agents. An agent is created as shown in [B1·b making an agent](https://banes-lab.com/disciplined-methodology/collaborate#agents-as-executed-contracts-panel-b). Its definition is executed rather than consulted: it directs the agent to disclose what it trusts, bind itself to one phase as [phase binding](https://banes-lab.com/pag/orchestration/phase-binding.md) requires, rank what is worth verifying, calibrate its detectors, gather from the implementation, check its own contract against its own behaviour, and emit exactly one typed artifact. The agent that creates agents and the agent that audits them are the same loop applied to agents, and what the walk executes are the ontology's contracts for the [orient](https://banes-lab.com/records/stage/orient.md) and [verify](https://banes-lab.com/records/stage/verify.md) stages.

### A walked loop, one artifact

An agent defined by a voice can be judged only by how it sounds, and a model can make almost anything sound right. A reviewer agent with a persuasive system prompt approves a change that reads well, because nothing in its definition made it open the diff, calibrate a detector or name what would refute its verdict. An agent written as a description is applied by its reader's interpretation, and the interpretation drifts with the reader.

For this reason I treat a capability as real only once its behaviour matches a testable contract, and a verifier applies its rules to itself. An agent is defined by the loop it walks and the artifact it emits, rather than by a voice. In practice, an agent is written as a contract the loop can execute. It has a disclosed trust anchor, a phase it binds to, and a ranking of its claims by risk and uncertainty. Every claim has an evidence requirement naming the observation that would settle it, an admissibility check confirms the phase was honoured, and the run ends in a single typed artifact. The agent is generated from inspected evidence about its domain, rendered through an adapter, and shown to be grounded and embodied before it is persisted.

To check this, run the agent on a case with a planted contradiction and on a clean case. It should report the contradiction with its evidence and pass the clean case for the right reason; an agent that cannot fail on purpose has never been shown to work. A bounded invocation has no channel back, so it returns its uncertainty as described in [ask where it appears](https://banes-lab.com/disciplined-methodology/plan/ask-where-it-appears.md), and a rule that should have been inverted for it, left as it is, is actively wrong while reading as governed.

The anchor is disclosed, as [verify the verifier](https://banes-lab.com/disciplined-methodology/verify/verify-the-verifier.md) requires, and the self-audit is what catches an overclaim above it: the agent reads its own definition, extracts every capability it claims, runs a positive and a negative case for each, and lowers its confidence for every claim it cannot back.

Phase binding is what keeps an investigation honest. An investigation discovers and never fixes, and its artifact is a report of evidence. An action fixes and never discovers, and its artifact is a log of bounded changes against known evidence. The two exclude each other because the checks that heal rewrite the tree, so an investigation that ran them has changed the tree under a read-only contract.

An agent is generated the way a plan is, from a template that is executed, as described in [execute the template](https://banes-lab.com/disciplined-methodology/plan/execute-the-template.md). Its source is inspected evidence about the domain it will investigate, never prior knowledge, which is the difference between grounded output and [ungrounded content](https://banes-lab.com/records/arch/ungrounded-content.md). Its target is a portable contract, the shape [the drop-in](https://banes-lab.com/disciplined-methodology/start/onboarding.md) gives every core, rendered for one runtime through an [adapter pattern](https://banes-lab.com/records/arch/adapter-pattern.md), so the same agent moves to another runtime by being rendered again. What an agent needs to know in order to act is declared in the body it is delivered with, because a declaration in a field the runtime discards never reaches the agent, and a check reading that field measures an artifact while the mechanism does nothing.

B1·a a verifying agent

```mermaid
flowchart TB
anchor["Disclose the trust anchor · what is assumed and cannot be verified"]
phase["Bind to one phase · investigate discovers and never fixes, action fixes and never discovers"]
rank["Rank the claims by verification worth"]
calibrate["Calibrate every detector · a known-good it must match, a known-bad it must not"]
resolve["Resolve each claim to the observation that would settle it"]
gather["Gather from the implementation · never infer"]
admissible["Check the phase was honoured"]
verify["Classify each claim · verified, contradicted, unverified"]
audit["Audit the agent's own contract · an overclaim lowers its confidence"]
artifact["Emit exactly one typed artifact"]
anchor --> phase --> rank --> calibrate --> resolve --> gather --> admissible --> verify --> audit --> artifact
verify -. refuted or escalated, bounded .-> resolve
```

B1·b making an agent

```mermaid
flowchart TB
evidence["Inspected domain evidence"]
contract["A portable contract · semantic operations and slots, no runtime"]
adapter["An adapter renders it for one runtime"]
grounded{"Grounded, embodied, no leakage?"}
persisted["Persisted, with its participation declared in the body"]
evidence --> contract --> adapter --> grounded
grounded -- yes --> persisted
grounded -- no --> contract
```

## Links to

- [The loop](https://banes-lab.com/disciplined-methodology/start/the-loop.md)
- [Agent templates](https://banes-lab.com/pag/templates/templates-agents.md)
- [A seat is a contract](https://banes-lab.com/disciplined-methodology/start/a-seat-is-a-contract.md)
- [Phase binding](https://banes-lab.com/pag/orchestration/phase-binding.md)
- [Orient](https://banes-lab.com/records/stage/orient.md)
- [Verify](https://banes-lab.com/records/stage/verify.md)
- [Ask where it appears](https://banes-lab.com/disciplined-methodology/plan/ask-where-it-appears.md)
- [Verify the verifier](https://banes-lab.com/disciplined-methodology/verify/verify-the-verifier.md)
- [Execute the template](https://banes-lab.com/disciplined-methodology/plan/execute-the-template.md)
- [Ungrounded Content](https://banes-lab.com/records/arch/ungrounded-content.md)
- [The drop-in](https://banes-lab.com/disciplined-methodology/start/onboarding.md)
- [Adapter Pattern](https://banes-lab.com/records/arch/adapter-pattern.md)

## Linked from

- [Phase binding](https://banes-lab.com/pag/orchestration/phase-binding.md)
- [Agent templates](https://banes-lab.com/pag/templates/templates-agents.md)
- [Verify the verifier](https://banes-lab.com/disciplined-methodology/verify/verify-the-verifier.md)
- [One chain](https://banes-lab.com/disciplined-methodology/ship/one-chain.md)
