Skip to content

How to communicate token usage? #604

@vemonet

Description

@vemonet

Hi,

Agent workflows require using LLMs, which translate in token usage, usually a dict containing prompt_tokens, completion_tokens, reasoning_tokens, total_tokens. Some systems might want to communicate token usage to the client (e.g. so they can monitor costs, or optimize tokens per request). I could not find any standard way to do so apart from using the CUSTOM event

Is there a recommended way to communicate token usage with AG-UI? Would it make sense to have one, or is it considered out of scope?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions