Skip to Content
This workshop is complete. To join the next one or learn more about GlassFlow, get in touch.
Bonus: AI SRE (cloud)

Bonus: Build an AI SRE with a handover agent (cloud)

A glowing orange horizon under a black sky

You build two agents that watch a small live service: a cheap watcher that looks every 2 minutes, and a root-cause agent it hands off to when something looks wrong. Then the service breaks and you watch them find out why.

Time: about 30 minutes. In our run: about 15 minutes from joining to the root-cause finding.

This guide uses Tares Cloud: Tares runs in a workspace we host for you, and you work in it from your browser. The only thing on your laptop is Claude Code. You build exactly what the local guide builds; what changes is everything around it:

Local guideThis guide (cloud)
TaresYou install it and run tares up and tares mcp on your laptopAlready running in your workspace; you join with a link
Demo serviceRuns on your laptop in DockerOne shared service, hosted for the whole room
Breaking itYou run ./inject.sh yourselfThe facilitator breaks it once for everyone
Model keyYour own Anthropic API keyNone: your workspace comes with $10 of model credit
Claude CodeConnects to localhost:8788Connects to your workspace with a command from its Connect page

Once the demo project is started, the agents you build, the wake-up and the checks along the way are the same in both guides.

Before you start

The demo service

Everyone in the room watches the same small service, hosted for the workshop:

  • api-server, the service you watch. It has three endpoints, /api/orders, /api/stats and /api/users, and a fault switch.
  • traffic-generator, which calls the three endpoints every second, so there is always something to look at.
  • Prometheus, which reads api-server’s metrics every 5 seconds and checks three alert rules.
  • Loki, which keeps api-server’s logs.

What api-server gives out:

  • Metrics: requests by endpoint and status, request time, active database connections, and whether its database (postgres) is up.
  • Logs: one line per request.
  • Alerts, fired by Prometheus: HighErrorRate (more than 5% of requests fail), HighLatency (p99 over 1 second) and DependencyDown (postgres down).

The service is shared, so you do not break it yourself: the facilitator breaks it once for the whole room, in step 9.

How Tares sees it

The AI SRE demo template (step 2) creates three sources in your workspace. Each one pulls one kind of data into Tares:

  • demo_metrics asks Prometheus every 5 seconds for four numbers: the 5xx rate, the p99 latency, active database connections and postgres up.
  • demo_logs reads api-server’s logs from Loki every 10 seconds. It drops the normal 200 lines, so only errors come in.
  • demo_alerts asks Prometheus every 10 seconds which alerts are firing.

All three label their events service=api-server. That label is what joins them: Tares puts every event with it on one timeline, for the entity service=api-server. Your agents read that timeline, and so does Claude Code.

What you build

  • A wake-up (watch) that fires every 2 minutes and hands the timeline to an agent.
  • A watcher on a small, cheap model. Each time, it says “nothing to do” or “investigate”.
  • A root-cause agent on a bigger model. Nothing wakes it on a schedule: only the watcher’s “investigate” does. It writes what it finds onto the project page.

Steps

Join the workshop

Skip this step if you already created a workspace in Part 1. Use that one.

  • Open the join link and sign up or sign in. Joining creates your own workspace, with $10 of model credit.
  • When it says your workspace is ready, click Open. It takes about 10 seconds.

You land on Welcome to Tares. Model provider ready is already ticked: there is no key to add. Your workspace’s address is https://<your-workspace>.tares-glassflow.com; this guide calls it your console.

Start the demo project

  • Open Projects, click Create new, and at the bottom, Start from a template. (Or add /projects/new/templates to your console’s address.)
  • On the AI SRE demo card, click Set up.
  • You should see Shared demo environment DONE, “hosted demo stack answered”, and the Prometheus, api-server and Loki URLs filled in. Click Start.

The form also shows a box “Give the agent a model provider”. Skip it: your workspace already has one.

You land on the project page, with Cause an incident and Clear the fault at the top. Do not press them: they act on the shared service for everyone. Starting the demo created the three sources above, plus a trigger and an agent of its own.

Turn off the agent the template ships

The template comes with a ready-made agent, incident-first-look. It wakes whenever Prometheus fires an alert and writes its own finding. In this guide you build that job yourself, with a watcher and a root-cause agent. If incident-first-look stays on, the incident in step 9 gives you two findings, and you cannot tell which one your agents wrote. So turn it off; you can turn it back on any time.

  • On the project page, click Setup.
  • In the 3. Agents card, click Change, then Disable.

You should see incident-first-look marked OFF. You are now in Advanced setup; the rest of the steps happen here.

The project page now shows Needs attention: “No agent is turned on, so nothing looks at what arrives.” That is expected. You turn on your own agents later in this guide, and the warning goes away.

Connect Claude Code to Tares

Connect it, and look at the timeline the agents will read.

  • In your console, open Connect (left sidebar, under Agent access), then Claude Code.
  • Click copy on the claude mcp add --transport http tares … command and run it in a terminal. It carries your workspace’s address and access token.

Then open claude and ask:

