Clarify workflow span criteria and add reference scenarios for langchain and openai agents - #354
Open
lmolkova wants to merge 15 commits into
Open
Clarify workflow span criteria and add reference scenarios for langchain and openai agents#354lmolkova wants to merge 15 commits into
lmolkova wants to merge 15 commits into
Conversation
…ain and openai agents
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the GenAI semantic conventions guidance around when to emit an invoke_workflow span (vs invoke_agent), and extends the Python reference scenarios so the workflow span is demonstrated for additional frameworks (LangGraph/LangChain and OpenAI Agents). Regenerates scenario data.json and updates the aggregated reference coverage reports/index accordingly.
Changes:
- Refines
invoke_workflowspan criteria text in the model (and corresponding generated docs) with clearer framework-oriented guidance and concrete examples. - Adds new workflow-span reference runs to the OpenAI Agents and LangChain scenarios, including
invoke_workflowattribute emission and updateddata.json. - Updates reference reports and the reference README index to include the newly supporting libraries for
invoke_workflow(and related span coverage).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| reference/scenarios/openai-agents/scenario.py | Adds a workflow-run example that emits an invoke_workflow span and attributes for OpenAI Agents. |
| reference/scenarios/openai-agents/data.json | Records observed invoke_workflow attribute coverage for the OpenAI Agents scenario. |
| reference/scenarios/langchain/scenario.py | Adds a LangGraph workflow-run example emitting an invoke_workflow span and introduces a tool span example. |
| reference/scenarios/langchain/data.json | Records observed invoke_workflow / execute_tool attribute coverage for the LangChain scenario. |
| reference/reports/invoke-workflow-span.md | Updates workflow span coverage report to include LangChain and OpenAI Agents. |
| reference/reports/execute-tool-span.md | Updates execute_tool coverage report to include LangChain among supporting libraries (but needs a correction noted in review). |
| reference/README.md | Updates the reference report index tables to include LangChain/OpenAI Agents for workflow/tool spans. |
| model/gen-ai/spans.yaml | Refines the invoke_workflow span guidance and examples in the semantic conventions model. |
| docs/gen-ai/gen-ai-agent-spans.md | Mirrors the updated invoke_workflow guidance in the generated docs page. |
Pull request dashboard statusWaiting on maintainers · refreshed 2026-08-10 14:02 UTC Merge when ready. Status above doesn't look right?
|
RKest
approved these changes
Jul 6, 2026
RKest
approved these changes
Jul 6, 2026
3 tasks
trask
approved these changes
Jul 31, 2026
trask
left a comment
Member
There was a problem hiding this comment.
Lightly filtered AI-generated feedback — push back freely
# Conflicts: # reference/scenarios/langchain/scenario.py
# Conflicts: # docs/gen-ai/gen-ai-agent-spans.md # docs/registry/attributes/gen-ai.md # reference/reports/invoke-workflow-span.md
aabmass
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fun fact:
Code like this in OpenAI Agents (and similar on with ADK)
Produces traces like this:
Where agent A and agent B are siblings.
In the future, OpenAI and ADK can document additional heuristics (e.g. if runner.run is called with a single agent, no agents-as-tools, no sub-agents, no handoff agents, etc).
Motivation
It's not clear today who and when should produce workflow spans. It's also not clear what should be used as a workflow name, resulting in static types like
StateGraphbeing used that talk about the implementation details and topology rather than anything about application and its workflows.Checklist
changelog.d/for any change to the conventions that a consumer would care about. Editorial changes (typos, pure rewording, repo tooling) don't need an entry.See [CONTRIBUTING.md]