Skip to Content
Tares

How should an AI SRE end its run when slow database queries turn out to be nothing?

Tares lets an AI SRE end that run with the conclude tool set to no_op, which records no finding. When the slow queries are a real problem, the agent concludes with a finding instead, carrying a verdict about a named entity, a headline and a next step. Ending on purpose keeps a quiet check from turning into a finding nobody needs to read.

How it works

An agent that ends with a conclusion gets the conclude tool, which ends a run on purpose. The tool has two outcomes:

  • no_op: there is nothing to report, so no finding is recorded. Use it when the slow database queries were a blip, a known batch job or within normal range.
  • A finding with a verdict: the verdict is about a named entity, for example the database or service the slow queries belong to. Use it when something needs attention.

A finding also carries two short fields:

  • headline: one line of up to 100 characters, saying what was found in the reader’s terms.
  • next_step: up to 300 characters, saying what a person should do. It is empty when nothing needs doing.

Agents are told to give both. If a run does not provide them, Tares takes the headline from the note’s heading, bold lead or first sentence. It takes the next step from the text after “Next step:”, “Next:” or “Recommendation:”.

For an agent that investigates slow queries, the choice is simple. If you checked and found nothing worth acting on, end with no_op. If you found something, or you found the cause and it is already over, end with a finding that says so. A verdict such as resolved (it was noise, or it is already over) is a finding, so it is recorded, unlike no_op.

Set it up

You set this on the agent in the How it ends section of the agent form. The full reference is How a run ends, and the wider picture of an AI SRE is in AI SRE.

  1. Open the agent that watches or investigates your database and find How it ends.
  2. Tick Ends every run with a conclusion (concludes: true). The agent then always gets the conclude tool, whatever its prompt says, and Tares adds the instructions for using it.
  3. Optionally add Verdicts it can give (verdicts). Write your own words, each with when to give it. You can list up to 10, each one word (letters, digits, dashes), and none can be no_op, because nothing to report is always possible.
  4. Write the prompt so it only describes the job, for example what counts as a slow query for you and which queries are expected to be slow. You do not need to explain conclude in the prompt.
  5. Save the agent.

In YAML, an agent that concludes with one verdict looks like this:

agents: - name: triage trigger: watch-web concludes: true verdicts: - { verdict: investigate, when: one entity looks like a problem and needs a closer look } prompt: | ...

With a verdict list in place, the tool accepts only those words and tells the model what each one means. A finding must carry one of them. If the agent gives a word that is not on the list, or leaves the verdict out, the run goes back to the agent to fix within the same run.

If a run stops without concluding, Tares asks once more with conclude as the only choice. That keeps a run from drifting to an end with no clear outcome.

What you get

  • A clear end to quiet runs. When the slow queries turn out to be nothing, the agent ends with no_op and records no finding.
  • Findings that say what to do. When something is wrong, the finding has a verdict about a named entity, a headline of up to 100 characters and a next step of up to 300 characters.
  • A next step only when one exists. The next step stays empty when nothing needs doing, so a reader is not sent chasing work.
  • Verdicts you define. With a verdict list, each word has a stated meaning and a stated moment to use it, and the agent’s summary shows how it ends.
  • Handoffs that key off your words. Other agents can pick up from the verdicts you set.

When something else fits

  • If you want the agent’s last message to be its finding with no verdict, leave Ends every run with a conclusion off. The finding then carries no verdict.
  • If you want every run to leave a record, even a quiet one, give the agent a verdict such as resolved instead of no_op. A verdict is recorded as a finding, while no_op is not.

Still stuck? Get help

Last updated on