Skip to main content

Module agent

Module agent 

Source

Structs§

AgentConfig
Configuration for an agent, loaded from a TOML file.
AgentInfo
Metadata about a discovered agent.
BudgetConfig
Budget configuration. max_tokens is passed to chain() for enforcement.

Enums§

AgentSource
Where an agent was found.

Functions§

discover_agents
Discover agents from global and optional local directories.
resolve_agent
Resolve an agent by name: find it, load its config, return both.
resolve_agent_budget
Extract the budget (max_tokens) from an agent config, if set.
resolve_agent_model
Resolve the model for an agent run: config.model if set, else the client’s default.
resolve_agent_retry
Resolve the retry config: CLI arg > agent TOML > client default.
resolve_agent_system
Resolve the system prompt: arg > config.system_prompt > None. Mirrors the CLI precedence at llm-cli/src/commands/agent.rs.
resolve_agent_tools
Filter an agent’s tool whitelist against the set of tools registered on the host. Returns a Vec<Tool> in the order the agent requested them. Errors with the exact CLI message if any name is unknown.