Brain Docs

Reference

Rust SDKInstallationHTTP clientWire client
planreasonmaterialize_proceduralquery_explainquery_trace
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
Rust SDKReasoningmaterialize_procedural

materialize_procedural

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
async fn materialize_procedural(&self, input: &MaterializeProceduralInput) -> Result<MaterializeProceduralResult, BrainHttpError>
Handshake credentialstable
async fn materialize_procedural(&self, request: &MaterializeProceduralRequest) -> Result<MaterializeProceduralResponse>

Parameters

ParameterTypeRequired
sessions64-bit integer[]optional

Restrict to these sessions. The wire field is sessionFilter.

top_kintegeroptional

How many directives to include.

min_confidencefloatoptional

Confidence floor.

categoriesstring[]optional

Restrict to these categories.

Returns

FieldTypePresence
system_blockstringalways

The rendered text, ready to prepend to a prompt.

statement_idsstring[]always

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

total_candidatesintegeralways

How many were eligible before trimming.

trimmed_by_budgetbooleanalways

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

let p = brain
    .materialize_procedural(&MaterializeProceduralInput {
        top_k: Some(20),
        min_confidence: Some(0.6),
        ..Default::default()
    })
    .await?;

if p.trimmed_by_budget {
    eprintln!("{} candidates, trimmed", p.total_candidates);
}

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

See also
list_statementsWhat to write

Was this page helpful?

reason

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

query_explain

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