Durable runbook ops agent on the Loom stack: checkpoint/resume, supervisor planner/executor/verifier, audit trail.
Project description
loom-ops
Durable runbook ops agent on the Loom stack — ops sibling of loom-run, built on loom-runner with flow-xray traces.
Run нельзя потерять: упал на шаге 12/40 →
resume, каждый tool call в SQLite, postmortem черезexplain+ flow-xray.
Loom stack (this repo’s place)
| Package | Role |
|---|---|
| loom-stack hub | Start here — docs and comparisons |
| loom-runner | Runtime — checkpoint/resume (dependency) |
| loom-run | Showcase — dev chat on a repo |
| loom-ops | Product — incident/deploy runbooks (this repo) |
| flow-xray | Traces — --trace HTML graphs |
Full map: docs/STACK.md. Dev assistant → use loom-run; ops runbooks → loom-ops.
Install
From PyPI (after publish — see releases):
pip install "loom-ops[api,telegram]"
loom-ops supervise "incident: API latency spike" --run-id inc-001 --db ops.sqlite --mock-llm --workspace .
PyPI workflow:
.github/workflows/publish.ymlon GitHub Release. RequiresPYPI_API_TOKENwith upload scope for projectloom-ops.
From source (development):
git clone https://github.com/kroq86/loom-ops.git
cd loom-ops
python3.13 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,api,telegram]"
Demo (mock LLM, no API key)
# Supervisor team: planner → parallel executor + verifier
loom-ops supervise "incident: API latency spike" --run-id inc-001 --db ops.sqlite --mock-llm --workspace .
# Inspect verifier subagent audit trail
loom-ops explain --run-id inc-001:sub:verifier --db ops.sqlite --workspace .
# Single runbook walk
loom-ops runbook "incident: API latency spike" --run-id rb-001 --db ops.sqlite --mock-llm --workspace .
# HITL: executor pauses for approval (see tests/test_supervisor_ops.py)
loom-ops approve --run-id exec-1 --note "LGTM" --role executor --db ops.sqlite --mock-llm --workspace .
# Allowlisted shell (optional)
export LOOM_OPS_ALLOW_SHELL=1
# uses workspace/ops.shell.allowlist.json by default
loom-ops runbook "deploy check" --run-id rb-shell --db ops.sqlite --mock-llm --workspace .
# HTTP SSE
loom-ops serve --db ops.sqlite --mock-llm --workspace .
curl -N -X POST http://127.0.0.1:8766/supervise \
-H 'Content-Type: application/json' \
-d '{"message":"incident: API latency spike","run_id":"inc-http","max_steps":20}'
curl http://127.0.0.1:8766/runs/inc-http/explain
# Telegram gateway (optional extra)
export TELEGRAM_BOT_TOKEN=...
export TELEGRAM_ALLOWED_CHAT_IDS=123456789
loom-ops telegram --db ops.sqlite --mock-llm --workspace .
Ops tools
| Tool | Role | Purpose |
|---|---|---|
read_runbook |
planner | Load runbook from runbooks/ |
execute_step |
executor | Mock, allowlisted shell, or MCP |
await_approval |
executor | HITL gate — run pauses until approve |
check_health |
verifier | Service health check (mock / MCP) |
record_audit |
verifier | Append audit entry (+ workspace memory) |
delegate_subagent |
supervisor | Spawn single resumable child run |
delegate_subagents_batch |
supervisor | Run multiple child roles in parallel |
Docs
Tests
python -m pytest -q
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loom_ops-0.2.0.tar.gz.
File metadata
- Download URL: loom_ops-0.2.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
541f10b43f01bf125bc7c1d997fa4c340b54f9b6de8c3b80c1903cc5222289da
|
|
| MD5 |
7c50988242fde62a0857b683cda7b42f
|
|
| BLAKE2b-256 |
77c6605b9404f8be8f527d608e60a3dbefd45523232d63d431b445d45b0f66e4
|
File details
Details for the file loom_ops-0.2.0-py3-none-any.whl.
File metadata
- Download URL: loom_ops-0.2.0-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
617ed85302bb60dc33c6d716def2623f707b98d3d7af8de522a6a1c061426e0d
|
|
| MD5 |
1497465c8e37c735e06f455e471c0312
|
|
| BLAKE2b-256 |
3bd7ad135def9bfd021d36d30860a25e6656bf8164bcd8b192e45597729d7934
|