Skip to main content
POST
Events, Questions and Results

Overview

All wallets use the agent loop.

Send an event

POST /v1/compute/{goalId}/events with a signed write proof or an access token (Authentication schemes).
  • event_id: your id for the event. Sending the same id twice is one event.
  • case_key: the case it is about. It is opened, woken if open, or reopened if finished. Leave it out to send the event to the goal’s root.
  • task: what happened.
  • facts: optional object, up to 16,000 bytes, with case_key: the case’s fields; later facts merge in. Invalid: 400 invalid_facts.
  • budget_usdc, step_limit: for a case this event opens.
Answers 202 with { "target": "case" | "root", "case_key", "outcome": "created" | "already_open" | "reopened" | "sent_to_root" }.

Replies reach the case that asked

Replies wake their sending session. Unmatched mail goes to the newest goal’s root.

A case asks a named person

ask_person takes a name, address, question and kind:
  • answer: email requires aligned DMARC or verified DKIM for the From domain. Failed/missing verification holds it for owner review; the question stays open.
  • approval: anything that releases an action. The person is sent a signed, single-use link that expires. Only the click counts. A reply to the same email is told to the case and releases nothing. The click is written on the record with who, when, via: "link" and what the person was shown (shown, shown_hash).
A question can be chased (chase_after_seconds, up to three reminders) and has a deadline (deadline_seconds, default 7 days) at which the case is told to escalate. A used, expired or altered link is refused. Goal email and ask_person obey domain sending limits.

Results out

Give the goal an address or people to email at creation:
Results go to public HTTPS and each recipient. Unregulated webhook payload:
The body is signed in X-OneShot-Signature (t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>">). Read the secret at GET /v1/compute/{goalId}/result-webhook. If the case asked for an approval, only a result equal to the approved one is sent; anything else is withheld. A failed delivery is retried with a growing delay, up to six attempts, each shown on the case. Regulated webhooks send IDs, status, timestamps and a content-read path.

Read a case

GET /v1/compute/{goalId}/cases/{key} returns the case’s record, facts, outputs, recorded, wait_until, decisions, asks (each with status, chases, deadline_at, escalated_at) and deliveries (each with status, attempts, last_error, next_attempt_at). Declared params.cases.value_field requires a finite result number before delivery. Case reads add value and actual_usdc. Case settings declare person_actions; outcomes report value, spend and owners.