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
| Step | REST | MCP tool | SDK |
|---|---|---|---|
| Load the brief | GET /v1/memory/marketing/brief | br_marketing_brief | client.marketingMemory.brief |
| List records | GET /v1/memory/marketing | br_marketing_memory_list | client.marketingMemory.list |
| Save a record | POST /v1/memory/marketing | br_marketing_memory_save | client.marketingMemory.save |
| Change a record | PUT /v1/memory/marketing/{id} | br_marketing_memory_update | client.marketingMemory.update |
| Delete a record | DELETE /v1/memory/marketing/{id} | br_marketing_memory_delete | client.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.
| Type | Use it for | Fields |
|---|---|---|
brand_voice | How the brand sounds | tone_rules, do_phrases, dont_phrases, examples |
audience | A group you are reaching | pain_points, goals |
offer | A product or promotion | price, url, proof_points |
channel | An account and the rules the owner stated | channel (required), account, constraints |
decision | Something the owner approved or ruled out | verdict (approved or ruled_out, required), reason (required), channel |
learning | Something that worked or failed | result (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:
| Field | Meaning |
|---|---|
empty | true when nothing of any type is stored |
counts | Stored records per type |
omitted | Stored records per type that are not in this brief |
missing_types | Types with nothing stored |
ask_owner | For each missing type, what to ask the owner |
message | One or two sentences saying what to do next |
outcomes | A digest of recorded outcomes (see below) |
bounds | The 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, 5audience, 5offer, 10channel, 10
decision and 10 learning records (43 in total);
bodyandreasonare 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
| Caller | Read brief and list | Save, change, delete |
|---|---|---|
API key with a role that has memory.read / memory.write | yes | yes |
OAuth key with the default MCP scopes (models completions tools) | yes | no |
OAuth key that also has the memory scope | yes | yes |
OAuth key with only models | no | no |
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
| Status | error.code | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing, too long, or not a known value |
| 400 | field_not_allowed | A field that belongs to another record type |
| 400 | field_required | The type needs a field that was not sent |
| 400 | nothing_to_update | An update with no fields |
| 400 | unknown_outcome_action | An outcome_action_ids entry is not in your outcome ledger |
| 404 | not_found | No marketing record with that id on this account |
| 409 | type_limit_reached | 200 records of that type already exist |
| 503 | outcome_ledger_unavailable | Ids were cited but the outcome ledger cannot be checked |