Context Variables
Context Variables
In the agentic workflow architecture, variables play a crucial role in managing context across interactions.
Learn more about all the supported variables in Syntphony CAI
When an action captures data, it's stored in the conversation context and can be accessed using specific variable structures, as seen in the examples below.
Agentic Variables
Description
Where
hiddenContext._
eva.api.agentic.functionRequest
Internal key for passing parameters to a Rest call
hiddenContext._
eva.api.agentic.functionResult
Used to store the result of a request to an endpoint in the context
hiddenContext._
eva.api.agentic.userData
Pass information in context (e.g. ID number, email, etc.) or any relevant information to the agent. It can be any data type.
These variables create a dynamic memory system that persists information between agent interactions. By properly structuring your Code cells to read from and write to these context objects, you can build sophisticated workflows where each action builds upon previously collected information.
Manipulating Context
When an action captures data, it's stored in the conversation context and can be accessed using specific variable structures using Code cells.
User Data
For scenarios requiring proactive API queries or leveraging data captured outside the Agentic context, you can manually insert contextual user data without waiting for a direct action call. The variable hiddenContext._eva.api.agentic.userData
is used to set the user (customer) data for the agent. After setting the information in the context, the next call to OpenAI will send the user data and the request (text) from the client.

Note that userData
is specifically structured as an object with key-value pairs { key: value }, while functionResult.result_data
is flexible and can contain any data type returned from the API call, allowing for versatile data handling in your Code cells.
Success Scenario
When an Action is successfully executed:
The customer request is comprehended and routed to the specialist agent
Context and supporting data are transmitted to said agent
The agent identifies the appropriate action/tool
Function request data is inserted into context (hiddenContext._eva.api.agentic.functionRequest)
A request is made to the client API through a Code cell (formatting) and REST cell (execution)
Results are stored in context for agent processing
Example of context manipulation to Check Balance:

Error Handling
Follows the same structure as the success scenario, with little changes to the last Code cell. Initial Agentic Flow + Function Error:

Last updated
Was this helpful?