Skip to main content

Function: personaFromAgentOptions()

personaFromAgentOptions(opts, cognition, tools): IPersonaDefinition

Defined in: packages/agentos/src/api/runtime/gmiPersona.ts:72

Builds the persona of a GMI from agent options (spec D6).

Parameters​

opts​

AgentOptions

The agent's options.

cognition​

ResolvedCognition

The resolved profile (resolveCognition): sentiment tracking, metaprompts, and whether learning is on.

tools​

ITool<any, any>[]

The agent's tools, adapted: they decide the persona's capabilities.

Returns​

IPersonaDefinition

Throws​

When no provider or model can be resolved, as generateText throws.