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

# Get full tenant graph

> Returns all entity nodes and their edges for the tenant in the v2 contract shape (nodes carry ``display_tier``/``display_color`` per ADR-010; edges use ``source``/``target`` with ``last_activity_at``). Intended for the Memory graph visualisation where all entities are displayed simultaneously. Use ``entity_types`` to restrict to specific node labels (comma-separated). The result is capped at ``limit`` nodes (default 500) for performance; when the cap is reached ``truncated=True`` is set in the response.



## OpenAPI

````yaml /api-reference/memory-api.json get /v1/memory/graph
openapi: 3.1.0
info:
  title: Strattum Memory API
  description: >-
    REST API that serves entity context — profile, timeline, graph, sources and
    formatted context — for agents and UIs. (PRD-003, Workstream 1.3)
  version: 1.0.0
servers: []
security: []
paths:
  /v1/memory/graph:
    get:
      tags:
        - memory
      summary: Get full tenant graph
      description: >-
        Returns all entity nodes and their edges for the tenant in the v2
        contract shape (nodes carry ``display_tier``/``display_color`` per
        ADR-010; edges use ``source``/``target`` with ``last_activity_at``).
        Intended for the Memory graph visualisation where all entities are
        displayed simultaneously. Use ``entity_types`` to restrict to specific
        node labels (comma-separated). The result is capped at ``limit`` nodes
        (default 500) for performance; when the cap is reached
        ``truncated=True`` is set in the response.
      operationId: get_memory_graph_v1_memory_graph_get
      parameters:
        - name: entity_types
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated list of entity type labels to filter by. Example:
              ``Customer,Company``
            title: Entity Types
          description: >-
            Comma-separated list of entity type labels to filter by. Example:
            ``Customer,Company``
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 20000
            minimum: 1
            description: Maximum number of nodes to return.
            default: 500
            title: Limit
          description: Maximum number of nodes to return.
        - name: tier
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Comma-separated list of ``display_tier`` values to keep. Default
              (omitted) keeps entity + activity (drops detail). Pass ``entity``
              for the fast first-paint path used by the Memory graph viz.
            title: Tier
          description: >-
            Comma-separated list of ``display_tier`` values to keep. Default
            (omitted) keeps entity + activity (drops detail). Pass ``entity``
            for the fast first-paint path used by the Memory graph viz.
        - name: include
          in: query
          required: false
          schema:
            type: string
            pattern: ^(full|summary)$
            description: >-
              ``full`` (default) returns all node properties. ``summary`` strips
              props to name/title/label/display fields/x/y for ~70% smaller
              payloads — the side panel re-hydrates full props via GET
              /entity/{id} when a node is selected.
            default: full
            title: Include
          description: >-
            ``full`` (default) returns all node properties. ``summary`` strips
            props to name/title/label/display fields/x/y for ~70% smaller
            payloads — the side panel re-hydrates full props via GET
            /entity/{id} when a node is selected.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryGraphResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MemoryGraphResponse:
      properties:
        nodes:
          items:
            $ref: '#/components/schemas/MemoryGraphNode'
          type: array
          title: Nodes
        edges:
          items:
            $ref: '#/components/schemas/MemoryGraphEdge'
          type: array
          title: Edges
        truncated:
          type: boolean
          title: Truncated
          description: >-
            True when the result was capped by the ``limit`` parameter. The
            frontend can use this to show 'displaying N of total_nodes'.
          default: false
        total_nodes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Nodes
          description: >-
            Actual node count before the cap was applied. Only populated when
            ``truncated=True``.
      type: object
      required:
        - nodes
        - edges
      title: MemoryGraphResponse
      description: Response for GET /graph (the full tenant graph, v2 contract).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MemoryGraphNode:
      properties:
        id:
          type: string
          title: Id
        entity_type:
          type: string
          title: Entity Type
        display_tier:
          type: string
          title: Display Tier
          description: >-
            Display tier set at MERGE time by memory-worker (ADR-010):
            ``entity`` (core) | ``activity`` (event-ish) | ``detail`` (child
            rows filtered out of the graph payload).
        display_color:
          type: string
          title: Display Color
          description: >-
            Display color token (ADR-010): blue, green, purple, amber, red,
            indigo, gray.
        properties:
          additionalProperties: true
          type: object
          title: Properties
      type: object
      required:
        - id
        - entity_type
        - display_tier
        - display_color
      title: MemoryGraphNode
      description: A single node in the Memory graph visualisation (v2 contract).
    MemoryGraphEdge:
      properties:
        source:
          type: string
          title: Source
        target:
          type: string
          title: Target
        type:
          type: string
          title: Type
        last_activity_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Activity At
          description: >-
            Last activity timestamp materialised on the edge at MERGE time
            (ADR-010). Null for edges where no source timestamp was available.
      type: object
      required:
        - source
        - target
        - type
      title: MemoryGraphEdge
      description: A single edge in the Memory graph visualisation (v2 contract).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````