Skip to main content

Module start_rate

Module start_rate 

Source
Expand description

How often one sender may start agents (docs/specs/SPEC_ALWAYS_AVAILABLE_AGENTS_2026_10_27.md §7, “wake loops”). A start spends a paid session, and agent A starting stopped agent B, which starts A again, must not run away: each sender gets DEFAULT_PER_MINUTE starts in any 60 seconds.

The sender is whatever the caller names: an agent’s id for Agents start, job:<id> for a Job or cron fire, so a Job cannot starve the agents and an agent cannot starve a Job. A refusal names the limit. The count is in memory: a restart gives every sender a fresh minute, which is the same bound again.

Constants§

DEFAULT_PER_MINUTE 🔒
Starts one sender may make in a minute.
SETTING_PER_MINUTE 🔒
The setting that changes it; 0 turns the limit off.
WINDOW_MS 🔒

Functions§

allow 🔒
Count one start by sender_key and say whether it may go ahead. Err names the limit and when the sender may start again; the refused start is not counted.
allow_at 🔒
limit_of 🔒
The starts a sender may make per minute: the setting, else DEFAULT_PER_MINUTE.
table 🔒

Type Aliases§

Table 🔒