> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veadk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a session as an evaluation case

> Convert an existing session into a case identified by evalId; success returns JSON null

Available only with the development UI enabled, such as `veadk web` or `adk api_server --with_ui`; the default `adk api_server` does not expose this endpoint

Create the target evaluation set and confirm that the session identified by `userId` and `sessionId` exists. The service converts that conversation into a new case identified by `evalId`, allowing a debugging session to become a regression sample

<Warning>
  This operation copies conversation content into the evaluation set, which can include user messages and tool results. Review the sample before adding it, then retrieve the case to confirm the saved content
</Warning>


## OpenAPI

````yaml productions/api-reference/openapi/en/agent-api-server.json POST /dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session
openapi: 3.1.0
info:
  title: Agent API Server
  version: google-adk 2.2.0
  description: >-
    Public HTTP endpoints for Google ADK 2.2.0; /dev routes require the
    development UI to be enabled
servers:
  - url: http://localhost:8000
    description: Local server
security: []
tags:
  - name: Service and applications
  - name: Sessions
  - name: Agent execution
  - name: Artifacts
  - name: Memory
  - name: Evaluation · development server
  - name: Debugging · development server
  - name: Compatibility endpoints
paths:
  /dev/apps/{app_name}/eval-sets/{eval_set_id}/add-session:
    post:
      tags:
        - Evaluation · development server
      summary: Add a session as an evaluation case
      description: >-
        Convert an existing session into a case identified by evalId; success
        returns JSON null


        Available only with the development UI enabled, such as `veadk web` or
        `adk api_server --with_ui`; the default `adk api_server` does not expose
        this endpoint
      operationId: agentApiAddSessionToEvalSet
      parameters:
        - name: app_name
          in: path
          required: true
          schema:
            type: string
            title: App Name
          description: Application name
          example: travel_assistant
        - name: eval_set_id
          in: path
          required: true
          schema:
            type: string
            title: Eval Set Id
          description: Evaluation set ID
          example: travel-eval
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddSessionToEvalSetRequest'
            example:
              evalId: case-001
              sessionId: session-001
              userId: user-001
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: 'null'
              example: null
        '400':
          description: Invalid request or a required service/dependency is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AddSessionToEvalSetRequest:
      properties:
        evalId:
          type: string
          title: Evalid
          description: Evaluation case ID
        sessionId:
          type: string
          title: Sessionid
          description: Session ID
        userId:
          type: string
          title: Userid
          description: User ID
      type: object
      required:
        - evalId
        - sessionId
        - userId
      title: AddSessionToEvalSetRequest
    ApiError:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error details
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: Error details
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Location of the invalid field
        msg:
          type: string
          title: Message
          description: Validation error message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````