feat(weave): first-class sdk feedback for agent spans + turns#7543
Draft
andrewtruong wants to merge 1 commit into
Draft
feat(weave): first-class sdk feedback for agent spans + turns#7543andrewtruong wants to merge 1 commit into
andrewtruong wants to merge 1 commit into
Conversation
(cherry picked from commit bf21329)
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
Enables attaching feedback to Agent-view traces after the fact via the SDK — the gap a user hit where classic
call.feedback.add_reaction()/add_note()worked for traditional traces, but there was no clean path for agent spans/turns, andadd_reactionon an agent ref wrotewandb.reaction.1, which the Agent view ignores.client.get_agent_span_feedback(span_id)/get_agent_turn_feedback(trace_id)/get_agent_conversation_feedback(conversation_id), each returning aRefFeedbackQuery— no more hand-buildingweave:///.../agent_span/...URIs or rawFeedbackCreateReq.add_reaction()on an agent ref now writeswandb.agent_user_feedbackwithscorer_tags(the shape the Agent UI thumbs render). Call/object refs are unchanged (stillwandb.reaction.1).Test plan
pytest tests/trace/test_client_feedback.py --trace-server=fake→ all green (no Docker locally; the fake backend mirrors ClickHouse at the interface level, and feat(weave): first-class sdk feedback for agent spans + turns #7524's CI validated both backends).ruff checkon the changed files → clean.mypy 1.19.1(pinned to the pre-commit rev) on the changed source → introduces no new type errors.