Echo/Docs

CLI command

autonomy

Autonomy budgets: per channel, how many actions Echo's automation may take on its own in any window of a stated number of hours.

Invocation#

Shell
echo-cli autonomy list
echo-cli autonomy set --channel <channel> --actions <count> --hours <hours> --by <name>
echo-cli autonomy remove --channel <channel>

Inputs and output#

list writes every budget by channel as { budget, since, used }: the budget (channel, window_hours, action_cap, set_by, set_at), the start of its window ending now, and used, the done actions on the channel the automation audit trail holds since then. set writes the budget as stored; remove writes the budget it removed.

State effect#

Every verb calls Echo Web's authenticated /api/automation/budgets operation with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the budgets panel of the dashboard's Approvals screen and the Autonomy budgets section of Echo Desktop's GEO screen read, set and remove the same budgets, and echo-mcp reads them (echo_list_autonomy_budgets) but cannot set them. An action counts toward a channel when its automation audit row is done and names the channel in its inputs; the count is read on every check, so the window moves with the clock. The campaign job asks its channel's budget before each send: below the cap it sends; at the cap, or on a channel with no budget, it sends nothing, queues the send for approval as send_campaign_message (see approvals) and records a refused audit row naming the cap and its use, once per held send. The caption publishing job (/api/cron/needher-captions-publish) asks the budget of the channel needher-captions before each caption shoot, counting the shoots it already published that tick: below the cap it publishes the shoot; at the cap, or with no budget, it leaves the shoot's frames generated, queues it once as publish_caption_shoot { "series_id": "<shoot>" } and records one refused audit row naming the cap and the request; an approval publishes it once. A channel with no budget lets automation take nothing on it alone. set replaces the channel's budget whole; remove takes it away.

Refusals#

  • A wrong invocation is refused as a usage error before anything is sent: "autonomy takes list; set --channel <channel> --actions <count> --hours <hours> --by <name>; remove --channel <channel>; got <word>", "autonomy <verb> does not take <flag>; it takes …", "<flag> needs a value", "autonomy set needs <flag>" for each of --channel, --actions, --hours and --by, "autonomy remove needs --channel", and "--actions must be a whole number; got <text>" (and --hours).
  • Echo Web's refusal is printed as "Echo Web refused <method> /api/automation/budgets… with HTTP <status>: <its answer>": a bad request with "channel is required: the channel the budget limits, as its actions name it", "window_hours must be a whole number: the hours each window of the budget spans; got <value>", "window_hours must be positive: a window of <n> hours holds no action", "action_cap must be a whole number: how many actions automation may take alone in one window; got <value>", "action_cap may not be negative; got <n>", "set_by is required: an internal caller has no signed-in user, so it names who is acting" or "channel is required"; not found with "channel <channel> has no autonomy budget".
  • The campaign job's answer for a held campaign reads "channel <channel> is at its autonomy budget: <used> of <cap> actions in the last <hours> hours; the send to recipient <id> waits as approval request <id>", or "channel <channel> has no autonomy budget, so automation takes no action on it alone; set one with echo-cli autonomy set; the send to recipient <id> waits as approval request <id>", and the automation audit trail records the same refusal. The caption publishing job answers held_shoots, and its audit row reads the same sentence ending "the shoot waits as approval request <id>". An approved publish_caption_shoot whose frames were published or failed meanwhile fails with "the caption manifest holds no generated frame of shoot <id>; it was published or failed after it was queued", and one the ingest refuses with "the ingest refused the shoot: <reason>".