Docs

Budgets and analytics

Set budgets per agent, team, author, repository, pull request and provider, then see where every dollar goes in the analytics dashboard.

1. Budget windows

Every review agent has a daily, weekly and monthly budget in US dollars. PURA checks them before each review starts and pauses reviews once a budget is reached, so spend stays within the numbers you set.

  • Daily resets at midnight UTC.
  • Weekly resets on Monday at midnight UTC.
  • Monthly resets on the 1st at midnight UTC.

Spend is measured from the token usage your provider reports for each review, priced at the model's rates.

Budgets and plan allowance are separate. Your budgets cap model spend. Your plan sets how many reviews you can run each month, and the count resets on the 1st. See pricing.

2. Where budgets apply

Budgets work at three levels, checked in this order:

  1. Per agent: one budget for everything the agent reviews.
  2. Per team, author, repository or pull request: set on an agent's Allow rules. You can budget by:
    • contributing team (the author's team)
    • reviewing team (the team requested to review)
    • author
    • repository
    • single pull request (a repository plus labels)
    Each matching team, author, repository or pull request gets its own budget. When one is reached, the agent keeps reviewing for everyone else.
  3. Per provider: a budget for each provider on the agent, so you control how much goes to each vendor. When one is reached, PURA moves to the next provider.

Tip: give a busy or experimental repository its own budget so it never draws down the rest of the agent's budget.

3. When a budget is reached

  • Provider budget: the next provider in the chain reviews the pull request.
  • Team, author, repository or pull request budget: the agent pauses for that one entity until the window resets.
  • Agent budget: the agent pauses until the window resets, and your other agents keep reviewing.

When no agent has budget left for a pull request, PURA comments on it with each agent, the budget that was reached and its window. Reviews resume on their own when the window resets, or as soon as you raise the budget.

4. The analytics dashboard

The dashboard shows where your review spend goes:

  • Summary: reviews, spend and tokens for the selected period.
  • Budgets: daily, weekly and monthly spend against each budget.
  • Leaderboards: your top agents, providers, models, repositories, users and teams.
  • Review logs: every review run with its agent, provider, model, findings by severity, usage and cost.
PURA analytics overview — review and cost summary cards, daily/weekly/monthly budget usage, and review-performance charts
Spend against each budget window, usage over time, and review results.
PURA analytics broken down by model — cost, findings, tokens, and tool calls per model
Cost, findings, tokens and tool calls per model.
PURA leaderboards — top agents, providers, models, repos, users, and teams
Leaderboards for agents, providers, models, repositories, users and teams.

Filter every view by date range (up to 30 days at a time), contributing team, reviewing team, repository, user, model, provider or agent.

Sign in with GitHub at app.pura.sh. Org owners and members of your org's pura-admins team have access.

Next