Intelligence · function
assembleContext
Never send the scene graph.
Explained in Agents and behaviour.
function assembleContext(providers: readonly ContextProvider<unknown>[], subject: string, tick: number, tokenBudget: number): AssembledContextimport { assembleContext } from '@driftengine/ai';Parameters
| Parameter | Type | Description |
|---|---|---|
providers | readonly ContextProvider<unknown>[] | |
subject | string | |
tick | number | |
tokenBudget | number |
In depth
Sections are taken in descending priority until the budget is spent, and what did not fit is named. The estimate is deliberately crude — a provider-specific tokenizer may sharpen it, but requiring one would make the core abstraction depend on whichever provider happened to be configured.