Availability
Agent Call Tracing is available from Tyk AI Studio 2.3.0.
Turn on tracing on AI Studio and on each Edge Gateway, then select which content AI Studio captures. For how tracing works, refer to Agent Call Tracing.
Prerequisites
- To change the tracing settings of Apps, LLMs, tools, and datasources, your role has the
traces:writepermission.
Configure AI Studio
-
Set these environment variables on the AI Studio server:
If you do not set
AGENT_TRACING_KEY, AI Studio usesTYK_AI_SECRET_KEY. If neither is set, tracing does not start. - Restart AI Studio.
- In the admin console, select Agent sessions in the sidebar. If tracing does not run, the page shows “Agent Call Tracing is not running”.

Rotate the Root Key
AI Studio derives two keys from the root key. One key creates the fingerprints and the correlation index. The other key encrypts the captured content with AES-256-GCM. To rotate the root key:- Set the new value in
AGENT_TRACING_KEY. - Move the old value to
AGENT_TRACING_KEY_PREVIOUS. AI Studio supports one previous key only. - Restart AI Studio.
Configure Edge Gateways
An Edge Gateway captures traffic only when all these conditions are true:- The Edge Gateway is an Enterprise build with a valid license.
- The Edge Gateway is connected to AI Studio.
- The Edge Gateway has its analytics pulse.
AGENT_TRACING_ENABLED=trueis set.- Tracing runs on AI Studio. The Edge Gateway gets the content settings and the fingerprint key from AI Studio in the configuration sync.
EDGE_TLS_ENABLED=false or EDGE_SKIP_TLS_VERIFY=true, the Edge Gateway sends metadata only and logs a warning at start. Its spans then have the attribute tyk.content.withheld=edge_link_unverified_tls. Refer to TLS.
For the tracing variables of an Edge Gateway, refer to the Edge Gateway environment variables.
Capture Content for All Apps
AI Studio captures no prompt or response content until you raise the content mode.- Set
AGENT_TRACING_CONTENT_CEILINGtoredactedorfull. - Set
AGENT_TRACING_CONTENT_DEFAULT_MODEto the same mode or a lower mode. - Restart AI Studio.

Turn Tracing Off for One App
- Open the App and expand the Tracing section.
- Set Tracing to Off.
- Save the App.

App Settings
Open an App and expand Tracing. A field that is set to Inherit uses the global value.LLM, Tool, and Datasource Settings
Each LLM, tool, and datasource has a Tracing section:- Maximum content mode: The highest mode that AI Studio captures of calls to this resource, for all Apps.
- Don’t send trace context to this provider: LLMs only. The gateway does not send
traceparent,tracestate, or baggage to this LLM. This setting also works in Community Edition.
