Procedures
Procedures are step-by-step instructions that AI agents can follow to complete complex tasks. They create a framework for solving problems in a consistent manner while enabling continuous improvement through analysis and adaptation. Procedures are a guideline, if they don't work the agent can adapt to the situation.
Core Concepts
A procedure is a flowchart-style guide that an agent can follow to complete a task. Each procedure is stored in its own directory and contains files that separate different concerns:
- Discovery: Quick identification of relevant procedures
- Execution: Clear steps and dependencies
- Analysis: Understanding of effectiveness and issues
- Evolution: Natural path to optimization and training
Directory Structure
procedures/
└── example_procedure/
├── description.md # Quick discovery info
├── procedure.md # Main procedure flow
├── reasoning.md # Analysis and rationale
├── history/ # Usage records
│ └── 20250106_131420_405/
│ ├── iteration_20250106_131423_051.xml
│ └── iteration_20250106_131424_226.xml
└── training/ # Optional training data
├── short_description_of_goal
│ ├── iteration_20250106_131423_051.xml
│ └── iteration_20250106_131424_226.xml
└── another_goal
└── ...
File Purposes
description.md
Contains a short description and keywords that help agents find relevant procedures. This file should be quick to read and clearly indicate the procedure's purpose and applicability.
Send an email using the users email account.
- communication
- gmail
procedure.md
The main file loaded when executing the procedure. Contains:
- Mermaid diagram showing the procedure flow
- Referenced procedures
- Prerequisites for execution
# Sending an Email
## Referenced Procedures
- web usage (ITB)
- managing user information
## Prerequisites
- If the email requires attachements, these should be available as files in the SIA filesystem
## Flow
```mermaid
...
```
reasoning.md
Documents why the procedure works the way it does. Contains:
- Design rationale
- History of uses and outcomes
- Notes about successful and failed executions
- Analysis of issues and improvements
New analysis is appended after each use of the procedure.
history/
Contains timestamped directories for each use of the procedure. The timestamp comes from the ID of the script that loads the procedure.md file.
Usage Flow
Discovery
When an agent needs to complete a task:
- Search through description.md files
- Match keywords to task requirements
- Identify relevant procedures
Execution
Once a procedure is selected:
- Load procedure.md for execution
- Follow the flowchart
- Copy iterations to new history subdirectory
- Analyze execution success and issues
- Append findings to reasoning.md
Optimization
During idle time:
- Review procedure usage patterns
- Identify improvement opportunities
- Generate training data if appropriate
- Update procedure flow if needed