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

# Tokens

[Updated in 2025.13](https://docs-classic.cognigy.com/release-notes/2025.13.md)

*Tokens* are visual representations of [CognigyScript](https://docs-classic.cognigy.com/ai/platform-features/cognigyscript) expressions that you store and reuse in Cognigy. Cognigy has a selection of default Tokens that are associated with Input, Context, and Profile objects.

> [!NOTE]
>
> Tokens automatically include curly brackets in the script. For this reason, you don't need to wrap the CognigyScript in the **Script** field or the Tokens in text fields with curly brackets.

## Restrictions

* Only Node text fields with the ![token](https://mintcdn.com/cognigy-docs-legacy/eGdkyf6N-EPpPKZA/_assets/icons/black-and-white/token.svg?fit=max\&auto=format\&n=eGdkyf6N-EPpPKZA\&q=85\&s=d551f4495579080252a3972e8d9b07d2) icon support Tokens.

## Working with Tokens

In **Manage > Tokens**, you can view, create, and delete Tokens as well as copy their Reference ID.

Tokens include the following information:

* **Name** — the Token name displayed in Nodes and the Token Management Menu.
* **Script** — the CognigyScript expression used to access the data. You don't need to wrap the CognigyScript expression in `{{ }}`.
* **Type** — the category of the Token in the search list:
  * **Input** — access to the data in the [Input](https://docs-classic.cognigy.com/ai/agents/develop/ai-agent-memory/input.md) object.
  * **Context** — access to the data in the [Context](https://docs-classic.cognigy.com/ai/agents/develop/ai-agent-memory/context.md) object.
  * **Profile** — access to the data in the [Profile](https://docs-classic.cognigy.com/ai/agents/develop/ai-agent-memory/profile.md) object.
  * **Custom** — specific CognigyScript expression with access to the data in one or more [Cognigy objects](https://docs-classic.cognigy.com/ai/agents/develop/ai-agent-memory/overview#lifespan-of-cognigy-objects). For example, `"Should your order " + context.customerOrderAmount + " be sent to " + profile.address + "?"`.

You can also create and use Tokens in the Node editor or create Tokens from [JSON editors](#create-and-use-tokens-in-the-node-editor).

> [!NOTE]
>
> Deleting a Token doesn't remove the CognigyScript from the Nodes that used the deleted Token.

### Default Tokens

Cognigy provides a selection of default tokens that you can readily use in your Flows.

> [accordion] Default Tokens
>
> | Token | Type | Description | Target path |
> | - | - | - | - |
> | AI Agent Description | Input | The description of the AI Agent, used to give context about the AI Agent's role. | `context.ai.description` |
> | AI Agent Image URL | Input | The URL of the AI Agent's avatar. | `context.ai.imageUrl` |
> | AI Agent Instructions | Input | System-level instructions used to guide the AI Agent's behavior during conversations. | `context.ai.instructions` |
> | AI Agent Knowledge Store | Input | The Knowledge Store assigned to the AI Agent, used for answering questions based on external documents. | `context.ai.knowledgeStore` |
> | AI Agent Name | Input | The display name of the AI Agent shown to users during conversations. | `context.ai.name` |
> | AI Agent Output | Input | The response sent by the AI Agent after processing the prompt and context. | `input.aiAgentOutput` |
> | AI Agent Reference ID | Input | The unique ID of the AI Agent used internally to identify and reference the specific AI Agent configuration. | `context.ai.referenceId` |
> | Answer | Input | Displays the extracted Input. For example, if the user is asked for a number and the answer was `I like the number 7` the extracted answer is `7`. | `input.result` |
> | Available Agents | Input | Displays the current available agents in your system. | `input.availableAgents` |
> | Channel | Input | Displays the current used channel. For example, `adminconsole`. | `input.channel` |
> | Current Flow Name | Input | Displays the current used Flow name. | `input.flowName` |
> | Current Time | Input | Displays the current time. For example, `2024-01-08T15:14:59+01:00` | `input.currentTime.ISODate` |
> | Data | Input | Displays the data payload of the message. | `input.data` |
> | Execution | Input | Represents the number of processed Inputs for this conversation. The first user message in a conversation has an execution value of 1, the second one has an execution value of 2, then 3 and so on. | `input.execution` |
> | First Attachment URL | Input | Attachments are an array pointing to the URL of the first element. | `input.attachments[0].url` |
> | First Currency Slot | Input | Array pointing to `input.slots`. | `input.slots.MONEY[0].value` |
> | First Date Slot | Input | Array pointing to `input.slots`. | `input.slots.DATE[0].start.ISODate` |
> | First Email Slot | Input | Array pointing to `input.slots`. | `input.slots.EMAIL[0]` |
> | First Number Slot | Input | Array pointing to `input.slots`. | `input.slots.NUMBER[0]` |
> | First Percentage Slot | Input | Array pointing to `input.slots`. | `input.slots.PERCENTAGE[0]` |
> | Handover Status | Input | No data is displayed when handover is not defined.  Indicates status:<ul><li>`completed` - the handover was finished by the agent.</li><li>`cancelled` - the user has cancelled the Handover request.</li><li>`error` - an error occurred when requesting the handover.</li></ul> | `input.handover.status` |
> | Input ID | Input | Displays the input ID of the last answer. | `input.inputId` |
> | Intent | Input | Displays a recognized Intent when intents are defined. | `input.intent` |
> | Intent Score | Input | Displays the score rate between `0` and `1` of a recognized intent. | `input.intentScore` |
> | KSearch:TopK Texts | Input | Displays the output of the Knowledge Search Node to the user. | `input.knowledgeSearch?.topK?.map(result=>result?.text).join('')` |
> | Language | Input | Displays the language code for the active NLU language. For example, `en-US`. | `input.language` |
> | Last Question Result | Input | Displays the extracted Input as the answer to an AI Agent question. For example, `I want to order a pizza`. | `input.result` |
> | LLM Prompt Result | Input | The response sent from the LLM, for example in the Search Extract Output or LLM Prompt Nodes. | `input.promptResult` |
> | Microsoft:SSO Request Status | Input | Used for Teams Single Sign-On (SSO). Indicates the status of the Azure Bot Services connection configured in the [Endpoint settings](https://docs-classic.cognigy.com/ai/agents/deploy/endpoint-reference/azure-bot-services.md#specific-endpoint-settings):<ul><li>**pending** - token just requested.</li><li>**declined** - token invalidated.</li><li>**completed** - SSO token received.</li></ul> | `input.data.microsoftSsoPermissionRequest` |
> | Microsoft:SSO Token | Input | The Microsoft Graph API SSO token for the Azure Bot Services connection configured in the [Endpoint settings](https://docs-classic.cognigy.com/ai/agents/deploy/endpoint-reference/azure-bot-services.md#specific-endpoint-settings). | `input.data.microsoftSsoToken` |
> | Mode | Input | Displays the type of the message. For example, `Text only`. | `input.mode` |
> | Session ID | Input | Displays the unique session ID of your conversation. | `input.sessionId` |
> | State | Input | Displays the state. For example, `default`. | `input.state` |
> | Text | Input | Displays the text you edited in the text field of a Node. | `input.text` |
> | Type | Input | Displays the type. For example, `Statement`. | `input.type` |
> | Understood | Input | Indicates `true`/`false`. | `input.understood` |
> | URL Token | Input | The URL token of the Endpoint. The identifier after the last `/` in the Endpoint URL. | `input.URLToken` |
> | User ID | Input | Displays the user ID. | `input.userId` |
> | VG: Caller Country | Input | Displays the caller's country. | `input.data.numberMetaData.country` |
> | VG: Caller Country Code | Input | Displays the caller's country code. | `input.data.numberMetaData.countryCallingCode` |
> | VG: Caller Number | Input | Displays the caller's number. | `input.data.numberMetaData.number` |
> | VG: Caller Number Type | Input | Displays the caller's number type. | `input.data.numberMetaData.type` |
> | VG: Caller URL | Input | Displays the caller's URL. | `input.data.numberMetaData.url` |
> | xApp PIN Page URL | Input | Displays the PIN Page URL. | `input.apps.baseUrl` |
> | xApp Session PIN | Input | Displays the Session PIN. | `input.apps.session.pin` |
> | xApp Session URL | Input | Displays the Session URL. | `input.apps.url[]` |
> | Short-Term Memory | Context | Displays the short-term memory of the conversation, as defined in the [AI Agent Node settings](https://docs-classic.cognigy.com/ai/agents/develop/node-reference/ai/ai-agent.md). | `context.shortTermMemory` |
> | Accepted GDPR | Profile | Indicates `true`/`false`; means accepted / not accepted. | `profile.accepted_gdpr` |
> | Age | Profile | Displays the customer's age. | `profile.age` |
> | Birthday | Profile | Displays the customer's birthday. | `profile.birthday` |
> | Customer Number | Profile | Displays the customer number. | `profile.customerNumber` |
> | Email | Profile | Displays the customer's email address. | `profile.email` |
> | First Name | Profile | Displays the customer's first name. | `profile.firstname` |
> | Gender | Profile | Displays the customer's gender. | `profile.gender` |
> | Goals | Profile | Displays the defined tasks. | `profile.tasks` |
> | Last Name | Profile | Displays the customer's last name. | `profile.lastname` |
> | Location | Profile | Displays the customer's location. | `profile.location` |
> | Prevent Data Collection | Profile | Indicates, if available, `true`/`false`; shows whether data collection is active or not. | `profile.prevent_data_collection` |
> | Profile Picture | Profile | Contains the URL to a profile picture. | `profile.profilepic` |

### Create and Use Tokens in the Node Editor

By clicking ![open token list](https://mintcdn.com/cognigy-docs-legacy/eGdkyf6N-EPpPKZA/_assets/icons/black-and-white/token.svg?fit=max\&auto=format\&n=eGdkyf6N-EPpPKZA\&q=85\&s=d551f4495579080252a3972e8d9b07d2) in a text field, you open the Token list. You can search for a Token in the search field at the top or scroll through the Token types. To create a Token, click ![create token](https://mintcdn.com/cognigy-docs-legacy/eGdkyf6N-EPpPKZA/_assets/icons/blue/plus-transparent.svg?fit=max\&auto=format\&n=eGdkyf6N-EPpPKZA\&q=85\&s=9290e973d7fec2b9ca72e01259efca87).

### Create Tokens from JSON Editors

To create a Token from a JSON editor, right-click a CognigyScript expression and select **Create Token from JSON Path**. The selected CognigyScript expression is added to the **Script** field. If you highlight any code snippet and create a Token from the JSON path, the highlighted code is added to the **Name** field.

## Example

The default Token named **Text** represents `{{input.text}}`. The following image shows the **Text** Token in a Node and the corresponding CognigyScript expression after it:

![Text Token in a Node alongside its CognigyScript expression](https://mintcdn.com/cognigy-docs-legacy/sbu8K_1z3Hht9e7i/_assets/ai/develop/tokens/token-example.png?fit=max\&auto=format\&n=sbu8K_1z3Hht9e7i\&q=85\&s=f03e54befce6a8e9636c23da62fe8095)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.