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

# List Memories

> List memories within a project.

    System returns a paginated list of memories stored in the project.
    The page_size and page_num fields control pagination.

    The filter field accepts the structured filter expression language.
    User-defined metadata keys must be referenced with the `m.` or `metadata.` prefix
    (for example, `m.source = "chat_v3"`). Unknown or unsupported fields are rejected
    instead of being ignored.
    The set_metadata field scopes semantic memories to matching semantic sets.
    The type field allows specifying which memory type to list.



## OpenAPI

````yaml /openapi.json post /api/v2/memories/list
openapi: 3.1.0
info:
  title: MemMachine API
  version: 0.3.10
  description: >-
    Architectural Memory Systems for AI Agents. Specialized in episodic and
    semantic memory management with strict namespace isolation.
servers:
  - url: http://localhost:8080
security: []
tags:
  - name: Configuration
    description: System overview and memory subsystem configuration.
  - name: Episodic Configuration
    description: Per-project episodic memory subsystem configuration.
  - name: Memories
    description: Core operations for episodic and semantic memory ingestion and retrieval.
  - name: Projects
    description: Lifecycle management for isolated memory namespaces.
  - name: Resources
    description: Embedder, language model, and reranker lifecycle management.
  - name: 'Semantic Memory: Categories'
    description: Category, template, and tag management for semantic sets.
  - name: 'Semantic Memory: Features'
    description: Add, retrieve, and update individual semantic features.
  - name: 'Semantic Memory: Sets'
    description: Set type and set ID lifecycle, listing, and configuration.
  - name: System
    description: Infrastructure, health, and observability.
