acted_as. Every later interaction is read from and appended to the Session event log.
What this example demonstrates
- Pair the person in the application, before any Checkfu call. The app sends a single-use, short-lived pairing code into the DM and accepts it only when the same member echoes it back in the same DM. That proves continuity of the conversation; the authenticator is the application, not Checkfu.
- Provision one Principal and one Agent per person. The person’s Principal is found again by its external subject. The person holds
act_asandapproveon their own Agent, and the Agent holdsuse_environmenton the Environment. - Start one direct Session for the DM with
acted_asset to the person and the person’s principal-owned MemoryStore mounted read-write. Admission is refused withoutact_as,use_environment, or the Agent’s grant on the store. The Session is created with the ordinary Session API. - Connect an app with
connections.apply. The Connection is owned by the person;connections.applymintsuse_connectionanduse_toolfor the person and their Agent and pins the Connection on the Agent as a new AgentVersion. The DM moves to a new Session on that version with the sameacted_asand memory mount. - Decide ActionApprovals as the person. The app reads the parked approval from the event log, renders the draft only when the logged arguments hash to the frozen digest, and calls
actionApprovals.decidewithexpected_versionandacted_asthe person. The ledger names the person, with the app’s key as the authenticating caller. - Keep reminders app-side. The app serves reminder Custom tools that act only for the platform-frozen
actedAs, keeps the schedule in its own state, and drives the person’s current DM Session when a reminder is due. The resulting Run is the person’s Run, bounded like a message they typed.
acted_as. Per-person isolation therefore comes from the application granting each person’s store to exactly that person’s Agent, and act_as on that Agent to exactly that person.
Retention, delivery, and recovery boundaries
Your messaging provider can redeliver an incoming message, and a reply to the provider can fail after Checkfu has accepted Session truth. Deduplicate by a stable message key and reconcile provider delivery rather than creating a second transcript. A lost provider response can leave an external effect indeterminate; do not retry it blindly. Standard retention may preserve permitted Session and Memory content subject to policy and erasure. ZDR does not durably store execution content or memory documents, so persistent personal memory and content replay are unavailable for that path, and the draft cannot be rendered when the logged arguments are gone. Usage remains authoritative for Budgets. Check capability status for the exact provider and deployment before depending on restart recovery, revocation, erasure, a memory operation, or an execution lane.Pinned source boundary
The optional source reads a parked approval from the Session event stream. The durable event is the starting point for the approval UI; a button press or reply in your messaging app is not approval authority until your service callsactionApprovals.decide.
path=examples/personal-assistant/src/draft.ts