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

# List User Memory

> List the memories for a given user and agent that the user has access to



## OpenAPI

````yaml get /user-memories
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /user-memories:
    get:
      tags:
        - Memory
      summary: List User Memory
      description: List the memories for a given user and agent that the user has access to
      operationId: Memory.listUserMemory
      parameters:
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: User memory list
          content:
            application/json:
              schema:
                type: object
                required:
                  - object
                  - data
                properties:
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserMemory'
                    description: >-
                      An array containing the actual response elements,
                      paginated by any request parameters.
                  has_more:
                    type: boolean
                    description: >-
                      Whether or not there are more elements available after
                      this set. If false, this set comprises the end of the
                      list.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Datagrid from 'datagrid-ai';

            const client = new Datagrid({
              apiKey: process.env['DATAGRID_API_KEY'], // This is the default and can be omitted
            });

            const users = await client.memory.user.list();

            console.log(users.data);
        - lang: Python
          source: |-
            import os
            from datagrid_ai import Datagrid

            client = Datagrid(
                api_key=os.environ.get("DATAGRID_API_KEY"),  # This is the default and can be omitted
            )
            users = client.memory.user.list()
            print(users.data)
components:
  parameters:
    limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 50
        minimum: 1
        maximum: 100
      required: false
      description: The limit on the number of objects to return, ranging between 1 and 100.
    offset:
      name: offset
      in: query
      schema:
        type: integer
        default: 0
        minimum: 0
        maximum: 100000
      required: false
      description: >-
        A cursor to use in pagination. `offset` is an integer that defines your
        place in the list. For example, if you make a list request and receive
        100 objects, starting with `obj_bar`, your subsequent call can include
        `offset=100` to fetch the next page of the list.
  schemas:
    UserMemory:
      type: object
      required:
        - id
        - object
        - updated_at
        - created_at
        - user_prompt
        - context
        - agent_id
        - user_id
        - memory
      properties:
        object:
          type: string
          enum:
            - user_memory
          description: The object type, which is always `user_memory`.
        id:
          type: string
          description: The ID of the user memory.
        updated_at:
          type: string
          description: The updated at of the user memory.
        created_at:
          type: string
          description: The created at of the user memory.
        user_prompt:
          type: string
          description: The user prompt of the user memory.
        context:
          type: array
          items:
            type: string
          description: The context of the user memory.
        agent_id:
          type: string
          description: The agent ID of the user memory.
        user_id:
          type: string
          description: The user ID of the user memory.
        memory:
          type: array
          items:
            type: string
          description: The memory of the user memory.
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````