paths:
  /api/v2/memories/list:
    post:
      tags:
        - Memories
      summary: List Memories
      description: |-
        List memories within a project.

            System returns a paginated list of memories stored in the project.
            The page_size and page_num fields control pagination.

            The filter field accepts the structured filter expression language.
            User-defined metadata keys must be referenced with the `m.` or `metadata.` prefix
            (for example, `m.source = "chat_v3"`). Unknown or unsupported fields are rejected
            instead of being ignored.
            The set_metadata field scopes semantic memories to matching semantic sets.
            The type field allows specifying which memory type to list.
      operationId: list_memories
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListMemoriesSpec'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListMemoriesSpec:
      properties:
        org_id:
          type: string
          title: Org Id
          description: |2-

                The unique identifier of the organization.

                - Must not contain slashes (`/`).
                - Must contain only letters, numbers, underscores, hyphens, colon, and Unicode
                  characters (e.g., Chinese/Japanese/Korean). No slashes or other symbols
                  are allowed.

                This value determines the namespace the project belongs to.
                
          default: universal
          examples:
            - MemVerge
            - AI_Labs
        project_id:
          type: string
          title: Project Id
          description: |2-

                The identifier of the project.

                - Must be unique within the organization.
                - Must not contain slashes (`/`).
                - Must contain only letters, numbers, underscores, hyphens, colon, and Unicode
                  characters (e.g., Chinese/Japanese/Korean). No slashes or other symbols
                  are allowed.

                This ID is used in API paths and resource locations.
                
          default: universal
          examples:
            - memmachine
            - research123
            - qa_pipeline
        page_size:
          type: integer
          title: Page Size
          description: |2-

                The maximum number of memories to return per page. Use this for pagination.
                
          default: 100
          examples:
            - 50
            - 100
        page_num:
          type: integer
          title: Page Num
          description: |2-

                The zero-based page number to retrieve. Use this for pagination.
                
          default: 0
          examples:
            - 0
            - 1
            - 5
            - 10
        filter:
          type: string
          title: Filter
          description: |2-

                An optional string filter applied to the memory metadata. This uses a
                simple query language (e.g., 'metadata.user_id=123') for exact matches.
                Multiple conditions can be combined using AND operators.  The metadata
                fields are prefixed with 'metadata.' to distinguish them from other fields.
                
          default: ''
          examples:
            - metadata.user_id=123 AND metadata.session_id=abc
        set_metadata:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Set Metadata
          description: |2-

                Optional metadata key-value pairs used to filter or identify semantic sets.
        type:
          anyOf:
            - $ref: '#/components/schemas/MemoryType'
            - type: 'null'
          description: |2-

                The specific memory type to list (e.g., episodic or semantic).
                
          examples:
            - episodic
            - semantic
      type: object
      title: ListMemoriesSpec
      description: Specification model for listing memories.
    ListResult:
      properties:
        status:
          type: integer
          title: Status
          description: |2-

                The status code of the search operation. 0 typically indicates success.
                
          default: 0
          examples:
            - 0
        content:
          $ref: '#/components/schemas/ListResultContent'
          description: |2-

                The dictionary containing the memory search results (e.g., list of memory
                objects).
                
      type: object
      required:
        - content
      title: ListResult
      description: Response model for memory list results.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JsonValue: {}
    MemoryType:
      type: string
      enum:
        - semantic
        - episodic
      title: MemoryType
      description: Memory type.
    ListResultContent:
      properties:
        episodic_memory:
          anyOf:
            - items:
                $ref: '#/components/schemas/Episode'
              type: array
            - type: 'null'
          title: Episodic Memory
          description: Listed episodic memory entries.
        semantic_memory:
          anyOf:
            - items:
                $ref: '#/components/schemas/SemanticFeature'
              type: array
            - type: 'null'
          title: Semantic Memory
          description: Listed semantic memory entries.
      additionalProperties: false
      type: object
      title: ListResultContent
      description: Payload for ListResult.content returned by `/memories/list`.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Episode:
      properties:
        uid:
          type: string
          title: Uid
          description: Unique identifier for the episode.
        content:
          type: string
          title: Content
          description: The content payload of the episode.
        session_key:
          type: string
          title: Session Key
          description: Session key associated with the episode.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the episode was created.
        producer_id:
          type: string
          title: Producer Id
          description: Identifier of the episode producer.
        producer_role:
          type: string
          title: Producer Role
          description: Role of the producer (e.g., user/assistant/system).
        produced_for_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Produced For Id
          description: Identifier of the intended recipient of the episode.
        sequence_num:
          type: integer
          title: Sequence Num
          description: Sequence number within the session.
          default: 0
        episode_type:
          $ref: '#/components/schemas/EpisodeType'
          description: The type of episode being stored (e.g., message).
          default: message
        content_type:
          $ref: '#/components/schemas/ContentType'
          description: Content type of the episode.
          default: string
        filterable_metadata:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: boolean
                  - type: integer
                  - type: number
                  - type: string
                  - type: string
                    format: date-time
              type: object
            - type: 'null'
          title: Filterable Metadata
          description: Metadata indexed for filtering.
        metadata:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          title: Metadata
          description: Optional metadata associated with the episode.
      type: object
      required:
        - uid
        - content
        - session_key
        - created_at
        - producer_id
        - producer_role
      title: Episode
      description: Episode data returned in list responses.
    SemanticFeature:
      properties:
        set_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Set Id
          description: Identifier of the semantic set.
        category:
          type: string
          title: Category
          description: Category of the semantic feature.
        tag:
          type: string
          title: Tag
          description: Tag associated with the semantic feature.
        feature_name:
          type: string
          title: Feature Name
          description: Name of the semantic feature.
        value:
          type: string
          title: Value
          description: Value of the semantic feature.
        metadata:
          $ref: '#/components/schemas/Metadata'
          description: Storage metadata for the semantic feature.
      type: object
      required:
        - category
        - tag
        - feature_name
        - value
      title: SemanticFeature
      description: Semantic memory entry returned in API responses.
    EpisodeType:
      type: string
      enum:
        - message
      title: EpisodeType
      description: Episode type.
    ContentType:
      type: string
      enum:
        - string
      title: ContentType
      description: Enumeration for the type of content within an Episode.
    Metadata:
      properties:
        citations:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Citations
          description: Episode IDs cited by this semantic feature.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: Identifier for the semantic feature.
        other:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Other
          description: Additional storage metadata for the semantic feature.
      type: object
      title: Metadata
      description: Storage metadata for a semantic feature, including id and citations.

````