Skip to main content
Runbooks are Markdown files in .sureops/runbooks/. The Diagnosis Specialist and Incident Commander automatically retrieve and read the most relevant runbooks for each incident — you don’t need to explicitly point agents at a runbook. sureops uses vector search to find the best match based on the incident’s symptoms, alerts, and affected services.

How agents use runbooks

During diagnosis, the agent:
  1. Generates a query based on the incident’s alert labels, affected services, and current symptoms
  2. Runs a hybrid search (semantic + keyword) across all runbooks in your knowledge base
  3. Retrieves the top-matching runbooks and includes them as grounding context in its analysis
The incident timeline shows which runbooks were consulted: look for entries like “Consulted runbook: payments.md” in the reasoning section of the Diagnosis Specialist’s output. This lets you verify that the right runbook was retrieved and improve the content if it wasn’t.

Naming conventions

Runbooks live in .sureops/runbooks/ and use the filename as a searchable identifier. Recommended naming patterns:
Service-specific runbooks are linked from services.yaml via the runbook field. Pattern-based runbooks are discovered purely through search — no explicit link needed.

Frontmatter schema

Frontmatter fields help the retrieval layer rank and filter results. All are optional, but title and service significantly improve retrieval accuracy.

Content best practices

Be action-oriented

Agents are better at following specific instructions than at interpreting vague guidance. Prefer:
Over:

Include service-specific error patterns

Agents benefit from knowing what errors your service typically surfaces during failures:
When you reference a dashboard, include the URL directly. Agents can include it in their output so responders can navigate there without searching:

Include mitigation steps with commands

For procedures you want the Resolution Specialist to be able to propose:
helm upgrade payments charts/payments —set redis.maxConnections=200 -n prod

The knowledge base

The knowledge base is the collection of all your runbooks, indexed and stored as vector embeddings. Every time you push a change to .sureops/runbooks/, sureops re-indexes the affected files.

Verifying retrieval

After an incident closes, check the Diagnosis Specialist’s timeline entry to confirm the right runbooks were found:
  • Runbook consulted: the agent found and used a relevant runbook
  • No matching runbook found: the agent fell back to general knowledge — consider authoring a runbook for this pattern

Keeping runbooks fresh

Stale runbooks can mislead agents. A runbook that describes an old architecture or outdated procedures is worse than no runbook at all. Recommended practices:
  • Set the last_reviewed frontmatter field and review runbooks that haven’t been touched in 90+ days
  • After a major incident where the runbook was inaccurate, update it as part of closure
  • After a successful postmortem, consider whether the postmortem learnings should be folded back into the runbook

Runbook format example

kubectl rollout restart deployment/redis -n prod