Skip to content

Commit d50dbde

Browse files
ref(ai-agents-sdks): Add fallback span description when there is no agent name (#16645)
Document fallback span description specification when there is no well-defined agent name.
1 parent 33d980b commit d50dbde

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

develop-docs/sdk/telemetry/traces/modules/ai-agents.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Describes AI agent invocation.
3535
Agent invocations represent operations that can include multiple model calls, or some auxiliary work that goes beyond transforming the model input and output.
3636

3737
- Span `op` SHOULD be `"gen_ai.invoke_agent"`.
38-
- Span `name` SHOULD be `"invoke_agent {gen_ai.agent.name}"`. (e.g. `"invoke_agent Weather Agent"`)
38+
- Span `name` SHOULD be `"invoke_agent {gen_ai.agent.name}"`. (e.g. `"invoke_agent Weather Agent"`) **[8]**
3939
- Attribute `gen_ai.operation.name` MUST be `"invoke_agent"`.
4040
- Attribute `gen_ai.agent.name` SHOULD be set to the agents name. (e.g. `"Weather Agent"`)
4141
- If provided, the attribute `gen_ai.request.model` MUST be the agent's default request model. (e.g. `"gpt-4o"`)
@@ -247,3 +247,8 @@ The input list should include the most recent messages up to and including the m
247247
**[7]**
248248

249249
Binary blobs in the input list should be replaced with the string `"[Blob substitute]"` in positions where binary data is expected in a given schema. Only binary blobs in positions where binary data is explicitly expected must be redacted. For example, in OpenAI Completions schema, only binary blobs in content blocks with type `image_url`, `input_audio` or `file` should be redacted.
250+
251+
**[8]**
252+
253+
In some agent libraries, the agent name is optional, and some do not provide the user an option to name their agents.
254+
In these cases, the span name SHOULD be `"invoke_agent {call_id}"`, where `call_id` is some user-provided identifier for the agent invocation. For example, `functionId` in Vercel AI.

0 commit comments

Comments
 (0)