Function: buildAgents()
buildAgents(
opts):Promise<BuiltAgents>
Resolve every entry in config.agents into a Mastra Agent
instance. When config.agents is omitted the plugin registers a
single built-in default analyst so the bare mastra() call still
yields a working agent.
Per-agent tool callbacks are invoked once with a typed
MastraPlugins index built from registered sibling plugins
(currently genie; extend MastraPlugins to surface more).
Parameters
Section titled “Parameters”config
Section titled “config”context
Section titled “context”PluginContextLike | undefined
extraSkillPaths?
Section titled “extraSkillPaths?”string[]
Local skill scan paths (remote skills provisioned to a temp dir at startup) folded into every agent that uses the auto-created default workspace.
Logger
memoryBuilder?
Section titled “memoryBuilder?”Returns
Section titled “Returns”Promise<BuiltAgents>
Throws
Section titled “Throws”when config.defaultAgent is set to an id that isn’t in the
resolved registry; this is a wiring bug, not a runtime condition.