Cost per outcome
Sales as Code shows cost per forecast and per won deal. Three parts to go.
Use case
Cost per outcome: a workflow across RepoOps, PromptCompute, CommitOps, Sales as Code that starts from monthly, or when spend crosses a budget line.
Who would use it
Founders and engineering leaders paying for agent work.
What value it provides
Spend joined to outcomes across products: dollars per recovered incident, per kept promise and per won deal, with a budget a person approves.
Why it matters to the user
You can defend agent spend in a board meeting, and cut the spend that produces nothing.
The problem
Agent spend arrives as tokens and dollars per vendor. Nobody can say what a recovered incident, a kept promise or a won deal cost.
Expected outcomes
- Cost per recovered incident
- Cost per kept promise
- Share of agent spend tied to an outcome: target above 80%
Each run records its outcome as met, not met or not measured.
How it runs
Products and connections
| Product | Role in this workflow | Docs |
|---|---|---|
| RepoOps | Read spend per outcome (spend_outcome); Send agent cost back to CommitOps | Reference · RepoOps docs |
| PromptCompute | Hold spend above the budget for a person (cumulative limit) | Reference · PromptCompute docs |
| CommitOps | Reference · CommitOps docs | |
| Sales as Code | Read cost per forecast and per won deal | Reference · Sales as Code docs |
Outside the family: Your model provider billing export (optional).
What a person approves
| Action | Default risk |
|---|---|
credits.top_up | high |
subscription.plan.change | medium |
Action keys are from the PromptCompute catalog.
How to access it from an agent
An agent will run this workflow through the PromptReports MCP server or API, with an ID agent token. The runner will then call each product for it. Proposed
// MCP: https://mcp.promptreports.ai/mcp (Proposed)
start_run({
workflow: "cost-per-outcome",
inputs: { "period": "This month", "budget": "$4,000", "outcomes": "Incidents, promises, deals" },
dry_run: false
})
// returns { run_id, status: "running", approvals_url }
get_run({ run_id }) // poll, or subscribe to run eventscurl -X POST https://api.promptreports.ai/v1/runs \
-H "Authorization: Bearer $PROMPTREPORTS_AGENT_TOKEN" \
-d '{"workflow":"cost-per-outcome"}'Or call the products yourself, step by step:
| Product | Endpoint | Tools |
|---|---|---|
| RepoOps | https://mcp.repoops.ai/mcp | search_brain get_pre_edit_context propose_brain_entry get_incident_attribution |
| PromptCompute | https://mcp.promptcompute.ai/mcp | request_approval get_approval cancel_approval answer_approver |
| CommitOps | https://commitops.ai/api/mcp | whoami list_assertions get_assertion promised_not_started |
| Sales as Code | To confirm | to confirm |
Set it up
- Sign in at app.promptreports.ai with PromptReports ID, and pick your org.
- Connect RepoOps, PromptCompute, CommitOps, Sales as Code on the Connections page. Link Your model provider billing export (optional) through the product that uses it.
- Register the agent that will run it on the Agents page, and give it a version manifest.
- Set the approval policy for credits.top_up, subscription.plan.change. Start with Require approval; critical actions are never auto.
- Fill in the inputs (Period, Budget, Outcomes) and choose the trigger: monthly, or when spend crosses a budget line.
- Start a dry run. It will count no workflow request, and it shows which steps would record missing evidence.
- Start the run. Approve each gate in the approvals inbox, then read the signed record when it ends.