Create an agent once before sending traces. Use agent addressing to select its identifier and environment. If an integration requires
project_name, use the selected environment’s tracer_session_name.Use create_feedback() / createFeedback
Child runs
You can attach user feedback to any child run of a trace, not just the trace (root run) itself.
This is useful for critiquing specific steps of the agent, such as the retrieval step or generation step of a RAG pipeline.
createFeedback call shape, assuming a runId is already available from your agent.
session_id from an agent address requires self-hosted LangSmith v0.18 or later and langsmith>=0.14.9 (Python) or langsmith@>=0.11.0 (TypeScript). It is not yet supported on BYOC data planes. For details, see Resolve an agent environment.
You can even log feedback for in-progress runs using create_feedback() / createFeedback. See Access the current run (span) within a traced function for how to get the run ID of an in-progress run.
Collect feedback from a user interface
If you need to collect feedback from a browser or other client-side environment without exposing your API key, use presigned feedback tokens. These generate a URL scoped to a specific run and feedback key that clients can call directly. See Collect feedback with presigned URLs for the full guide. To learn more about how to filter traces based on various attributes, including user feedback, see Filter traces.Connect these docs to your agent of choice via MCP for real-time answers.

