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

# Read one memory, and what it came from

> One memory by its id, as `recall` and the listing return it, together with what it came from. A fact names its `source_id`: read it with `GET .../sources/{source_id}` to see what was stored. A memory derived from other memories names them in `derived_from` instead; read each of those to reach its source.



## OpenAPI

````yaml /openapi/source/external/agent-memory/agent-memory.json get /ai/memory/namespaces/{namespace}/profiles/{profile_id}/memories/{memory_id}
openapi: 3.1.0
info:
  version: 1.0.0
  title: Telnyx API
  x-latency-category: interactive
  x-endpoint-cost: light
  description: >-
    Long-term memory for AI agents. A profile per user, caller, or agent: write
    memories in with `ingest` or `remember`, and recall them with `recall`.
    Facts are extracted, and contradictions resolve to the newest.
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: Memory
    description: Write memories into a profile and recall them.
  - name: Profiles
    description: What a namespace and a profile hold.
  - name: Sources
    description: What a profile stored, and what its memories came from.
  - name: Operations
    description: Whether a write has finished.
  - name: Settings
    description: How a namespace's summaries are written.
paths:
  /ai/memory/namespaces/{namespace}/profiles/{profile_id}/memories/{memory_id}:
    get:
      tags:
        - Profiles
      summary: Read one memory, and what it came from
      description: >-
        One memory by its id, as `recall` and the listing return it, together
        with what it came from. A fact names its `source_id`: read it with `GET
        .../sources/{source_id}` to see what was stored. A memory derived from
        other memories names them in `derived_from` instead; read each of those
        to reach its source.
      operationId: GetMemory
      parameters:
        - name: namespace
          in: path
          required: true
          schema:
            type: string
            title: Namespace
            description: The namespace. `default` exists for every organization.
          description: The namespace. `default` exists for every organization.
        - name: profile_id
          in: path
          required: true
          schema:
            type: string
            title: Profile Id
            description: >-
              The profile: your identifier for the user, caller or agent this
              memory is about.
          description: >-
            The profile: your identifier for the user, caller or agent this
            memory is about.
        - name: memory_id
          in: path
          required: true
          description: A memory's id, as `recall` and the listing return it.
          schema:
            type: string
            title: Memory Id
            description: A memory's id, as `recall` and the listing return it.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemoryResponse'
              example:
                data:
                  id: mem_01HZY4
                  text: Invoices go to 220 W Chicago Ave.
                  recorded_at: '2026-08-26T21:14:11Z'
                  source_id: b1e6c0a2-4f3d-4a2e-9c7b-8e1f2a3b4c5d
                  derived_from: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not find any usable credentials in the request.
                    source:
                      pointer: /
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
        '404':
          description: The memory does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: memory_not_found
                    detail: no such memory
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: invalid_request
                    detail: memory id must be a UUID
        '502':
          description: Upstream error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: upstream_error
                    detail: the memory dataplane is unavailable
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


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


            const Memory = await
            client.ai.memory.namespaces.profiles.memories.retrieve('namespace',
            'profile_id', 'memory_id');


            console.log(Memory.data);
        - lang: Python
          source: |
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            memory = client.ai.memory.namespaces.profiles.memories.retrieve(
                "namespace",
                "profile_id",
                "memory_id",
            )
            print(memory.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmemory, err := client.AI.Memory.Namespaces.Profiles.Memories.Get(\n\t\tcontext.TODO(),\n\t\t\"namespace\",\n\t\t\"profile_id\",\n\t\t\"memory_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", memory.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    var response = client.ai().memory().namespaces().profiles().memories().retrieve("namespace", "profile_id", "memory_id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            memory =
            telnyx.ai.memory.namespaces.profiles.memories.retrieve("namespace",
            "profile_id", "memory_id")


            puts(memory)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $memory = $client->ai->memory->namespaces->profiles->memories->retrieve(
                'namespace',
                'profile_id',
                'memory_id',
              );

              var_dump($memory);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:memory:namespaces:profiles:memories retrieve \
              --api-key 'My API Key' \
              --namespace namespace \
              --profile-id profile_id \
              --memory-id memory_id
components:
  schemas:
    MemoryResponse:
      properties:
        data:
          $ref: '#/components/schemas/TracedMemory'
      type: object
      required:
        - data
      title: MemoryResponse
    TelnyxErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TelnyxError'
    TracedMemory:
      properties:
        id:
          type: string
          title: Id
        text:
          type: string
          title: Text
        recorded_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Recorded At
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
          description: >-
            The source this memory was extracted from. Set for a fact, which
            comes from exactly one source; null for a memory derived from other
            memories. Read it with `GET .../sources/{source_id}`. A source
            deleted a moment ago can still be named here, and then answers 404.
        derived_from:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Derived From
          description: >-
            The ids of the memories this one was derived from. Read each with
            `GET .../memories/{memory_id}` to reach its `source_id`. Set for a
            derived memory; null for a fact.
      type: object
      required:
        - id
        - text
        - source_id
        - derived_from
      title: TracedMemory
    TelnyxError:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key

````