AgentRuntimePlugin constructor
AgentRuntimePlugin({
- List<
McpToolProvider> ? spiProviders, - List<
McpTool> usecaseTools = const <McpTool>[], - List<
RemoteMcpServer> remoteServers = const <RemoteMcpServer>[], - StatefulAgent? statefulAgent,
- LlmClient? llmClient,
- FileStateStorage? stateStorage,
- List<
AgentHook> hooks = const <AgentHook>[], - String playbook = '',
Implementation
AgentRuntimePlugin({
List<McpToolProvider>? spiProviders,
List<McpTool> usecaseTools = const <McpTool>[],
List<RemoteMcpServer> remoteServers = const <RemoteMcpServer>[],
StatefulAgent? statefulAgent,
LlmClient? llmClient,
FileStateStorage? stateStorage,
List<AgentHook> hooks = const <AgentHook>[],
String playbook = '',
}) {
_registry = McpToolRegistry();
_assembleRegistry(
spiProviders: spiProviders ?? const <McpToolProvider>[],
usecaseTools: usecaseTools,
remoteServers: remoteServers,
);
_kernel = AgentKernel(
registry: _registry,
statefulAgent: statefulAgent ?? StubStatefulAgent(),
llmClient: llmClient,
promptComposer: SystemPromptComposer(playbook: playbook),
stateStorage: stateStorage,
hooks: hooks,
);
_providers = <String, String>{
for (final p in spiProviders ?? const <McpToolProvider>[])
p.namespace: p.runtimeType.toString(),
};
_remoteServerHealth = <String, String>{
for (final s in remoteServers) s.id: s.healthStatus,
};
}