Agenta Annotations API

Attach evaluator-style feedback to existing traces and spans.

Operations 5

POST /annotations/ Create Annotation #
GET /annotations/{trace_id} Fetch Annotation #
PATCH /annotations/{trace_id} Edit Annotation #
DELETE /annotations/{trace_id} Delete Annotation #
POST /annotations/query Query Annotations #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agenta:agenta-annotations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agenta-annotations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Agenta Annotations API
  description: Agenta API
  contact:
    name: Agenta
    url: https://agenta.ai/
    email: team@agenta.ai
  version: 0.1.0
servers:
- url: /api
- url: https://eu.cloud.agenta.ai/api
security:
- APIKeyHeader: []
tags:
- name: Annotations
  description: Attach evaluator-style feedback to existing traces and spans.
paths:
  /annotations/:
    post:
      tags:
      - Annotations
      summary: Create Annotation
      operationId: create_annotation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationCreateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /annotations/{trace_id}:
    get:
      tags:
      - Annotations
      summary: Fetch Annotation
      operationId: fetch_annotation
      parameters:
      - name: trace_id
        in: path
        required: true
        schema:
          type: string
          title: Trace Id
      - name: span_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Annotations
      summary: Edit Annotation
      operationId: edit_annotation
      parameters:
      - name: trace_id
        in: path
        required: true
        schema:
          type: string
          title: Trace Id
      - name: span_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationEditRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Annotations
      summary: Delete Annotation
      operationId: delete_annotation
      parameters:
      - name: trace_id
        in: path
        required: true
        schema:
          type: string
          title: Trace Id
      - name: span_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationLinkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /annotations/query:
    post:
      tags:
      - Annotations
      summary: Query Annotations
      operationId: query_annotations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationQueryRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SimpleTraceKind:
      type: string
      enum:
      - adhoc
      - eval
      - play
      title: SimpleTraceKind
    AnnotationResponse:
      properties:
        count:
          type: integer
          title: Count
          default: 0
        annotation:
          anyOf:
          - $ref: '#/components/schemas/Annotation'
          - type: 'null'
      type: object
      title: AnnotationResponse
    LabelJson-Output:
      anyOf:
      - type: boolean
      - type: string
      - additionalProperties:
          $ref: '#/components/schemas/LabelJson-Output'
        type: object
    AnnotationCreateRequest:
      properties:
        annotation:
          $ref: '#/components/schemas/AnnotationCreate'
      type: object
      required:
      - annotation
      title: AnnotationCreateRequest
    Annotation:
      properties:
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
        deleted_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Deleted At
        created_by_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Created By Id
        updated_by_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Updated By Id
        deleted_by_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Deleted By Id
        span_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
        trace_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Trace Id
        attributes:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Output'
            type: object
          - type: 'null'
          title: Attributes
        origin:
          $ref: '#/components/schemas/SimpleTraceOrigin'
          default: custom
        kind:
          $ref: '#/components/schemas/SimpleTraceKind'
          default: adhoc
        channel:
          $ref: '#/components/schemas/SimpleTraceChannel'
          default: api
        tags:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/LabelJson-Output'
            type: object
          - type: 'null'
          title: Tags
        meta:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Output'
            type: object
          - type: 'null'
          title: Meta
        data:
          additionalProperties:
            $ref: '#/components/schemas/FullJson-Output'
          type: object
          title: Data
        references:
          $ref: '#/components/schemas/SimpleTraceReferences'
        links:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/OTelLink-Output'
            type: object
          - items:
              $ref: '#/components/schemas/OTelLink-Output'
            type: array
          title: Links
      type: object
      required:
      - data
      - references
      - links
      title: Annotation
    AnnotationQueryRequest:
      properties:
        annotation:
          anyOf:
          - $ref: '#/components/schemas/AnnotationQuery'
          - type: 'null'
        annotation_links:
          anyOf:
          - items:
              $ref: '#/components/schemas/OTelLink-Input'
            type: array
          - type: 'null'
          title: Annotation Links
        windowing:
          anyOf:
          - $ref: '#/components/schemas/Windowing'
          - type: 'null'
      type: object
      title: AnnotationQueryRequest
    Windowing:
      properties:
        newest:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Newest
        oldest:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Oldest
        next:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Next
        limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Limit
        order:
          anyOf:
          - type: string
            enum:
            - ascending
            - descending
          - type: 'null'
          title: Order
        interval:
          anyOf:
          - type: integer
          - type: 'null'
          title: Interval
        rate:
          anyOf:
          - type: number
          - type: 'null'
          title: Rate
      type: object
      title: Windowing
    FullJson-Input:
      anyOf:
      - type: string
      - type: integer
      - type: number
      - type: boolean
      - additionalProperties:
          $ref: '#/components/schemas/FullJson-Input'
        type: object
      - items:
          $ref: '#/components/schemas/FullJson-Input'
        type: array
      - type: 'null'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OTelLink-Output:
      properties:
        span_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
        trace_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Trace Id
        attributes:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Output'
            type: object
          - type: 'null'
          title: Attributes
      type: object
      title: OTelLink
    SimpleTraceOrigin:
      type: string
      enum:
      - custom
      - human
      - auto
      title: SimpleTraceOrigin
    Reference:
      properties:
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
        slug:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Id
      type: object
      title: Reference
    SimpleTraceReferences:
      properties:
        query:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        query_variant:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        query_revision:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        testset:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        testset_variant:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        testset_revision:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        application:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        application_variant:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        application_revision:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        evaluator:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        evaluator_variant:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        evaluator_revision:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        environment:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        environment_variant:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        environment_revision:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        testcase:
          anyOf:
          - $ref: '#/components/schemas/Reference'
          - type: 'null'
        selector:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Selector
      type: object
      title: SimpleTraceReferences
    LabelJson-Input:
      anyOf:
      - type: boolean
      - type: string
      - additionalProperties:
          $ref: '#/components/schemas/LabelJson-Input'
        type: object
    AnnotationEditRequest:
      properties:
        annotation:
          $ref: '#/components/schemas/AnnotationEdit'
      type: object
      required:
      - annotation
      title: AnnotationEditRequest
    AnnotationsResponse:
      properties:
        count:
          type: integer
          title: Count
          default: 0
        annotations:
          items:
            $ref: '#/components/schemas/Annotation'
          type: array
          title: Annotations
          default: []
      type: object
      title: AnnotationsResponse
    AnnotationLinkResponse:
      properties:
        count:
          type: integer
          title: Count
          default: 0
        annotation_link:
          anyOf:
          - $ref: '#/components/schemas/OTelLink-Output'
          - type: 'null'
      type: object
      title: AnnotationLinkResponse
    FullJson-Output:
      anyOf:
      - type: string
      - type: integer
      - type: number
      - type: boolean
      - additionalProperties:
          $ref: '#/components/schemas/FullJson-Output'
        type: object
      - items:
          $ref: '#/components/schemas/FullJson-Output'
        type: array
      - type: 'null'
    SimpleTraceChannel:
      type: string
      enum:
      - otlp
      - web
      - sdk
      - api
      title: SimpleTraceChannel
    OTelLink-Input:
      properties:
        span_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Span Id
        trace_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Trace Id
        attributes:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Input'
            type: object
          - type: 'null'
          title: Attributes
      type: object
      title: OTelLink
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    AnnotationCreate:
      properties:
        origin:
          $ref: '#/components/schemas/SimpleTraceOrigin'
          default: custom
        kind:
          $ref: '#/components/schemas/SimpleTraceKind'
          default: adhoc
        channel:
          $ref: '#/components/schemas/SimpleTraceChannel'
          default: api
        tags:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/LabelJson-Input'
            type: object
          - type: 'null'
          title: Tags
        meta:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Input'
            type: object
          - type: 'null'
          title: Meta
        data:
          additionalProperties:
            $ref: '#/components/schemas/FullJson-Input'
          type: object
          title: Data
        references:
          $ref: '#/components/schemas/SimpleTraceReferences'
        links:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/OTelLink-Input'
            type: object
          - items:
              $ref: '#/components/schemas/OTelLink-Input'
            type: array
          title: Links
      type: object
      required:
      - data
      - references
      - links
      title: AnnotationCreate
    AnnotationEdit:
      properties:
        tags:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/LabelJson-Input'
            type: object
          - type: 'null'
          title: Tags
        meta:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Input'
            type: object
          - type: 'null'
          title: Meta
        data:
          additionalProperties:
            $ref: '#/components/schemas/FullJson-Input'
          type: object
          title: Data
        references:
          anyOf:
          - $ref: '#/components/schemas/SimpleTraceReferences'
          - type: 'null'
        links:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/OTelLink-Input'
            type: object
          - items:
              $ref: '#/components/schemas/OTelLink-Input'
            type: array
          - type: 'null'
          title: Links
      type: object
      required:
      - data
      title: AnnotationEdit
    AnnotationQuery:
      properties:
        origin:
          anyOf:
          - $ref: '#/components/schemas/SimpleTraceOrigin'
          - type: 'null'
        kind:
          anyOf:
          - $ref: '#/components/schemas/SimpleTraceKind'
          - type: 'null'
        channel:
          anyOf:
          - $ref: '#/components/schemas/SimpleTraceChannel'
          - type: 'null'
        tags:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/LabelJson-Input'
            type: object
          - type: 'null'
          title: Tags
        meta:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/FullJson-Input'
            type: object
          - type: 'null'
          title: Meta
        references:
          anyOf:
          - $ref: '#/components/schemas/SimpleTraceReferences'
          - type: 'null'
        links:
          anyOf:
          - additionalProperties:
              $ref: '#/components/schemas/OTelLink-Input'
            type: object
          - items:
              $ref: '#/components/schemas/OTelLink-Input'
            type: array
          - type: 'null'
          title: Links
      type: object
      title: AnnotationQuery
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header