Expand description
Multi-turn tool coordinator — data types and runtime.
Provides a provider-agnostic orchestration layer for agent tool-calling loops: send a prompt with tool definitions, handle tool call requests, execute tools, feed results back, repeat until the model produces a final response or hits an iteration cap.
Types reused from crate::agent:
ToolCallRequest— what the model asks forToolCallRecord— what actually happenedTokenUsage— accumulated counts
Types defined here:
ToolCallingConfig— iteration / parallelism / timeout knobsFinishReason— why the session endedRole— re-exported fromcrate::agent(system/user/assistant/tool)ConversationMessage— a single turn in the historyCoordinatorResult— everything the caller gets backToolCoordinator— the runtime that drives the LLM+tool loop
§Design notes
ToolCallRecordis reused fromcrate::agentrather than duplicated. Failed tool calls land inresultas a{"error": "..."}JSON object withsuccess: false, matching pawan’s existing agent loop — there’s no separateerrorfield on the record.ConversationMessage::tool_call_idis only populated onRole::Toolturns and links the result back to the assistant message that requested it.
Re-exports§
pub use types::*;
Modules§
- types
- Coordinator wire types — ToolCallingConfig, FinishReason, ConversationMessage, CoordinatorResult
Structs§
- Tool
Coordinator - Runtime that drives the LLM + tool-calling loop.