Optional retrievalOptional cognitiveCognitive memory system (personality-affected encoding/retrieval with Ebbinghaus decay).
Optional defaultOptional defaultOptional maxMaximum number of tool-loop iterations before the safety break engages.
Prevents runaway tool loops in processTurnStream(). Defaults to 5.
Optional defaultRuntime default for the reasoning trace's entry cap when the persona sets no
reasoningTraceConfig.maxEntries. Defaults to 500.
Optional defaultRuntime default for the characters kept per trace message. Defaults to 1000.
Optional customOptional completionOne model layer for the turn. When set, the GMI resolves the hop through it
before it builds the prompt, streams through it, and moves to the next hop
when an attempt fails before any output with a retryable error.
llmProviderManager is then a
GatewayProviderManager (see src/api/runtime/gatewayProviderManager.ts).
Optional beforeCalled for every model attempt after its prompt is built and before it is
sent, a fallback hop's rebuilt prompt included. Messages it returns replace
that attempt's prompt and do not enter the history; a hook that throws or
returns an empty list is recorded on the reasoning trace and the built
prompt is sent. agent({ runtime: 'gmi' }) routes onBeforeGeneration here.
Optional shutdownHow long shutdown() waits, in milliseconds, for the turns it stopped to
end before it closes the GMI's memories anyway. Defaults to 8000.
GMIManager passes its own shutdownTimeoutMs.
Optional learningThe session's learner session, passed by a host whose learning option is on. The GMI asks it once per user
turn, before the tool loop, for the personality section (a system prompt at priority 2, after the persona's base
prompt) and tells each tool call the turn's learner and mode (sessionData.learning). A session that fails or
does not answer within 2,000 ms never fails the turn. The host that passes the session ends it.
Optional personaThe persona's traits as the GMI renders them itself, when it has no learner session or the session did not
answer: authored is the registry persona's traits and overlay a workflow role overlay's patch. They are read
once, at initialize(), never from the persona copy setPersonalityTrait() replaces. Honesty-humility and
emotionality always come from authored; an overlay that names either is not applied to it, and the trace says
so. Without this field the GMI renders no personality section of its own.
Optional overlay?: Partial<Record<"honesty" | "emotionality" | "extraversion" | "agreeableness" | "conscientiousness" | "openness", number>>
Base configuration required to initialize a GMI instance.
Interface
GMIBaseConfig