BrainstormRouter is a personal research project by Justin Jilg. It is not a commercial product, has no SLA and is not intended for production use.

Outcomes

Record what your agent did and what it led to. Approval and edits improve model choice; engagement and revenue are reported, not learned from.

Outcomes

When an agent works through BrainstormRouter, the model request is only the start. The agent writes a post, a person edits and approves it, it goes out, replies arrive two days later and a deal closes two weeks after that.

The outcome ledger connects those facts. You record the action (the post, the email, the ad) once, link the request ids that produced it, and report outcome events against it for as long as they keep arriving.

The three calls

StepRESTMCP toolSDK
Record an actionPOST /v1/outcomes/actionsbr_outcome_action_recordclient.outcomes.recordAction
Report outcomesPOST /v1/outcomes/actions/{actionId}/eventsbr_outcome_reportclient.outcomes.report
Read the reportGET /v1/outcomes/summarybr_outcome_summaryclient.outcomes.summary
Read one actionGET /v1/outcomes/actions/{actionId}—client.outcomes.getAction

Writes need router.write; reads need router.read. An OAuth key with the completions or tools scope can use all of them.

Record an action

curl -X POST https://api.brainstormrouter.com/v1/outcomes/actions \
  -H "Authorization: Bearer $BR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "launch-post-1",
    "kind": "post",
    "channel": "linkedin",
    "campaign": "q4-launch",
    "external_ref": "urn:li:share:7261",
    "task_type": "copywriting",
    "request_ids": ["req_0193…", "req_0194…"]
  }'
FieldNotes
idempotency_keyRequired. Recording the same key again returns the same action (created: false).
kindpost, email, dm, ad, landing_page, call_script or other.
channelFree text, stored lower-case: linkedin, x, email.
campaignYour label, for grouping.
external_refThe vendor's id for the post or message. An opaque id — never an email address or a name.
task_typeThe task type the routing loop learns under.
request_idsUp to 20 BrainstormRouter request ids that produced the action.
occurred_atWhen it happened, ISO-8601 UTC. Defaults to now. Not in the future, at most 90 days back.

The model is looked up, not reported

There is no model field. For each request id, BrainstormRouter reads its own usage record for your account and stores the model that actually served the request and what it cost.

A request id that is not in your usage records is not linked. It comes back in unresolved_request_ids, and the response does not say whether the id belongs to someone else, failed, or has not been written yet. If you record an action immediately after a completion and an id is unresolved, send the same action again with the same idempotency_key: a replay links the ids that now resolve and changes nothing else.

Report outcomes

curl -X POST https://api.brainstormrouter.com/v1/outcomes/actions/$ACTION_ID/events \
  -H "Authorization: Bearer $BR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": [
      { "signal": "edited", "value": 0.15, "idempotency_key": "review-1-edit" },
      { "signal": "approved", "idempotency_key": "review-1-approve" },
      { "signal": "reply", "value": 2, "occurred_at": "2026-11-11T09:12:00Z", "idempotency_key": "replies-2026-11-11" }
    ]
  }'

Up to 50 events per call. Events are append-only. Each needs an idempotency_key that is unique within the action; a repeated key is not recorded twice, and the first value stands.

occurred_at is UTC, must not be in the future, and must not be earlier than the action. It defaults to now. If one event in a batch is invalid, nothing in the batch is recorded.

Signals

SignalGroupvalue
approved, rejected, publishedHuman judgementnone
editedHuman judgementedit ratio 0–1, required
impression, click, reaction, comment, share, replyEngagementcount, default 1
unsubscribe, complaint, bounceNegativecount, default 1
meeting_booked, signup, conversionBusinesscount, default 1
revenueBusinessUS dollars, required

The edit ratio is how much of the output the person changed: 0 means they shipped it untouched, 1 means they rewrote it.

What routing learns from, and what it does not

Only five signals change which model BrainstormRouter picks next time:

SignalReward
approved1.0
rejected0.0
edited1 − edit ratio
complaint0.0
unsubscribe0.25

