Intelligence · interface

AgentSessionOptions

Explained in Agents and behaviour.

interface AgentSessionOptions<W = unknown>
import type { AgentSessionOptions } from '@driftengine/ai';

Properties

NameTypeDescription
agentIdreadonlystring
policyreadonlyAgentPolicy
providerreadonlyoptionalAiProviderAbsent is a supported configuration, not a degraded one. The floor is enough.
budgetreadonlyoptionalBudget
modelreadonlyoptionalstring
toolsreadonlyoptionalToolRegistry<W>Tools, and the admission guards they declared. Absent admits everything.
worldreadonlyoptionalWThe consumer's world, handed to a guard unchanged.
whileBusyreadonlyoptionalWhileBusyWhat an observation arriving while a request is out does.
More

queue and replace pending are deliberately absent. Both described what to do with a second request, and there is never one — the state machine has no edge on which it could be issued.

maxPendingObservationsreadonlyoptionalnumber
dedupeWindowMsreadonlyoptionalnumber
logreadonlyoptionalCommandLogWhere accepted model commands are recorded, so a run can be replayed exactly.
maxIntentMsreadonlyoptionalnumberA ceiling on how long any one intent may hold the slot, in milliseconds.
More

An intent with an unknown extent ends when the consumer says so, which is the contract — the consumer is the thing that knows whether the walk finished. But a consumer that forgets leaves the agent on one intent forever, which is the blocked agent arriving through the back door.

Off by default, because a default here would be a guess about behaviours this package cannot see, and a wrong one would cut short a legitimately long action. What it costs when set: a genuinely long intent is reclaimed by the floor. What would make it wrong: a consumer whose intents legitimately outlast any figure worth writing down, which should set nothing and call complete.

interruptProviderreadonlyoptionalAiProviderA second, faster provider asked only when something interrupts.
More

§46's tiering: a small or local model answers "something happened, react now" in well under the strong model's latency, while the strong one is still composing the next intent. Additive — absent, preemption behaves exactly as it does without it.

What it costs: a second provider to configure and a second bill. What would make it wrong: an interrupt model slow enough that the floor beats it to the answer, at which point it is buying nothing the floor did not already give.