You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d60a10b
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ag2): show captured content as the span's input and output
Future AGI fills a span's input and output only from input.value /
output.value. AG2 sets neither: it records chat messages, tool arguments
and results, and human input under their own keys. With
capture_content=True, a real run on CLIProxy showed every LLM and tool span
with empty input and output in Observe, though the content was on the span.
The processor now copies that content to input.value / output.value (with
a mime type) on chat, execute_tool and await_human_input spans. Content a
TraceConfig flag hides is not copied, and existing values are kept. With
capture off (the default) nothing changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: python/frameworks/ag2/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,8 @@ the processor drops whole attributes:
148
148
|`hide_input_images`, `hide_embedding_vectors`| Nothing: AG2 records only text parts (binary inputs are omitted) and no embeddings |
149
149
150
150
The text flags cannot redact just the text inside the JSON, so they remove the
151
-
whole message attribute, which is the privacy-safe choice.
151
+
whole message attribute, which is the privacy-safe choice. A removed key is
152
+
not copied to `input.value` / `output.value` either.
152
153
153
154
## Conformance
154
155
@@ -161,6 +162,7 @@ whole message attribute, which is the privacy-safe choice.
161
162
| Session | Not emitted by AG2. `session.id` from traceAI's `using_session` / `using_attributes` context, which wins over a static value; or set it yourself: `setup(..., span_attributes={"session.id": "..."})`| When neither is set |
162
163
| User, metadata, tags |`user.id`, `metadata`, `tag.tags` (and the other traceAI context keys) from `using_user` / `using_metadata` / `using_tags` / `using_attributes`; a key AG2 or `span_attributes` already set is not overridden | When the context does not set them |
163
164
| Tools |`gen_ai.tool.name`, `gen_ai.tool.call.id`, `gen_ai.tool.type`; arguments/result only with `capture_content=True`||
165
+
| Input / output |`input.value` / `output.value` (what Observe shows as a span's input and output), copied from the captured chat messages, tool arguments and result, or human input | Without `capture_content=True`, when a `TraceConfig` flag hides the source, and always on `invoke_agent` and `record_usage` spans (AG2 records no content there) |
164
166
| Errors | OTel status `ERROR` on failing tool / model / agent spans ||
0 commit comments