> ## Documentation Index
> Fetch the complete documentation index at: https://agentset-feat-agent-first-api-mcp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Warm cache for a namespace

> Pre-loads the namespace into the vector store's cache for faster query performance. Not all vector stores support this operation. Currently only Turbopuffer supports this operation.



## OpenAPI

````yaml post /v1/namespace/{namespaceId}/warm-up
openapi: 3.1.1
info:
  title: AgentsetAPI
  description: Agentset is agentic rag-as-a-service
  version: 0.0.1
  contact:
    name: Agentset Support
    email: support@agentset.ai
    url: https://api.agentset.ai/
  license:
    name: MIT License
    url: https://github.com/agentset-ai/agentset/blob/main/LICENSE.md
servers:
  - url: https://api.agentset.ai
    description: Production API
security: []
paths:
  /v1/namespace/{namespaceId}/warm-up:
    post:
      tags:
        - Namespaces
      summary: Warm cache for a namespace
      description: >-
        Pre-loads the namespace into the vector store's cache for faster query
        performance. Not all vector stores support this operation. Currently
        only Turbopuffer supports this operation.
      operationId: warmUp
      parameters:
        - $ref: '#/components/parameters/NamespaceIdRef'
        - $ref: '#/components/parameters/TenantIdRef'
      responses:
        '200':
          description: Cache warming started
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      status:
                        type: boolean
                    required:
                      - status
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '409':
          $ref: '#/components/responses/409'
        '410':
          $ref: '#/components/responses/410'
        '422':
          $ref: '#/components/responses/422'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - token: []
      x-codeSamples:
        - lang: TypeScript
          source: |

            import { Agentset } from "agentset";

            const agentset = new Agentset({ apiKey: 'agentset_xxx' });
            const ns = agentset.namespace('ns_xxx');

            await ns.warmUp();
            console.log("Cache warmed successfully");
        - lang: python
          label: Python (SDK)
          source: |-
            from agentset import Agentset


            with Agentset(
                namespace_id="ns_123",
                x_tenant_id="<id>",
                token="AGENTSET_API_KEY",
            ) as a_client:

                res = a_client.namespace.warm_up()

                # Handle response
                print(res)
components:
  parameters:
    NamespaceIdRef:
      in: path
      name: namespaceId
      schema:
        type: string
        examples:
          - ns_123
        description: The id of the namespace (prefixed with ns_)
      x-speakeasy-globals-hidden: true
      required: true
      description: The id of the namespace (prefixed with ns_)
    TenantIdRef:
      in: header
      name: x-tenant-id
      schema:
        description: >-
          Optional tenant id to use for the request. If not provided, the
          namespace will be used directly. Must be alphanumeric and up to 64
          characters.
        type: string
        pattern: ^[A-Za-z0-9]{1,64}$
      description: >-
        Optional tenant id to use for the request. If not provided, the
        namespace will be used directly. Must be alphanumeric and up to 64
        characters.
  responses:
    '400':
      description: >-
        The server cannot or will not process the request due to something that
        is perceived to be a client error (e.g., malformed request syntax,
        invalid request message framing, or deceptive request routing).
      content:
        application/json:
          schema:
            x-speakeasy-name-override: BadRequest
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad_request
                    description: A short code indicating the error code returned.
                    example: bad_request
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#bad-request
                required:
                  - code
                  - message
            required:
              - success
              - error
    '401':
      description: >-
        Although the HTTP standard specifies "unauthorized", semantically this
        response means "unauthenticated". That is, the client must authenticate
        itself to get the requested response.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Unauthorized
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    description: A short code indicating the error code returned.
                    example: unauthorized
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#unauthorized
                required:
                  - code
                  - message
            required:
              - success
              - error
    '403':
      description: >-
        The client does not have access rights to the content; that is, it is
        unauthorized, so the server is refusing to give the requested resource.
        Unlike 401 Unauthorized, the client's identity is known to the server.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Forbidden
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - forbidden
                    description: A short code indicating the error code returned.
                    example: forbidden
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#forbidden
                required:
                  - code
                  - message
            required:
              - success
              - error
    '404':
      description: The server cannot find the requested resource.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: NotFound
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_found
                    description: A short code indicating the error code returned.
                    example: not_found
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#not-found
                required:
                  - code
                  - message
            required:
              - success
              - error
    '409':
      description: >-
        This response is sent when a request conflicts with the current state of
        the server.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: Conflict
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - conflict
                    description: A short code indicating the error code returned.
                    example: conflict
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: https://docs.agentset.ai/api-reference/errors#conflict
                required:
                  - code
                  - message
            required:
              - success
              - error
    '410':
      description: >-
        This response is sent when the requested content has been permanently
        deleted from server, with no forwarding address.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: InviteExpired
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - invite_expired
                    description: A short code indicating the error code returned.
                    example: invite_expired
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#invite-expired
                required:
                  - code
                  - message
            required:
              - success
              - error
    '422':
      description: >-
        The request was well-formed but was unable to be followed due to
        semantic errors.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: UnprocessableEntity
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unprocessable_entity
                    description: A short code indicating the error code returned.
                    example: unprocessable_entity
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#unprocessable-entity
                required:
                  - code
                  - message
            required:
              - success
              - error
    '429':
      description: >-
        The user has sent too many requests in a given amount of time ("rate
        limiting")
      content:
        application/json:
          schema:
            x-speakeasy-name-override: RateLimitExceeded
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    description: A short code indicating the error code returned.
                    example: rate_limit_exceeded
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#rate-limit_exceeded
                required:
                  - code
                  - message
            required:
              - success
              - error
    '500':
      description: The server has encountered a situation it does not know how to handle.
      content:
        application/json:
          schema:
            x-speakeasy-name-override: InternalServerError
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    description: A short code indicating the error code returned.
                    example: internal_server_error
                  message:
                    x-speakeasy-error-message: true
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: The requested resource was not found.
                  doc_url:
                    type: string
                    description: >-
                      A link to our documentation with more details about this
                      error code
                    example: >-
                      https://docs.agentset.ai/api-reference/errors#internal-server_error
                required:
                  - code
                  - message
            required:
              - success
              - error
  securitySchemes:
    token:
      type: http
      description: Default authentication mechanism
      scheme: bearer
      x-speakeasy-example: AGENTSET_API_KEY

````