Annotation queues: add runs
Add runs to an annotation queue. The legacyPOST /api/v1/annotation-queues/{queue_id}/runs and POST /api/v1/annotation-queues/{queue_id}/runs/by-key endpoints are both deprecated. Use the annotation queue items API instead: each run is one RUN item with its ID plus the project_id (project UUID) and start_time lookup keys, so the run can be located directly instead of scanned for.
In Python and TypeScript, the items API is on the new client resources (
client.annotation_queues.items / client.annotationQueues.items), so the Exceptions table applies. On self-hosted, the items endpoints need LangSmith v0.16.14 or later.Main changes
Method name
- Python
- TypeScript
- Java
- Go
- cURL
Inputs
The request takes a list of items (up to 100 per call) instead of a list of run IDs. Each run becomes one item:extend_trace_retention is unchanged. It stays an optional query parameter and defaults to false. When omitted, adding runs does not change their retention. Set it to true to upgrade the traces of added runs from base to extended retention, as described in Data retention auto-upgrades. Thread items are not upgraded.
- Python
- TypeScript
- Java
- Go
- cURL
Response
The items API returns{"items": [...]}, one created queue item per input (id, queue_id, item_type, run_id, project_id, start_time, added_at, last_reviewed_time). Use the item id with the other items endpoints (update, delete, status). The legacy Python and TypeScript methods returned nothing.
Examples
Add runs to a queue
- Python
- TypeScript
- Java
- Go
- cURL
Build one
RUN item per run from the run objects you already have.- Before
- After
Before
Annotation queues: read runs
List and count the runs in an annotation queue. The legacyGET /api/v1/annotation-queues/{queue_id}/runs, GET /api/v1/annotation-queues/{queue_id}/run/{index}, and GET /api/v1/annotation-queues/{queue_id}/size endpoints are deprecated, as are total_size and total_archived. Use the annotation queue items API instead: list or count the items in one review status, then fetch each run with the lookup keys on its item.
In Python and TypeScript, the items API is on the new client resources (
client.annotation_queues.items / client.annotationQueues.items). The Exceptions table applies to them. On self-hosted, listing items needs LangSmith v0.16.17 or later. retrieve_placement needs v0.16.20 or later. The count endpoint needs v0.17.1 or later. No 0.16 release includes it.Main changes
Method name
- Python
- TypeScript
- Java
- Go
- cURL
page_size and the cursor from the previous page. To find an item’s position, use retrieve_placement. The method is retrievePlacement in TypeScript and Java, GetPlacement in Go, and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement in cURL. It returns the item’s review status (section), zero-based position, and a cursor for listing from that point. The cursor counts runs and threads together and ignores start-time bounds. Pass it only to a list request without item_type, min_start_time, or max_start_time.
Review status
The items API requires astatus. The legacy endpoints defaulted to needs_my_review when you omitted it.
The legacy
archived=true flag on the list endpoint also maps to archived. The items API does not accept completed.
needs_my_review and needs_others_review are relative to the caller. A personal access token returns its owner’s split. A service key returns the split for its service account, not for any human reviewer. Together they cover every item still in the queue.
For counts, the legacy totals map to:
Item type
The items API returns runs and threads. Passitem_type as RUN to list only runs, as the legacy endpoints did. The count endpoint has no item_type filter, so counts include thread items.
Response
Each item holds the run’s lookup keys (run_id, project_id, start_time) and queue metadata (id, added_at, last_reviewed_time, reserved_by, completed_by), not the run itself. To read a run’s name, inputs, or outputs, pass those keys to the run retrieve method. The list returns an opaque next_cursor for pagination. The SDKs iterate across pages for you.
The count endpoint returns {"count": <n>} instead of {"size": <n>}.
Examples
List and count runs waiting for review
- Python
- TypeScript
- Java
- Go
- cURL
The legacy Python client had no size method, so the count is new.
- Before
- After
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
- Python
- TypeScript
- Java
- Go
- cURL
The v2 resource methods are async. Call them with
await.Share and unshare parameters
- Python
- TypeScript
- cURL
runs.share.createtakes the run ID as its positional argument. Passsession_id(the tracing project UUID) andtrace_id(the root trace UUID).runs.share.deletetakes the root trace ID, not an arbitrary child run ID. Pass the tracing project UUID assession_id.share_idis removed. The server generates the share token.
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.querytakes the share token and aselectslist. The token scopes the query to the complete shared trace. The legacy run-ID filter and cursor response are removed.public.runs.retrieverequires the run ID, share token, exact runstart_time, and aselectslist. Obtain the exact stored start time frompublic.runs.query.- The public point read returns only selected fields. Use
ID,NAME,RUN_TYPE,STATUS, andSTART_TIMEfor the examples below. - To retrieve the public URL for an authenticated run, call
runs.retrievewithselects=["SHARE_URL"], then readrun.share_url. Supplyingstart_timegives SmithDB the most efficient lookup.
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 becausepublic.runs.retrieve requires the run’s exact stored start_time.
- Python
- TypeScript
- cURL
- Before
- After
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.- Python
- TypeScript
- Java
- Go
- cURL
SmithDB-only self-hosted below v0.18: also pass the run’s start time. Without it, feedback on a run that started more than a few hours ago (6 hours with the default Helm chart settings) can fail or be dropped.
Examples
Provide session_id when creating feedback
On SmithDB-only self-hosted below v0.18, also pass the run’s start time, as described in the preceding note.
- Python
- TypeScript
- Java
- Go
- cURL
create_feedback now requires session_id in addition to run_id.- Before
- After
Before
See also
Connect these docs to your agent of choice via MCP for real-time answers.

