Interface: IGMI
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:749
Interface
IGMI
Description
Defines the contract for a Generalized Mind Instance (GMI).
Properties
creationTimestamp
readonlycreationTimestamp:Date
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:751
gmiId
readonlygmiId:string
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:750
Methods
_triggerAndProcessSelfReflection()
_triggerAndProcessSelfReflection():
Promise<void>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:872
Returns
Promise<void>
analyzeAndReportMemoryHealth()
analyzeAndReportMemoryHealth():
Promise<{issues?:object[];lifecycleManagerStats?: {details?:any;isHealthy:boolean; };overallStatus:"DEGRADED"|"ERROR"|"OPERATIONAL"|"LIMITED";ragSystemStats?: {details?:any;isHealthy:boolean; };workingMemoryStats?: {[key:string]:any;itemCount:number; }; } |undefined>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:874
Returns
Promise<{ issues?: object[]; lifecycleManagerStats?: { details?: any; isHealthy: boolean; }; overallStatus: "DEGRADED" | "ERROR" | "OPERATIONAL" | "LIMITED"; ragSystemStats?: { details?: any; isHealthy: boolean; }; workingMemoryStats?: {[key: string]: any; itemCount: number; }; } | undefined>
clearHistory()?
optionalclearHistory():void
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:821
Empties the conversation history; GMI drops what it recorded about its turns, as for replaceHistory.
Returns
void
getCognitiveMemoryManager()
getCognitiveMemoryManager():
ICognitiveMemoryManager|undefined
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:871
Returns
ICognitiveMemoryManager | undefined
getConversationHistory()?
optionalgetConversationHistory():ConversationMessage[]
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:802
The conversation history as the GMI holds it, the calls of its own tool rounds, their results and the assistant
turns' thinking blocks included; hydrateConversationHistory() sets it back. With conversational persistence on,
the runtime reads it when a turn stops for the host on a GMI whose history holds only that turn's conversation,
and keeps it with the turn's stream for the continuation.
Returns
ConversationMessage[]
getCurrentPrimaryPersonaId()
getCurrentPrimaryPersonaId():
string
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:755
Returns
string
getCurrentState()
getCurrentState():
GMIPrimeState
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:757
Returns
getGMIId()
getGMIId():
string
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:756
Returns
string
getLastTurnHistory()?
optionalgetLastTurnHistory():ConversationMessage[]
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:812
The messages of the conversation history from the input of the GMI's last turn on, as getConversationHistory()
gives them: that input, the assistant turns and tool results of the turn's tool rounds, and what a tool
continuation of the turn added; empty when no turn ran, or when the history no longer holds that input. With
conversational persistence on, the runtime reads it when a turn stops for the host on a GMI whose history also
holds a turn of another conversation, and keeps the conversation's stored history before the turn, followed by
these messages, with the turn's stream for the continuation.
Returns
ConversationMessage[]
getLearnerSession()?
optionalgetLearnerSession():ILearnerSession|undefined
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:867
The learner session this instance was built with (GMIBaseConfig.learning), or undefined when its host has
no learning layer. Optional so that custom IGMI implementations keep compiling.
Returns
ILearnerSession | undefined
getOverallHealth()
getOverallHealth():
Promise<GMIHealthReport>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:875
Returns
Promise<GMIHealthReport>
getPersona()
getPersona():
IPersonaDefinition
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:754
Returns
getReasoningTrace()
getReasoningTrace():
Readonly<ReasoningTrace>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:869
Returns
Readonly<ReasoningTrace>
getWorkingMemorySnapshot()
getWorkingMemorySnapshot():
Promise<Record<string,any>>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:870
Returns
Promise<Record<string, any>>
handleToolResult()
handleToolResult(
toolCallId,toolName,resultPayload,userId,userApiKeys?,options?):Promise<GMIOutput>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:760
Parameters
toolCallId
string
toolName
string
resultPayload
userId
string
userApiKeys?
Record<string, string>
options?
Returns
Promise<GMIOutput>
handleToolResults()?
optionalhandleToolResults(toolResults,userId,userApiKeys?,options?):Promise<GMIOutput>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:777
Continues the turn with several tool results at once: a batch the host passes, or a pause the host answers in
part. For a pause answered in part, the results hold, after the host's, one error result for each call of the
pause the host left out (isError: true, errorDetails.code EXTERNAL_TOOL_NOT_RUN), so the GMI's own history
answers every call of the pause before it writes again. An IGMI without it takes one result at a time: a pause
answered in part continues it through handleToolResult() with the host's result alone, and a batch of several
results ends the continuation with an error.
Parameters
toolResults
userId
string
userApiKeys?
Record<string, string>
options?
Returns
Promise<GMIOutput>
hydrateConversationHistory()?
optionalhydrateConversationHistory(conversationHistory):void
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:792
Makes conversationHistory the whole conversation history. The runtime calls it before a resume continues a
pause, and before results on the paused stream continue it on a GMI whose own history holds a turn of another
conversation, or that replaced the GMI the turn paused on: with the history the paused GMI held of the turn when
it paused (what its getConversationHistory() returned, or the conversation's stored history before the turn and
what its getLastTurnHistory() returned), with the pause's calls, when the runtime kept one, and with the
conversation's stored history otherwise.
Parameters
conversationHistory
ConversationMessage[]
Returns
void
hydrateTurnContext()?
optionalhydrateTurnContext(context):void
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:832
Sets the turn a tool continuation goes on with: the session, conversation and organization the continuation runs
under, and the sources the paused turn retrieved (ragSources), which its tool calls and reply are judged with.
The runtime calls it when it calls hydrateConversationHistory(), and also when the conversation holds no history
to set. A blank organization means the turn has none; an empty ragSources means it retrieved none; a field left
out keeps what the GMI holds. A conversation other than the one of the GMI's last turn also drops what GMI kept
for that turn (its memory scope, tool-call gate, learning preparation, model hop and sources), so the continuation
starts as on a GMI built for it.
Parameters
context
conversationId?
string
organizationId?
string
ragSources?
sessionId?
string
Returns
void
initialize()
initialize(
persona,config):Promise<void>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:753
Parameters
persona
config
Returns
Promise<void>
onMemoryLifecycleEvent()
onMemoryLifecycleEvent(
event):Promise<LifecycleActionResponse>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:873
Parameters
event
Returns
Promise<LifecycleActionResponse>
processTurnStream()
processTurnStream(
turnInput):AsyncGenerator<GMIOutputChunk,GMIOutput,undefined>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:758
Parameters
turnInput
Returns
AsyncGenerator<GMIOutputChunk, GMIOutput, undefined>
recordUserFeedback()?
optionalrecordUserFeedback(feedback):Promise<void>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:849
Records user feedback on this instance's session: a reasoning-trace entry
and, when cognitive memory is configured, memories scoped to the user.
GMIManager calls it with feedback normalized by normalizeUserFeedback.
Optional so that custom IGMI implementations keep compiling.
Parameters
feedback
NormalizedUserFeedback & object
Normalized feedback plus the id of the user who sent it.
Returns
Promise<void>
replaceHistory()?
optionalreplaceHistory(messages):void
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:819
Makes messages the whole conversation history. An empty array is authoritative.
GMI also drops what it recorded about the turns the new history no longer holds
(the details of their trace entries, the input excerpts of their sentiment records).
Parameters
messages
ConversationMessage[]
Returns
void
setPersonalityTrait()?
optionalsetPersonalityTrait(trait,value):void
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:861
Sets one personality trait on this instance without mutating the persona
definition shared with other sessions. Used by the self-improvement
adapt_personality tool. Optional so that custom IGMI implementations
keep compiling; without it, personality adaptation reports that the
caller could not be resolved.
Parameters
trait
string
Trait key, e.g. openness or honesty.
value
number
New trait value.
Returns
void
shutdown()
shutdown():
Promise<void>
Defined in: packages/agentos/src/cognition/substrate/IGMI.ts:876
Returns
Promise<void>