Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
planreasonmaterializeProceduralqueryExplainqueryTrace
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKReasoningmaterializeProcedural

materializeProcedural

Render remembered directives into a system-prompt block, with the ids that went into it.

PURPOSE

Render the caller's remembered directives — the preferences and standing instructions in the graph — into one block of text you can prepend to a system prompt. The body is optional; every field is a filter.

POST/v1/procedural/materializeBearer API keystable
materializeProcedural(input?: MaterializeProceduralInput): Promise<MaterializeProceduralResult>
Handshake credentialstable
materializeProcedural(request: MaterializeProceduralRequest): Promise<MaterializeProceduralResponse>

Parameters

ParameterTypeRequired
sessions64-bit integer[]optional

Restrict to these sessions. The wire field is sessionFilter.

topKintegeroptional

How many directives to include.

minConfidencefloatoptional

Confidence floor.

categoriesstring[]optional

Restrict to these categories.

Returns

FieldTypePresence
systemBlockstringalways

The rendered text, ready to prepend to a prompt.

statementIdsstring[]always

Which statements went in — so you can cite them, or diff two renderings.

totalCandidatesintegeralways

How many were eligible before trimming.

trimmedByBudgetbooleanalways

true means directives did not make it in. The block is not the whole set, and an agent reading it is working from a partial picture.

Example

const p = await brain.materializeProcedural({ topK: 20, minConfidence: 0.6 });
if (p.trimmedByBudget) console.warn(`${p.totalCandidates} candidates, trimmed`);

const messages = [
  { role: "system", content: `${basePrompt}\n\n${p.systemBlock}` },
  ...history,
];

The wire request takes an explicit spaceId and a requestId alongside the filters.

See also
listStatementsWhat to write

Was this page helpful?

reason

Draw inferences from an observation, with both the supporting and the contradicting evidence.

queryExplain

See the plan Brain would run for a query, and its estimated cost — without running it.

On this page

ParametersReturnsExample
Suggest an editOpen in Playground