What are Services?
Services are long-running background tasks that extend agent functionality beyond request-response patterns.Service Interface
Service Types
Common Service Patterns
Platform Integration Service
Background Task Service
Model Service Pattern
Service Lifecycle
Service Registration
Service Communication
Services can interact with the runtime and other services:Best Practices
- Implement graceful shutdown in
stop() - Handle errors without crashing
- Use environment variables for config
- Avoid blocking operations
- Clean up resources properly
Common Services
| Service | Purpose | Example Plugin |
|---|---|---|
| Platform Services | Connect to chat platforms | Discord, Telegram |
| Model Services | AI model providers | OpenAI, Anthropic |
| Data Services | External data sources | Web search, SQL |
| Media Services | Process media | TTS, image gen |
| Background Services | Scheduled tasks | Task runner |
Next Steps
Agent Configurations
Browse sample character configurations

