Delegate one operation to an agent
Authorize an agent to call one exact operation, verify the Mandate at the action time, and inspect a denied attempt.
This quickstart gives an agent useful authority without sharing a human credential or authorizing everything the principal can do.
The agent's presence, its stated purpose, its data access, and its authority to perform an operation are different facts.
Create the target operation#
Start with a Flower Shop Offer. The setPromotionalPrice operation is bound to Alice's ownerChannel. It accepts an integer amount and updates the current price.
Alice can call it directly. The pricing agent cannot, because its Timeline and actor do not match ownerChannel.
Define the Operation Mandate#
Create a separate Mandate with Alice as authority holder, the pricing agent as authorized actor, and a trusted guarantor. Target one logical document, one Channel, one operation, and a request range from 100 to 300 PLN.
A Mandate does not mean “do anything Alice can do.” It describes one bounded authority relationship.
Confirm and activate authority#
The Mandate initializes as Pending. The guarantor confirms that the declared authority relationship is legitimate. The profile then activates it immediately or waits for a separate condition.
The processed lifecycle—not an Active field authored by the creator—determines whether the Mandate is usable.
Submit the agent action#
The KYA or other Timeline provider attributes the entry to the agent. onBehalfOf names Alice and the initial Mandate document. The Operation Request targets Alice's ownerChannel and asks to set the price to 175 PLN.
The agent remains the actor. The entry does not pretend Alice clicked the button.
Verify authority at the timestamp#
The target feeder derives the agent's source Channel, sees that the target Channel differs, resolves the exact processed Mandate state at the entry timestamp, and verifies the actors, logical target, Channel, operation, request constraint, and optional exact-state precondition.
If evidence is missing, the action is deferred. If the resolved Mandate is inactive or mismatched, the action is withheld.
Inspect the accepted result#
The processor receives the original Timeline Entry, accepts it through the agent's source Channel, selects the operation bound to ownerChannel, applies the update once, and checkpoints the source Channel.
Test a denied request#
Ask the agent to set the price to 450 PLN. The request exceeds the Mandate range. A KYA provider can retain the attempted action and denial for audit without releasing an authorized target entry. The target feeder independently rejects any malformed attempt that still arrives.
The product should explain the failed rule, not merely show “permission denied.”
Revoke and retry#
Alice invokes the standard termination path. The Mandate records the causal timestamp, moves to Terminated, emits the termination event, and ends its processing scope gracefully.
A later agent attempt is withheld because the exact Mandate state at that action time is terminal.