Overview
Instead of repeating the same contextual logic in every agent or prompt, content variables let you define key–value pairs once and reference them wherever needed. When referenced, the Platform resolves all keys in the content object, fetches any dynamic values (such as memory variables), and makes the data available in the session history. This eliminates redundant memory lookups and ensures consistent data access across all agents. Example Suppose multiple agents need user details. Instead of having each agent query the memory store separately, create a content variable group calledUserContext:
| Key | Value |
|---|---|
username | {{memory.userdetails.name}} |
location | {{memory.userdetails.location}} |
preferredLang | {{memory.userdetails.preferredLang}} |
When to Use Content Variables
Use content variables when:- Multiple agents need access to the same contextual data.
- You want to bundle related fields into a single logical object.
- You want to avoid repeated memory lookups across agents or prompts.
Create a Content Variable
- Go to Settings > Content.
- Click + New Content.
-
Fill in the following fields:
Field Description Name Unique identifier for the content variable. Display Name Display name shown in the UI. Description Brief description of the variable’s purpose. Contextual Information Key–value pairs that define the variable. Values can be static strings or dynamic references to memory stores or environment variables. - Click Create.
Access Content Variables
Use the following format to reference a content variable in prompts, tools, or workflows:guidelines with a key prefLang is referenced as: