Node Plugin
The Node Plugin provides essential services for web browsing, media processing, and content analysis through Node.js.
Installation
- Install the package:
Terminal window npm i github:elizaos-plugins/plugin-nodeTerminal window pnpm add github:elizaos-plugins/plugin-nodeTerminal window yarn add github:elizaos-plugins/plugin-node
Usage
import { createNodePlugin } from "@eliza/plugin-node";
const nodePlugin = createNodePlugin();
const agent = new AgentBuilder() .withPlugin(nodePlugin) .build();
Available Services
Service | Description | Key Features |
---|---|---|
BrowserService | Web capabilities | Page loading, content extraction, screenshots |
ImageDescriptionService | Image analysis | Content recognition, caption generation |
LlamaService | LLM integration | Text generation, analysis |
PdfService | PDF handling | Reading, parsing, text extraction |
SpeechService | Text-to-speech | Audio generation, voice synthesis |
TranscriptionService | Speech-to-text | Audio transcription, language detection |
VideoService | Video processing | Format conversion, frame extraction |
Configuration
interface NodePluginConfig { browserOptions?: { headless?: boolean; timeout?: number; }; speechOptions?: { defaultVoice?: string; outputFormat?: string; }; videoOptions?: { maxDuration?: number; outputFormats?: string[]; };}
Best Practices
- โ๏ธ Handle service errors appropriately
- โ๏ธ Implement timeouts for browser operations
- โ๏ธ Cache processed media when possible
- โ๏ธ Monitor resource usage for media operations
Configure service-specific options based on your performance requirements.