Expand description
Engine opt-in (C0 1.9, section 4; owner decision O1).
An engine’s agents work on tasks only by pulling them, and only within the opt-in its owner set on the web: which vaults and networks, how much per day, and whether at all. Cloud never starts an agent; nothing here spawns anything.
GET /v1/me/optin (instance token) → EngineOptinV1. The owner
changes it on the web; every change gets a new optin_id, and
active: false (the stop) ends every claim of that engine at once.
The engine may stop itself, never start: PUT /v1/me/optin
EngineOptinStopV1 → EngineOptinV1; active: true there is
403 forbidden_right reason owner_only.
Cloud is the source of truth and enforces it on every claim:
- a claim carries the
optin_idthe engine last read (section 1TaskClaimRequestV1.optin_id, required since this section; without it400 invalid_requestfieldoptin_id); - an older
optin_id→409 invalid_statereasonoptin_changed: the engine reads the opt-in again before it pulls; active: false, or no opt-in →409 invalid_statereasonoptin_inactive;- a vault or network outside the opt-in →
403 forbidden_rightreasonoptin_scope; - the day’s budget used up →
429 rate_limitedreasondaily_budget, withlimit,used(claims) andretry_after_suntil 00:00 UTC.
Usage counts per UTC day: a claim counts one task when it is granted; the
usage of task results (section 1) adds tokens and usd_micros. A claim
is refused once any set limit is reached; a running claim is never cut
short by the budget. A granted claim counts atomically: parallel claims
of one engine never exceed daily_budget.tasks together.
An engine may apply stricter local caps (fewer tasks, a lower budget, a narrower scope). It never widens what Cloud allows.
Structs§
- Daily
Budget V1 - Limits per UTC day. A limit that is absent is no limit; since Cloud task #19 (owner decision 23.10.) that holds for the task count too.
- Daily
Usage V1 - What the engine used today (UTC).
- Engine
Optin Stop V1 PUT /v1/me/optin: the engine’s own stop.- Engine
Optin V1 GET /v1/me/optin.
Enums§
- Network
V1 - A network an engine may pull questions from: an org channel
(
org:<org_id>/vault:<vault_id>/<name>). Any other kind does not decode.