Retry policy at registration

agent.addTool(myTool, RetryPolicy.builder()
    .maxAttempts(3)
    .initialDelay(Duration.ofMillis(200))
    .multiplier(2.0)
    .retryOn(ToolErrorKind.TRANSIENT)
    .build());
Advertisement

Never retry non-idempotent tools blindly

Writes with side effects (send email, charge card) — retrying without an idempotency key = duplicate action. Design keys upfront.

Advertisement

Backoff shape

Exponential with jitter. Jitter prevents synchronized retry storms across many callers.