opik-mcp

annotation-queues

Purpose

This feature lets an agent work with a project’s annotation queues and the custom annotator view a queue can carry: list and read queues, create one, change one, and set, replace or remove its view. It answers what a read of a queue returns when its view is large, how a view is cleared, and what happens on an Opik that predates custom views.

What it does now

Listing and reading

list('annotation_queue', project_id=… | project_name=…) returns one page of the project’s queues. Project scope is required, as on the queue pages of the Opik UI.

read('annotation_queue', id_or_name) returns the queue with a link to its page under the project, and annotator_url, the page annotators work it on (/{workspace}/sme?queueId={id}).

list('trace' | 'thread', filters='annotation_queue_ids contains "<id>"') lists a queue’s items. That filter names a parent, so the source = "sdk" default is not added: a queue also holds playground and experiment traces.

Writing

There is no delete, for queues or their items, and no way to add items yet.

Authoring a view

The opik-annotate skill holds the workflow: read the queue, sample real items, write the view, save it, check it in the queue’s Edit dialog under Annotator view, Preview. Its references/kit-v1.md is a verbatim copy of the kit reference in opik’s frontend, the only API a view can use.

How it works

read / list  -> read_list/entities/annotation_queue.py  -> client/annotation_queue.py
write        -> writes/registry.py ("annotation_queue.*")
             -> writes/operations/annotation_queue/__init__.py (prepare, build, decorate, confirm_view)
             -> models in writes/operations/annotation_queue/models.py

Decisions

Proven by

Log