I’m using the AI Agent node with the DeepSeek Chat Model (as a sub-node).
My issue is that I need to get the tokenUsage data for cost tracking. When I click on the Model sub-node and check its own output, the information is there (prompt, completion, and total tokens). However, the AI Agent node does not include this information in its output, even though I have the “Return Intermediate Steps” option enabled.
How can I access these specific values from the model to use them in the next nodes of my workflow?
good day @emiliano2025
I would avoid using the AI Agent final output as the control point for billing or audit data. Even if the model sub-node shows token usage internally, the Agent output is mainly the orchestration result, not a guaranteed cost-reporting contract. For cost tracking, I’d design the workflow with a separate measurable model step or branch where the usage metadata can be validated before continuing, then pass the result forward to the rest of the flow. That gives you a more reliable control point without depending on the Agent response format.