materialize_procedural
Render remembered directives into a system-prompt block, with the ids that went into it.
async fn materialize_procedural(&self, input: &MaterializeProceduralInput) -> Result<MaterializeProceduralResult, BrainHttpError>async fn materialize_procedural(&self, request: &MaterializeProceduralRequest) -> Result<MaterializeProceduralResponse>Parameters
ParameterTypeRequired
sessions64-bit integer[]optionalRestrict to these sessions. The wire field is sessionFilter.
top_kintegeroptionalHow many directives to include.
min_confidencefloatoptionalConfidence floor.
categoriesstring[]optionalRestrict to these categories.
Returns
FieldTypePresence
system_blockstringalwaysThe rendered text, ready to prepend to a prompt.
statement_idsstring[]alwaysWhich statements went in — so you can cite them, or diff two renderings.
total_candidatesintegeralwaysHow many were eligible before trimming.
trimmed_by_budgetbooleanalwaystrue 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
Was this page helpful?