GitHub
Memory System

Procedural Memory

Stores skills, workflows, and 'how-to' knowledge as executable graphs.

Storage: Neo4j (:Procedure, :Step, :Tool)

Purpose

Procedural Memory manages the "muscle memory" of the agent. It stores defined procedures for completing tasks (e.g., "How to deploy to production", "How to fix a bug").

Key Features

  • ACE (Agentic Constant Evolution): Procedures are not static. If a step fails, the system "reflects" and updates the graph structure to improve future performance.
  • Dependency Graphs: Steps can have explicit dependencies and conditional branching.

Functional Deep Dive

Graph Workflows

A Procedure is defined as a graph of Step nodes. Steps can loop or branch, allowing for complex, non-linear workflows.

Agentic Execution

Each step defines which Tool or specific Agent is required to execute it. The MainOrchestrator dispatches these steps to the appropriate handler.

Self-Correction (ACE)

If a procedure fails during execution, the ProceduralManager triggers a reflection loop. It analyzes the error, modifies the step definition or tool parameters in the graph, and saves the new version for future success.

Execution & Evolution Flow

API Reference

Procedural Memory provides RESTful endpoints for managing workflows and procedures.

MethodEndpointDescription
POST/api/memory/v1/proceduresCreate a new procedure
GET/api/memory/v1/proceduresList all procedures
GET/api/memory/v1/procedures/{procedure_id}Get procedure by ID
PUT/api/memory/v1/procedures/{procedure_id}Update procedure
DELETE/api/memory/v1/procedures/{procedure_id}Delete procedure
POST/api/memory/v1/procedures/{procedure_id}/executeExecute procedure
GET/api/memory/v1/procedures/{procedure_id}/historyGet execution history

SDK Reference

The Functor SDK provides a Python interface for procedural memory operations.

Creating a Procedure

from functor_sdk import FunctorClient
client = FunctorClient(api_key="your-api-key")
# Create a procedure
procedure = client.memory.procedural.create(
procedure_id="deploy_prod",
name="Production Deployment",
steps=[
{"step_id": "1", "action": "run_tests", "tool": "pytest"},
{"step_id": "2", "action": "build", "tool": "docker"},
{"step_id": "3", "action": "deploy", "tool": "kubectl"}
],
description="Deploy application to production",
metadata={"env": "production"}
)
print(f"Created procedure: {procedure['id']}")

Executing a Procedure

# Execute procedure
result = client.memory.procedural.execute(
procedure_id="deploy_prod",
inputs={"version": "v1.2.3"},
context={"environment": "production"}
)
print(f"Execution status: {result['status']}")
print(f"Output: {result['output']}")

Managing Procedures

# List all procedures
procedures = client.memory.procedural.list()
# Get procedure
procedure = client.memory.procedural.get(procedure_id="deploy_prod")
# Get execution history
history = client.memory.procedural.get_history(
procedure_id="deploy_prod",
limit=20
)
# Update procedure
updated = client.memory.procedural.update(
procedure_id="deploy_prod",
name="Updated Deployment",
steps=[...]
)
# Delete procedure
client.memory.procedural.delete(procedure_id="deploy_prod")