HarnessBuild
The Runtime and run records
The Runtime is the part of Harness that actually runs a turn: it receives the turn Desk opened, pins the package version, calls main, calls the model on its behalf, enforces the call, budget and time limits, and records what happened. This page covers the rules it enforces and how to see what a turn did.
What a turn pins when it starts #
When a turn starts, the Runtime fixes everything the turn will use, and it stays fixed to the end:
- Package version: the live one (package, version number, content digest).
- Engine parameters: that version's
config.engine. - Models: the reply and fallback models, resolved from the organization's settings.
So going live, rolling back and editing content only affect turns that start afterwards; a turn already running is not affected.
Per-turn limits #
| Parameter | Default | Range | Meaning |
|---|---|---|---|
max_calls |
30 | 3–50 | The most model calls in one turn |
max_tokens |
2048 | 1024–8192 | The most output tokens per model call |
effort |
low |
low / medium / high |
The model's reasoning effort |
call_timeout_s |
60 | 5–300 | How long one model request may take, never more than half the watchdog time (at most 60 seconds by default). On timeout the same model is retried, then the fallback model |
on_limit |
reply_with_draft |
four policies, see Ailo SDK | How to close when a limit is hit |
max_consecutive_errors |
3 | 0–6, 0 for no limit | How many errors in a row count as hitting the limit |
Two more:
- No limit on total time. A turn runs as long as it is making progress; after 120 seconds without any progress, the watchdog ends it and hands it to the team.
- One business read takes at most 30 seconds; on timeout the model is told it was unavailable and carries on.
The first four are Runtime hard limits that a code package cannot get past; the last two are the default policies of the standard package and the built-in loop. Engine parameters are stored in the package version; an organization admin changes them with set_package_engine_config, which saves a new version that takes effect once it goes live.
Budget #
Ailo's model costs are counted per organization, with a daily limit:
- Already over when a turn starts: no model is called and the turn goes to the team. The customer sees the same as when the model is unavailable, with no mention of a budget.
- Over during a turn: the loop ends and closes according to
on_limit. Of the four policies, onlyreply_with_draftgets one more model call to write a closing message; that call cannot use tools, and the result goes to the team for confirmation at low confidence. With nobody online, the conversation goes straight to the team. - The test bench uses a separate test budget, not the live budget.
When the customer writes again during a turn #
- If the customer writes before Ailo's first model call, the turn ends without calling the model and the next turn answers the new message.
- If the reply Ailo is about to send predates the customer's new message, Desk refuses it, the turn ends, and the next turn answers with the new message in view. After 2 turns in a row are voided this way (
max_consecutive_superseded), the next turn's reply goes through. Rewriting within the same turn with the new message is not available yet. - If a new message arrives while the turn is closing on a limit, the old draft is not sent and the next turn takes over.
When something fails #
- A model call fails: the same model is retried, then the fallback model; if neither works, the turn goes to the team.
- The result of a write is unknown: it is not redone, nothing is promised to the customer, and every later business write in the call is frozen.
- The server process restarts: a turn in progress is not resumed or resent; when its time is up, the watchdog hands it to the team.
Run records #
Every turn of your organization's conversations and test bench has a run record that members with console.view can read (by default specialists and above). Turns Ailo runs on another Desk organization's channels through a connection cannot be looked up yet (planned). In the console it is Workspace › Runs; open a row to see the turn's steps.
| Query | HTTP | CLI |
|---|---|---|
list_runs |
GET /api/tenants/{tenant_id}/runs |
ailo runs |
read_run |
GET /api/tenants/{tenant_id}/runs/{turn_id} |
ailo run TURN_ID |
read_run_steps |
GET /api/tenants/{tenant_id}/runs/{turn_id}/steps |
ailo run steps TURN_ID |
list_runs filters by time (window, or from / to up to 31 days), conversation, result, site and whether it was a test conversation, and pages with cursor.
read_run_steps returns the turn's end reason, number of model calls, the closing action and its result when a limit was hit, the package version, and the steps in time order:
Step type |
What it is |
|---|---|
model_call |
One model call: which call, whether it was the last allowed, tokens, cost, duration, retries |
tool_call |
One tool call. A tool the model asked for but that did not run also gets a step, marked not_run with the reason |
knowledge_search |
One knowledge search |
reply, handoff, ticket |
A reply, a handoff, an assist ticket |
hook |
The verdict of a check, such as Desk's check of a reply |
error |
An error |
- What is recorded and what is not. Tool inputs and outputs (sanitized, up to 16 KiB per step) and knowledge search hits are recorded; prompts, system instructions, raw model output and thinking are not; credential fields are replaced before anything is stored. The console's Runs page currently shows only step type, status, duration, tool name, tokens and cost.
- Projected by permission. Internal notes, assist tickets and customer data each need their own permission; without it you see only the step header.
- Kept for 30 days. After that the details are deleted; the conversation's events are kept as usual.
- Possibly incomplete just after a turn. Records are written asynchronously; a missing step does not mean it did not run.