What does the agent that takes over in a handoff actually receive, and does it get the original logs?
In Tares, the agent that takes over in a handoff receives the finding from the agent that handed off. It fetches any further evidence itself with its tools. The finding arrives after a line such as Handed off by triage with verdict "investigate" on service=checkout., and the new run is on the entity the finding is about.
How it works
A handoff is three values: a verdict, the agent that takes over, and a cooldown. When a run ends with a finding whose verdict matches (case does not matter), Tares starts the target agent on the entity that finding is about.
The target is handed the finding, after an opening line that names the agent that handed off, the verdict and the entity:
Handed off by triage with verdict "investigate" on service=checkout.
From there the target works like any other agent. If it needs more evidence about the entity, it fetches that evidence itself with its tools. A cheap agent that watches often can therefore pass one entity to a thorough agent, and the thorough agent decides what else to look at.
A few rules shape what the target gets and when it runs:
- The entity carries over. The target runs on the entity the finding is about, so
service=checkoutin the example is the entity the second agent investigates. - The handing agent must conclude. A verdict comes from the
concludetool, so the agent that hands off must end its runs with a conclusion. A run that ends without one has no verdict to match, so no handoff fires. - The target runs whether or not it is on for its own trigger. Give it no trigger when it should only run when handed off.
- The run belongs to a project. It belongs to the project whose wiring holds the handoff, and the target can be any other agent on the instance.
A handed-off run is recorded with woken_by: handoff and the finishing run as its parent. On the project’s Activity page it sits under the run that handed off, so a triage finding and the root cause it led to read as one thread.
Set it up
- Make the handing agent end its runs with a conclusion. Set
concludes: trueand list the verdicts it can give, so the verdict you hand off on is one the agent actually produces. - Add a handoff on that agent with a verdict, the target agent and a cooldown.
- Give the target agent no trigger if it should run only when handed off.
- In the console, open the agent form and find the When it concludes section. Choose Add a handoff, then pick a verdict, the agent that takes over and a cooldown (
30mby default). The verdict field offers the agent’s own verdicts as a dropdown and also takes any word you type. If you name a word the agent never gives, the form tells you that handoff would never run. - Or set it in the catalog or on the API (
POSTandPUT /api/agents/builtin), wherehandoffsis a list:
agents:
- name: triage
trigger: watch-web
concludes: true
verdicts:
- { verdict: investigate, when: one entity looks like a problem and needs a closer look }
prompt: |
...
handoffs:
- { verdict: investigate, agent: rca, cooldown: 30m }
- name: rca # no trigger: it runs only when handed off
prompt: |
...- Write the target’s prompt for an agent that starts from a finding and gathers its own evidence with its tools.
An update that leaves handoffs out keeps the existing ones, and an empty list clears them. Each agent can have at most 10 handoffs, and each verdict and agent pair appears once. Handoffs are the project’s wiring, so the same agent can hand off differently in two projects. The full reference is on the Handoffs page, and the wider picture of agents that watch and investigate is in AI SRE.
What you get
- A focused second run. The target starts with the finding and the entity, so it begins from the conclusion the first agent reached.
- Evidence on demand. The target pulls further evidence with its own tools, so it looks at what its job needs.
- One thread in Activity. The handed-off run sits under the run that handed off, so a triage finding and the root cause it led to read together.
- Guardrails you can see.
- Cooldown. There is at most one handoff from one agent to another per entity within the cooldown. A handoff inside it starts no run, and the finishing run’s results say
handoff to rca skipped: cooldown. - Depth limit. Chains stop at depth 3. After three handoffs in a row, the next is recorded as a capped run with the error
handoff chain stopped at depth 3. - No silent drops. If the target is already running for that entity, or has hit its daily cap or budget, the handoff is recorded as a capped run with the reason.
- Cooldown. There is at most one handoff from one agent to another per entity within the cooldown. A handoff inside it starts no run, and the finishing run’s results say
- Clean deletes. Deleting the target removes the handoffs that point to it, and the delete response lists the agents it was removed from under
handoffs_removed_from.
When something else fits
- A trigger over the
findingssource still wakes an agent as before, and fits when you want trigger conditions such as filters or windows on the findings. Handoffs are the simpler way to chain two agents by verdict. - If the second agent should run on its own schedule, give it its own trigger. A target with a trigger still runs when handed off.