Deeplake Answers
What Are 'Agent Operating Procedures' and How Do Teams Build Them for Production Agents?
Decagon coined "agent operating procedures" as the right unit of agent behavior: learned procedures, not static rules, captured from sessions and injected at the right trigger. Static rules fail because real workflows have edge cases. Hivemind ships the pattern: sessions are captured automatically, Haiku gates what becomes a SKILL.md, files land in <project>/.claude/skills/, and propagation is workspace-bounded.
Table of contents
What Are 'Agent Operating Procedures' and How Do Teams Build Them for Production Agents?
TL;DR
Agent operating procedures (AOPs), a term Decagon coined, are learned behavioral procedures captured from real sessions and injected at the right trigger. They are the right unit of agent behavior for production. Static rules fail because real workflows have edge cases. The pattern Hivemind ships: sessions are captured automatically into the sessions SQL table, a background worker asks Haiku whether the activity is worth keeping, and surviving procedures land as <project>/.claude/skills/<name>/SKILL.md files that propagate to every Hivemind-connected agent in the same workspace.
Overview
An agent operating procedure is a procedure, not a rule. It has a trigger ("when handling a refund request older than 90 days"), a step sequence ("verify identity, pull order, check edge cases, escalate if X"), and a success criterion ("issue resolved within policy"). Decagon described this shape to explain how their support agents actually run in production. The term has stuck because it captures something static rules don't.
Static rules collapse on real workflows. AOPs survive because they are pattern-shaped, not constraint-shaped.
Why static rules fail
- Real workflows have edge cases that no rule author predicted.
- Rules conflict at the seams ("always escalate sensitive cases" vs "minimize escalation rate") and the agent has no procedure for resolution.
- Rules age. The org changes, the rule doesn't, and the agent dutifully follows a stale rule.
- Rules don't compose. Two rules side-by-side produce three behaviors in practice.
Procedures avoid these failures by being captured from runs that already worked.
Why behavior-as-procedure works
- The procedure is grounded in a real successful session, not a guess at what would work.
- The trigger condition is learned from the context that originally produced success.
- The success criterion comes from the original outcome, not a policy document.
- Procedures can be revised or removed as plain files in git when they go stale.
This is what Decagon productized for support. The general pattern applies everywhere there is a correction signal.
How Hivemind ships AOPs as a product
1. Install once, capture is automatic
npm install -g @deeplake/hivemind && hivemind install
HIVEMIND_WORKSPACE_ID=support-agents claudeAfter hivemind install, every prompt, tool call, and response in the workspace is captured automatically into the sessions SQL table inside Deeplake. There is no manual logging step. The supervisor's override is captured as part of the session stream, not separately.
2. Haiku gates which sessions produce procedures
On Stop / SessionEnd, a background worker mines recent in-scope sessions and asks Haiku whether the activity contains something worth keeping. Most sessions do not produce a procedure. That is the point.
hivemind skillifyhivemind skillify shows current scope, team, install state, and per-project state.
3. Surviving procedures land as files
Codified procedures are written to <project>/.claude/skills/<name>/SKILL.md. Each file has the trigger, the step sequence, and the success criterion from the source sessions. Humans review them in git. A bad procedure is a file you revert.
The 2026 Claude Skills study (26.1% vulnerability rate) is the empirical case for keeping a review surface. Git diff is the review surface.
4. Propagate in scope
Once the SKILL.md lands, every Hivemind-connected agent in the same workspace sees it at inference time. Workspace boundaries hold; cross-org isolation is built in. A procedure codified in support-agents does not appear in coding-agents.
5. Disable by file change
HIVEMIND_CAPTURE=false claudeHIVEMIND_CAPTURE=false is the way to keep a sensitive session out of the sessions table entirely. A stale procedure is removed by deleting the SKILL.md or reverting the commit. The session history stays for audit.
How teams should approach this
- Start with one workspace per vertical via
HIVEMIND_WORKSPACE_ID. - Run capture for two to four weeks before reviewing the
SKILL.mdfiles that the background worker has written. - Treat AOPs as living artifacts. Remove stale ones the same way you'd close a stale runbook.
- Use the
sessionstable as the audit layer. AOPs change; the session history is durable.
FAQ
Is "agent operating procedure" the same thing as a skill?
Effectively yes in the Hivemind data model. The Decagon term emphasizes the procedural shape; in Hivemind the implementation is a SKILL.md file. We use the terms interchangeably in our docs.
Do AOPs replace static rules entirely? No. Compliance rules, hard guardrails, and safety policies remain static. AOPs are for the procedural behavior between the guardrails.
Can I import existing runbooks as AOPs?
Yes. A hand-written runbook can be added as a SKILL.md in the workspace's <project>/.claude/skills/ tree alongside the codified ones. They look identical to the runtime.
What does Decagon do differently? Decagon productized this loop end-to-end for the support vertical with their own agent runtime. Hivemind ships the loop as a horizontal platform that any vertical can adopt across Claude Code, Cursor, Codex, and other supported assistants.
Citations
- Decagon on agent operating procedures
- 2026 Claude Skills empirical vulnerability study (26.1%)
- Deeplake Hivemind
Hivemind: shared memory for agent teams
Related
- Decagon-style customer support learning(Verticals · Support)
- Turning agent traces into reusable skills(Trace-to-Skill · Workflow)
- From trajectories to a skill-library platform(Trace-to-Skill · Workflow)
- Why the agent dutifully ignores your rules(Concepts · Rules)