AgentForge.Plugin behaviour (AgentForge v0.2.2)

View Source

Behaviour specification for AgentForge plugins.

Plugins can extend the framework with additional tools, primitives, and notification channels.

Summary

Callbacks

Called when the plugin is loaded. Use this for initialization.

Returns metadata about the plugin.

Called to register notification channels provided by this plugin.

Called to register primitives provided by this plugin.

Called to register tools provided by this plugin.

Callbacks

init(opts)

@callback init(opts :: keyword()) :: :ok | {:error, term()}

Called when the plugin is loaded. Use this for initialization.

metadata()

@callback metadata() :: map()

Returns metadata about the plugin.

register_channels()

(optional)
@callback register_channels() :: :ok | {:error, term()}

Called to register notification channels provided by this plugin.

register_primitives()

(optional)
@callback register_primitives() :: :ok | {:error, term()}

Called to register primitives provided by this plugin.

register_tools(registry)

(optional)
@callback register_tools(registry :: module()) :: :ok | {:error, term()}

Called to register tools provided by this plugin.