Expand description
Agents: reusable configurations of the generation loop.
Agent is the abstraction; ToolLoopAgent is the built-in
implementation that delegates to generate_text and stream_text.
Applications may implement Agent themselves to combine models or
add planning logic; an agent can also serve as the executor of a tool
(sub-agent pattern), typically returning GenerateTextResult::text()
as the tool output.
Structs§
- Agent
Call - Parameters of one agent call.
- Agent
Stream Call - Parameters of one streaming agent call.
- Prepare
Call Input - Input of
PrepareCall. - Prepared
Call - The effective settings of one call, as seen by
PrepareCall. - Tool
Loop Agent - An agent that runs the tool loop of
generate_text/stream_textwith fixed settings. Build withToolLoopAgent::builder. - Tool
Loop Agent Builder - Builder for
ToolLoopAgent. Besides the methods below it accepts every call setting ofgenerate_text(prompt-independent ones).
Enums§
- Agent
Input - What the agent is asked about.
Constants§
- AGENT_
USER_ AGENT - User-Agent product appended to agent requests.
Traits§
- Agent
- An agent: a model plus configuration that answers prompts, possibly over several tool-calling steps.
- Prepare
Call - Rewrites the settings of a call from its options (templated instructions, per-tenant tools, …).