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

  1. Organize by purpose: Create separate files for different aspects (general, domain-specific, compliance, etc.)

  2. Use meaningful IDs: Each playbook must have a unique ID

  3. Structure content logically: Use headers, lists, and quotes to organize information

  4. Keep blocks focused: Each block should contain a single concept or instruction

  5. Document placeholders: Comment which parameters your playbooks expect

  6. Test thoroughly: Verify that all placeholders are being populated correctly

Example Structure

Platform Integration

When using the Minded platform:

  1. Playbooks are editable through the web interface using a rich text editor

  2. Changes are synchronized with your Git repository

  3. The platform uses the same EditorJS blocks format

  4. Local YAML files are automatically converted to the blocks format

  5. 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