Skip to main content
Back to How-to Guides As users interact with AI for Service (XO), the platform collects contextual data such as user preferences, channel details, order information, and session data. You can pass this context to the Agent Platform so agents can use it for personalized, context-aware responses and tool execution.

Use Cases

Use CaseExample
Priority handlingPass customer tier or status for routing.
Channel-specific responsesShare channel type information.
PersonalizationTransfer user preferences.
Session continuityInclude session context for ongoing conversations.

Prerequisites

Setup

Step 1: Create or Identify Variables

In AI for Service, create or use existing variables in the context object (for example, context.userInfo.name or context.channel.type). These capture runtime data to pass as metadata. Metadata variables

Step 2: Configure Metadata in the Automation Node

  1. Go to Flow & Channels > Automation Routing > Routing Modes.
  2. For any welcome flow, select More options (…) > Automation Settings.
  3. Confirm that Full Autonomy, the Agentic app, and the environment are selected.
  4. In the Metadata section, click + Add and enter key-value pairs:
    • Key: A logical name (for example, name).
    • Value: The XO variable path (for example, context.userInfo.name).
    Changes are auto-saved.
Metadata configuration

Step 3: Access Metadata in Agent Platform

The metadata is automatically stored in the agent’s memory under sessionMeta.metadata. Access it in agent prompts, supervisor prompts, or code tools:
{{memory.sessionMeta.metadata.keyname}}
Examples
LocationExample
Agent PromptThe customer's current order is {{memory.sessionMeta.metadata.ordernumber}}.
Supervisor PromptAssist the agent based on customer tier: {{memory.sessionMeta.metadata.customerTier}}.
For code tools, see Memory Stores in Agentic Apps. Metadata in Agent Platform

Debug Metadata

During execution, metadata variables are injected into the memory store and visible in the Traces tab.
  1. Start a test conversation from AI for Service with metadata.
  2. Navigate to the relevant session or trace in Agent Platform.
  3. Verify that memory variables are resolved and values are correct.
Metadata in Traces