> ## 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.

# Get Episode Count

> Retrieve the episode count for a project.

    An *episode* is the minimal unit of memory stored in the MemMachine system.
    In most cases, a single episode corresponds to one message or interaction
    from a user. Episodes are appended as the project accumulates conversational
    or operational data.

    This endpoint returns the total number of episodes currently recorded for
    the specified project. If the project does not exist, a not-found error is
    returned.



## OpenAPI

````yaml /openapi.json post /api/v2/projects/episode_count/get
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/projects/episode_count/get:
    post:
      tags:
        - Projects
      summary: Get Episode Count
      description: |-
        Retrieve the episode count for a project.

            An *episode* is the minimal unit of memory stored in the MemMachine system.
            In most cases, a single episode corresponds to one message or interaction
            from a user. Episodes are appended as the project accumulates conversational
            or operational data.

            This endpoint returns the total number of episodes currently recorded for
            the specified project. If the project does not exist, a not-found error is
            returned.
      operationId: get_episode_count
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetProjectSpec'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EpisodeCountResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetProjectSpec:
      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.
                
          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.
                
          examples:
            - memmachine
            - research123
            - qa_pipeline
      type: object
      required:
        - org_id
        - project_id
      title: GetProjectSpec
      description: |-
        Specification model for retrieving a project.

        This model defines the parameters required to fetch an existing project.
        Both the organization ID and project ID follow the standard `SafeId`
        validation rules.

        The combination of `org_id` and `project_id` uniquely identifies the
        project to retrieve.
    EpisodeCountResponse:
      properties:
        count:
          type: integer
          minimum: 0
          title: Count
          description: The total number of episodic memories in the project.
      type: object
      required:
        - count
      title: EpisodeCountResponse
      description: >-
        Response model representing the number of episodes associated with a
        project.


        This model is typically returned by analytics or monitoring endpoints

        that track usage activity (e.g., number of computation episodes,
        workflow

        runs, or operational cycles).


        The count reflects the current recorded total at the time of the
        request.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````