Trust and limits
Workforce lets you start an agent small and give it more room as it proves itself. Three settings do this, all on the agent's page in the Trust and What it can use sections:
| Setting | What it does |
|---|---|
| Probation | A new agent asks a person before its first data-changing actions. |
| Auto-pause | An agent in trouble pauses itself and tells its contacts. |
| Action limits | A tool the agent may use can be used only so many times a day before a person is asked. |
Setting these needs workforce::manage. Reading them needs workforce::read. In the API they are part of the agent's Workforce settings: trust for probation and auto-pause, and max_per_day on a tool in skills. See Put an agent to work.
Probation
An agent on probation asks a person before it uses a tool that changes data, until that tool has been approved enough times in a row. After that the tool runs on its own, as its approval setting says.
How it works:
- It applies to live runs only. Dev runs and chats with the agent are not affected.
- It counts per tool. Each tool the agent uses has its own count.
- Only tools that change data count. A tool that only reads is never held.
- Only a tool that would run on its own is held. A tool you already set to Ask first keeps asking, and a tool set to Never stays refused.
- Each approval adds one to the count for that tool. A denial sets the count back to zero.
- The person deciding sees why they are asked. The approval shows Probation: 1 of 3 approvals.
Set it
On the agent's page, in Trust, use the switch Ask before each new action until it's trusted and the field Approvals needed per action.
| Field | Range | Default |
|---|---|---|
| Approvals needed per action | 1 to 20 | 3 |
Probation is on unless you switch it off. Leave the number empty to use 3. With the switch off, the number is not used.
The agent's page shows each data-changing tool it may use with its progress, for example 2 of 3, and trusted once the tool has reached the number. A new agent with no such tool shows No tool that changes data is granted yet. An agent with probation off shows Probation is off for this agent.
Prota, the built-in agent, has no probation. Its settings are fixed, and the page shows probation as off.
In the API
PATCH /agents/{uuid}/workforce
{
"run_as": "prn:role:maintainer",
"skills": [ ... ],
"trust": {
"probation": { "off": false, "approvals": 5 }
}
}
| Field | Meaning |
|---|---|
trust.probation.off |
true turns probation off. Default false. |
trust.probation.approvals |
Approvals needed per tool: 1 to 20. 0 or left out uses 3. |
Any other number answers 400 workforce: invalid: trust.probation.approvals must be between 1 and 20. Remember that PATCH replaces every field of the settings, so send trust each time you change the agent.
Read the counts with GET /agents/{uuid}/workforce/probation (workforce::read). It answers off, approvals, and tools, one entry per data-changing tool with tool, approved_in_a_row, of and trusted.
Auto-pause
An agent pauses itself when it is in trouble, so a problem does not repeat all night. There are three triggers. Each can be changed or turned off.
| Trigger | Dashboard field | Range | Default |
|---|---|---|---|
| Failed runs in a row | Pause after failed runs in a row | 1 to 20 | 3 |
| Approvals denied in a row | Pause after denials in a row | 1 to 20 | 3 |
| One run spends too much | Stop a run that uses more than this share of the daily credit budget (%) | 1 to 100 | 50 |
Leave a field empty to use its default. Tick Off next to a field to turn that trigger off.
What counts
- Only live runs count. Dev runs and chats do not.
- A run fails for auto-pause when it ends with an error, a result in the wrong shape, a rule that could not be checked, or one of its own per-run limits (steps, tokens, time or tool calls). Hitting a daily limit or the credit budget is not the agent's fault and does not count.
- A run that finishes the work, or finds nothing to do, sets the count of failed runs back to zero.
- Each denied approval adds one to the denials. An approval that is approved sets the count back to zero. An answer to a question, or an approval that expires, changes nothing.
- On a playbook run, the failure counts against the agent that did the failing step.
- Resuming the agent sets both counts back to zero.
The agent's page shows where it stands, for example Failed runs in a row: 2 of 3.
The credit share
The third trigger watches one run. If a single run spends more than its share of the agent's Credits per day budget, the run is stopped and the agent is paused. With the default of 50 and a budget of 200 credits a day, a run that passes 100 credits is stopped.
This trigger needs a daily credit budget on the platform's allowance. For an agent that runs on your own key, or an agent with no Credits per day set, the field shows Not available: this agent runs on your own key, so it has no credit budget. or Not available: set a daily credit budget first.
What a person sees
The agent's page shows its status as Paused and, under the title, the reason:
Paused automatically: its last 3 runs in a row failed
The other reasons read 3 approvals in a row were denied and one run used too much of the daily credit budget. A link, View the run, opens the run that caused the pause.
The agent's contacts, the people and roles named under Who to tell, get an email titled <agent> was paused. It says that the platform paused the agent, why, and links to the run and to the agent's page. The email is sent whatever the agent's When it needs approval, When a run fails and When it hits its budget switches say. One email goes out per pause. For Prota it goes to the project's Owner and Maintainers.
The pause also shows in the agent's daily and weekly reports, and in the activity ledger as a pause by the system.
Resume
A person resumes the agent with Activate on its page, once the cause is fixed. Resuming clears the reason and the counts. Through the API:
Runs of a paused agent
An agent that is paused cannot take part in a run. A run that reaches it ends at once and does not count as a failure:
| Who paused it | Run status | Stop reason |
|---|---|---|
| A person | killed |
killed |
| The platform | completed |
auto_paused |
The run's summary starts with Not started: when the agent had done no work on the run yet, and Stopped: when it had. For example Not started: the agent was paused automatically.
The credit-share trigger uses the same stop reason: the run that spent too much ends completed with auto_paused, and the agent is paused.
In the API
PATCH /agents/{uuid}/workforce
{
"trust": {
"auto_pause": { "failed_runs": 5, "denials": 0, "run_budget_pct": 30 }
}
}
(Send the rest of the settings too; PATCH replaces all of them.)
| Field | Meaning |
|---|---|
trust.auto_pause.failed_runs |
Failed runs in a row: 1 to 20. Left out or null uses 3. 0 is off. |
trust.auto_pause.denials |
Denied approvals in a row: 1 to 20. Left out or null uses 3. 0 is off. |
trust.auto_pause.run_budget_pct |
Share of the daily credit budget one run may use: 1 to 100. Left out or null uses 50. 0 is off. |
A value outside the range answers 400 workforce: invalid: trust.auto_pause.<field> must be 0 (off) or between 1 and <max>.
GET /agents/{uuid}/workforce also answers:
| Field | Meaning |
|---|---|
streaks |
failed_runs and denials: where the agent stands now. |
auto_paused |
Present while the agent is paused by the platform: reason (failed_runs, denials or run_budget), count, run_uuid, paused_at and plain, the reason as a sentence. |
Action limits
A limit caps how often an agent may use one tool in a day. When the agent reaches it, the next call is not refused: a person is asked, as with any other approval. If they approve, the call goes through.
On the agent's page, in What it can use, each tool has the field Ask after N calls per day.
| Field | Range | Default |
|---|---|---|
| Ask after N calls per day | 1 to 10000 | Empty: no limit |
Good to know:
- It counts live calls only.
- The day is a UTC calendar day.
- It is per tool and per agent. Another agent with the same tool has its own count.
- A call a person approves keeps its place in the count.
- It sits beside Ask after N calls per run, which limits one run. A call held by either limit shows its own note in the approval: Limit: 20 calls a day reached or Limit: 5 calls in this run reached.
In the API, set max_per_day on the entry in skills:
max_per_day is 1 to 10000, or null for no limit. Anything else answers 400 workforce: invalid: tool "send_invoice" max_per_day must be 1 to 10000.