Available on crate feature
agents only.Expand description
Agent implementations (LLM, Custom, Workflow agents).
Provides the core agent types:
LlmAgent- AI-powered agent using LLMsCustomAgent- Implement custom agent logicSequentialAgent- Execute agents in sequenceParallelAgent- Execute agents concurrentlyLoopAgent- Iterative execution until condition met
Available with feature: agents
Modules§
- compaction
- LLM-based event summarizer for context compaction.
- guardrails
- Guardrail integration for LlmAgent
- tool_
call_ markup - XML-based tool call markup parsing.
Structs§
- Conditional
Agent - Rule-based conditional routing agent.
- Custom
Agent - Custom
Agent Builder - Guardrail
Set Non- guardrails - Placeholder type when guardrails feature is disabled
- LlmAgent
- LlmAgent
Builder - LlmConditional
Agent - LLM-based intelligent conditional routing agent.
- LlmConditional
Agent Builder - LlmEvent
Summarizer - An LLM-based event summarizer for sliding window compaction.
- Loop
Agent - Loop agent executes sub-agents repeatedly for N iterations or until escalation
- Parallel
Agent - Parallel agent executes sub-agents concurrently
- Sequential
Agent - Sequential agent executes sub-agents once in order
Constants§
- DEFAULT_
LOOP_ MAX_ ITERATIONS - Default maximum iterations for LoopAgent when none is specified. Prevents infinite loops from consuming unbounded resources.
- DEFAULT_
MAX_ ITERATIONS - Default maximum number of LLM round-trips (iterations) before the agent stops.
- DEFAULT_
TOOL_ TIMEOUT - Default tool execution timeout (5 minutes).
Traits§
Functions§
- normalize_
content - Normalize content by converting tool call markup in text parts to FunctionCall parts.
- normalize_
option_ content - Normalize
Option<Content>by converting tool call markup.
Type Aliases§
- After
Tool Callback Full - Rich after-tool callback that receives the tool, arguments, and response.
- OnTool
Error Callback - Callback invoked when a tool execution fails (after retries are exhausted).