materialize_procedural
Render remembered directives into a system-prompt block, with the ids that went into it.
materialize_procedural(sessions=None, top_k=None, min_confidence=None, categories=None) -> MaterializeProceduralResultmaterialize_procedural(request: MaterializeProceduralRequest) -> MaterializeProceduralResponseParameters
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
p = brain.materialize_procedural(top_k=20, min_confidence=0.6)
if p.trimmed_by_budget:
print(f"{p.total_candidates} candidates, trimmed")
messages = [{"role": "system", "content": f"{base_prompt}\n\n{p.system_block}"}, *history]The wire request takes an explicit spaceId and a requestId alongside the
filters.
See also
Was this page helpful?