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.

Marketing memory

Brand voice, audiences, offers, channel rules, decisions and learnings, stored once per account and loaded by any agent with one call.

Marketing memory

An agent that does marketing for someone needs the same facts every time: how the brand sounds, who it is talking to, what it sells, which accounts it may use and under what rules, what the owner has already decided, and what has worked. Without a place to keep them, every new conversation starts by asking again.

Marketing memory is that place. It is a set of typed records kept in your account's memory. Any agent or key on the account can read them, in any session, and one call returns the working set.

The calls

StepRESTMCP toolSDK
Load the briefGET /v1/memory/marketing/briefbr_marketing_briefclient.marketingMemory.brief
List recordsGET /v1/memory/marketingbr_marketing_memory_listclient.marketingMemory.list
Save a recordPOST /v1/memory/marketingbr_marketing_memory_saveclient.marketingMemory.save
Change a recordPUT /v1/memory/marketing/{id}br_marketing_memory_updateclient.marketingMemory.update
Delete a recordDELETE /v1/memory/marketing/{id}br_marketing_memory_deleteclient.marketingMemory.delete

In the Python SDK the resource is client.marketing_memory with the same five methods, sync and async.

Reads need memory.read. Writes need memory.write. These are the same permissions as the rest of /v1/memory/*.

Record types

Every record has a type, a title (up to 200 characters) and an optional body (up to 4,000). Each type adds its own fields. A field that does not belong to the type is rejected with field_not_allowed.

TypeUse it forFields
brand_voiceHow the brand soundstone_rules, do_phrases, dont_phrases, examples
audienceA group you are reachingpain_points, goals
offerA product or promotionprice, url, proof_points
channelAn account and the rules the owner statedchannel (required), account, constraints
decisionSomething the owner approved or ruled outverdict (approved or ruled_out, required), reason (required), channel
learningSomething that worked or failedresult (worked, failed or mixed, required), channel, outcome_action_ids

List fields hold up to 20 items of up to 500 characters. channel is stored lower-case; use the same label you pass to br_outcome_action_record so the two line up.

An account can hold up to 200 records of each type. A save beyond that is refused with type_limit_reached; nothing is evicted to make room.

Do not store passwords, tokens or API keys in a record. account is a handle, not a credential.

Save a record

curl -X POST https://api.brainstormrouter.com/v1/memory/marketing \
  -H "Authorization: Bearer $BR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "brand_voice",
    "title": "House voice",
    "body": "Plain and direct. Written for busy operators.",
    "tone_rules": ["Short sentences", "No exclamation marks"],
    "dont_phrases": ["game-changing", "unlock"]
  }'
{
  "record": {
    "id": "0f7a3c52-91d4-4b4e-8a53-4b2f3c1d9e10",
    "type": "brand_voice",
    "title": "House voice",
    "body": "Plain and direct. Written for busy operators.",
    "tone_rules": ["Short sentences", "No exclamation marks"],
    "dont_phrases": ["game-changing", "unlock"],
    "written_by": { "key_id": "key_8f2c", "user_id": "user_1", "via": "rest" },
    "created_at": "2026-11-10T15:02:11.000Z",
    "updated_at": null,
    "updated_by": null
  }
}

A save always adds a record. To change one, use PUT with its id: the fields you send replace the stored ones (a list replaces the whole list), and the type cannot change.

Who wrote it

Every record stores written_by: the id of the API key that made the call (a key issued through OAuth is still a key), the user that key belongs to when it has one, the agent id for agent-JWT callers, and whether the call came over rest or mcp. An update adds updated_at and updated_by and leaves written_by as it was. The list call returns these fields; the brief leaves them out to save space.

The brief

curl https://api.brainstormrouter.com/v1/memory/marketing/brief \
  -H "Authorization: Bearer $BR_API_KEY"

The response has one array per type (brand_voice, audiences, offers, channels, decisions, learnings), plus:

FieldMeaning
emptytrue when nothing of any type is stored
countsStored records per type
omittedStored records per type that are not in this brief
missing_typesTypes with nothing stored
ask_ownerFor each missing type, what to ask the owner
messageOne or two sentences saying what to do next
outcomesA digest of recorded outcomes (see below)
boundsThe limits applied to this brief

Order

Records are newest change first. Learnings that cite recorded outcome actions come before learnings that do not.

Size

The brief is bounded so it is safe to load at the start of every job:

  • at most 3 brand_voice, 5 audience, 5 offer, 10 channel, 10

decision and 10 learning records (43 in total);

  • body and reason are cut to 1,000 characters, and each list to 8 items of

240 characters. A record that was cut carries truncated: true;

  • record content stops at 24,000 characters in total. Types are filled in the

order above, so if the ceiling is reached it is the later types that are left out.

Whatever is left out is counted in omitted. Read it with the list call, which returns full records (type and limit filters, 50 by default, 200 at most).

When nothing is stored

{
  "empty": true,
  "brand_voice": [],
  "missing_types": ["brand_voice", "audience", "offer", "channel", "decision", "learning"],
  "ask_owner": [
    {
      "type": "brand_voice",
      "question": "How should your brand sound? Ask for tone rules, phrases to use, phrases never to use, and two or three samples of copy they like."
    }
  ],
  "message": "Nothing is stored for this account yet. Do not guess a brand voice or an audience: ask the owner the questions in ask_owner, then save each answer with br_marketing_memory_save (POST /v1/memory/marketing). Saving needs the memory.write permission (OAuth scope: memory)."
}

(Shortened: ask_owner has one entry per missing type.) When some types are filled and others are not, empty is false and ask_owner lists only the missing ones.

Learnings and recorded outcomes

A learning can cite the actions it is based on:

{
  "type": "learning",
  "title": "Posts that open with a question get more replies",
  "result": "worked",
  "channel": "linkedin",
  "outcome_action_ids": ["6f1c1f0e-2a53-4c0e-9d0b-0c5d6a3e1b77"]
}

Each id must be an action in your own outcome ledger (the id returned by POST /v1/outcomes/actions). An id that is not is rejected with unknown_outcome_action. If the ledger is not available, a learning that cites ids is refused with outcome_ledger_unavailable rather than stored unchecked; a learning without ids still saves.

The brief's outcomes block is taken from the ledger's own summary (GET /v1/outcomes/summary, grouped by channel, last 30 days):

{
  "available": true,
  "since": "2026-10-11T15:00:00.000Z",
  "until": "2026-11-10T15:05:00.000Z",
  "totals": {
    "actions": 3,
    "approved": 2,
    "rejected": 1,
    "approval_rate": 0.6667,
    "edited": 1,
    "mean_edit_ratio": 0.4,
    "replies": 3,
    "conversions": 2
  },
  "by_channel": [
    {
      "channel": "linkedin",
      "actions": 2,
      "approved": 1,
      "rejected": 1,
      "approval_rate": 0.5,
      "edited": 1,
      "mean_edit_ratio": 0.4,
      "replies": 3,
      "conversions": 0
    }
  ],
  "channels_omitted": 0,
  "truncated": false,
  "note": "…"
}

These are counts and ratios copied from that summary: the brief selects columns and computes nothing of its own. Up to 8 channels are shown, the ones with the most actions first. Revenue and cost are not in the digest; read them from the summary. When the ledger cannot be read, outcomes is { "available": false, "reason": "…" } and the rest of the brief still loads.

What is real about learning from results: model routing learns from approval, rejection, edits, complaints and unsubscribes reported to the outcome ledger. Replies, conversions and revenue are reported and do not change which model is chosen. A learning record changes nothing in routing. It is a note for the next agent.

Permissions and OAuth

CallerRead brief and listSave, change, delete
API key with a role that has memory.read / memory.writeyesyes
OAuth key with the default MCP scopes (models completions tools)yesno
OAuth key that also has the memory scopeyesyes
OAuth key with only modelsnono

The tools scope includes read-only access to memory, so an agent that connects with the default scopes can load the brief before it works. The consent screen says so. Writing memory needs the memory scope: what one agent stores is read by every later agent and conversation, so the owner approves that by name. An agent without it should tell its owner what it would have saved and ask them to reconnect with the memory scope.

Where the records live

Records are rows of the account's existing archival memory, tagged with their type. There is no separate store. They are tenant-scoped like the rest of memory, and they are kept until deleted; the automatic eviction that applies to the small core-memory blocks does not apply to them.

Tenants that require approval for shared-memory writes (PUT /v1/memory/approval-config) should know that marketing memory writes do not go through that approval queue.

Errors

Statuserror.codeMeaning
400validation_errorA field is missing, too long, or not a known value
400field_not_allowedA field that belongs to another record type
400field_requiredThe type needs a field that was not sent
400nothing_to_updateAn update with no fields
400unknown_outcome_actionAn outcome_action_ids entry is not in your outcome ledger
404not_foundNo marketing record with that id on this account
409type_limit_reached200 records of that type already exist
503outcome_ledger_unavailableIds were cited but the outcome ledger cannot be checked