Agent Presets
Agent presets let spawn_agent run sub-agents with role-specific configuration.
Use them to control model cost, tool access, session visibility, and behavior.
Quick Start
[agents.presets.researcher]
identity.name = "scout"
identity.emoji = "🔍"
identity.theme = "thorough and methodical"
model = "anthropic/claude-haiku-3-5-20241022"
tools.allow = ["read_file", "glob", "grep", "web_search", "web_fetch"]
tools.deny = ["exec", "write_file"]
system_prompt_suffix = "Gather facts and report clearly."
[agents.presets.coordinator]
identity.name = "orchestrator"
delegate_only = true
tools.allow = ["spawn_agent", "sessions_list", "sessions_history", "sessions_send", "task_list"]
sessions.can_send = true
Then call spawn_agent with a preset:
{
"task": "Find all auth-related code paths",
"preset": "researcher"
}
Config Fields
Top-level:
[agents] default_preset(optional preset name)[agents] presets(map of named presets)
Per preset ([agents.presets.<name>]):
identity.name,identity.emoji,identity.thememodeltools.allow,tools.denysystem_prompt_suffixmax_iterations,timeout_secssessions.*access policymemory.scope,memory.max_linesdelegate_only
Tool Policy Behavior
- If
tools.allowis empty, all tools start as allowed. - If
tools.allowis non-empty, only those tools are allowed. tools.denyis applied after allow-list filtering.- For normal sub-agents,
spawn_agentis always removed to avoid recursive runaway spawning. - For
delegate_only = true, the registry is restricted to delegation/session tools:spawn_agent,sessions_list,sessions_history,sessions_send,task_list.
Session Access Policy
sessions policy controls what a preset can see/send across sessions:
key_prefix: optional session-key prefix filterallowed_keys: explicit allow-listcan_send: allow/disallowsessions_sendcross_agent: permit cross-agent session access
See Session Tools for full details.
Per-Agent Memory
Each preset can have persistent memory loaded from a MEMORY.md file at spawn
time. The memory content is injected into the sub-agent system prompt.
memory.scopedetermines where the file is stored:user(default):~/.moltis/agent-memory/<preset>/MEMORY.mdproject:.moltis/agent-memory/<preset>/MEMORY.mdlocal:.moltis/agent-memory-local/<preset>/MEMORY.md
memory.max_lineslimits how much is injected (default: 200).
The directory is created automatically so agents can write to it.
[agents.presets.researcher.memory]
scope = "project"
max_lines = 100
Model Selection Order
When spawn_agent runs, model choice is:
- Explicit
modelparameter in tool call - Preset
model - Parent/default provider model
Markdown Agent Definitions
Presets can also be defined as markdown files with YAML frontmatter, discovered from:
~/.moltis/agents/*.md(user-global).moltis/agents/*.md(project-local)
Project-local files override user-global files with the same name.
TOML presets always take precedence over markdown definitions.
Example ~/.moltis/agents/reviewer.md:
---
name: reviewer
tools: Read, Grep, Glob
model: sonnet
emoji: 🔍
theme: focused and efficient
max_iterations: 20
timeout_secs: 60
---
You are a code reviewer. Focus on correctness and security.
Frontmatter fields: name (required), tools, deny_tools, model, emoji,
theme, delegate_only, max_iterations, timeout_secs.
The markdown body becomes system_prompt_suffix.