Skip to content

webchat: show token usage per reply and session total #39

Closed

Description

@melvincarvalho

Show input/output token counts as small muted text under each agent reply, plus a running session total in the header next to the model badge. ContainerOutput gains an optional usage field ({input_tokens, output_tokens}); both runners populate it (agent-micro: jsclaw/agent-micro#5; default runner: from the Agent SDK result event). Additive, non-breaking — gateway already spreads the whole output into the agent.output event. Tokens only, no dollar costs (provider pricing varies and goes stale).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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