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

# Search memory

> Semantically search through memory chunks and files using vector embeddings.



## OpenAPI

````yaml api-reference/openapi.json post /memory/{id}/search
openapi: 3.1.0
info:
  title: Ziet API
  description: >-
    Ziet is a serverless platform for AI agents and applications. Build
    intelligent agents with @Agent and @Action decorators, or serverless APIs
    with @Endpoint and Database. Deploy with a single command—no infrastructure
    to manage.
  license:
    name: MIT
  version: 0.1.0
servers:
  - url: https://api.ziet.ai/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Deployment
    description: Deploy code
  - name: Actions
    description: Discover actions
  - name: Agents
    description: Discover and configure agents
  - name: Endpoints
    description: Discover and invoke endpoints
  - name: Runs
    description: Execute agents
  - name: Memory
    description: Manage run memory
paths:
  /memory/{id}/search:
    post:
      tags:
        - Memory
      summary: Search memory
      description: >-
        Semantically search through memory chunks and files using vector
        embeddings.
      operationId: searchMemory
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
              properties:
                query:
                  type: string
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 10
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        value:
                          description: The stored value
                        score:
                          type: number
                          description: Relevance score (0-1)
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: ''Api-Key sk_live_YOUR_KEY'''

````