diff --git a/modules/connect/pages/triggers/overview.adoc b/modules/connect/pages/triggers/overview.adoc index 0e66100..ad10c88 100644 --- a/modules/connect/pages/triggers/overview.adoc +++ b/modules/connect/pages/triggers/overview.adoc @@ -12,6 +12,8 @@ A trigger is a configured way for the outside world to invoke an agent. Without Each trigger is its own resource on the agent, created, edited, and disconnected on its own, so you can attach several to the same agent. For example, one agent can serve a production Teams bot and a test Teams bot side by side, each through its own trigger. +NOTE: Triggers are available for Redpanda-managed agents only. A self-managed agent runs on your own infrastructure and is invoked through it, so it has no *Triggers* tab. To bring a self-managed agent into ADP for observability and governance, see xref:connect:byoa-register.adoc[Register your own agent]. + After reading this page, you will be able to: * [ ] {learning-objective-1} diff --git a/modules/gateway/pages/connect-agent.adoc b/modules/gateway/pages/connect-agent.adoc index 1ba9721..c7ff19e 100644 --- a/modules/gateway/pages/connect-agent.adoc +++ b/modules/gateway/pages/connect-agent.adoc @@ -373,6 +373,29 @@ response = client.chat.completions.create( The provider detail page also has client guides for *Claude Code*, *Codex*, and *Gemini* (the desktop client). Open *Connect your app* on the provider's page to see the per-client setup instructions. ==== +[[group-requests-into-transcripts]] +== Group requests into transcripts + +AI Gateway groups a session's LLM calls and MCP tool calls into a single transcript using the `X-Redpanda-Genai-Conversation` request header. Stamp this header with your framework's session or thread ID, using the same value on every request in the session, and the gateway maps it to the `gen_ai.conversation.id` attribute on each span so the spans group into one conversation. + +This header is required for the agent's *Transcripts* tab to populate. Without it, the gateway drops the spans and the tab stays empty. The header doesn't affect authentication or whether requests succeed. + +Set it through your SDK's default-headers mechanism so it rides along with both the LLM call and each MCP tool call: + +[source,python] +---- +import os +from openai import OpenAI + +client = OpenAI( + base_url=os.environ["PROXY_URL"], + api_key=os.environ["AUTH_TOKEN"], + default_headers={"X-Redpanda-Genai-Conversation": session_id}, +) +---- + +Replace `session_id` with the session or thread identifier your framework already tracks, and stamp the same value on the session's MCP tool calls so the whole turn groups into one transcript. For how transcripts read this attribute, see xref:monitor:transcripts.adoc[View agent transcripts]. + == Streaming responses Streaming passes through unchanged. Use the SDK's native streaming API; the proxy forwards the stream byte-for-byte.