Use the tares MCP server. Read the last 10 minutes of the timeline of the entity service=api-server and tell me which metrics it carries and their current values.

You should see three metrics: p99 api-server (about 5 ms), db connections active and dependency postgres up (1). The 5xx rate shows up only while the service is failing.

Create the root-cause agent first

Go back to Advanced setup: open Projects, click the AI SRE demo project, click Setup, then Advanced setup at the top right.

Click the + next to AGENTS, then:

  • name: rca-from-watcher
  • trigger: No trigger: only a handoff starts it. The field starts on incident, so change it.
  • start from: Root cause after a handoff (this fills the prompt)
  • model: claude-sonnet-5

Leave the rest as default, then click Create agent. You should see “Nothing starts it yet”. That is right: the watcher will start it.

Create the wake-up that runs every 2 minutes

Click the + next to TRIGGERS, then:

  • name: watch
  • in plain words: every 2 minutes, the watcher looks at api-server
  • sources: add demo_alerts, demo_logs and demo_metrics
  • entity label: service
  • fires: on a schedule
  • run every: 2m

Click Create trigger. You should see watch with “every 2m” and “no agent”.

Create the watcher

Click the + next to AGENTS, then:

  • name: watcher

  • trigger: watch

  • start from: Triage (on a schedule) (this fills the prompt and the verdict investigate)

  • at the end of the prompt, add this paragraph. It tells the watcher what normal looks like for this service:

    For api-server, also read the last few demo_metrics lines: p99 api-server (normal about 5 ms), dependency postgres up (normal 1), db connections active (normal 4 to 5). A firing alert, a p99 above 50 ms, or postgres up at 0 is a problem even when no count grew.
  • model: claude-haiku-4-5-20251001

  • under When it concludes, Add a handoff: verdict investigate, agent rca-from-watcher, cooldown 5m

Click Create agent. New agents start OFF: click Enable. You should see “watcher ON” and “investigate goes to rca-from-watcher · once per entity per 5m”.

Wait for one quiet run

The setup is done. Click Back to the project to see what the agents find. The watcher’s first run comes within 2 minutes.

When it has run, under What the agents found you should see No action, “No significant changes detected”, with the numbers the watcher checked.

Wait for the incident

The facilitator breaks the shared service for the whole room and says so. From then on 40% of api-server’s requests fail. What follows, in order:

  • About 30 seconds later, Prometheus fires HighErrorRate, and the alert and the error log lines land on the timeline.
  • At the next 2-minute mark, the watcher reads the timeline, concludes investigate and hands off. A run that falls in the first 30 seconds still says No action: the alert has not fired yet.
  • Shortly after, a Needs action finding appears under What the agents found, marked “watcher, then rca-from-watcher”. It says what is failing, since when, the likely cause and a next step.

In our run the finding appeared 3 minutes after the fault: “api-server returning 500s on all endpoints despite healthy DB/latency, app-level fault”.

Check the agents’ work with Claude Code

Ask:

Use the tares MCP server. What is wrong with the entity service=api-server right now?

Compare its answer with the finding: do both name the same failing endpoints, the same start time and the same cause?

What just happened

  • Tares put the service’s metrics, error logs and alerts on one timeline for service=api-server.
  • Every 2 minutes the watch wake-up handed that timeline to the watcher, a small, cheap model. Most runs it said “nothing to do”.
  • When the errors started, the watcher concluded investigate. That handoff woke rca-from-watcher on a bigger model, which read the evidence and wrote the root cause back onto the project page.
  • Claude Code read the same timeline over MCP, so you can check the agents’ work.

Our whole run cost $0.06 of the $10 in your workspace.

Use it on your own services

Nothing in the demo is special: it is three sources, one trigger and two agents. Your workspace stays after the workshop, so you can point it at a service of yours: swap the sources and keep the rest. The local guide lists the steps, and the AI SRE guide  walks through each of them.

If something is off

  • The sources stay at 0 events. Open Sources: all three should be OK and demo_metrics should get events within a minute. If they do not, tell the facilitator.
  • The project page says “Waiting for the first event” for logs and alerts. That is normal before the incident: only error log lines and fired alerts come in.
  • The watcher never concludes investigate. Open watcher and look at its last run. If it called the errors normal, make the added paragraph stricter.
  • The watcher concluded investigate but no root cause appears. Check the handoff verdict is spelled investigate in both places, and that the cooldown has passed (5 minutes per service).
  • The watcher never runs. Check it says ON and that watch is not PAUSED.
  • Claude Code does not find the tares server. Run the claude mcp add command again from Connect, then start a new claude session.
  • Runs stop with a budget message. Your workspace has used its $10. Tell the facilitator.
  • Clicking a + does not open the form. Click it again, or reload the page.

Clean up

  1. Turn the wake-up off: Advanced setup → TRIGGERS → watch → Pause. You should see PAUSED: “it is not evaluated and does not fire”. This stops the model calls.
  2. Your workspace stays, with whatever credit is left. Sign in at console.tares-glassflow.com  to come back to it.
Last updated on