Skip to content

Index

diapason.templates

Agent template system — pre-configured agent manifests.

AgentTemplate dataclass

A pre-configured agent manifest loaded from a TOML template.

discover_templates(extra_dirs=None)

Discover and load all agent templates from known directories.

Search order: 1. Built-in templates shipped with the package (templates/data/). 2. User templates at ~/.diapason/templates/agents/. 3. Any additional directories supplied via extra_dirs.

Returns a list of :class:AgentTemplate instances sorted by name.

load_template(path)

Load an agent template from a TOML file.

Expected format::

[template]
name = "code-reviewer"
description = "Reviews code for bugs, style, and best practices"

[agent]
type = "native_react"
max_turns = 8
temperature = 0.3
tools = ["file_read", "think"]
system_prompt = """You are a code reviewer..."""

Raises:

Type Description
FileNotFoundError

If path does not exist.