What is $context?
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
$context
values it sets in its settings panel when you click on it.

Example of $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
$context
values

This Condition module triggers the “Premium Customer” path if the $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:

This Message module will display the actual stored values of the contexts, so, e.g., “Hello Ms. Coworky! How can I help you?”
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.