Skip to content

AI Agent Memoryยถ

In Cognigy.AI, the AI Agent Memory refers to the data from the user, user input, or conversation the AI Agent can retrieve. The AI Agent memory is stored in Cognigy.AI objects which you can access using CognigyScript and Tokens. You can retrieve the stored information to generate context-aware AI Agent answers and control your Flows better, for example, with Intent Conditions.

Cognigy.AI objects are JSON objects that store different types of information:

  • Input object โ€” the user input information, such as the Intents in the user's message, the Channel through which the user interacts with the AI Agent, and other relevant metadata.
  • Context object โ€” session-specific information, such as selected products or the user's current location.
  • Profile object โ€” Contact Profile data, such as user names and email addresses.

How to Access the AI Agent's Memoryยถ

The following table shows how to access values from the Input, Context, and Profile objects with CognigyScript:

Input Context Profile
Variable input context profile
Shortcut ci cc cp
Example {{input.text}} {{context.selectedHotel}} {{profile.firstname}}
Shortcut Example {{ci.text}} {{cc.selectedHotel}} {{cp.firstname}}

Lifespan of Cognigy.AI Objectsยถ

The lifespan of Cognigy.AI objects varies depending on their type:

  • Input โ€” each new user input and Flow execution generates a new Input object.
  • Context โ€” kept throughout the entire chat or call session.
  • Profile โ€” stored persistently to preserve information, such as user name, throughout conversations.

The following image shows a comparison of the lifespans of Cognigy.AI objects: