Workflows AI tasks need a metered billing item before the flag ramps
@mayteio is already working on this.
Since Aug 19, 2026.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 232
Description
Background
The workflow "Create AI task" action (#84345, #85511) lets a workflow create and run an agent task when it fires. These runs are currently unmetered: is_billable_compute in products/tasks/backend/logic/services/compute_quota.py only counts Desktop-provenance runs against PostHog Code credits, so workflow-origin runs (like other server-originated agent runs) bypass the quota check. See the review thread on #84345.
This is acceptable while the feature is flag-gated off. It is a precondition for ramping the workflow-ai-task-action flag.
Goal
A metered "workflows AI tasks" billing item, so the workflows product is attributed the cost and revenue of the agent runs it creates, and teams that exhaust their quota stop launching runs.
Metered credits over a per-run price: a workflow can fire tasks at event volume, and one run can cost 30 seconds or 30 minutes of agent time, so credits track the real cost.
Work
- Usage reporting for workflow-origin task runs (sandbox time + LLM spend), attributed to the workflows product.
- New
QuotaResourcefor workflows AI task credits, wired into quota limiting. - Billing service product configuration (separate repo).
- Include workflow-origin runs in
is_billable_computeagainst the new resource, soget_compute_quota_denial_reasonblocks runs once the quota is exhausted. - Decide the customer-facing surface: usage page, alerts, and what a blocked workflow run reports back to the workflow log.
Current bounds until this lands
- Deactivated organizations are blocked for all task runs.
- Each workflow caps its parallel runs (default 5, max 100).
- The feature flag is off everywhere.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.