Agent Harness Tutorial · End to end · Zoom level 3
How we take care of it: consent
consent catches lists the writes Rohan's own words asked for.
How we took care of it.
- List the writes his words ask for, such as request_payout:CLM-010004, or register_claim:*.
- A plain "yes" grants the one action the agent is waiting on, for this turn only.
- Tool results can never add to the list, so a planted note can't grant itself anything.
- Nothing is blocked here; check point 4 uses the list.
| It reads | only Rohan's own messages in this conversation |
| Kind | rule |
| Provided by | agent |
| If it fails | — |
| Where in the code | consent.granting() · F entrypoint/consent.py:40-66 |
| Runs at | 1 · Before the loop |
Real exampleFlow 11: the agent asked "withdraw CLM-010005?"; Rohan said "yes", and that granted it.
How it is done: the real code
Cut from the live repositories each time the site is built, so it always matches what runs.
def granting(
identity: Identity, conversation: Conversation, text: str, rules: router.Rules
) -> Identity:
"""The turn's identity, carrying what the policyholder has consented to."""
return identity.model_copy(update={"consented": consented(conversation, text, rules)})