An on-call agent that remembers the runbook, and which step still works
Service owners, on-call rotations, the fix that actually worked last time. Recorded once during the incident, read back at 3am on the next page. When a step is retired, the agent sees it marked as changed and gives you the current one.
On this page
The senior engineer who never sleeps
Want to build an on-call agent that remembers the runbook? Here is how
Think about the one senior engineer on your team who has been there
five years. At 3am when the payments service falls over, you do not
page the runbook wiki, you page her. Not because she is smarter than
everyone else, but because she remembers.
She knows the dashboard that actually shows the problem. She knows
that the documented restart trick stopped working after the March
migration. She knows which on-call rotation owns the database now.
None of that is written down anywhere current, it lives in her head,
carried forward from one incident to the next.
An SRE agent without memory is the brand new hire on their first
night shift, reading the wiki out loud and hoping it is current. An
SRE agent with Korely is that senior engineer, except she never
sleeps and never quits. You want the second one answering the page.
Korely is the memory that turns the new hire into the veteran.
How you build it
Six steps, and only the last one is hard
Wire the agent to your signals
Give it read access to your alerting (PagerDuty, Opsgenie,
Grafana, Datadog) so when an alert fires the agent gets the
service name, the severity, and the firing metric. This part you
already know how to do in Claude Code or Cursor.
Give it hands
Let it run the safe diagnostics it is allowed to run: pull
recent logs, check the deploy history, hit a health endpoint,
read the last three incidents for this service. Read-only first,
write actions behind approval.
Write down what the team knows
Every incident teaches something: this alert is usually a noisy
neighbor, the real fix for the queue backup is to scale the
consumer not restart the broker, the payments service is owned
by the Orders squad now. Save those as memories the moment they
are learned, do not leave them in a Slack thread that scrolls
away.
Pull the right runbook at the right moment
When an alert fires, the agent searches its memory for this
exact service and this exact symptom, and gets back the steps
that actually worked last time plus who owns it now, not the
generic wiki page that has not been touched since 2024.
Let it learn during the incident
When the responder finds the real cause and the real fix, the
agent records it against the service so the next 3am page starts
from what you just learned, not from zero.
The part you skip, which is Korely
All of the above only works if the memory underneath is a
bi-temporal graph-RAG store: typed facts about services and
owners, a graph that links an alert to its service to its
on-call team, ranking by relevance with a weight for recency, and
contradiction handling so a new fix or a changed owner closes the old one,
which stays in the history. Korely is that layer, hosted in the EU, with no generative model on reads, starting at 19 euro a month + VAT. You build the agent, we are the
memory it runs on.
The shape of the fix
The incident teaches the memory, the next page reads it back
Incident, March
The responder finds the real fix
orders-db failover at 3am
Manual promote is wrong now, record the new step
add()
Korely memory
agent_id: sre-orders-db
Typed facts: service owners, on-call rotation
Every note dated, new fix returned with the old
get_context()
Next page
The agent answers from what is true now
Reads the current step before proposing it
Wait for managed failover, not manual promote
One loop per service. The fix recorded during the last incident is the fix the agent serves on the next one, with the retired step kept on the timeline for the audit.
How Korely fits
The memory infrastructure your demo hides and production exposes
Anyone can wire an agent to PagerDuty in an afternoon. The hard,
slow, expensive part is building a store that holds typed facts
about your services and owners, a graph that knows alert to service
to on-call team, that closes a fix you retired last quarter and
keeps it as history, and that resolves contradictions so when
ownership moves from Team A to Team B the agent serves the new owner
as current and the old one as history.
It has to do all of that on a read that adds a vector query and a fact lookup, with no generative model turn, while a responder
is staring at a red dashboard. That is a bi-temporal graph-RAG
system, and building it well is a multi-month project that has
nothing to do with your actual agent. The retrieval is a pgvector
search plus a lookup of the typed facts, Postgres only, so the right
runbook surfaces whether the agent matched the exact service name or
a loose paraphrase of the symptom.
The block the agent reads stays under a token budget you set, 800
tokens by default, so a year of incident history does not crowd the
prompt during the next page. Reads run no generative model, so the lookup adds a database query to your incident loop, not another model turn.
Its store is Postgres, hosted in the EU, which matters because your
incident data is some of the most sensitive operational data you
have. To extract facts, the text of each write, with up to ten earlier memories of the same end user (300 characters each) and the earlier facts it is compared with, goes to the model of
your project's region, Google's Gemini API by default or Scaleway in
Paris if you choose the EU region.
You skip the multi-month infra build and ship the agent, starting at
19 euro a month + VAT after the free tier.
Show me the code
A minimal write-then-page flow
sre_agent.pypython
# ── During the incident: the responder finds the real fix ───────from korely_memory import Korely
korely = Korely(api_key="kor_live_...")
# orders-db failover at 3am, old manual-promote step now causes harm
korely.add(
"orders-db failover: do NOT manually promote the replica. After ""the March managed-Postgres migration, wait for managed failover ""to complete, then clear stale connections in the pooler.",
agent_id="sre-orders-db",
)
# ── Next page: a fresh session recalls the current runbook ──────
ctx = korely.get_context(
"orders-db failover fix",
agent_id="sre-orders-db",
)
# ctx → a block that includes the current step (wait for managed failover)# and can still include older notes; the agent prefers the later date.# The agent prepends this before proposing a step to the responder.
The same memory is reachable from any agent, Claude Code, Continue,
n8n, a LangGraph runbook, or a plain HTTP client. Use different
agent_id
values so each service's or team's reads stay separate and auditable (each distinct agent_id counts toward the agent limit of your plan: Hobby 2, Developer 10, Team 100, Scale 500, so on a larger estate use one agent_id and metadata);
to keep two teams' facts from ever changing each other, put them in
separate projects.
When a fix goes stale
The step that was right in February is wrong after the migration
A database failover alert fires at 3am for the orders-db cluster.
Six months ago the runbook said the fix was to manually promote the
replica and restart the connection pooler. After the March migration
to managed Postgres that step became wrong, it actually causes a
longer outage now, and the responder that night recorded the real
fix: just wait for the managed failover to complete and clear the
stale connections.
With a plain wiki or a naive memory dump, both versions sit in the
context and the agent surfaces the old manual-promote step, the one
that now makes things worse. Because Korely is time-aware, every
note carries its date, and the new fix comes back together with the
older note. At 3am the agent prefers the later date: wait for
managed failover, clear stale connections.
The half-asleep on-call engineer gets the current step, not the one
that was retired in March, and the outage is two minutes instead of
forty. The old step is not gone, it sits on the timeline with its
dates, so when someone reviews the incident later they can see
exactly when and why the procedure changed.
timeline.pypython
korely.add(
"orders-db failover fix: manually promote the replica.",
agent_id="sre-orders-db",
timestamp="2025-09-01",
)
# After the March migration to managed Postgres, the step changes
korely.add(
"orders-db failover fix: wait for managed failover, clear pooler.",
agent_id="sre-orders-db",
timestamp="2026-03-15",
)
# Facts are extracted a few seconds after add() returns; read once both memories show status "ready".
ctx = korely.get_context("failover fix", agent_id="sre-orders-db")
# → a block that includes the new fix (wait for managed failover) and can# still include the older note; the agent prefers the later date.# Audit why the procedure changed via the REST API:# GET /v1/memories/{id}/history -> the memory's events, including when its fact was invalidated
Frequently asked
On-call agent memory, common questions
How is this different from just pointing my agent at our runbook wiki?
A wiki is a flat pile of pages that someone has to keep current by hand, and at 3am nobody knows which page is still true. Korely stores the runbook as memory the agent itself writes and updates, scoped to the exact service and ranked by relevance to the alert, with a weight for recency. When a new fix contradicts an old one, the old one is closed, kept as history and marked as changed, so the agent sees which step is current, not the page that has not been edited since 2024.
What happens when a fix that used to work becomes wrong?
That is the case Korely is built for. Facts are time-aware. When the responder records a new fix, the old note is kept, not deleted, and every note carries its date. The new fix comes back together with the older note, and the agent prefers the later date, so it stops suggesting the manual-promote step that caused a longer outage after your migration. The full history is still there if you need to audit why a procedure changed.
How does it know who owns a service when teams reorganize?
Ownership lives as a typed fact in the graph, alert to service to on-call team. When ownership moves from one squad to another you record the change once, and Korely's contradiction handling closes the old owner, which stays in the history, so the agent escalates to the team that owns it today, not the one that owned it last quarter. No more paging the wrong rotation at 3am.
Will adding memory slow down my incident response?
No. There is no generative model on the read path: a search embeds the query once, then looks up vectors and typed facts in the database. Memory is not in the critical path the way another model call would be. The context block it returns stays under a token budget you set, 800 tokens by default.
Where does our incident data live, and can we delete it?
In a managed store in the EU, Postgres with a vector and graph index, and you never host anything yourself. Incident data is some of the most sensitive operational data you have: it is stored in the EU, and to extract facts the text of each memory you write, with up to ten earlier memories of the same end user (300 characters each) and the earlier facts it is compared with, goes to the language model of your project's region: Google's Gemini API by default, or a model on Scaleway in Paris if you choose the EU region. You can list everything page by page, or erase it with one call per agent (DELETE /v1/agents/{agent_id}), and an agent_id keeps each service's reads separate; each distinct agent_id counts toward the agent limit of your plan (Hobby 2, Developer 10, Team 100, Scale 500), so on a larger estate use one agent_id for the on-call agent and tell the services apart with metadata, which search() filters on.
What do I actually have to build versus what comes from Korely?
You build the agent: wire it to PagerDuty or Grafana, give it the safe diagnostics it is allowed to run, decide what it proposes versus what it executes. You already have Claude Code or Cursor to do that. What you do not build is the memory layer underneath: the bi-temporal facts, the entity graph, recency ranking, and contradiction handling. That is the multi-month infrastructure project, and it is exactly what Korely hands you, starting at 19 euro a month + VAT.
Wire your on-call agent to a memory that already knows your services
The Hobby tier is free, Developer starts at 19 euro a month + VAT. Sign up,
get an API key, and run your first memory write in minutes, then let
the next page read it back.