Mandate · Guide
Propose a plan of subagents
When your agent holds a person's network grant and wants other agents to do part of the work, it proposes a delegation plan: the task in one line and, for each subagent, its purpose, its budget and any narrower limits. The person reviews the plan once, changes it if they want, and can see and stop every subagent later.
Before you begin: your grant request proposed hand-on (proposed.hand_on: true) and the person kept it, so the grant reads hand_on: "ask". Each subagent is a registered agent with an active signing key. A subagent from another maker is allowed; the person sees its maker's name.
1. Ask for hand-on in the grant request
{
"agent_id": "agt_scout",
"proposed": { "max_amount": 1500, "budget_amount": 2400, "budget_window": "month", "currency": "USD", "expires_at": "2027-06-30T00:00:00Z", "hand_on": true }
}
hand_on isn't a limit, so it leaves the grant's constraints and token as they were. Without it, a plan is refused with 403 delegation_not_allowed.
2. Propose the plan
POST / with the task and the subagents:
{
"task": "Lisbon trip, Dec 9 to 13",
"helpers": [
{
"key": "flights", "agent_id": "agt_flights", "purpose": "Book the flights",
"budget": { "amount": 1100, "allocation": "reserved", "at_limit": "stop" }
},
{
"key": "rooms", "agent_id": "agt_rooms", "purpose": "Book the hotel",
"budget": { "amount": 900, "allocation": "shared", "at_limit": "ask", "ask_up_to": { "percent": 10 } },
"limits": { "allowed_stores": ["https://casamarlinde.example"] }
}
]
}
Each subagent's budget has its amount and two settings (budgets):
| Field | Values | What it means |
|---|---|---|
allocation | reserved | Set aside from the grant. Nobody else can spend it. |
shared (default) | Drawn from what the grant has left. | |
at_ | stop | Past its amount the order is refused (over_). |
ask (default for shared) | Past its amount the order asks the person, up to ask_ (20% by default; null for any amount the grant has room for), then is refused. | |
continue | Past its amount the order goes through without asking while the grant has room. |
A subagent can never pass what the grant above it has left.
Merchant lock. limits.allowed_stores locks a subagent to up to a few stores (the person's page takes 5). At any other store its order is refused with outside_merchant_lock, with no approval and no adjust link, so nothing waits for the person. A person's own grant with allowed_stores still asks at another store (store_not_listed). The person sees the lock as the subagent's Merchant row and can add, narrow or remove it while reviewing. limits.allowed_categories is the Category row.
Every subagent is checked against the grant: never wider on any limit, at most 4 levels below the person's grant and 50 live subagents per grant, and the reserved budgets with what was already spent fit the budget. A plan that needs more than the grant is refused unless it sets requests_raise, which the person always reviews and accepts with their passkey.
The answer is 201 with children (each subagent's grant and, for your own agents, its network_mandate token) when the person's review setting accepts the plan at once, or 202 with review.url when it waits. Send the person that link, for example as "Change the plan". A proposed plan expires after 24 hours unanswered and is never accepted by silence.
3. Revise it
- POST
/sends the whole next list, keys kept. A revision that only tightens (removes a subagent, lowers a budget, movesv1/ mandate/ delegation_ plans/ {id}/ revisions at_limittowardstop, adds or narrows a merchant or category lock, shortens dates) applies at once; anything else waits for the person while the accepted version keeps running. - POST
/adds one subagent to the live plan.v1/ mandate/ network_ grants/ {id}/ delegate - POST
/withdraws a version still waiting. A newer proposal replaces an older one.v1/ mandate/ delegation_ plans/ {id}/ withdraw
4. Buy under a subagent's grant
The subagent buys with POST / and its own grant token. Each order walks the chain, so a stop above it takes effect on the next order. A subagent from another maker gets its token on its own maker's webhook.
| Field on a refusal | Meaning |
|---|---|
reason: parent_ | A grant above is stopped, paused or expired, or an agent above is suspended |
reason: over_ | Past the subagent's amount, with at_ or past ask_ |
reason: outside_ | The subagent is locked to other stores |
stopped_ | person, maker, parent, agent_ or expired |
stopped_ | The grant that stopped it |
5. Handle the webhooks
| Event | When |
|---|---|
mandate. | The plan waits for the person |
mandate. | Accepted, by the person or at once (edited_, decided_, the subagents as saved) |
mandate. | The person saved changes (changes: one line each) |
mandate., . | Work on under your own grant |
mandate. | A subagent grant was minted |
mandate. | The person stopped a subagent and everything below it (stopped_) |
The person chooses how your plans are reviewed, per agent or as their default. Your call reads the result: 201 when accepted, 202 when waiting.
| Review mode | What happens to your plan |
|---|---|
prompt (the default) | It waits for the person |
auto_ | Accepted at once if it fits the grant |
digest | Accepted at once; the person sees it in one daily summary |
first_ | Waits only when it names a subagent not accepted before |
A plan with requests_raise, or naming a subagent from a maker the person never approved, always waits. When the person
raises a subagent's budget from now on, the plan gets a new version and you get mandate.delegation_plan.changed.
The person can also change a running plan themselves: add or remove a subagent, or change a budget, its two settings, its category or its merchants. The plan gets a new
version with edited_by: person, new subagents' grants are minted, removed ones stop, and you get
mandate.delegation_plan.changed. Read the plan again before your next revision: a revision on an older version is
409 plan_changed.
What to check
- Read the grant with GET
/:v1/ mandate/ network_ grants/ {id}
| Field | On |
|---|---|
hand_, plan_, helper_, plan_ | A grant that may hand on |
parent_, budget (allocation, at_, ask_), purpose, depth | A subagent grant |
- Pricing: a plan the person is asked to review counts as one confirmation. Plans accepted at once and the subagent grants are free; the orders subagents make are metered as network orders.
Errors you might see
| Code | Why | Fix |
|---|---|---|
delegation_ (403) | The grant has no hand-on | Ask for hand_ in the grant request |
delegation_ (400) | A subagent is wider than the grant, or the budgets don't fit | Lower the field in param |
helper_ (400) | The agent isn't registered or has no active signing key | Add a signing key to the agent |
delegation_, delegation_ | Past 4 levels or 50 live subagents | Stop subagents whose work is done |
plan_ (409) | The version was already decided | Read the plan again |
See also
- Network grants
- Give subagents their own limits, for company grants
- Near-limit notices