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

# Remember one fact, stored as written

> For a fact the agent has already distilled: `text` is stored as given, with nothing extracted from it. Send a transcript to `ingest` instead. Remembering the same text again writes the same memory rather than a second copy of it, so a retry is safe. The write runs asynchronously -- poll the returned operation.



## OpenAPI

````yaml /openapi/source/external/agent-memory/agent-memory.json post /ai/memory/namespaces/{namespace}/profiles/{profile_id}/remember
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}/remember:
    post:
      tags:
        - Memory
      summary: Remember one fact, stored as written
      description: >-
        For a fact the agent has already distilled: `text` is stored as given,
        with nothing extracted from it. Send a transcript to `ingest` instead.
        Remembering the same text again writes the same memory rather than a
        second copy of it, so a retry is safe. The write runs asynchronously --
        poll the returned operation.
      operationId: RememberFact
      parameters:
        - name: profile_id
          in: path
          required: true
          schema:
            type: string
            title: Profile Id
        - name: namespace
          in: path
          required: true
          schema:
            type: string
            title: Namespace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RememberRequest'
            example:
              text: Prefers window seats and flies out of ORD
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RememberResponse'
              example:
                data:
                  operation_id: op_01HZY4M7Q9
                  profile_id: caller:+13128675309
                  source_id: 9af23d17-2b6c-4d8e-a1f0-3c4b5d6e7f80
        '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 namespace does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: namespace_not_found
                    detail: no such namespace
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: invalid_request
                    detail: 'body.text: String should have at least 1 character'
        '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 response = await
            client.ai.memory.namespaces.profiles.remember('namespace',
            'profile_id', {
              text: 'text',
            });


            console.log(response.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
            )
            response = client.ai.memory.namespaces.profiles.remember(
                namespace="namespace",
                profile_id="profile_id",
                text="text",
            )
            print(response.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\tresponse, err := client.AI.Memory.Namespaces.Profiles.Remember(\n\t\tcontext.TODO(),\n\t\t\"namespace\",\n\t\t\"profile_id\",\n\t\ttelnyx.AIMemoryNamespaceProfileRememberParams{\n\t\t\tText: \"text\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

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

            import
            com.telnyx.sdk.models.ai.memory.namespaces.profiles.ProfileRememberParams;


            public final class Main {
                private Main() {}

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

                    ProfileRememberParams params = ProfileRememberParams.builder()
                        .text("text")
                        .build();
                    var response = client.ai().memory().namespaces().profiles().remember("namespace", "profile_id", params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.ai.memory.namespaces.profiles.remember("namespace",
            "profile_id", text: "text")


            puts(response)
        - 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 {
              $response = $client->ai->memory->namespaces->profiles->remember(
                'namespace',
                'profile_id',
                text: 'text',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx ai:memory:namespaces:profiles remember \
              --api-key 'My API Key' \
              --namespace namespace \
              --profile-id profile_id \
              --text text
components:
  schemas:
    RememberRequest:
      properties:
        text:
          type: string
          minLength: 1
          title: Text
      type: object
      required:
        - text
      title: RememberRequest
    RememberResponse:
      properties:
        data:
          $ref: '#/components/schemas/AcceptedMemory'
      type: object
      required:
        - data
      title: RememberResponse
    TelnyxErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TelnyxError'
    AcceptedMemory:
      properties:
        operation_id:
          type: string
          title: Operation Id
        profile_id:
          type: string
          title: Profile Id
        source_id:
          type: string
          title: Source Id
          description: >-
            Identifies one source within its profile: an ingested session, or
            one remembered fact. Returned by `ingest` and `remember` when the
            write is accepted. Re-ingesting a session keeps its source id.
      type: object
      required:
        - operation_id
        - profile_id
        - source_id
      title: AcceptedMemory
    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

````