Overview
Plugin types define the structure for extending agent functionality in elizaOS. Plugins can provide actions, providers, evaluators, services, routes, models, and more.ServiceClass
Type for a service class constructor. This is more flexible thantypeof Service to allow for service classes with specific serviceType values.
serviceType- Unique identifier for the service typestart()- Factory method to initialize and start the servicestopRuntime?()- Optional method to stop the service for a specific runtimeregisterSendHandlers?()- Optional method to register message send handlers- Constructor - Creates a new service instance
RouteBodyValue
Supported types for route request body fields.RouteRequest
Minimal request interface for route handlers.body?- Request body dataparams?- URL path parametersquery?- Query string parametersheaders?- HTTP headersmethod?- HTTP method (GET, POST, etc.)path?- Request pathurl?- Full request URL
RouteResponse
Minimal response interface for route handlers.status()- Set HTTP status codejson()- Send JSON responsesend()- Send response dataend()- End the responsesetHeader?()- Set response headersendFile?()- Send a file as response
headersSent?- Whether headers have been sent
Route
Defines an HTTP route with handler and configuration.type- HTTP method typepath- Route path patternfilePath?- Path to static file (for STATIC routes)handler?()- Request handler functionisMultipart?- Whether route accepts multipart/form-datax402?- Payment configuration for paid routesprice- Price in USDC base units (6 decimals)network?- Override payment networkpayTo?- Override payment addressdescription?- Payment description
public- Whether route is publicly accessible (required for public routes)name- Route name (required for public routes, optional for private)
JSONSchemaDefinition
JSON Schema type definition for component validation.ComponentTypeDefinition
Component type definition for entity components.schema- JSON schema for validationvalidator?()- Optional custom validation function
PluginEvents
Event handlers provided by a plugin.Plugin
Main plugin interface for extending agent functionality.name- Plugin name (unique identifier)description- Human-readable descriptioninit?()- Optional initialization functionconfig?- Plugin configuration valuesservices?- Service classes to registercomponentTypes?- Entity component definitionsactions?- Actions the plugin providesproviders?- Context providersevaluators?- Message evaluatorsadapter?- Custom database adaptermodels?- Model handlers for inferenceevents?- Event handlersroutes?- HTTP routestests?- Test suitesdependencies?- Required plugin dependenciestestDependencies?- Dependencies for testing onlypriority?- Plugin loading priorityschema?- Database schema definitions
ProjectAgent
Defines an agent within a project configuration.character- The character definition for the agentinit?()- Optional initialization functionplugins?- Plugins to load for this agenttests?- Test suites for the agent
Project
Defines a project with multiple agents.agents- Array of agent configurations