Why it matters
Real-world tools have varied timing. Understanding advanced patterns enables realistic integrations.
Advertisement
The architecture
LongRunningFunctionTool: for tools taking significant time. Returns handle; agent polls or gets callback.
Async tools: CompletableFuture returns. Agent await.
Advertisement
How it works end to end
Streaming: tool emits partial results. Framework marshals into agent context.
Cancellation: user or agent may cancel. Tool must support graceful stop.
Retries: framework-level retry policy for transient failures.