Context for a task at the lowest cost
Every context token you hand a model costs money and distracts it. The cheapest way to give an agent what it needs from
the Cerebro is a single call to POST /v1/context (or get_context over MCP), with a tight
budget.
Why it’s cheap
Section titled “Why it’s cheap”- No language model. meemoo builds the context with search by meaning and by words plus the Cerebro’s connections. There is no model cost per call.
- One read. Each call counts as one read of your daily quota, no matter how many items it returns.
- Within budget. It never goes over
maxTokens. meemoo estimates tokens as characters / 4.
The pattern
Section titled “The pattern”- Describe the task in
task, in concrete natural language: “Write to Juan about the pricing proposal”. - Set a tight
maxTokens. 600 to 1,200 is enough for almost everything; the minimum is 300 and the maximum 8,000. - If you already know which items must be included, pass them in
focus(up to 10 refs). They go first and with more text. - Paste the
markdowninto the agent’s prompt. - Only if something is missing, open that item with
GET /v1/items/{ref}(get_itemover MCP).
curl -X POST https://meemoo.tech/api/v1/context \ -H "Authorization: Bearer $MEEMOO_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "task": "Write to Juan about the pricing proposal", "maxTokens": 800, "focus": ["notebook:9e2b5d71-4a8c-4e3f-b6d0-2c7a1f5e8b93"] }'const res = await fetch("https://meemoo.tech/api/v1/context", { method: "POST", headers: { Authorization: `Bearer ${process.env.MEEMOO_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ task: "Write to Juan about the pricing proposal", maxTokens: 800, focus: ["notebook:9e2b5d71-4a8c-4e3f-b6d0-2c7a1f5e8b93"], }),});const { markdown, items, tokens } = await res.json();const system = `Context from the person's memory:\n\n${markdown}`;import osimport requests
res = requests.post( "https://meemoo.tech/api/v1/context", headers={"Authorization": f"Bearer {os.environ['MEEMOO_TOKEN']}"}, json={ "task": "Write to Juan about the pricing proposal", "maxTokens": 800, "focus": ["notebook:9e2b5d71-4a8c-4e3f-b6d0-2c7a1f5e8b93"], },)ctx = res.json()system = f"Context from the person's memory:\n\n{ctx['markdown']}"What goes in
Section titled “What goes in”In this order, until the budget is full: what you asked for in focus; the items closest to the task; and the direct
(connected) neighbors of the three closest. The first one and the focus items get more text; the rest, a summary.
Finished tasks don’t come in as close matches. Each entry in items says why it was included (why: focus, match
or neighbor).
Common mistakes
Section titled “Common mistakes”- Many searches instead of one context call. Five
searchcalls cost five reads and fill the prompt with loose results. Onecontextcall costs one and comes already organized. - A big
maxTokens“just in case”. More context isn’t always better. Start low and raise it only if the agent comes up short. - A vague task. “Help me” brings little. “Prepare Monday’s call with Juan about the Acme contract” brings what helps.