Playbooks
Playbooks are reusable instructions that are automatically included in all prompt and tool nodes of your agent. They help maintain consistency and reduce repetition across your agent's behavior.
Overview
Playbooks are defined using EditorJS blocks format and support:
EditorJS blocks for rich content structure
EJS templating for dynamic content
Placeholders for runtime values
Multiple files for better organization
Platform integration for web-based editing
Configuration
Add the playbooks directory to your minded.json:
{
"playbooks": ["./src/playbooks"]
}Creating Playbooks
Create YAML files in your playbooks directory using the EditorJS blocks structure:
Block Types
Playbooks support various EditorJS block types:
Header Block
Paragraph Block
List Block
Quote Block
Code Block
Delimiter Block
Using Templates
EJS Templates
Use EJS syntax (<%= %>) for dynamic content evaluated at compile time:
Placeholders
Use placeholders for runtime values from the agent's state:
Memory placeholders ({memory.key}):
System placeholders ({system.key}):
These placeholders are automatically replaced with values from the agent's memory and system context when the playbooks are compiled.
Using Memory Values in Playbooks
Placeholders in playbooks are replaced with values from the agent's memory state:
Nested Values
Placeholders support nested object access from the memory state:
These values are resolved from nested properties in the agent's memory, for example: memory.customer.name.
Complete Example
Best Practices
Organize by purpose: Create separate files for different aspects (general, domain-specific, compliance, etc.)
Use meaningful IDs: Each playbook must have a unique ID
Structure content logically: Use headers, lists, and quotes to organize information
Keep blocks focused: Each block should contain a single concept or instruction
Document placeholders: Comment which parameters your playbooks expect
Test thoroughly: Verify that all placeholders are being populated correctly
Example Structure
Platform Integration
When using the Minded platform:
Playbooks are editable through the web interface using a rich text editor
Changes are synchronized with your Git repository
The platform uses the same EditorJS blocks format
Local YAML files are automatically converted to the blocks format
All templating features work the same in both local and platform environments
Migration from Content Format
If you have existing playbooks using the old content format, convert them to blocks:
Old format:
New format:
Last updated