Pattern includes interactive terminal UI builders for creating and editing agents and groups. These builders provide a guided experience with live configuration previews, section-based editing, and multiple save options.
# Create a new agent interactively
pattern agent create
# Edit an existing agent
pattern agent edit MyAgent
# Create a new group interactively
pattern group create
# Edit an existing group
pattern group edit MyGroup
# Load from TOML template
pattern agent create --from template.toml
pattern group create --from template.tomlBoth builders follow the same interaction pattern:
- Summary Display: Shows a formatted overview of the current configuration
- Section Menu: Choose which section to edit, or finish/cancel
- Section Editor: Interactive prompts to modify that section's values
- Repeat: After each section edit, returns to the summary view
- Save Options: When done, choose where to save (database, file, both, or preview)
- Use arrow keys or number keys to select menu options
- Press Enter to confirm selections
- Type values directly when prompted
- Use
@filepathsyntax to link to external files (e.g.,@./prompts/system.md) - Empty input typically means "keep current value"
- Name: Agent identifier (required)
- System Prompt: Core instructions, either inline or
@path/to/file.md - Persona: Agent personality/character description
- Instructions: Additional operational guidelines
- Provider: anthropic, openai, gemini, or ollama
- Model Name: Specific model (e.g., claude-sonnet-4-20250514, gpt-4o)
- Temperature: Response creativity (0.0-1.0)
Manage agent's memory:
- Add: Create new memory blocks
- Edit: Modify existing blocks
- Remove: Delete blocks
- Edit as TOML: View TOML representation (preview)
Block properties:
- Label: Identifier for the block (e.g., "human", "persona", "notes")
- Content: Text content or
@pathto file - Permission: read_only, read_write, append, partner, human, admin
- Type: core (always in context), working (swappable), archival (searchable)
- Shared: Whether other agents can access this block
- Tools: Multi-select from available tools (block, recall, search, send_message, web, file, calculator, etc.)
- Rules: Add workflow rules for tool execution:
- ContinueLoop: Tool continues conversation loop
- ExitLoop: Tool ends conversation when called
- StartConstraint: Tool must be called first
- MaxCalls: Limit how many times tool can be called
- Cooldown: Minimum time between calls
- RequiresPreceding: Tool requires other tools to be called first
- Max Messages: Limit messages in context window
- Enable Thinking: Turn on reasoning/thinking mode
Configure event-driven data inputs:
- Bluesky: Jetstream firehose subscriptions
- Discord: Channel monitoring
- File: File system watching
- Custom: Custom source configuration
- Bluesky Handle: Link agent to a Bluesky identity
╭──────────────────────────────────────╮
│ Agent: MyAssistant │
├──────────────────────────────────────┤
│ ─ Basic Info ─ │
│ Name MyAssistant │
│ System (from file: prompt.md) │
│ Persona (none) │
│ Instructions (none) │
│ │
│ ─ Model ─ │
│ Provider anthropic │
│ Model claude-sonnet-4-20250514│
│ Temperature (default) │
│ │
│ ─ Memory Blocks (2) ─ │
│ • human [read_write] User prefere… │
│ • persona [read_only] I am a help… │
│ │
│ ─ Tools (4) ─ │
│ block, recall, search, send_message │
╰──────────────────────────────────────╯
? What would you like to change?
❯ Basic Info
Model
Memory Blocks
Tools & Rules
Context Options
Data Sources
Integrations
Done - Save
Cancel
- Name: Group identifier (required)
- Description: What this group does (required)
- round_robin: Agents take turns in order
- Skip unavailable: Whether to skip inactive agents
- supervisor: One agent leads and delegates
- Leader: Which agent is the supervisor
- pipeline: Sequential processing through stages
- Stages: Ordered list of agents
- dynamic: Context-based agent selection
- Selector: random, capability, load_balancing
- sleeptime: Background monitoring
- Check interval: Seconds between checks
- Intervention agent: Who acts on triggers
- Triggers: Conditions for intervention
Manage group membership:
- Add: Add an agent to the group
- Edit: Change member role/capabilities
- Remove: Remove member from group
Member properties:
- Name: Agent name (must exist in database)
- Role: regular, supervisor, observer, or specialist (with domain)
- Capabilities: Tags for capability-based routing
Memory blocks accessible to all group members:
- Same editing interface as agent memory blocks
- Content automatically shared with all members
- Permission controls per-block access level
Configure event sources for the group:
- Same options as agent data sources
- Events are routed through the coordination pattern
╭──────────────────────────────────────╮
│ Group: Support Team │
├──────────────────────────────────────┤
│ ─ Basic Info ─ │
│ Name Support Team │
│ Description Primary support group │
│ │
│ ─ Pattern ─ │
│ Type Dynamic (selector: cap… │
│ │
│ ─ Members (3) ─ │
│ • Pattern [supervisor] │
│ • Entropy [specialist] │
│ • Archive [regular] │
│ │
│ ─ Shared Memory (1) ─ │
│ • context [read_write] │
│ │
│ ─ Data Sources (1) ─ │
│ • bluesky [bluesky] │
╰──────────────────────────────────────╯
? What would you like to change?
❯ Basic Info
Coordination Pattern
Members
Memory Blocks
Integrations
Done - Save
Cancel
When you select "Done - Save", you'll choose where to save:
- Save to database: Writes directly to pattern_db
- Export to file: Saves as TOML file (prompts for filename)
- Both: Database and file
- Preview: Shows TOML representation without saving
- Cancel: Returns to editing
Use @ prefix to link to external files:
System prompt: @./prompts/assistant.md
Persona: @./personas/helpful.md
This keeps large prompts maintainable and version-controlled.
Builders auto-save state to ~/.cache/pattern/builder-state.toml after each section edit. If the builder crashes, the next run can potentially recover.
Create templates by exporting existing configurations:
pattern agent export MyAgent -o template.toml
# Edit template.toml
pattern agent create --from template.tomlBuilders validate configuration before saving:
- Agent: Name and model are required
- Group: Name, description, and valid pattern configuration required
- Supervisor pattern: Leader must be specified
- Pipeline pattern: At least one stage required
name = "MyAgent"
system_prompt = "You are a helpful assistant."
# Or use file reference:
# system_prompt_path = "./prompts/system.md"
persona = "I am friendly and concise."
instructions = "Always be helpful."
[model]
provider = "anthropic"
model = "claude-sonnet-4-20250514"
temperature = 0.7
tools = ["block", "recall", "search", "send_message"]
[[tool_rules]]
tool_name = "send_message"
rule_type = "ExitLoop"
priority = 9
[memory.human]
content = "User prefers short responses."
permission = "read_write"
memory_type = "core"
shared = false
[memory.persona]
content_path = "./personas/assistant.md"
permission = "read_only"
memory_type = "core"
[context]
max_messages = 50
enable_thinking = true
[data_sources.bluesky_mentions]
type = "bluesky"
# ... bluesky-specific configname = "Support Team"
description = "Primary support group"
[pattern]
type = "dynamic"
selector = "capability"
[[members]]
name = "Pattern"
role = "supervisor"
capabilities = ["coordination", "planning"]
[[members]]
name = "Entropy"
role = { specialist = { domain = "task_breakdown" } }
capabilities = ["analysis", "decomposition"]
[shared_memory.context]
content = "Shared context for the team."
permission = "read_write"
[data_sources.discord]
type = "discord"
# ... discord-specific config