Skip to main content
Agents retry. A tool call times out, a network hiccup drops a response, an agent loop repeats a step—and without protection, each retry starts fresh billable work. Pass an idempotency_key and Titan recognizes the repeat, returning the original run instead.

How it works

Keys are scoped to your user and the capability, so the same key used for a search and a fetch does not collide. Entries are retained for 24 hours.

Which tools accept it

titan_search, titan_fetch, titan_crawl, and titan_run_template—every tool that starts billable work. titan_get_run and titan_list_templates do not need it. They are already free and side-effect-free.

Using a key

Choose keys that identify the work, not the attempt:

Replay warnings

A deduplicated call tells you so, in warnings: Treat both as success. The work is happening or has happened—your retry did the right thing by not duplicating it.

Retrying without a key

If you did not pass a key and a call fails, decide by error code before retrying. Every error body carries a retryable boolean, so an agent can branch on it without hardcoding this table.

Do not retry a run that is still going

The most expensive mistake is treating a timeout as a failure. When a tool returns running or queued with a next_step warning, the run is alive. Re-issuing the call starts a second run for the same work, and you pay for both.

Retry with backoff

The stable idempotency_key means even if a “failed” call actually started a run, the retry joins it rather than duplicating it.

Next steps