Manage agent budgets
Limit each agent's accepted queries, writes, destructive writes and exports and its request rate, and read what remains.
On this page
An agent here is one management API key or one approved agent connection. Its budget counts accepted operations. It does not count money, tokens, tracked people or model calls.
One combined read, such as a person's timeline, uses one query operation and one slot for concurrent work, even when it reads several kinds of activity. The slot stays occupied until that read finishes.
Retries are free when they carry the same supported retry key or confirmation. A fresh key or confirmation starts new work. Keep the retry key from the original call.
Set limits
The console labels these controls Accepted operations. Plan allowances and Typed-decision expenditure are separate sections with different units and remedies.
A workspace owner or admin can edit limits beside a management key in Agents and keys, or beside a connection in Connected agents. The API keys card also controls the workspace defaults and an optional total across all agents.
Set limits per UTC hour and day for queries, writes, destructive writes and exports. Also set how much work may run at once. An empty agent limit inherits the workspace default. An empty workspace default inherits the platform default. Zero blocks that class. Empty workspace totals impose no extra total cap. Tightening a limit takes at most seven seconds and needs no new sign-in. Work already admitted can finish.
| Class | Platform per hour | Platform per day |
|---|---|---|
| Queries | 3,000 | 30,000 |
| Writes | 600 | 5,000 |
| Destructive writes | 60 | 300 |
| Exports | 60 | 300 |
The platform default allows 16 operations at once. The defaults are a safety net against a runaway loop, not a limit on ordinary work: tighten them for an agent that should do less. Operation limits accept whole numbers from 0 to 1,000,000; concurrency accepts 0 to 64. These are work controls, not a price quote.
Request rate
The operation limits above count accepted work. A separate request rate limits how fast a key may send
requests, whatever they do. It is set in the same policy file as request_rate, with requests_per_second
and burst, and it is bounded by your plan's API request rate.
{"credential_kind":"api_key","credential_id":"<key-id>","policy":{"request_rate":{"requests_per_second":2,"burst":4}}}
An app you host has its own key, so its rate and budget are its own; see Give an app its own key. An app shows a zero rate as "paused" and does not retry it, as Polling, retries and refusals describes.
- An omitted
request_rate, or an omitted field inside it, inherits: the workspace default for keys, then your plan's rate. A zero blocks that key: every request is refused until an owner changes it. - A value above your plan's rate is refused when you set it. If you later downgrade, the stored value is kept but the plan's lower rate applies, and the read shows that it was lowered.
- Every management key also counts against one workspace allowance shared across projects, so many keys
cannot add up to more than the workspace is allowed. Set
workspace_total.request_ratein the workspace defaults file to tighten it below your plan. A lower workspace total wins over keys that are individually within their own limits. - One key reaching its allowance does not use up another key's, even when one person created both.
A key that is revoked, expired or unknown is refused with 401 when it is authenticated, before the key's
allowance or the workspace allowance is read or charged. Only the flood shield per network address, which
runs before any key is known, counts that request. A zero, on the request rate or on an operation limit, is
a throttle and not a revocation: the key stays valid and authenticates, and only revoking it ends it. A
freeze does not end a key that only reads either. See
Revoke an agent's access.
A refusal is 429 with error: rate_limited and rate_limit.limit set to key or workspace; it tells you
retry_after seconds and whether waiting helps (retry_action). It is not a budget_refusal, which is the
operation budget. Responses carry X-RateLimit-* for the key's own allowance and X-Anectico-Workspace-RateLimit-*
for the shared one. A refused request uses none of either allowance and is not counted as accepted work. A
request that was admitted counts as a request even if its operation then fails or is refused by the operation
budget.
If the request rate cannot be checked, reads still work and the response says X-Anectico-Rate-Checked: false
with no remaining count: treat the allowance as unknown, never as zero or as plenty. Writes and exports follow
the operation budget, which stops them if it cannot be checked. A few sensitive routes refuse with 503 and a
rate_unavailable reason rather than skip the check. While your policy cannot be read, your plan's rate still
applies to the key and the workspace. The request rate is an operational limit, not billing or a spend
guarantee, and it adds no meter.
Read what remains
Ask for the current budget with anectico budget get or the MCP read action get_agent_budget.
It returns the effective limits, accepted counts, work reserved during admission, remaining work,
and the absolute UTC start and reset time for this hour and today. It also returns the request rate: what you
set, the requests per second and burst now in effect with where each value came from (this key, the workspace
default, the workspace total or your plan), your plan's ceiling, and the requests left in the key's and the
workspace's allowance. Those counts are marked unchecked, with nothing shown, when they cannot be read. Read history with
anectico budget usage --period day or get_agent_usage. The history is a record of accepted work,
kept for 35 days by hour and 13 months by day. It can lag and can lose unrecorded work during an
outage. Missing history is unknown, not proof of zero. The history conclusion describes the
returned buckets, not a count of all agents that reached a limit.
A credential needs activity:read for its own policy and usage. Reading another credential or
workspace defaults needs audit:read. An owner can use anectico budget get --credential-kind api_key --credential <key-id> or the same arguments on anectico budget usage. A project-bound
credential cannot read another project's policy or history. For defaults use
anectico budget get --workspace.
anectico budget set --file budget.json replaces an override. A key policy file can be:
{"credential_kind":"api_key","credential_id":"<key-id>","policy":{"queries":{"hour":20,"day":100},"concurrent":2}}
Omit both credential fields to replace workspace defaults. Add workspace_total to that file to
cap all agents together; its request_rate tightens the shared request rate. Setting a policy needs api_key:write and an owner or admin role; changing a
connection also needs members:write. Over MCP, use the confirmed write action set_agent_budget.
The CLI and REST show the same server preview; confirm identical inputs with
--confirm-token or X-Anectico-Confirm-Token. A successful replacement returns a structured
receipt naming the credential or workspace. Its numeric versions and changed are unknown;
the owning state digest protects the replacement. Read the budget back for the current policy.
What counts and what happens at a limit
Accepted query executions, applied writes and exports count. Refusals, previews, configuration list or describe reads, result polling and identical retries do not count. Native safety limits still apply. A new query execution key deliberately means new work. Retry identities for other operations last ten minutes; keep the original identity when retrying. Creating a fresh key creates a fresh individual budget, so only a person with key-management rights can do that; a workspace total keeps that within the owner's overall allowance.
A refusal carries budget_refusal: class, limit_kind (hour, day, concurrency or unavailable), limit_value,
resets_at in UTC, subject (agent, workspace or an identical operation), owner_can_change and reason. REST returns
429, MCP returns a tool refusal, and the CLI exits 1 with the same fields. A running identical
admission can briefly return operation_in_progress; it has no charge. The activity record marks
budget refusals as budget. A concurrency reset is the current earliest running lease expiry;
running work can extend it.
If the budget cannot be checked, queries continue with an explicit unchecked marker. Writes and
exports stop with budget_unavailable and a short try-later time. Current counters may be lost
during an outage or when cached state is reclaimed, so a budget is an operational limit,
not a financial guarantee. Never retry a refusal in a loop. Tell the person which limit was
reached and when it resets, or that checking was unavailable.
Ask your agent
The agent uses get_agent_budget for what remains, get_agent_usage for history, and
set_agent_budget for an approved change. For covered typed-decision expenditure, use
get_agent_spend_budget, get_agent_spend_usage and owner-approved set_agent_spend_budget.
These preserve exact nano-USD strings and possible exposure, with no change to your invoice.
Read the complete spend workflow below; positive guaranteed enforcement remains unsupported,
explicit zero is distinct, and write recovery reads a retained first outcome.
How much work do you have left this hour and today? Tell me the limits, the UTC reset times, and whether the counts were checked. Stop if you reach a limit.
Show the accepted usage for this key this week. State the time window and any gaps in the record.
Set this key to 20 queries an hour and 100 a day, with two operations at once. Preview the exact change before I approve it.
Scheduled work
A report, alert rule, metric watch, Live screen or sampling rule records which key or connected agent created it. Changing its query, schedule or targets moves the origin to the updater. A rename or pause does not. A Console member creates a person origin without a member id.
Each accepted scheduled run counts once. A retry of that run is free. Revoking or expiring the key, or removing the connection, moves new runs to scheduled work in the workspace. Reports and alerts keep working. Person-created and older definitions use that same line. Only the optional workspace total limits this work.
Reports, Live refreshes and sampled evaluations skip an exhausted slot. They show budget_exceeded
and try at the next scheduled time. Alert and metric-watch evaluations always run. Missing an alert
is worse than an overage. Usage marks over budget by scheduled alerting; these counts are part
of accepted work, not an extra charge. Alerts take no concurrency slot, even at a workspace limit.
If limits cannot be checked, Live refreshes and alerts run with checked: false. Reports send data
and evaluations write results, so both skip with limits_unavailable. These skips do not retry in
a loop. Opening or polling a Live display is free. Experiments run when called; release gates read
recorded evidence. They follow the usual interactive limits.
The API keys card shows a Scheduled work usage line. Ask your agent for get_agent_usage with
credential_kind: scheduled_work, or run anectico budget usage --credential-kind scheduled_work.
Use no credential id. This workspace read needs audit:read and workspace access. Read the returned
UTC window and its uncertainty. Add this line to the credential lines for the same period and window.
Do not add hour counts to day counts. Missing history is still unknown.
Each feature's usual read shows its origin and latest run budget state. Credential names require
api_key:read for a key or members:read for a connection; a missing name may be withheld or
unavailable. A revoked publishing key still stops public Live viewing. To stop a schedule itself,
pause or delete its definition. Revoking its accounting origin does not cancel it.
Budget replacements use the same complete server preview in the console, MCP and
anectico budget set. Review the current policy, inherited defaults, effective limits
and workspace totals before confirming. Native confirmation repeats the same file
with --confirm-token. Another change to policy or inherited defaults requires a
new preview. Preparation also requires audit:read; an approved connection's
policy requires members:write.
Plan allowances and typed spend refusals
Agent plan headroom defines OAuth approval
capacity, monthly admitted automated work, the provisional catalog, check state and plan_refusal
remedies. Read it with anectico usage agents or get_agent_plan_usage, using usage:read and
mcp:read for MCP. Owner-set operation budgets do not increase those allowances.
A separate spend_refusal concerns the typed-decision expenditure
below. budget_exhausted is 429; spend_accounting_unavailable is 503.
spend_contract_unsupported and budget_contract_breach are 412. Raising a ceiling cannot repair
unsupported enforcement or unavailable accounting. MCP error results and CLI JSON diagnostics
preserve the structured refusal; the CLI exits 1. Read the reason before deciding what to do next.
Typed-decision expenditure
Accepted-operation budgets and plan work allowances do not represent money. A separate monetary
policy contract covers only Anectico's typed-decision expenditure attributable to a verified key or
approved connection. It does not cap your agent's own model invoice and has billing_effect: none:
it does not change your subscription bill. The separate budget spend commands below read and replace this policy; the existing
budget get, budget set and budget usage commands continue to count accepted operations.
The console's separate expenditure section reads the authoritative policy and exposure. Owners and administrators with the required policy permissions can edit a complete replacement on the existing key, approval and workspace controls, including Billing. USD text accepts at most nine decimal places, up to $9223372036.854775807, without rounding. The review displays the server's full before and proposed layers, exact nano-USD, exposure and support. Confirmation sends that frozen proposal, the server token and the same stable idempotency key. It does not substitute operation counts or your model-price overrides for financial accounting. A changed policy, inherited default, support basis or controlling authority requires a fresh review; a conflict is not success.
The server's committed receipt is displayed separately from refreshed current policy. After a lost apply reply, follow write recovery, including the console's Recover spend receipt. The latest policy is a separate current observation.
Monetary amounts use exact decimal strings in nano-USD. An omitted limit inherits; explicit zero is
the blocking value. Platform monetary defaults have no chosen ceiling. Credential limits can inherit
workspace defaults, and a workspace total can impose an additional ceiling. Positive guaranteed limits
remain unsupported until provider bounds and every covered call are qualified. A recorded zero policy
alone does not prove that existing calls enforce it; check enforcement_qualified before relying on it.
Exposure means settled expenditure plus reserved and uncertain possible expenditure. A timeout, cancellation, restart or UTC reset does not establish that a call was free. Unknown pricing is distinct from genuinely priced zero, and unknown remaining expenditure is omitted. Lowering a limit below exposure reports that it is already exceeded; it does not erase possible expenditure. Hour and day are alternate views of the same expenditure and must not be added together. Missing history does not prove zero.
Financial control records identify credentials and their controlling actors, never the people being measured or their evidence. Deleting a project removes its financial detail while workspace expenditure and unresolved exposure remain held. Deleting the workspace removes its financial records. Policy recovery must return the first committed result under the same retry key, after current access checks; a later observation is separate from that original receipt.
Read and replace typed-decision spend policy
Use anectico budget spend get --json for your verified credential, or add
--credential-kind api_key --credential <id>, --credential-kind oauth_connection --credential <id>
or --workspace. Self reads require activity:read; another credential or workspace requires
audit:read. The MCP read actions are get_agent_spend_budget and get_agent_spend_usage, through
execute_read_action, with mcp:read. An observed agent name is never a spending credential.
Amounts are canonical decimal strings in nano-USD, from "0" through "9223372036854775807".
The currency is USD, coverage is platform_typed_decisions, and billing_effect is none.
This covers the typed-decision instrument's expenditure. It does not cap your own model invoice,
change your subscription, or price queries, exports or deliveries. Customer model-price overrides
remain observations and cannot qualify enforcement.
The response retains settled expenditure, reservations, uncertain exposure, carried exposure, optional remaining amounts, UTC buckets and reset, observation time, support version, basis and checked, over-cap and breach states. Hour and day are two representations of the same cost; never add them. Missing history is unknown, never evidence of zero. A missing limit is inherited or unbounded; a missing remaining amount may be unknown. Read its explanation. A priced zero, unpriced attempt and uncertain exposure are different facts.
History requires explicit UTC bucket boundaries and a finite window:
anectico budget spend usage --period day \
--from 2026-10-16T00:00:00Z --to 2026-10-17T00:00:00Z --limit 100 --json
Use --period hour for hour buckets. --limit is 1–200, default 100; it maps to page_size.
Pass --cursor with the same selector, period and bounds for the next page. A cursor is at most
512 bytes. Available history covers 35 days of hours or 13 months of days; this does not expire
unresolved exposure or turn absent older observations into zero. Project selection must match the
credential's verified project when an explicit --project is used; the configured telemetry
project does not rebind self spending. Project-bound keys cannot read workspace or connection policy.
For an owner-approved replacement, save a file of at most 64 KiB. For example, this replaces the workspace defaults with a zero ceiling and leaves the total unbounded:
{"subject":{"workspace":true},"policy":{"hour_nano_usd":"0","day_nano_usd":"0"},"require_hard_limit":true}
For one credential use subject: {"credential_kind":"api_key","credential_id":"<id>"} or
oauth_connection. The policy is a complete replacement: omit an amount to inherit, specify
"0" to block. Only a workspace replacement may include a complete workspace_total object;
omitted total amounts are unbounded. Workspace defaults and the workspace total serve different
purposes and are both shown in the review.
anectico budget spend set --file spend.json --idempotency-key owner-spend-1 --json
anectico budget spend set --file spend.json --idempotency-key owner-spend-1 \
--confirm-token '<server-token>' --json
The first call returns the complete server before and proposed state and performs no write,
reservation or provider call. Review inherited and effective limits, support, basis, current
exposure and the exact subject. Apply only the same file and stable key with the returned token.
A changed policy, default, provider support or controlling authority requires fresh review.
Exposure is an observation and can change before commit. The returned committed result contains
the first transaction's policy, revision, receipt and observation; a later get is a separate
current observation. The shared receipt envelope carries that result as JSON in its
/committed_result target change.
Replacements require an owner or admin with api_key:write and audit:read; a connection policy
also requires members:write. MCP uses set_agent_spend_budget through execute_internal_action,
with mcp:read and mcp:write. Use the existing owner-created management key within its delegated
ceiling for governance; evaluation access does not silently acquire owner authority.
Positive guaranteed limits require a qualified maximum provider charge. That qualification is
currently unavailable: enforcement_qualified stays false, and requesting a positive guarantee
with require_hard_limit: true refuses with spend_contract_unsupported (412). Explicit zero can
still block work. require_hard_limit: false records policy without promising guaranteed positive
enforcement. Read hard_limit_supported and the basis rather than inferring support from a number.
Keep one stable key of 1–128 printable ASCII bytes without spaces for the approved intent. A
header, query parameter and body key must agree. The owning receipt supports
write recovery: use anectico writes lookup set_agent_spend_budget
or lookup_write_outcome with the original arguments and key before another apply. Recovery
rechecks current authority and returns the first committed observation separately from today's
policy. An unknown result keeps the intent unresolved; it never justifies a fresh key. These
controls return no proof link.
Previewing the controlling credential itself also requires activity:read in addition to
audit:read. This conditional grant does not apply to another credential or the workspace.
Qualification and pricing claims
The workspace allowance returned by the current checked read is separate from accepted-operation limits and typed-decision expenditure. The catalog allowances are provisional while qualification continues. A successful read or one completed scheduled job does not establish a capacity or throughput promise. A management key cannot establish whether a new OAuth approval would be issued. Positive monetary guarantees remain unsupported without a qualified provider maximum; observation and zero-spend blocking do not provide that guarantee. These controls do not change your subscription invoice or introduce query charges.