Function: gmi()
gmi(
opts):Agent
Defined in: packages/agentos/src/api/gmi.ts:396
An agent whose sessions are GMIs (docs/GMI.md, "GMIs from agent()").
Parameters
opts
The options of agent(). voice, avatar and channels throw when set;
a config that sets only enabled: false is unset. budget checks every completion call a GMI makes
(docs/GMI.md, "Spend budget").
Returns
The Agent surface: generate, stream, session, usage, close, export.
Throws
At construction, naming the option: an option the GMI path
cannot honour, an unknown cognition profile or metaprompt preset, a
learning value of the wrong type or an unknown learning.mode, or a
memory.embedding that names a provider without embeddings, a model that
does not resolve, or a dimension that is not a positive integer or not known.
No environment is read here: the provider and model resolve on the first
call, which rejects with the error agent() gives when nothing resolves.
Throws
At construction, naming the field: an agencies bound
outside its range, or an agencies.members value that is not a gmi() agent.
Throws
At construction: agencies.hitl approvals with no handler.
Throws
At construction: agencies.launch beside a tool of its own named launch_agency.