Skip to content
Announcements14 min read

Potato 2.15: Agents in Live Studies and Five Annotation Types

AI agents can annotate or run a live study as declared machine annotators, and five new annotation types include an affect grid and voice recording.

Potato Team

Potato 2.15 lets an AI agent work in a live study. An agent connected over the Model Context Protocol (MCP) can annotate as a declared machine annotator and go through the study's phases, from consent to graded training, as a person does. As an operator, an agent can also find the items annotators disagree on, read agreement and annotator quality, adjudicate, and add items.

The release adds five annotation types and a skeleton tool for 3D volumes, and Potato now has 85 annotation types. Protocols from published annotation studies that needed workarounds in 2.14 now have direct support. Every MCP tool has a new name, and an agent can no longer record answers under a person's username. Read the upgrade notes before you install. Because 2.15 fixes three sign-in problems, any study with passwords on should upgrade, and Security fixes lists them.

bash
pip install --upgrade 'potato-annotation[mcp]'

Agents in live studies

Potato's MCP server used to cover writing and checking a config. In 2.15 the server also works inside a running study. There, an agent records answers under a machine annotator's id, and Potato counts the answers as a machine's work.

You turn the live tools on with two config blocks. machine_annotators declares each machine and the id the machine annotates under, and mcp names every tool an agent may call. Add both blocks to a study's config:

yaml
machine_annotators:
  enabled: true
  annotators:
    - id: claude-labeller
      kind: llm
      model: claude-sonnet-5-5
 
mcp:
  enabled: true
  tools:
    - get_task_spec
    - get_current_page
    - submit_page
    - get_next_item
    - submit_annotation
    - get_agreement
  audit_log: mcp_audit.jsonl

potato mcp issue-token binds a token to the declared id with --machine-id, and the agent sends the token as a bearer header:

bash
potato mcp issue-token --config config.yaml --name labeller --role annotator \
    --machine-id claude-labeller --expires 30d

An agent reads the questions and the shape of each answer with get_task_spec. The agent answers the pages before annotation, such as consent and training, with get_current_page and submit_page, then calls get_next_item and submit_annotation until the study is done. Training answers are graded, and a model that fails training annotates no items. submit_annotation checks every answer against the scheme before anything is written and returns every problem at once, with the valid labels or range named. dry_run checks without writing, and items submits up to 50 items in one call.

Because a machine's answers go through the same save path as the browser's, progress, agreement, and exports include the machine's answers. The agreement report compares people with people, and for single-answer schemes such as choices and scales, the report also scores each machine against the human majority. machine_annotators.phases switches consent, instructions, or other phases off for machines, and show_when on participant.kind shows a page only to machines or only to people.

propose_annotation shows a person the machine's answer in an inline form, in clients that support MCP Apps. The person confirms or corrects the answer, and Potato then records the answer as the machine's, with the review stored beside the answer. CSV and TSV exports add _review_status and _review columns.

Running a study as an operator

Operator tools give an agent the admin's view of a study. search_items finds unannotated, disagreed, or machine-labeled items, get_item_disagreement shows how each annotator answered one item, and get_annotator_quality reports attention checks, gold items, and MACE competence. adjudication_queue, adjudication_item, and adjudication_submit work through the adjudication queue, and a machine submits adjudications only when adjudication.adjudicator_users lists the machine's id. Operator tools show people as pseudonyms such as annotator_3f9a12c4, and mcp.expose_usernames: true shows real usernames instead.

Connecting over HTTP or OAuth

With mcp.enabled, the study server answers MCP at /mcp, and a client connects by URL with a token. potato mcp config --client claude-code --url https://study.example.org prints the block a client needs, and --client also takes claude-desktop, cursor, and codex. With mcp.oauth.enabled, a connector added by URL in Claude.ai or Claude Desktop signs in through the browser instead. An admin approves each connection on a consent page and chooses the machine annotator the connection records as, the connection's role, the tools, and how long the connection lasts. /admin/mcp/grants, potato mcp grants, and potato mcp revoke-grant list and revoke connections.

Each credential sees only the tools the credential can call. Tokens take --tools and --expires, and a credential over the limit in mcp.rate_limit gets a 429 with Retry-After. MCP Server for a Running Potato Study covers every tool and setting.

Five new annotation types

Potato 2.15 adds five annotation types:

  • affect_grid. One marker on a square or circular pad rates valence and arousal, or any two continuous dimensions. With continuous, the scheme records a trace while audio or video plays.
  • record_audio. The annotator records a clip for each item, listens back, and records again when needed. potato recordings export turns the clips into items for a rating task.
  • click_reveal. A blurred image sharpens in a circle around each click, and Potato stores the position and time of every click.
  • tap_along. Potato stores each key press or tap with the time in the audio, and each tap type has a separate key.
  • cursor_reveal. The text stays blurred except near the pointer, as in mouse-tracking reading studies, and Potato stores the pointer path and the dwell time on each word.

