In Coworkers.ai , a $context is the bot’s internal memory — a set of named variables used to store and manage information during a conversation.
Each conversation stores its own $contexts and you can explore them in the Discussions/Calls detail:
What gets stored in $context?
$context values are created automatically or manually and are updated throughout the conversation. They include:
System contexts
-
✅ Discussion metadata (stored with
$sys_prefix, e.g., start time, system state, etc.)
User contexts
-
✅ API responses — your mapped values (e.g., delivery status, user account info) + system info (e.g., response status)
-
✅ Manually set values (e.g.,
$user_verified = "true"from a Context module or a Lambda (code block) module in the dialog flow -
✅ Dialog flow modules — values from modules that try to detect, understand, and store particular pieces of information (e.g., the Entities module, the Form module, Numbers extraction, Name extraction, etc.).
-
Each module describes the
$contextvalues it sets in its settings panel when you click on it.
-
$context values set by Name extraction module
To manually set, edit, delete, increment, decrement, or copy a value to another context key, use the Context module in the dialog flow.
Where can $context be used?
$context values can be used anywhere in your dialog flow to steer your dialog flow logic, personalize answers, or drive decisions.
1. In Conditions
Use context values to route the conversation:
-
Check if a value exists or not, and react accordingly
-
Compare numbers, strings, booleans, or two
$contextvalues
$api_client_type context value = vip, and the “Others” path in all other cases.
2. In Bot Replies
Insert dynamic data into text replies, buttons, or speech:
3. In most Module settings inputs
Use $context inside:
-
Prompts in the AI Knowledge or other LLM modules
-
Button actions, links, redirect URLs, etc.
4. In Lambda (a custom code block - JavaScript)
Access and manipulate all $context values freely in the Lambda module.
Note: All $context values are stored in the context object, so must be prefixed with context..
return {
$full_name: context.$first_name + " " + context.$last_name
}
All context values are stored as strings.