A minimal backend-only plugin template for ElizaOS. This template provides a clean starting point for creating simple plugins without frontend complexity.
This quick-starter template is ideal for:
- Backend-only plugins
- Simple API integrations
- Services and providers
- Actions without UI components
- Lightweight extensions
plugin-hehe/
├── src/
│ ├── __tests__/ # Unit tests
│ │ ├── plugin.test.ts
│ │ └── test-utils.ts
│ ├── plugin.ts # Main plugin implementation
│ ├── tests.ts # Plugin test suite
│ └── index.ts # Plugin export
├── scripts/
│ └── install-test-deps.js # Test dependency installer
├── tsup.config.ts # Build configuration
├── tsconfig.json # TypeScript config
├── package.json # Minimal dependencies
└── README.md # This file
-
Create your plugin:
elizaos create my-plugin # Select: Plugin # Select: Quick Plugin (Backend Only)
-
Navigate to your plugin:
cd my-plugin -
Install dependencies:
bun install
-
Start development:
bun run dev
- Only essential packages (
@elizaos/core,zod) - No frontend frameworks or build tools
- Fast installation and builds
- Unit tests only with Bun test runner
- No E2E or component testing overhead
- Quick test execution
- API routes for server-side functionality
- Services for state management
- Actions for agent capabilities
- Providers for contextual data
Define agent capabilities:
const myAction: Action = {
name: 'MY_ACTION',
description: 'Description of what this action does',
validate: async (runtime, message, state) => {
// Validation logic
return true;
},
handler: async (runtime, message, state, options, callback) => {
// Action implementation
return { success: true, data: {} };
},
};Manage plugin state:
export class MyService extends Service {
static serviceType = 'my-service';
async start() {
// Initialize service
}
async stop() {
// Cleanup
}
}Supply contextual information:
const myProvider: Provider = {
name: 'MY_PROVIDER',
description: 'Provides contextual data',
get: async (runtime, message, state) => {
return {
text: 'Provider data',
values: {},
data: {},
};
},
};Backend endpoints:
routes: [
{
name: 'api-endpoint',
path: '/api/endpoint',
type: 'GET',
handler: async (req, res) => {
res.json({ data: 'response' });
},
},
];# Start in development mode with hot reload
bun run dev
# Start in production mode
bun run start
# Build the plugin
bun run build
# Run tests
bun test
# Format code
bun run formatWrite unit tests in src/__tests__/:
import { describe, it, expect } from 'bun:test';
describe('My Plugin', () => {
it('should work correctly', () => {
expect(true).toBe(true);
});
});- Update
package.jsonwith your plugin details - Build your plugin:
bun run build - Publish:
elizaos publish
Use this template when you need:
- ✅ Backend-only functionality
- ✅ Simple API integrations
- ✅ Lightweight plugins
- ✅ Fast development cycles
- ✅ Minimal dependencies
Consider the full plugin-hehe if you need:
- ❌ React frontend components
- ❌ Complex UI interactions
- ❌ E2E testing with Cypress
- ❌ Frontend build pipeline
This template is part of the ElizaOS project.