Variables and context
Variables let one system prompt reuse configured facts without embedding every value directly in its instructions. They are one part of the context Wirevox assembles for an agent.
Use variables for stable, non-secret values such as a business name, hours, service area, or escalation department. Use knowledge retrieval for larger reference material and functions for live external state or actions.
In this topic
- Configure prompt variables — create, name, insert, update, and remove agent variables safely.
- Understand runtime context — see what Wirevox resolves or adds before the model receives the prompt.
- Troubleshoot variable references — fix warnings, unresolved tokens, stale values, duplicates, and unexpected substitutions.
The four context layers
| Layer | Best use | Example |
|---|---|---|
| Configured variables | Stable values maintained with the agent draft. | Business hours or service area. |
| Runtime context | Conversation-specific facts supplied by Wirevox. | Current local time or a known caller number. |
| Knowledge | Larger approved material searched when needed. | Policies, product documentation, or detailed FAQs. |
| Action results | Current data returned by an attached function. | Available appointment times or a customer record. |
Do not copy the same fact into several layers. Define one authoritative source and tell the agent how to behave when that source has no confirmed answer.
Variable lifecycle
Variables are part of the agent configuration:
- Define a name and value in the draft.
- Reference the name in the system prompt.
- Wirevox resolves the token when preparing a conversation.
- Browser testing uses the saved draft.
- Live conversations use the variables captured in the published version.
Changing a variable does not immediately alter an active agent. Save, test, and publish the draft before expecting live conversations to use the new value.
What variables are not
Variables are not:
- a secret store;
- contact or CRM fields that change per caller;
- live availability or account data;
- a replacement for knowledge retrieval;
- a function argument captured during a conversation; or
- an automatic source-verification mechanism.
The value becomes part of model context. Store credentials and private tokens in the appropriate protected integration or environment configuration, never in a prompt variable.
Recommended next step
Start with Configure prompt variables, then review runtime context before adding date, caller, or knowledge instructions to the system prompt.