Skip to main content

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​

The four context layers​

LayerBest useExample
Configured variablesStable values maintained with the agent draft.Business hours or service area.
Runtime contextConversation-specific facts supplied by Wirevox.Current local time or a known caller number.
KnowledgeLarger approved material searched when needed.Policies, product documentation, or detailed FAQs.
Action resultsCurrent 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:

  1. Define a name and value in the draft.
  2. Reference the name in the system prompt.
  3. Wirevox resolves the token when preparing a conversation.
  4. Browser testing uses the saved draft.
  5. 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.

Start with Configure prompt variables, then review runtime context before adding date, caller, or knowledge instructions to the system prompt.