Procedural Memory
Procedural memory stores step-by-step sequences for repeatable tasks — the agent's "skill library." When a user requests a task that matches a known procedure, the agent follows the stored steps instead of reasoning from scratch on every request.
What Is Procedural Memory?
A procedure is an ordered sequence of steps that define how to accomplish a specific task type. Procedures are stored in SQL Server and matched against user intent before each LLM call. When matched, the procedure's steps are injected into working memory as a structured guide:
// Example: "Onboard New Vendor" procedure
{
"procedureId": "proc_vendor_onboard",
"name": "Onboard New Vendor",
"triggerPattern": "onboard.*vendor|add.*supplier|new.*vendor",
"steps": [
{ "order": 1, "action": "Ask for vendor company name and contact email" },
{ "order": 2, "action": "Call vendor_lookup tool to check if vendor exists" },
{ "order": 3, "action": "If not found, call create_vendor tool with collected details" },
{ "order": 4, "action": "Send welcome email via email_send tool" },
{ "order": 5, "action": "Confirm completion to the user with vendor ID" }
]
}
Key Characteristics
| Property | Value | Notes |
|---|---|---|
| Storage | SQL Server (Octopus_Procedures table) | Managed by SqlServerPlugin |
| Lifetime | Persistent until deactivated | Soft-delete via IsActive = false |
| Scope | Agent-level or shared across agents | TenantId + optional AgentId scope |
| Matching | Regex pattern first, embedding fallback | Fast + intelligent matching |
| Approval | Configurable approval workflow | Agent-learned procedures require admin approval |
Two Sources of Procedures
Admin-Defined Procedures
Written by administrators in the Skill Library UI or via API. Always approved and immediately active. Use these for well-known, stable business processes.
Agent-Learned Procedures
Captured automatically when the agent successfully completes a multi-step task. Stored in a pending state — must be reviewed and approved by an admin before becoming active.
Matching Pipeline
Procedure vs. Tool
| Aspect | Procedure | Tool |
|---|---|---|
| What it is | Stored step-by-step instructions in SQL | Registered executable function (MCP) |
| Who defines it | Admin or agent learning | Developer (code) |
| LLM sees it as | Context injection in working memory | Available function in tool schema |
| Execution | LLM follows steps using available tools | LLM calls the function; runtime executes it |
This is a summary page. The Procedural Memory full guide covers procedure capture, SQL storage schema, recall and matching algorithms, step execution with parameter substitution, the Skill Library UI, editing and versioning, and procedure scope levels.