Overview
Plugins extend agent functionality by hooking into the tick lifecycle, exposing actions, and managing state. They’re the primary way to add capabilities like social posting, trading, or custom integrations. Reference:src/plugins/types.ts
Plugin Interface
Lifecycle Hooks
TickContext
The context passed toonTick:
Reference:
TickContext interface in src/core/types.ts
Creating Plugins
Static Plugin
Factory Pattern (Recommended)
Use factories when plugins need configuration or internal state:src/plugins directory
Plugin Actions
Actions are methods exposed by plugins, callable via the agent:Registration
agent.use() in src/core/agent.ts
Dependencies
Plugins can declare dependencies that must load first:loadPlugins() in src/plugins/loader.ts
Configuration Patterns
Error Handling
Plugins should catch errors to avoid crashing the agent:Testing
tests/plugins/
Next Steps
Agent SDK
Main agent class reference.
Plugin Guide
Step-by-step plugin development.