Self-hosted agent pack for orchestrating an autonomous agent specialized in
on-call. Version 1.0.0 — actionable kit with scripts, templates, named prompts and an extended checklist.
Overview
This pack provides an operational autonomous agent for the on-call domain.
It includes a dedicated OODA loop, versioned prompts, runbook templates
and a set of scripts for installation, testing and execution.
The core of the product is a local on-call engine. Each alert is handled according to an explicit flow: detection, acknowledgment, triage, runbook execution, silent escalation if the runbook fails, resolution and shift report. The agent does not lose an alert: unacknowledged alerts are re-raised, critical incidents are escalated and every decision is recorded in SQLite.
This pack targets teams running a 24/7 service with an SME (on-call engineer), a solo SRE or a small NOC team. It does not replace a large-scale PagerDuty platform and does not execute any arbitrary command supplied in an alert.
The pack is designed to be self-hosted (BYO-LLM): no API key is included. The LLM adapter detects a local or CLI provider (ollama, claude-code, kimi, codex).
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ Alert source (webhook / API / file) │
└──────────────────────────────────┬──────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ IDLE → MONITORING → TRIAGING → ACKNOWLEDGING → RUNBOOK → ESCALATING │
│ ↓ │
│ RESOLVED → HANDOFF → REPORTING │
│ OODA State Machine │
└──────────────────────────────────┬──────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ Named prompts → Deterministic handler → BYO-LLM Adapter │
│ scripts/test_prompt.py scripts/run_agent.py │
└──────────────────────────────────┬──────────────────────────────────┘
▼
┌─────────────────────────────────────────────────────────────────────┐
│ SQLite (alerts, incidents, escalation_log) → runbooks.yaml │
│ → notification (webhook/simulated) / report │
└─────────────────────────────────────────────────────────────────────┘
Pack contents
| File | Role |
|---|---|
README.md |
This file — overview and quick-start |
SOUL.md |
Mission, values and OODA states specific to on-call |
PROMPTS.md |
5 named and versioned system prompts |
CHECKLIST.md |
25 operational steps with commands |
SPEC.md |
Technical spec, configurable parameters, interfaces |
CHANGELOG.md |
v1.0.0 history |
agent-oncall-v1.json |
Pack manifest with stats and files |
scripts/install.sh |
One-shot installer (venv, deps, systemd service) |
scripts/config.yaml |
Configuration template to fill in |
scripts/test_prompt.py |
Tests a prompt on a local example |
scripts/run_agent.py |
Minimal swarm orchestrator |
templates/*.yaml |
2 business configuration templates |
Quick installation
cd /opt/autonomous-stack/agent-oncall-v1
bash scripts/install.sh
The installer checks for Python 3.10+, creates a venv, installs the dependencies, detects a local LLM provider and configures a systemd unit.
Immediate test
# Test the main prompt
python3 scripts/test_prompt.py --prompt triage_engine --input templates/alert_example.yaml
# Run the agent in dry-run mode
python3 scripts/run_agent.py --config scripts/config.yaml --dry-run
Execution contract
pending: alert received, awaiting triage.acknowledged: alert acknowledged by the agent or a human.open: active incident linked to a critical alert.resolved: alert and incident closed with cause/resolution.escalated: runbook exhausted or critical severity, notification sent.closed: incident archived after automatic post-mortem.
Runbooks are defined in templates/runbooks.yaml. Each step carries an
id, an allowed command (ping, curl, check_disk, check_service), a success
condition and a maximum delay. The agent only executes the commands explicitly
listed in the runbook.
Common operations
python3 agent.py alert --source monitoring --severity critical --message "disk full on db-01"
python3 agent.py run --once --deterministic
python3 agent.py status
python3 agent.py resolve --alert a-example
python3 agent.py handoff --shift night
The deterministic mode covers the included handlers without an LLM. The BYO-LLM mode is reserved for semantic triage and writing the shift report; its output remains a JSON object and any error follows the retry policy.
Customization
- Copy
scripts/config.yamltoconfig.oncall.yaml. - Adapt the templates in
templates/. - Plug your own alert sources into
run_agent.py.
Costs and limits
This pack favors deterministic logic for critical decisions.
The LLM is used for semantic triage and report synthesis.
Refer to SPEC.md for the operating cost estimate.
License
Personal use per purchase. Resale prohibited.