class

Autobot::Plugins::Plugin

Inherits Reference < Object

Abstract base class for Autobot plugins.

Plugins extend the agent's capabilities by registering tools, providing skills, or hooking into lifecycle events.

Lifecycle:

  1. initialize — set up internal state
  2. setup(context) — register tools, configure settings
  3. start — begin background work (fibers, timers)
  4. stop — clean up resources

Example:

class MyPlugin < Autobot::Plugins::Plugin
  def name : String
    "my_plugin"
  end

  def description : String
    "Does something useful"
  end

  def version : String
    "0.1.0"
  end

  def setup(context : PluginContext) : Nil
    context.register_tool(MyTool.new)
  end
end

Instance methods

description

Human-readable description.

Source
metadata

Plugin metadata for status display.

Source
name

Unique identifier for this plugin (snake_case).

Source
required_executable

External CLI binary required by this plugin (e.g. "sqlite3", "gh"). Returns nil if no external binary is needed.

Source
setup(context : PluginContext) : Nil

Called during setup to register tools and configure the plugin. The default implementation is a no-op.

Source
start

Called when the gateway or agent starts. Use this for spawning background fibers.

Source
stop

Called during graceful shutdown.

Source
version

Semantic version string.

Source