They are the signals that are fast and that say something about the text the model wrote. Each is applied to the model or models that served the action's linked requests, through the same learning path as POST /v1/feedback.

A reward is applied once per action and model for the human verdict (approved, rejected, edited) and once for audience pushback (complaint, unsubscribe). Reporting approved ten times moves nothing after the first. When one call carries both an edit and an approval, the lower reward is used. The response lists what was applied under routing.applied.

Impressions, clicks, reactions, comments, shares, replies, bounces, meetings, signups, conversions and revenue are recorded and reported. They do not change routing. A conversion two weeks later depends on the audience, the offer, the timing and the channel far more than on which model drafted the copy, and there are too few of them to separate those causes. BrainstormRouter does not claim that revenue teaches model choice. published is also recorded only: it says the action happened, not that the draft was good.

An action with no linked request teaches nothing, because there is no model to credit.

Read the report

curl "https://api.brainstormrouter.com/v1/outcomes/summary?group_by=campaign&since=2026-10-01T00:00:00Z" \
  -H "Authorization: Bearer $BR_API_KEY"
ParameterNotes
group_bymodel (default), channel, campaign, kind, task_type
since, untilISO-8601 UTC. Default: the last 30 days.
kind, channel, campaign, task_typeExact-match filters.

The window selects actions by when they happened. Every outcome recorded for those actions is counted, however late it arrived — so a campaign's row keeps filling in as replies and revenue come back.

Each group, and totals, has:

FieldMeaning
actionsActions in the group
approved, rejected, approval_rateapproved / (approved + rejected)
edited, mean_edit_ratioMean edit ratio over edited events
published, impressions, clicks, reactions, comments, shares, repliesSummed counts
unsubscribes, complaints, bouncesSummed counts
meetings, signups, conversions, revenue_usdSummed counts and dollars
model_cost_usdCost of the linked requests, from your usage records
cost_per_reply_usd, cost_per_conversion_usdmodel_cost_usd divided by replies or conversions

A ratio with nothing to divide by is null — never 0 and never infinity.

When you group by model, an action produced by several models is counted in each model's row, with only that model's request cost. The rows then add up to more than totals, which counts each action once. Actions with no linked request are in the row whose key is null.

One summary aggregates at most 5,000 actions, newest first. If more matched, truncated is true: narrow the window or add a filter.

SDKs

import BrainstormRouter from "brainstormrouter";

const br = new BrainstormRouter({ apiKey: process.env.BR_API_KEY! });

const { action } = await br.outcomes.recordAction({
  idempotency_key: "launch-post-1",
  kind: "post",
  channel: "linkedin",
  request_ids: [requestId],
});

await br.outcomes.report(action.id, [{ signal: "approved", idempotency_key: "review-1" }]);

const report = await br.outcomes.summary({ group_by: "model" });
import os

from brainstormrouter import BrainstormRouter

br = BrainstormRouter(api_key=os.environ["BR_API_KEY"])

recorded = br.outcomes.record_action(
    "launch-post-1", "post", channel="linkedin", request_ids=[request_id]
)
br.outcomes.report(
    recorded["action"]["id"],
    [{"signal": "approved", "idempotency_key": "review-1"}],
)
report = br.outcomes.summary(group_by="model")

Limits

LimitValue
Request ids per action20
Events per call50
Events per action10,000
channel, task_type64 characters
campaign, idempotency_key, request id128 characters
external_ref256 characters
Events returned with an action500, oldest first

Actions and events cannot be edited or deleted through the API.

POST /v1/feedback and this ledger

POST /v1/feedback/{requestId} still works and is unchanged for coding outcomes (code_compiled, tests_passed, …). Use it when the outcome belongs to one request. Use the ledger when the outcome belongs to something done in the world, arrives late, or arrives more than once.

/v1/feedback now also looks the request id up in your usage records. When it finds the request, the model on that record is credited and a model_used that disagrees is ignored; the response reports model_source: "usage_record". When it does not find it, model_used is used as before (model_source: "caller").