Skip to main content

Documentation Index

Fetch the complete documentation index at: https://restate-6d46e1dc-create-pull-request-patch.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Restate automatically retries failures of your agents until they succeed. But LLM calls are costly, so you might want to configure retry behavior to fit your use case and to avoid retrying errors that cannot heal. Restate distinguishes between two types of errors:
  • Transient errors: Temporary issues like network failures or rate limits. Restate automatically retries these until they succeed or the retry policy is exhausted.
  • Terminal errors: Permanent failures like invalid input or business rule violations. Restate does not retry these. The invocation fails permanently. You can catch these errors and handle them gracefully.

Retrying LLM calls

LLM API calls can suffer from transient failures (rate limits, network issues, provider outages). Restate retries failed LLM calls so your agents recover automatically.

Default behavior

Setting a retry policy

Tool execution errors

Restate makes tool execution resilient by retrying transient errors and propagating terminal ones.

Transient errors

Setting a retry policy on run actions

Terminal errors

For errors that should not be retried (invalid input, business rule violations, resource not found), use a TerminalError in your tool. Restate does not retry these:
To learn more about error handling with Restate, consult the error handling guide.

Combining with rollback

For multi-step agent workflows where steps have side effects (bookings, payments, emails), combine terminal errors with compensation/rollback patterns to undo completed work before finishing.