Node Plugin
The Node Plugin provides essential services for web browsing, media processing, and content analysis through Node.js.
Installation
Section titled “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
import { createNodePlugin } from "@eliza/plugin-node";
const nodePlugin = createNodePlugin();
const agent = new AgentBuilder() .withPlugin(nodePlugin) .build();
Available Services
Section titled “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
Section titled “Configuration”interface NodePluginConfig { browserOptions?: { headless?: boolean; timeout?: number; }; speechOptions?: { defaultVoice?: string; outputFormat?: string; }; videoOptions?: { maxDuration?: number; outputFormats?: string[]; };}
Best Practices
Section titled “Best Practices”- Handle service errors appropriately
- Implement timeouts for browser operations
- Cache processed media when possible
- Monitor resource usage for media operations