You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
capabilityDescription ='Custom service implementation';
375
-
376
-
staticasync start(runtime:IAgentRuntime) {
377
-
const service =newMyService(runtime);
378
-
// Initialize service
379
-
returnservice;
380
-
}
381
-
382
-
async stop() {
383
-
// Cleanup
384
-
}
385
-
}
386
-
387
-
// Complete Plugin
388
-
exportconst completePlugin:Plugin= {
389
-
name: 'complete-plugin',
390
-
description: 'Demonstrates all plugin features',
391
-
priority: 100,
392
-
393
-
// Configuration
394
-
config: {
395
-
API_KEY: process.env.MY_API_KEY
396
-
},
397
-
398
-
// Initialization
399
-
async init(config, runtime) {
400
-
// Validate config
401
-
// Setup resources
402
-
},
403
-
404
-
// Components
405
-
actions: [/* Action definitions */],
406
-
providers: [/* Provider definitions */],
407
-
evaluators: [/* Evaluator definitions */],
408
-
409
-
// Services
410
-
services: [MyService],
411
-
412
-
// Routes
413
-
routes: [{
414
-
name: 'api-endpoint',
415
-
path: '/api/data',
416
-
type: 'GET',
417
-
handler: async (req, res, runtime) => {
418
-
res.json({ data: 'value' });
419
-
}
420
-
}],
421
-
422
-
// Events
423
-
events: {
424
-
MESSAGE_RECEIVED: [
425
-
async (payload) => {
426
-
// Handle message
427
-
}
428
-
]
429
-
},
430
-
431
-
// Models
432
-
models: {
433
-
'custom-model': async (runtime, params) => {
434
-
// Custom model logic
435
-
returnresult;
436
-
}
437
-
},
438
-
439
-
// Dependencies
440
-
dependencies: ['@elizaos/plugin-sql'],
441
-
442
-
// Tests
443
-
tests: [/* Test suites */]
444
-
};
445
-
```
446
-
447
-
## Conclusion
448
-
449
-
The Eliza plugin system is significantly more powerful than the current documentation suggests. While the core concepts (Actions, Providers, Evaluators) are well-documented, the advanced features (Services, Routes, Events, Database Adapters) provide extensive capabilities that are not yet covered in the documentation. This represents both an opportunity for developers to create more sophisticated plugins and a need for more comprehensive documentation.
capabilityDescription ='Custom service implementation';
376
-
377
-
staticasync start(runtime:IAgentRuntime) {
378
-
const service =newMyService(runtime);
379
-
// Initialize service
380
-
returnservice;
381
-
}
382
-
383
-
async stop() {
384
-
// Cleanup
385
-
}
386
-
}
387
-
388
-
// Complete Plugin
389
-
exportconst completePlugin:Plugin= {
390
-
name: 'complete-plugin',
391
-
description: 'Demonstrates all plugin features',
392
-
priority: 100,
393
-
394
-
// Configuration
395
-
config: {
396
-
API_KEY: process.env.MY_API_KEY
397
-
},
398
-
399
-
// Initialization
400
-
async init(config, runtime) {
401
-
// Validate config
402
-
// Setup resources
403
-
},
404
-
405
-
// Components
406
-
actions: [/* Action definitions */],
407
-
providers: [/* Provider definitions */],
408
-
evaluators: [/* Evaluator definitions */],
409
-
410
-
// Services
411
-
services: [MyService],
412
-
413
-
// Routes
414
-
routes: [{
415
-
name: 'api-endpoint',
416
-
path: '/api/data',
417
-
type: 'GET',
418
-
handler: async (req, res, runtime) => {
419
-
res.json({ data: 'value' });
420
-
}
421
-
}],
422
-
423
-
// Events
424
-
events: {
425
-
MESSAGE_RECEIVED: [
426
-
async (payload) => {
427
-
// Handle message
428
-
}
429
-
]
430
-
},
431
-
432
-
// Models
433
-
models: {
434
-
'custom-model': async (runtime, params) => {
435
-
// Custom model logic
436
-
returnresult;
437
-
}
438
-
},
439
-
440
-
// Dependencies
441
-
dependencies: ['@elizaos/plugin-sql'],
442
-
443
-
// Tests
444
-
tests: [/* Test suites */]
445
-
};
446
-
```
447
-
448
-
## Conclusion
449
-
450
-
The Eliza plugin system is significantly more powerful than the current documentation suggests. While the core concepts (Actions, Providers, Evaluators) are well-documented, the advanced features (Services, Routes, Events, Database Adapters) provide extensive capabilities that are not yet covered in the documentation. This represents both an opportunity for developers to create more sophisticated plugins and a need for more comprehensive documentation.
0 commit comments