Skip to content

Record compute usage and cost per agent run #3762

Done

Description

@integry

Run summaries report LLM token cost only. Once runs can land on metered compute (Sprites, Fly Machines) operators need compute cost too; locally, CPU/memory per run is still useful.

Acceptance:

  • Runtime handle reports usage at completion: wall time, CPU-seconds, peak/avg memory, and optional cost (runtime-provided or computed from a configurable rate table).
  • Stored with the run, shown next to token cost in Web UI run summary, PR summary comment and MCP get_agent_run / cost breakdown.
  • DockerRuntime collects via docker stats/cgroup at end of run.

Implementation

Extend run persistence (knex migration) with compute usage columns; add to cost breakdown service and UI run summary component. Rate table configurable via env for remote runtimes.

Activity

  1. propr-dev commented on Nov 24, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3762/claude-opus-5-5-record-compute-usage-and--20261124-0846-gr9
    • Base Branch: 3758-epic-runtime-abstraction-sc0
    • Worktree: issue-3762-20261124-0846-claude-opus-5-5-gr9

    🔍 Track Task Execution

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions