Two forms
brain_context with topic and budget, and as GET /api/context?topic=<topic>&budget=1500.
What a topic briefing contains
If no page is titled with the topic, the briefing says so and lists the closest notes instead. If nothing matches at all, it says that the vault has nothing and suggests asking the owner.
Budget
budget is in tokens, counted as about four characters each. The default is 1,500.
When a briefing is too long it is cut in this order: the tail of the longest sections, then the text of the longest lines, then whole sections from the end. The title and the reminder always stay. A claim or quote is never left without its source; if it cannot fit with its source, the line is dropped.