Trigger an on-call agent that finds and fixes production incidents

Dan has a Jev classifier watch a live log stream; when it spots an incident it triggers a durable Pi agent that investigates, finds the root cause, writes a fix and waits for his approval to deploy.

IndyDevDan · YouTube · published Oct 12, 2026 · Software & DevOps

Trigger an on-call agent that finds and fixes production incidents — video by IndyDevDan▶ Watch on YouTube
Prompt
Watch [log stream] and classify each event. When an incident is detected, start an on-call agent that investigates, finds the root cause, writes a fix and waits for my approval before deploying.

Sponsored

Advertise here →

Visual breakdown

IndyDevDan's proactive incident agent: a cheap classifier ("Jev" in the captions) watches the production event stream, triggers a Pi durable agent that detects, investigates, finds the root cause and prepares a fix, then waits for a human to approve a one-time deploy.

The problem: Being the engineer on call means detecting, investigating and fixing incidents yourself, and normal agents wait for you to start them and lose their state when something fails.

How the on-call agent handles an incident

  1. Live event streamEvery production event streams into the app (a mock product in the demo)
  2. Jev classifierClassifies every event for pennies and flags incidents
    Dropped: Normal events
  3. Trigger the agentPasses the issue payload, its location and the error to a durable agent
  4. Pi durable agentRuns an SOP: detect, investigate, root cause, fix; reads logs and past events
  5. Human near the loopYou review the summary and code diff, then approve or decline
    Dropped: Declined fixes wait for more investigation
  6. One-time deployA non-replayable deploy to production; production stabilises
Production dataTrigger / your reviewAIResult

Why durable agents

  1. Proactive: they work for you, then wait
  2. Multi-client: browser, terminal UI, curl or your product connect to the same detached agent
  3. Long-running: close the laptop or restart the machine and they resume from the last checkpoint
  4. Human near the loop: approve deploys without babysitting the terminal

By the numbers

1.5¢Jev spend early in the demo
13¢to classify logs over almost an hour of filming
16¢for about 6,000 rows

Build your own

He links the proactive agent demo and the durable Pi network demo in the description; Pi durable itself is still experimental.

  1. Put a cheap classifier in front of your production log stream
  2. Or skip it and only look at 4XX and 5XX errors
  3. When an incident is flagged, trigger a durable agent with the payload, location and error
  4. Give the agent an incident SOP and tools to read logs, query past events and update the incident
  5. Make the deploy a task that can only run once, behind your approval
  6. Run agents on their own machines or cloud sandboxes so they can work in isolation

What to know

  • Refresh the page and all the incident state is still there: that's the durable part.
  • Every tool call is a task, so you can change an agent's tools mid-session, like switching to read-only.
  • Durable tasks run in phases; if one phase fails you can repeat just that phase.
  • Background compaction and shared JSON app state let many agent sessions on one device work on the same issue.
  • Test it: kill the agent or interrupt its workflow and check it comes back.

Distilled from the video’s captions

How to try it

  1. Open Pi.
  2. Copy the prompt and fill in the [placeholders].
  3. Watch IndyDevDan's video for the full walkthrough and setup.

Related use cases

Share