Skip to main content

Module agent_builder

Module agent_builder 

Source
Expand description

Agent builder — constructs a runnable agent from a ManagedAgentDef.

The build_agent function is the bridge between the declarative agent definition and the live LlmAgent that the session loop drives. It wires:

  • Model (Arc<dyn Llm>) + system prompt → LlmAgentBuilder
  • Built-in tool declarations → in-process tool implementations
  • Custom tools → ManagedCustomTool wrappers (park via ToolParkingLot)
  • Permission policy → ToolConfirmationPolicy
  • Description → agent description

MCP servers and skills are noted but their full integration is deferred to later tasks (MCP toolset lifecycle, skill injection).

Structs§

ManagedBuiltinTool
Built-in tool for server-side execution (bash, filesystem, web_search, etc.).
ManagedCustomTool
Wrapper for custom (client-executed) tools declared in a ManagedAgentDef.

Enums§

BuildError
Errors that can occur during agent construction.

Functions§

build_agent
Build a runnable agent from a ManagedAgentDef and a resolved model.