Skip to content

Feature Request: Add Total Token Usage in Workflow as a System Variable #21848

@half-6

Description

@half-6

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

I’d like to request a feature enhancement for workflows. It would be extremely helpful to have access to the total token usage of a workflow run — ideally exposed through a system variable like sys.total_tokens.

This feature is very important for our team, especially as we evaluate upgrading to a Team Plan. Having visibility into token consumption would allow us to:

  • Monitor and optimize token usage more effectively.
  • Make dynamic decisions within workflows based on cost.
  • Better manage and forecast usage at scale.

We believe this addition would greatly enhance the transparency and control of workflow operations.

Thanks for considering this request!

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions