Skip to content

Support additional pi-format stores as named agents via config #1393

Description

@ben-vargas

What do you want to change?

Let the config file declare extra pi-format session stores, each surfacing as its own agent in the unified reports:

{ "pi": { "stores": [ { "name": "omp", "path": "~/.omp/agent/sessions" } ] } }

Rows from a named store get their own agent name, [omp] -prefixed model labels, and the usual session metadata — alongside the default pi store, which is untouched.

Why?

Tools built on pi (oh-my-pi is the one I use) write pi-format stores at their own paths. ccusage can read one pi universe at a time via --pi-path/PI_AGENT_DIR, and labels everything it reads pi. So if you use pi and a fork, there's no way to see both in one unified report: you run a second invocation against the fork's path and try to merge the output yourself — except both come back tagged pi, so you can't tell them apart, and you've paid the full load twice.

Since the file format is identical, ccusage already knows how to read these stores. This just gives them a name.

How? (optional)

Config-only (no new CLI flags; per-agent subcommands stay a closed set — named stores appear in unified reports only). Reuses the existing pi parser with the store name threaded through for labels and dedupe identity. Store names are validated (pattern, no collisions with built-in agents, no duplicate/overlapping paths, so double-counting isn't possible), and costs are always computed from the real model name — the store name never participates in pricing lookup. Without pi.stores in config, output is byte-identical to today.

I have this implemented with tests and the config schema regenerated, and can open a PR.

Activity

  1. pullfrog commented on Jul 4, 2026

    @pullfrog
    Contributor
  2. ben-vargas commented on Jul 4, 2026

    @ben-vargas
    ContributorAuthor

    Related: #1193 asked for omp support specifically, via auto-detecting ~/.omp/agent/sessions as a fallback pi path. This proposal covers that use case and fixes what the fallback approach can't: a fallback only kicks in when the default pi store is absent/empty (so pi + omp users still see nothing), and everything it reads would be labeled pi, indistinguishable from real pi usage. Named stores make omp (or any pi fork) a first-class agent alongside pi, and the config entry is one line.

  3. ben-vargas commented on Jul 10, 2026

    @ben-vargas
    ContributorAuthor

    Closed with merge of #1397

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