The volume_annotation type has a new skeleton tool for tracing neurons and other branching structures in 3D volumes. Each traced node has a position, a radius, and a parent, and the swc export writes the traced structures as SWC files. Add skeleton to the scheme's tools list to turn the tool on.

Protocols from published studies

Designs in the showcase reproduce protocols from published annotation studies, and several of the designs needed a workaround in Potato 2.14. Each protocol below now has a direct form:

  • Best-worst scaling over each item's own options. bws reads the options from options_field, as text or images, and keeps the item on screen. Options that share an id are scored together across items.
  • MQM re-annotation. error_span loads earlier errors through pre_annotation, and annotators then correct an existing Multidimensional Quality Metrics (MQM) annotation. Severity-only marking no longer needs error_types.
  • Word-snapped spans. span_units snaps a span selection to whole words, or to the clauses or tokens an item field lists.
  • Parent shapes on images. On image_annotation, an attribute with type: shape links a shape to the shape's parent, with optional containment and ordering checks.
  • Lock-in answers. lock_after_answer adds a Lock in answer button. Dependent questions stay hidden until the annotator locks the answer, and the server then refuses changes with a 409.
  • Lexicon tiers and multi-span arguments. tiered_annotation text tiers take a lexicon of suggestions, and with suggestions_only the server refuses any other value. event_annotation arguments take several spans.
  • Questions after reading. With display_logic on an instance_display field and finish_button on cursor_reveal, a comprehension question can appear only after the annotator has read the passage.

Other additions

  • Ranking. ranking takes top_k, and allow_ties records ties such as B,D=A,C. The server checks every saved order.
  • Selection caps. multiselect takes max_selections, and the server now checks the cap of hierarchical_multiselect as well.
  • Span attributes. Span schemes take an attributes: block for properties such as a claim's stance. Adjudication, exports, agreement, and MCP include the attributes.
  • Video. video_annotation adds points on frames (point_marks), point tracks, and relations between tracks for scene graphs. The agreement report scores relations, and the new video_points and scene_graph exports write points and relations.
  • Audio description. The video timeline shades speech, description_fit checks each description against the length of the segment, and potato transcripts vad finds speech regions in local and hotlinked media.
  • Chained studies. The pre_annotation export turns one study's answers into pre-annotations for the next study.
  • potato export. The command runs the export CLI that used to need python -m potato.export, and the old command still works with the same flags. Potato now has 77 export formats.
  • Smaller changes. Clicking a slider's handle in place answers with the starting value. Pressing Enter or Space on the handle has the same effect. radio takes display_config.num_columns, triad_test items can show an image, and trajectory_eval takes step_notes: always.

Fixes

Potato's changelog lists every fix. The fixes below change stored answers, the adjudication queue, or what a study loads:

  • Adjudication keeps the discontinuous parts and entity links of spans.
  • Two spans with the same label and offsets in different instance_display fields, or two PDF regions with the same label, no longer share one id.
  • After a restart, decided items dropped out of the adjudication queue. The completed view was then empty, and a decision still on disk could not be opened. Decided items now stay in the queue.
  • symbolic_association tiers follow ELAN, with one child per parent on the parent's span, and the server refuses a save with two children on one parent or a child outside the parent's span. EAF and TextGrid exports no longer stop on a number or list value.
  • /updateinstance runs the same answer checks in every payload format.
  • When given an id the study already had, add_items added the items listed before the duplicate and then answered 500. The tool now checks every id first and adds nothing when one id is taken.
  • Media given as a bare file name loads from media_directory in the video, audio, image, spectrogram, and tiered annotation types and in image_region.
  • potato start run from the wrong folder prints the cd command to run.

Upgrade notes

