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