← All projects
Build 05AI agent for service creditsHackathon build

SLA Copilot

The site went down. Who do you owe money to? And can you prove it landed?

SLA Copilot turns a resolved production incident into verified service credits for the customers who were actually affected and contractually qualify. It joins incident, usage, plan and billing evidence, applies a policy gate, issues the credit in Stripe test mode, and independently checks the result.

Built atA hackathon
RoleIdea, pitch & system design
SystemsPagerDuty · PostHog · Stripe · Linear
PolicyDeterministic, in YAML/JSON
SafetyStripe test mode · in-app approval
01 · The problemThe question after the outage

Engineering knows what broke. Finance doesn't know who's owed.

After an incident, teams answer the technical questions in minutes. The commercial one takes days, if anyone asks it at all. SLA Copilot answers one narrow question with real money attached.

EASY · ANSWERED IN MINUTES
  • What broke?✓ KNOWN
  • When did it break?✓ KNOWN
  • When did it recover?✓ KNOWN
HARD · USUALLY NOBODY ASKS
Which customers do we now owe something to?

And can we prove the credit reached the right customer, for the right amount, exactly once? SLA Copilot is proactive: it finds the obligation before an angry customer has to ask.

02 · The key word“Actually”

No single system knows the answer.

Every tool holds one piece of the truth, and each piece on its own leads to the wrong decision. The answer only exists once they're joined.

An outage happened
≠
which customers tried the broken feature
A customer's plan
≠
whether this outage triggers their SLA credit
A successful Stripe call
≠
the right customer got the right credit
Operational events become customer decisions only when joined with customer behavior.THE CORE INSIGHT
03 · Run itThe hackathon demo, interactive

Run the incident yourself.

This replays the demo scenario: a 47-minute SEV-1 outage of the exports service and three customers. Step through the state machine, approve the credit, then replay it with a network timeout to see why the verifier matters.

PAGERDUTY · RESOLVEDSEV-1
exports-api outage
DURATION47 min
SERVICEexports-api
ReadyDEMO DATA · STRIPE TEST MODE
04 · ReliabilityTransport vs. semantic success

A 200 OK can still be wrong.

An agent can call every API successfully and still credit the wrong account, or credit the right one twice. So the success test is the observed state of the systems, not the agent's own trace.

TRANSPORT SUCCESS
“Stripe returned 200.”
  • ?Was it the right customer?
  • ?The authorized amount?
  • ?Under the right policy version?
  • ?Only once, even after a retry?
SEMANTIC SUCCESS
“The state is correct.”
  • ✓Exact Stripe customer, from a stable mapping
  • ✓Exact amount from the policy formula
  • ✓Case and policy IDs in the metadata
  • ✓Exactly one matching credit exists

We don't close the case because the agent says it finished. We close it when PagerDuty, PostHog, policy and Stripe agree.

05 · Where the AI fitsInterpret, never decide money

The model explains. Code decides the money.

A language model is good at reading messy incident text and writing clear summaries. It should never be the thing that picks the account or computes the credit.

THE MODEL CAN
Interpret & explain
  • Read the incident and name the affected feature
  • Summarize the evidence for a reviewer
  • Write a short audit explanation
  • Flag ambiguity and ask a human
DETERMINISTIC CODE MUST
Decide & act
  • Map each account to its exact Stripe customer
  • Evaluate policy rules and compute the credit
  • Enforce approval limits and idempotency
  • Make the Stripe write, then verify it
06 · The systemsEach one holds a piece

Five tools, one decision.

The core loop runs on three systems. Linear and Slack were scoped as bonuses, so the demo couldn't break on an integration that wasn't essential.

01CORE
PagerDuty

Incident facts: service, severity, start, end and status.

02CORE
PostHog

Which accounts actually hit the broken feature during the window.

03CORE
Stripe

Customer and plan lookup, then the credit, in test mode.

04BONUS
Linear

One audit issue per incident with every decision linked.

05DEFERRED
Slack

Approval for large credits. In-app approval used instead.

07 · Picking the ideaNarrow beats generic

Why this idea, and not the obvious ones.

I wanted a problem the hackathon's host companies actually face, with one clear, consequential decision that could be explained and demoed in two minutes.

Refund / support agent
Too easy to shrink into an email parser that calls Stripe.PASSED
Incident commander
Useful but broad. The demo turns into a pile of dashboards.PASSED
Coding agent
Another “read ticket, change code” demo.PASSED
Cross-app reconciler
Interesting, but abstract to explain fast.PASSED
SLA Copilot
A concrete domain, a visible financial result and an obvious definition of success.CHOSEN
08 · Honest limitsWhat a real version needs

A decision assistant, not an autopilot for payouts.

The prototype proves a safe execution loop. A production version would need more, and I'd rather say so than oversell it.

01 · IDENTITY
Account mapping

Real companies have messy IDs across tools. Production needs a trusted identity service, not string matching.

02 · CONTRACTS
SLAs vary

Real contracts have caps, exclusions and maintenance clauses. The demo policy is illustrative.

03 · EVIDENCE
Attempt ≠ impact

A failed event proves an attempt, not every business impact. Raw event IDs stay in the audit.

04 · SAFETY
Capped autonomy

Scoped credentials, amount caps, approval thresholds and a reconciliation job.

PythonPagerDuty MCP / APIPostHogStripe test modeLinearYAML policy engineState machinesIdempotency
↑↓ NAVIGATE↵ OPENESC CLOSE