Skip to main content

The Problem

Your agent can talk, but can it do things? Out of the box, an LLM can only generate text. To make it useful, you need:
  • Actions - Execute tasks (send emails, query APIs, generate images)
  • Context - Know what’s happening (user preferences, conversation history, external data)
  • Learning - Extract and remember information from conversations
  • Connections - Maintain state with external services
Each component type has one job. Actions do, Providers supply, Evaluators learn, Services connect.

Overview

Plugin components are the building blocks that give agents their capabilities. Each component type serves a specific purpose in the agent’s decision-making and interaction flow. For system architecture, see Plugin Architecture.

Component Types

Actions

Actions are discrete tasks agents can perform. They represent the agent’s capabilities - what it can DO.

Action Interface

Actions define discrete tasks that agents can perform. Each action has:
  • name: Unique identifier for the action
  • description: Clear explanation of what the action does
  • similes: Alternative names or aliases for fuzzy matching
  • examples: Training examples showing when to use the action
  • validate: Function to check if the action can run in the current context
  • handler: The execution logic that returns an ActionResult
The handler receives the runtime, message, state, options (for action chaining), an optional callback for intermediate responses, and previous responses. Important: All action handlers must return an ActionResult with a success field indicating whether the action completed successfully. For complete interface definitions, see Plugin Reference.

Core Actions (Bootstrap Plugin)

The bootstrap plugin provides 13 essential actions:

Communication Actions

Room Management

Data & Configuration

Media & Utilities

Creating Actions

For advanced patterns, see Plugin Patterns.

Minimal Action

With Validation

With Examples

Handler Patterns

HandlerOptions Interface

The options parameter passed to action handlers provides context for multi-step action plans:

Using HandlerOptions

Best Practices for Actions

  • Name actions clearly (VERB_NOUN format)
  • Always return ActionResult with success field
  • Validate before executing
  • Return consistent response format
  • Use similes for alternative triggers
  • Provide diverse examples
  • Handle errors gracefully

Providers

Providers supply contextual information to the agent’s state before it makes decisions. They act as the agent’s “senses”, gathering relevant data.

Provider Interface

Providers supply contextual data to enhance agent decision-making. Each provider has:
  • name: Unique identifier for the provider
  • description: Optional explanation of what data it provides
  • dynamic: If true, data is re-fetched each time (not cached)
  • position: Execution order priority (-100 to 100, lower runs first)
  • private: If true, hidden from the default provider list
  • get: Function that returns a ProviderResult with text, values, and data
The get function receives the runtime, current message, and state, returning data that will be composed into the agent’s context. For complete interface definitions, see the Provider Interface in the Reference.

Core Providers (Bootstrap Plugin)

Creating Providers

Basic Provider

Dynamic Provider

Private Provider

Provider Priority

Provider Execution Flow

  1. Providers are executed during runtime.composeState()
  2. By default, all non-private, non-dynamic providers are included
  3. Providers are sorted by position and executed in order
  4. Results are aggregated into a unified state object
  5. The composed state is passed to actions and the LLM for decision-making

Best Practices for Providers

  • Return consistent data structures
  • Handle errors gracefully
  • Cache when appropriate
  • Keep data fetching fast
  • Document what data is provided
  • Use position to control execution order

Evaluators

Evaluators are post-processors that analyze and extract information from conversations.

Evaluator Interface

Evaluators process and extract information from agent responses. Each evaluator has:
  • name: Unique identifier for the evaluator
  • description: Explanation of what it evaluates or extracts
  • similes: Alternative names for matching
  • alwaysRun: If true, runs on every agent response
  • examples: Training examples for the evaluator
  • validate: Function to determine if evaluator should run
  • handler: Processing logic that analyzes the response
Evaluators run after an agent generates a response, allowing for fact extraction, sentiment analysis, or content filtering. For complete interface definitions, see the Evaluator Interface in the Reference.

Core Evaluators (Bootstrap Plugin)

Evaluator Flow

Common Use Cases

Memory Building

  • Extract facts from conversations
  • Track user preferences
  • Update relationship status
  • Record important events

Content Filtering

  • Remove sensitive data
  • Filter profanity
  • Ensure compliance
  • Validate accuracy

Analytics

  • Track sentiment
  • Measure engagement
  • Monitor topics
  • Analyze patterns

Creating Evaluators

Basic Evaluator

With Examples

Best Practices for Evaluators

  • Run evaluators async (don’t block responses)
  • Store extracted data for future context
  • Use alwaysRun: true sparingly
  • Provide clear examples for training
  • Keep handlers lightweight

Services

Services manage stateful connections and provide core functionality. They are singleton instances that persist throughout the agent’s lifecycle.

Service Abstract Class

Services are singleton instances that manage stateful connections and provide persistent functionality throughout the agent’s lifecycle. Services extend an abstract class with:
  • serviceType: Static property identifying the service type
  • capabilityDescription: Description of what the service provides
  • start(): Static method to initialize and start the service
  • stop(): Method to clean up resources when shutting down
  • config: Optional configuration metadata
Services are ideal for managing database connections, API clients, WebSocket connections, or any long-running background tasks. For the complete Service class definition, see the Service Abstract Class in the Reference.

Service Types

The system includes predefined service types:
  • TRANSCRIPTION, VIDEO, BROWSER, PDF
  • REMOTE_FILES (AWS S3)
  • WEB_SEARCH, EMAIL, TEE
  • TASK, WALLET, LP_POOL, TOKEN_DATA
  • DATABASE_MIGRATION
  • PLUGIN_MANAGER, PLUGIN_CONFIGURATION, PLUGIN_USER_INTERACTION

Creating Services

Service Lifecycle Patterns

Delayed Initialization

Sometimes services need to wait for other services or perform startup tasks:

Best Practices for Services

  • Handle missing API tokens gracefully
  • Implement proper cleanup in stop()
  • Use delayed initialization for non-critical tasks
  • Log service lifecycle events
  • Make services resilient to failures
  • Keep service instances stateless when possible

Component Interaction

Execution Flow

  1. Providers gather context → compose state
  2. Actions validate against state → execute if valid
  3. Evaluators process responses → extract information
  4. Services provide persistent functionality throughout

State Composition

Service Access

Plugin Example with All Components

See Also

Plugin Architecture

Understand overall plugin system design

Development Guide

Build your first plugin step by step

Common Patterns

Learn proven plugin development patterns

Plugin Reference

Complete API reference for all interfaces

Action Planning

Multi-step action workflows with HandlerOptions

Streaming Responses

Stream action outputs in real-time

Background Tasks

Long-running operations with task workers

Core Runtime

How components integrate with the runtime