optimistic-gold•2mo ago
Agent Step Still not Showing CardV2
My Agent step calls a function that return cardV2 but the agent is unable to display the card trace elements.


1 Reply
Here’s what usually causes a CardV2 not to appear when it’s generated from a Function inside an Agent step, and how to fix it.
1. Make sure the Function returns a
The Dialog Manager only renders elements that are delivered through the top-level
At minimum you need one of:
The trace
After updating the function, re-publish the project and open the Test Tool / Web Chat. The card should now render immediately after the Agent step runs. If the object you return matches the snippet above and you still don’t see anything, open the DevTools network tab while testing; the
1. Make sure the Function returns a
trace
arrayThe Dialog Manager only renders elements that are delivered through the top-level
trace
property. Returning the raw object (or a property called traces
) will be ignored.
2. Use the exact CardV2 payload shapeAt minimum you need one of:
title
, description.text
, or imageUrl
. Buttons are optional but, if present, must follow the structure in the example above.
3. Keep the type string exactThe trace
type
must be cardV2
(all lower-case “v2”).
4. Publish & test in the chat widgetAfter updating the function, re-publish the project and open the Test Tool / Web Chat. The card should now render immediately after the Agent step runs. If the object you return matches the snippet above and you still don’t see anything, open the DevTools network tab while testing; the
/interact
response should contain a type:"cardV2"
trace. If it’s there, the widget will render it—if it isn’t, the function isn’t returning it in the right place.
Reference: Trace specification → CardV2 https://docs.voiceflow.com/reference/trace-types