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

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.

# Create or update an agent endpoint

> Upsert the agent endpoint configuration (URL, model type, credentials) used by the eval worker



## OpenAPI

````yaml /switch-trust/api-reference/openapi.json put /eval/agent-endpoints/tenants/{tenant_id}/workspaces/{workspace_id}/{agent_id}
openapi: 3.0.3
info:
  contact: {}
  description: Switch Trust API
  license:
    name: Switch AI
    url: https://www.sandboxaq.com/legal/eula
  title: Switch Trust API
  version: 1.0.0
servers:
  - description: Flint AI Platform (per-tenant instance)
    url: https://{instance}.flintai.dev/api/v1
    variables:
      instance:
        default: your-instance
        description: Your Flint AI instance subdomain
security: []
paths:
  /eval/agent-endpoints/tenants/{tenant_id}/workspaces/{workspace_id}/{agent_id}:
    put:
      tags:
        - eval
      summary: Create or update an agent endpoint
      description: >-
        Upsert the agent endpoint configuration (URL, model type, credentials)
        used by the eval worker
      operationId: UpsertAgentEndpoint
      parameters:
        - description: Tenant ID
          in: path
          name: tenant_id
          required: true
          schema:
            type: string
        - description: Workspace ID
          in: path
          name: workspace_id
          required: true
          schema:
            type: string
        - description: Agent fingerprint (agn_<32 hex>)
          in: path
          name: agent_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/eval.AgentEndpoint'
        description: Agent endpoint configuration
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/eval.AgentEndpointRecord'
          description: Saved agent endpoint
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/common.RequestError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    eval.AgentEndpoint:
      properties:
        config:
          description: >-
            Config carries the per-type model-construction params (model_name,

            temperature, endpoint path, immediate_result, input_path,
            output_path).

            Its shape depends on ModelType; see the eval adapter (build_model).
          type: object
        endpoint_auth_type:
          type: string
        endpoint_credential:
          type: string
        endpoint_headers:
          description: >-
            EndpointHeaders and EndpointCredential are write-only secrets: they
            are

            accepted on PUT but redacted (nulled) on the public GET response.
          type: object
        endpoint_url:
          type: string
        model_type:
          type: string
      type: object
    eval.AgentEndpointRecord:
      properties:
        agent_id:
          type: string
        config:
          description: >-
            Config carries the per-type model-construction params (model_name,

            temperature, endpoint path, immediate_result, input_path,
            output_path).

            Its shape depends on ModelType; see the eval adapter (build_model).
          type: object
        created_at:
          type: string
        endpoint_auth_type:
          type: string
        endpoint_credential:
          type: string
        endpoint_headers:
          description: >-
            EndpointHeaders and EndpointCredential are write-only secrets: they
            are

            accepted on PUT but redacted (nulled) on the public GET response.
          type: object
        endpoint_url:
          type: string
        model_type:
          type: string
        updated_at:
          type: string
      type: object
    common.RequestError:
      description: Error responses returned by the API
      properties:
        code:
          example: 400
          type: integer
        message:
          example: Invalid request
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    BearerAuth:
      description: Use this header with a Bearer token to authenticate requests.
      in: header
      name: Authorization
      type: apiKey

````