Skip to main content

Module agents

Module agents 

Source
Expand description

Agent configuration loading.

Why: Sub-agents are defined declaratively in TOML files under .claude/agents/ so model, prompt, and parameters can evolve without code changes. What: AgentConfig, AgentInfo, LlmParams, SystemPrompt, ToolsConfig, RunnerConfig, RunnerKind, discover_agents, load_all_agents. Test: agents::tests::*. Agent configuration loading and types for tcode.

Why: Sub-agents (and the PM itself) are defined declaratively in TOML files under .claude/agents/ so model, prompt, and LLM parameters can evolve without code changes. This module is the assembly point for config types and the discovery helpers. What: Re-exports AgentConfig and all nested config types from config; provides discover_agents for scanning an agents directory. Test: discover_agents tests place TOML files in a tempdir and verify the returned list. AgentConfig::load tests read individual files.

Re-exports§

pub use config::AgentConfig;
pub use config::AgentInfo;
pub use config::LlmParams;
pub use config::RunnerConfig;
pub use config::RunnerKind;
pub use config::SystemPrompt;
pub use config::ToolsConfig;

Modules§

config
Agent configuration schema for tcode.

Functions§

discover_agents
Discover all agent configs in the given directory.
load_all_agents
Load all agent configs from the given directory, skipping parse errors.
locate_agents_dir
Locate the agents directory for the given project root.