Skip to main content

Module template

Module template 

Source
Expand description

Agent template system for reusable, composable agent configurations.

Three layers, each independently useful:

  • Templates: Bundled agent presets (template = "coder")
  • Skills: Auto-injected domain expertise (skills = ["rust-expert"])
  • Variables: Prompt variable substitution ({agent_name}, custom vars)

Resolution happens at the config boundary (before agent construction). All downstream code sees a fully materialized AgentConfig.

Modules§

registry
Built-in agent template registry — maps template names to base configurations.
skills
Built-in agent skill fragments — short prompt blocks injected via skills = ["rust-expert"].
variables
Prompt variable substitution — replaces {variable} placeholders in system prompts.

Structs§

AgentTemplate
A bundled or user-defined agent template.
PartialAgentConfig
A partial agent config where all fields are optional. Used for template defaults that can be overridden by user config.
TemplateMeta
Template metadata.

Functions§

resolve_agent_config
Resolve an AgentConfig that may reference a template and/or skills into a fully materialized config with no template references.