Skip to Content

What verdict and next step should an AI SRE record for slow database queries?

For slow database queries, an AI SRE in Tares calls the conclude tool with a verdict such as investigate, a one-line headline and a next step, or no_op when there is nothing to report. The verdict is a word you define on the agent. The headline says what was found, and the next step says what a person should do.

How it works

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

  • no_op: nothing to report, so Tares records no finding. Use it when the queries look normal.
  • A finding: a verdict about a named entity, such as the database that looks slow, plus a headline and a next step.

The two extra fields have fixed limits:

  • headline: one line of up to 100 characters. It says what was found in the reader’s terms, for example which database is slow and what you see.
  • next_step: up to 300 characters. It says what a person should do, and it stays empty when nothing needs doing.

The project’s Overview shows both on each card, and agents are told to give both. If a run gives neither, 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:”.

The verdict words are yours. You can list up to 10, each one word (letters, digits, dashes), and none can be no_op. With a list, a finding must carry one of your words, and a missing or off-list verdict goes back to the agent to fix within the same run.

For slow database queries, this gives you a simple mapping:

  • A triage agent sees one database that looks slow. Record investigate. The headline names the database and the symptom. The next step tells a person where to look first.
  • An agent picking up after a handoff finds what is failing and why. Record rca. The headline states the cause. The next step states the fix or the person to involve.
  • The slowness was noise, or it is already over. Record resolved. Leave the next step empty, because nothing needs doing.
  • Nothing looks wrong. Call no_op.

The Triage (on a schedule) preset comes with investigate. The Root cause after a handoff preset comes with rca and resolved.

Set it up

Set this on the agent that watches your database. It works the same way for any agent that ends with a conclusion. Read the full behavior on How a run ends, and see the AI SRE guide for where such an agent fits.

  1. Open the agent form and find the How it ends section.
  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 it. If a run stops without concluding, Tares asks once more with conclude as the only choice.
  3. Add the verdicts the agent can give, each with when to give it. For a triage agent, start with investigate.
  4. Keep the prompt about the job only, such as which database to watch and what counts as slow. Tares supplies the conclusion instructions.
  5. Check the agent’s summary, which shows how it ends.

The same setup in YAML:

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

For a second agent that takes over after a handoff, add rca (you found what is failing and why) and resolved (it was noise, or it is already over) in the same way. The handoffs of an agent key off these verdict words, so pick words you want to route on.

What you get

  • Each run ends with a clear outcome. Either no finding is recorded, or a finding carries a verdict on a named entity.
  • Each finding card in the project Overview shows a headline of up to 100 characters and a next step of up to 300 characters, so a person can read it at a glance.
  • Verdicts from a list you control, so a slow-query finding is always one of your own words and an off-list word is corrected within the same run.
  • Handoffs that can key off the verdict, for example passing an investigate finding to a root cause agent.
  • Quiet runs. When the queries are fine, no_op records nothing, so the Overview holds only findings that matter.

When something else fits

  • If you want the agent’s last message to be its finding with no verdict, leave the conclusion off. The cost is that findings carry no verdict to route or filter on.
  • If you do not set a verdict list, a finding can carry any verdict or none. Set a list when you want consistent words across runs.

Still stuck? Get help

Last updated on