Hi Akshat,
Adding some specifics to Jason's answer:
Defining the inputs
In AI Studio, open the agent and go to the Configuration tab. Add your variables under Start Context, giving each one a name, data type and description. Once the agent is published, they show up under Inputs on the Call Agentic Virtual Agent action. The action only lists published agents and always runs the latest published version, so republish after you add variables.
A few things to know:
• Only primitive types are supported. You can't pass a list of orders or a JSON object. Flatten what you need into strings, numbers or booleans, or let the agent fetch the detail with a data action tool.
• The description matters. The agent reads it to work out how to use the value. "Customer ID, already verified, use for the GetAccount tool" works much better than "custId".
• Use masking for string values the agent should carry but never see or say, such as auth tokens, UUIDs or internal IDs. They can still be passed into tools.
• Outputs are set up the same way under End Context. You can pick them from Start Context, Tool Input or Tool Output, with up to 50 outputs and 2,000 characters per string (longer values get truncated). After publishing you can add outputs but can't deselect ones you've already used.
Token and context sizing
• The total size of unmasked start context values is capped. Masked values don't count toward it. If you go over, the action takes the Failure path with the exit reason request.too.large, so handle that path in the flow rather than assuming success.
• Everything unmasked goes into the prompt on every turn. A large start context costs more tokens and adds latency for the whole conversation, not just the first turn.
• Don't send sensitive data such as card numbers in start context.
• Map the Exit Reason output (Error / Escalation / TriggeredByUser / Guardrails) to a variable and branch on it after the action. That gives you clean handling for escalations and failures.
I agree with Jason on the rule of thumb: pass identifiers and state (customer ID, auth status, locale, intent from the IVR), mask the internal ones, and let tools pull the rest.
Docs:
Call Agentic Virtual Agent action: https://help.genesys.cloud/articles/call-agentic-virtual-agent-action/
Start/End context configuration: https://help.genesys.cloud/409057
Regards
------------------------------
Stephan Taljaard
EMBEDIT s.r.o
------------------------------