Skip to content

feat(weave): first-class sdk feedback for agent spans + turns#7543

Draft
andrewtruong wants to merge 1 commit into
masterfrom
hatchery/armory-v2
Draft

feat(weave): first-class sdk feedback for agent spans + turns#7543
andrewtruong wants to merge 1 commit into
masterfrom
hatchery/armory-v2

Conversation

@andrewtruong

Copy link
Copy Markdown
Collaborator

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, and add_reaction on an agent ref wrote wandb.reaction.1, which the Agent view ignores.

  • Adds client.get_agent_span_feedback(span_id) / get_agent_turn_feedback(trace_id) / get_agent_conversation_feedback(conversation_id), each returning a RefFeedbackQuery — no more hand-building weave:///.../agent_span/... URIs or raw FeedbackCreateReq.
  • add_reaction() on an agent ref now writes wandb.agent_user_feedback with scorer_tags (the shape the Agent UI thumbs render). Call/object refs are unchanged (still wandb.reaction.1).

Heads-up for the reviewer: this is a git cherry-pick -x of the already-merged #7524. This branch is behind master and that patch is already present on master, so there is nothing net-new to land here. Opened as a draft for review/tracking only — close it if #7524 already covers the need.

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 check on the changed files → clean.
  • mypy 1.19.1 (pinned to the pre-commit rev) on the changed source → introduces no new type errors.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
weave/trace/feedback.py 88.88% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants