> ## 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 using the compatibility path

> Equivalent to the hyphenated Add a session as an evaluation case endpoint

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

This underscore path uses the same request and response as its hyphenated counterpart and remains available to existing clients. Confirm that the session and set exist, and review the conversation data that will be saved as a sample

<Warning>
  Writing or deleting evaluation samples changes the actual evaluation set
</Warning>

See the [corresponding evaluation endpoint](/productions/api-reference/preview/en/agent-api-server/add-session-to-eval-set) for the replacement and its complete requirements


## 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:
        - Compatibility endpoints
      summary: Add a session using the compatibility path
      description: >-
        Equivalent to the hyphenated Add a session as an evaluation case
        endpoint


        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: agentApiAddSessionToEvalSetLegacy
      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

````