<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									How to retrieve AI agent token usage details? - How To				            </title>
            <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/</link>
            <description>Callin.io Community Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Tue, 18 Aug 2026 16:48:48 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3481</link>
                        <pubDate>Tue, 29 Apr 2025 14:00:29 +0000</pubDate>
                        <description><![CDATA[Could you please ‘upvote’ this feature request?





Retrieve LLM Token Usage in AI Agents Feature Requests


    Hello!
I would like to extract the completion and prompt tokens info when us...]]></description>
                        <content:encoded><![CDATA[<p>Could you please ‘upvote’ this feature request?</p>

<aside class="quote" data-post="1" data-topic="68714">
<div class="title">
<div class="quote-controls"></div>
<img alt="" class="avatar" height="24" src="https://community.n8n.io/user_avatar/community.n8n.io/david.diaz.dev/48/50196_2.png" width="24" />
<a href="https://community.n8n.io/t/retrieve-llm-token-usage-in-ai-agents/68714">Retrieve LLM Token Usage in AI Agents</a> <a class="badge-category__wrapper" href="/c/feature-requests/5"><span class="badge-category" data-category-id="5" data-drop-close="true" style="--category-badge-color: #EA4B71;--category-badge-text-color: #FFFFFF" title="Suggest or vote for features you would like to have in callin.io!"><span class="badge-category__name">Feature Requests</span></span></a>
</div>
<blockquote>
    Hello!
I would like to extract the completion and prompt tokens info when using AI Agents. It would be highly beneficial for tracking my costs.
I have explored different workarounds presented here <a href="https://community.n8n.io/t/sum-total-openai-token-usage-across-entire-workflow-using-summarize/45817/5">Similar post 1</a> and <a href="https://community.n8n.io/t/retrieving-token-usage-from-summarization-chain/40592">Similar post 2</a>, but they do not function for AI Agents. There isn't a direct method to achieve this with callin.io nodes.
Please let me know if anyone has successfully retrieved this token information.
Thanks!
  </blockquote>
</aside>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>aminabudahab</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3481</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3480</link>
                        <pubDate>Tue, 29 Apr 2025 13:34:20 +0000</pubDate>
                        <description><![CDATA[Thanks for the reply. I just observed something with the data.

Is there a method to subscribe to a workflow and retrieve its results?

Another question is, what happens if I incorporate a c...]]></description>
                        <content:encoded><![CDATA[<p>Thanks for the reply. I just observed something with the data.</p>

<p>Is there a method to subscribe to a workflow and retrieve its results?</p>

<p>Another question is, what happens if I incorporate a custom node at the conclusion of the workflow?</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>Bojan_Blazevski1</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3480</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3479</link>
                        <pubDate>Tue, 29 Apr 2025 13:22:07 +0000</pubDate>
                        <description><![CDATA[You should place it within a sub-workflow. While it can reside in the same workflow file, I&#039;d advise against using it in the same execution. Doing so might lead to processing a significantly...]]></description>
                        <content:encoded><![CDATA[<p>You should place it within a sub-workflow. While it can reside in the same workflow file, I'd advise against using it in the same execution. Doing so might lead to processing a significantly larger volume of data.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>solomon</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3479</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3478</link>
                        <pubDate>Tue, 29 Apr 2025 11:52:50 +0000</pubDate>
                        <description><![CDATA[Is it possible to run this callin.io node within the same workflow? Perhaps at the conclusion of the existing nodes.]]></description>
                        <content:encoded><![CDATA[<p>Is it possible to run this callin.io node within the same workflow? Perhaps at the conclusion of the existing nodes.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>Bojan_Blazevski1</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3478</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3477</link>
                        <pubDate>Tue, 22 Apr 2025 16:04:16 +0000</pubDate>
                        <description><![CDATA[Sharing the solution here for easier access by others:

By retrieving the execution data, you can obtain the token usage from the model.

image940×694 56.5 KB

This information was originall...]]></description>
                        <content:encoded><![CDATA[<p>Sharing the solution here for easier access by others:</p>

<p>By retrieving the execution data, you can obtain the token usage from the model.</p>

<div class="lightbox-wrapper"><a class="lightbox" data-download-href="https://community.n8n.io/uploads/default/d865999761e58effca963dd4dd3536a452e63ca7" href="https://community.n8n.io/uploads/default/original/3X/d/8/d865999761e58effca963dd4dd3536a452e63ca7.png" title="image"><img alt="image" data-base62-sha1="uSkOfIvZBp7eFvFcnMZj2lgFDsH" data-dominant-color="3F3E40" height="500" src="https://community.n8n.io/uploads/default/optimized/3X/d/8/d865999761e58effca963dd4dd3536a452e63ca7_2_677x500.png" width="677" /><div class="meta"><span class="filename">image</span><span class="informations">940×694 56.5 KB</span></div></a></div>

<p>This information was originally posted in the topic <a href="https://community.n8n.io/t/retrieve-llm-token-usage-in-ai-agents/68714/20">here</a>.</p>

<p>Since the solution provided by the original poster includes this detail (even though it's a paid option), I'm marking their reply as the solution and adding my response to the top of my question.</p>

<p>This approach ensures that both pieces of valuable information are easily discoverable for anyone facing a similar issue in the future.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>solomon</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/paged/2/#post-3477</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3476</link>
                        <pubDate>Tue, 22 Apr 2025 15:51:50 +0000</pubDate>
                        <description><![CDATA[I operate callin.io as the backend for a SaaS initiative. When our users engage with our agents, I aim to record the token consumption to deduct it from their token balance.

Currently, the ...]]></description>
                        <content:encoded><![CDATA[<p>I operate callin.io as the backend for a SaaS initiative. When our users engage with our agents, I aim to record the token consumption to deduct it from their token balance.</p>

<p>Currently, the interim approach involves utilizing the OpenAI nodes rather than the AI Agent node.</p>

<p>However, we will soon require the AI Agent node as well.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>solomon</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3476</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3475</link>
                        <pubDate>Tue, 22 Apr 2025 04:25:09 +0000</pubDate>
                        <description><![CDATA[Hi,

Potential use cases for a solution like this:


Cost management (internal/client-facing)
Security and abuse mitigation.
Alerting: similar to the above points.
Performance / debugging / ...]]></description>
                        <content:encoded><![CDATA[<p>Hi,</p>

<p>Potential use cases for a solution like this:</p>

<ul>
<li>Cost management (internal/client-facing)</li>
<li>Security and abuse mitigation.</li>
<li>Alerting: similar to the above points.</li>
<li>Performance / debugging / monitoring: Analyzing response time per workflow versus tokens utilized.</li>
<li>Unified solution: I was previously exploring OpenAI stats to integrate into a Grafana dashboard, but this approach could encompass multiple model providers.</li>
</ul>

<p>I'm confident there are even more possibilities.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>jcuypers</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3475</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3474</link>
                        <pubDate>Mon, 21 Apr 2025 23:16:37 +0000</pubDate>
                        <description><![CDATA[Just wondering, what&#039;s the practical application for this? Is the idea to handle expenses for unusual cases?]]></description>
                        <content:encoded><![CDATA[<p>Just wondering, what's the practical application for this? Is the idea to handle expenses for unusual cases?</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>mohamed3nan</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3474</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3473</link>
                        <pubDate>Mon, 21 Apr 2025 23:10:14 +0000</pubDate>
                        <description><![CDATA[Unfortunately, that&#039;s an estimator, not actual data extraction from the workflow.

From what I can see, it retrieves the text, the AI model, and sends it to an external service to estimate t...]]></description>
                        <content:encoded><![CDATA[<p>Unfortunately, that's an estimator, not actual data extraction from the workflow.</p>

<p>From what I can see, it retrieves the text, the AI model, and sends it to an external service to estimate the cost. Very clever, but still a bit cumbersome.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>solomon</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3473</guid>
                    </item>
				                    <item>
                        <title>RE: How to retrieve AI agent token usage details?</title>
                        <link>https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3472</link>
                        <pubDate>Mon, 21 Apr 2025 22:48:07 +0000</pubDate>
                        <description><![CDATA[Hi

I&#039;m confident you can retrieve this information from the underlying tables.

Here&#039;s a workflow that was recently shared, which is likely based on that approach:





Solved  - How to Get...]]></description>
                        <content:encoded><![CDATA[<p>Hi</p>

<p>I'm confident you can retrieve this information from the underlying tables.</p>

<p>Here's a workflow that was recently shared, which is likely based on that approach:</p>

<aside class="quote quote-modified" data-post="1" data-topic="100039">
<div class="title">
<div class="quote-controls"></div>
<img alt="" class="avatar" height="24" src="https://community.n8n.io/user_avatar/community.n8n.io/joe_peres/48/50177_2.png" width="24" />
<a href="https://community.n8n.io/t/solved-how-to-get-llm-token-usage-from-ai-agents/100039">Solved <img alt="white_check_mark" class="emoji" height="20" src="https://community.n8n.io/images/emoji/twitter/white_check_mark.png?v=12" title="white_check_mark" width="20" /> - How to Get LLM Token Usage from AI Agents</a> <a class="badge-category__wrapper" href="/c/tips/14"><span class="badge-category" data-category-id="14" data-drop-close="true" style="--category-badge-color: #EA4B71;--category-badge-text-color: #FFFFFF" title="A place to share knowledge and ask for the best techniques when using callin.io to get the most out of it."><span class="badge-category__name">Tips &amp; Tricks</span></span></a>
</div>
<blockquote>
    Hey community! <img alt="wave" class="emoji" height="20" src="https://community.n8n.io/images/emoji/twitter/wave.png?v=12" title="wave" width="20" /> 
I've been looking for a way to get accurate Tokens used counts for some time and have noticed a few recent questions in the community about tracking token usage and cost. To address this, I developed Token Estim8r, a plug-and-play workflow. You can integrate it into any other workflow using a simple HTTP Request at the end to get accurate token usage and costs added to a Google Sheet, along with an individual breakdown in the JSON Array column.
<a class="anchor" href="#p-246280-click-here-to-see-the-template-on-n8n-token-estim8rhttpsjoeperes3g3rfzx-1" name="p-246280-click-here-to-see-the-template-on-n8n-token-estim8rhttpsjoeperes3g3rfzx-1"></a>click here to see the template on callin.io <a href="https://joeper.es/3G3RFZX" rel="noopener nofollow ugc">Token Estim8r</a>
<a class="lightbox" data-download-href="https://community.n8n.io/uploads/default/ac8da0d44cbc84611f2232b134e22a8fd6b3ae2c" href="https://community.n8n.io/uploads/default/original/3X/a/c/ac8da0d44cbc84611f2232b134e22a8fd6b3ae2c.jpeg" title="Evil King Browser Devours Your Tokens">[Evil…</a>
</blockquote>
</aside>

<p>Reg,
J.</p>]]></content:encoded>
						                            <category domain="https://community.callin.io/community/how-to/">How To</category>                        <dc:creator>jcuypers</dc:creator>
                        <guid isPermaLink="true">https://community.callin.io/community/how-to/how-to-retrieve-ai-agent-token-usage-details/#post-3472</guid>
                    </item>
							        </channel>
        </rss>
		