Portal Community

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

PropertyValueNotes
StorageSQL Server (Octopus_Procedures table)Managed by SqlServerPlugin
LifetimePersistent until deactivatedSoft-delete via IsActive = false
ScopeAgent-level or shared across agentsTenantId + optional AgentId scope
MatchingRegex pattern first, embedding fallbackFast + intelligent matching
ApprovalConfigurable approval workflowAgent-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

1
Regex Pattern Match User message tested against all active procedure trigger patterns. Fast — no LLM call needed.
2
Embedding Fallback If no regex match, embed the message and compare cosine similarity against procedure embeddings.
3
Best Match Selected The highest-confidence procedure is selected. Multiple matches: highest similarity wins.
4
Injected into Working Memory Matched procedure steps are formatted and injected between system prompt and retrieved knowledge.

Procedure vs. Tool

AspectProcedureTool
What it isStored step-by-step instructions in SQLRegistered executable function (MCP)
Who defines itAdmin or agent learningDeveloper (code)
LLM sees it asContext injection in working memoryAvailable function in tool schema
ExecutionLLM follows steps using available toolsLLM calls the function; runtime executes it
Full Guide

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.