Run potato validate config.yaml --strict on each config first. The following changes can alter what a working 2.14 study does:

  • Agents record annotations only as declared machine annotators. submit_annotation no longer takes username. Declare the agent under machine_annotators and issue the agent's token with --machine-id. A token without --machine-id can still read and operate the study.
  • Every MCP tool is named potato__<method> on the stdio server, the potato mcp connect bridge, and /mcp. The live_ prefix is gone, so live_get_status is now potato__get_status. Update prompts, skills, and allowlists that name tools. mcp.tools in the config keeps bare names.
  • list_items is now search_items. A config that still lists list_items stops at startup, and the error names the new tool.
  • Operator tools take annotator where the tools took username (assign_items and delete_annotations), and show people as pseudonyms. Pass the pseudonym back, or set mcp.expose_usernames: true to see real usernames.
  • A config stops at startup when the config grants a tool that records annotations and declares no machine annotator. The tools that record annotations are submit_annotation, submit_page, get_next_item, get_current_page, and adjudication_submit.
  • The MCP server needs Python 3.10 and the 2.x MCP SDK (mcp>=2.3). The mcp extra installs the SDK. On Python 3.9, Potato installs and runs without the MCP server.
  • The study server answers /mcp when mcp.enabled is set. Set mcp.http.enabled: false to keep only the /api/mcp/* JSON routes.
  • In a study with MCP on, a declared machine annotator's id cannot sign in on the web. If the simulator's llm or agent strategy signs in under declared ids against such a study, add web_login: true to each declared entry. The User Simulator page shows the block. A study without MCP is unchanged unless an entry sets web_login: false.
  • A study that signs workers in from a link refuses /register. A study with login.type: url_direct or prolific, or with any crowdsourcing.provider, answers 403 to registration. Because the home page of such a study shows no registration form, the change reaches only direct POSTs from the user simulator, scripts, and tests. Set login.allow_registration: true to accept registration through /register. The value must be true or false, and any other value stops the server at startup. Security fixes gives the reason for the change.
  • radio and multiselect check display_config at startup. display_config must be a mapping, and num_columns a whole number from 1 to 12. A radio with both horizontal and a num_columns above 1 stops too, so set only one of the two.
  • POST /submit_annotation stores a bare value under the label the page uses for the scheme type, such as rank_order for a ranking, instead of text_box for every type. A value that is not a valid answer gets a 400, and nothing is stored. No Potato page calls the deprecated route, so only scripts that post to /submit_annotation directly see the change.
  • The node/ package is removed. customjs, customjs_hostname, --with-custom-js, and --custom-js-hostname are ignored, and potato validate reports either key when the key is set.
  • potato deploy records each server's SSH host key in .potato/secrets.json on the first connection, and stops if a later connection presents a different key. If you rebuild a server by other means than potato deploy, delete the deployment's ssh_host_key from .potato/secrets.json. Running Potato Locally or in the Cloud has the details. The host-key check is one of the security fixes.

Finding agent answers recorded under a person's username

A 2.14 agent could record annotations under a person's username. The MCP audit log names each such write, and records written by 2.15 name the machine in machine_id instead of target. Run the command below to list the 2.14 writes:

bash
jq -c 'select(.event == "annotation_submitted" and .target != null)
       | {time, agent, target, instance_id}' mcp_audit.jsonl

Security fixes

Any study with passwords on should upgrade. Potato 2.15 fixes three sign-in problems, and all three are present in 2.14.2. The advisory covers the first problem and lists every release up to 2.14.2 as affected:

  • A sign-in without a password no longer succeeds (GHSA-w8g6-25f8-rx4h). With require_password on, which is the default, a POST /auth with no pass field signed in as any registered user. OAuth and SAML studies with allow_local_login were affected through local accounts. Hinoki Security reported the problem.
  • A crowd study link no longer signs in as an account with a password or an SSO identity. ?PROLIFIC_PID=<a researcher's username> signed in as that researcher with no password. A study link now opens only a passwordless worker account.
  • A crowd study no longer accepts /register. Anyone who knew a worker's id could register the id first, and the worker's link then opened the registrant's account. The upgrade notes describe login.allow_registration for the simulator, scripts, and tests that register on purpose.

An audit of the MCP server and an end-to-end run with real clients found further problems before the release. The audit findings below affect 2.14.x studies:

  • Attention-check and gold items sent the expected answer to the annotation page in the item data. Quality control now keeps the expected answer on the server.
  • An answer posted under condition.<factor> replaced the participant's assigned condition in show_when. Only a question the config declares may use that name now, and the same rule covers participant.kind.
  • potato mcp connect followed redirects with the agent token attached. The bridge now refuses redirects, and refuses plain http to any host other than localhost.
  • export_data options could name paths outside the exports folder. MCP now refuses path options and publishing to the Hugging Face Hub.

GitHub code scanning found five more problems that affect 2.14.x:

  • With trace ingestion on, a crafted trace id could overwrite a file outside the traces folder, such as an annotator's state. Potato now cleans the id into a file name.
  • Codebook markdown with a long heading could stall the server for minutes. Markdown is now capped at 256,000 characters per request.
  • /admin/api/export writes only inside <output_annotation_dir>/exports/, and an unknown format gets a 400.
  • Error responses no longer include exception text, /register no longer reveals whether a user_state.json exists at a path-shaped username, and the web proxy no longer reports the address a blocked host resolved to.
  • potato deploy checks the server's SSH host key after the first connection, as the upgrade notes describe.

The changelog lists the problems found in code that is new in 2.15.

Installing 2.15

Upgrade with the mcp extra on Python 3.10 or later, then validate each config:

bash
pip install --upgrade 'potato-annotation[mcp]'
potato validate config.yaml --strict

On Python 3.9, pip install --upgrade potato-annotation installs everything except the MCP server. MCP Server for a Running Potato Study is the place to start with agents, and What's New lists the rest of the release.