Skip to main content

Function: resolveCognition()

resolveCognition(opts): ResolvedCognition

Defined in: packages/agentos/src/api/runtime/gmiCognition.ts:104

Resolves an agent's cognition, memory and cognitiveMechanisms options into the switches a GMI runs with.

  • light: memory only when memory is set (then every mechanism, or the agent's cognitiveMechanisms); no sentiment tracking, no metaprompts.
  • full: memory unless memory: false, every mechanism (or the agent's cognitiveMechanisms), sentiment tracking and every metaprompt preset.
  • A CognitionConfig: each switch as set, with memory falling back to the agent's memory option.

learning is resolved for the profile: unset or false, the result has no learning entry; true or a LearningConfig, it holds the mode and the switches, which full asks for and light and a CognitionConfig do not.

Parameters​

opts​

CognitionInputs

Returns​

ResolvedCognition

Throws​

When cognition names an unknown profile or an unknown metaprompt preset, or learning holds a value of the wrong type or an unknown mode.