Skip to main content

base_agent_builder

Function base_agent_builder 

Source
pub fn base_agent_builder(llm_client: Arc<dyn LlmClient>) -> AgentBuilder
Expand description

Returns an AgentBuilder with sensible defaults:

  • English
  • Medium reasoning effort
  • Thinking enabled
  • Consecutive failure recovery (default 3 retries)
  • Session limits (50 sessions / 100 turns per session / 50k per-message cap)
  • Per-run react-loop cap (200 iterations for one user input)
  • LLM-based context compression for long tool-heavy conversations

Callers are responsible for: registering tools, setting the approval handler, setting the system prompt, then calling .build().