---
type: email
from: Alex Flash <notifications@github.com>
subject: [openai/openai-agents-python] Getting request tokens for the agent as

 a tool (Issue #1520)
received: 2026-03-05 10:10:10
date_header: Mon, 18 Aug 2025 09:20:46 -0700
priority: normal
status: awaiting_approval
uid: 27964
---

## Email Content

**From:** Alex Flash <notifications@github.com>
**Subject:** [openai/openai-agents-python] Getting request tokens for the agent as

 a tool (Issue #1520)
**Date:** Mon, 18 Aug 2025 09:20:46 -0700

### Body (preview)

pipedude created an issue (openai/openai-agents-python#1520)



### Question



Hi! I have a problem of this kind, I use a multi-agent system where the Main agent has a Deep Agent as a tool. The problem is that I can't get data about the tokens spent by the Deep agent through the API. When using Usage, I only receive the cost of tokens for the initial and final Main Agent request and do not receive the cost of intermediate requests, in this case, the Deep agent. Maybe I'm doing something wrong?



This is the response received using Usage:

[raw_response.txt](https://github.com/user-attachments/files/21839530/raw_response.txt)



This is the initial request, these tokens are in Usage.

<img width="1571" height="916" alt="Image" src="https://github.com/user-attachments/assets/b6bc9308-d2ee-432d-91d0-e2bebffdbd25" />



This is an intermediate Deep Agent request, and these tokens are NOT included in Usage.

<img width="1580" height="921" alt="Image" src="https://github.com/user-attachments/assets/47bdd286-4f53-488d-b811-899c3183db86" />



This is the final request, these tokens are also in Usage.

<img width="1579" height="926" alt="Image" src="https://github.com/user-attachments/assets/cc0c3256-5dbb-4985-adcb-bc834ca3d100" />



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/issues/1520

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/issues/1520@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
