Skip to main content
These methods add runs to annotation queues, share runs publicly, and create feedback. For deprecation dates, minimum SDK versions, and the agent prompt that applies to every method, see Migrate to SmithDB-backed SDK methods.

Annotation queues: add runs

Add runs to an annotation queue. The SmithDB-backed path takes each run’s full lookup key—its ID plus the session_id (project UUID) and start_time partition keys—so the run can be located directly instead of scanned for.
This method stays on the existing client, not the new runs v2 client, so the Exceptions table does not apply—error handling is unchanged.

Main changes

Method name

No change—client.add_runs_to_annotation_queue(). The SmithDB path is selected by the parameters you pass (see Inputs below).See the reference for the full parameter list.

Inputs

The SmithDB path needs each run’s session_id (project UUID) and start_time in addition to its run_id. These are already present on the run objects you fetch (for example from client.list_runs()).
Provide exactly one of runs or run_ids; passing both raises a LangSmithUserError.

Response

No change. Both run_ids= and runs= return None.

Examples

Add runs to a queue

run_ids= takes a plain list of run IDs. runs= takes each run’s full lookup key—read run_id, session_id, and start_time off the run objects you already have.
Before

Share and read public runs

Share a trace, remove its public access, or read the runs in a publicly shared trace. The v2 methods use explicit SmithDB coordinates and return select-driven run objects. Public read methods do not require a LangSmith API key. Treat the share token as a secret because anyone with the token can read the shared trace.

Main changes

Method names

The v2 resource methods are async. Call them with await.

Share and unshare parameters

  • runs.share.create takes the run ID as its positional argument. Pass session_id (the tracing project UUID) and trace_id (the root trace UUID).
  • runs.share.delete takes the root trace ID, not an arbitrary child run ID. Pass the tracing project UUID as session_id.
  • share_id is removed. The server generates the share token.
Although generated parameter types may mark these coordinates as optional, provide session_id and trace_id when sharing, and provide session_id when unsharing. SmithDB uses these coordinates for the lookup.

Public read parameters

  • public.runs.query takes the share token and a selects list. The token scopes the query to the complete shared trace. The legacy run-ID filter and cursor response are removed.
  • public.runs.retrieve requires the run ID, share token, exact run start_time, and a selects list. Obtain the exact stored start time from public.runs.query.
  • The public point read returns only selected fields. Use ID, NAME, RUN_TYPE, STATUS, and START_TIME for the examples below.
  • To retrieve the public URL for an authenticated run, call runs.retrieve with selects=["SHARE_URL"], then read run.share_url. Supplying start_time gives SmithDB the most efficient lookup.
Do not construct the public URL from the API origin. Retrieving share_url uses the deployment’s configured application origin and works for both Cloud and self-hosted deployments.

Responses

Examples

The examples query the public trace before the point read because public.runs.retrieve requires the run’s exact stored start_time.

Feedback: create

Create feedback (a score, correction, or comment) for a run.

Main changes

Required parameter

The method name and endpoint are unchanged. Only the session (project) ID requirement changes.
create_feedback now requires session_id, the UUID of the project (session) that owns the run. It was previously optional.

Examples

Provide session_id when creating feedback

create_feedback now requires session_id in addition to run_id.
Before

See also