Execution Model

TengineAI executes tool calls with built-in reliability behavior. This page explains what happens under the hood so you know what to expect — and what your API receives.


Request IDs

Every tool call gets a unique Request ID (UUID) that TengineAI injects as X-Tengine-Request-Id in the outbound request.

Use it to:

  • Correlate tool calls with your logs
  • Deduplicate when the same logical request arrives more than once (see Retries below)
  • Debug with support by sharing the Request ID

The Request ID is stable for the lifetime of a single execution attempt. If a retry is served from cache, the same Request ID is reused.


Retries and Duplicate Prevention

Agents retry. APIs fail. TengineAI handles retries safely so they don't cause duplicate side effects.

When the model or SDK retries a tool call (e.g. after a timeout or transient error), TengineAI:

  1. Identifies the retry using the same logical request (same tool, same arguments, same session)
  2. Checks whether a previous attempt already completed successfully
  3. Returns the cached result if one exists — your API is not called again
  4. Executes a fresh call only if no prior successful result exists

Your API receives at most one real execution per logical request. Use X-Tengine-Request-Id on your side to deduplicate if you see the same ID twice (e.g. from a client retry before TengineAI responded).


Session Identity

Identity flows automatically to your API.

HeaderWhen PresentDescription
X-Tengine-Project-IdAlwaysYour TengineAI project ID
X-Tengine-Integration-IdAlwaysThe integration ID
X-Tengine-Request-IdAlwaysUUID per request
X-Tengine-TimestampAlwaysUnix seconds

When a member session is active:

HeaderWhen PresentDescription
X-Tengine-Member-IdWhen inject_member_identity.id = trueMember's external ID
X-Tengine-Member-EmailWhen inject_member_identity.email = trueMember's email
X-Tengine-Member-RolesWhen inject_member_identity.roles = trueMember's roles

Your API receives the right identity (project, member) without extra configuration. See Identity Headers in the Custom Tools reference for details.


Key Revocation Behavior

When you revoke an API key (by deleting the integration):

  • Revocation propagates instantly across all active sessions
  • Sessions using that key are invalidated automatically
  • New requests with the old key are rejected immediately

Revocation applies to subsequent requests. In-flight requests are allowed to complete. There is no grace period — revoked keys are unusable for any new request as soon as the deletion completes.


Run History

Every tool invocation is logged. You can:

  • View Run history in the dashboard for each project
  • Filter by status (Success, Error, Blocked)
  • See Run ID and Request ID for each run
  • Identify when a retry was handled automatically (original result reused)

Reliability Guarantees

  • Retries won't duplicate writes — Safe retry handling prevents duplicate side effects when the model or SDK retries
  • Tool calls are logged — Every invocation has a Run ID and appears in Run history
  • Keys revoke across sessions — Revocation takes effect immediately for all active sessions

Next Steps