Plugin System
Tiny Claw’s plugin system keeps the core minimal while enabling unlimited extensibility. All channels, providers, and tool packages are plugins that follow a simple, well-defined contract.Three Plugin Types
Channel Plugins
Connect external messaging platforms (Discord, Slack, Web, etc.)
Provider Plugins
Add LLM providers (OpenAI, Anthropic, Ollama, etc.)
Tool Plugins
Contribute new agent capabilities (web browsing, image gen, etc.)
Plugin Metadata
All plugins share common metadata:packages/types/src/index.ts
Channel Plugins
Channel plugins connect external messaging platforms to the agent loop.Interface
packages/types/src/index.ts
Lifecycle
getPairingTools()
Called during boot to merge pairing tools (e.g.
discord_pair, friends_chat_invite)start(context)
Called after agentContext is built. Plugin connects to platform and begins listening for messages
Message Routing
Plugin receives messages from platform and enqueues them via
context.enqueue(userId, message)Outbound Messages
If
sendToUser() is implemented, the gateway routes proactive messages to this channelRuntime Context
packages/types/src/index.ts
Example: Web Channel
The built-in web channel uses SSE (Server-Sent Events) for real-time streaming:Example: Discord Channel
Provider Plugins
Provider plugins register additional LLM providers.Interface
packages/types/src/index.ts
Provider Interface
packages/types/src/index.ts
Example: OpenAI Provider
Tool Plugins
Tool plugins contribute additional agent capabilities.Interface
packages/types/src/index.ts
Tool Interface
packages/types/src/index.ts
Example: Web Browsing Tools
Plugin Discovery
Plugins are discovered automatically from theplugins/ directory:
Package.json Convention
Security Model
Owner-Only Tools
Some tools can only be invoked by the instance owner:packages/types/src/index.ts
Shield Integration
All tool calls are evaluated by the Shield engine before execution:Plugin Development Guide
Channel Plugin Guide
Detailed guide for building channel plugins
Built-in vs Plugin
| Component | Built-in | Plugin |
|---|---|---|
| Web UI | ✅ | |
| Ollama Cloud | ✅ | |
| Memory tools | ✅ | |
| Heartware tools | ✅ | |
| Delegation tools | ✅ | |
| Discord | ✅ | |
| Friends chat | ✅ | |
| OpenAI | ✅ | |
| Anthropic | ✅ | |
| Web browsing | 🔜 | |
| Image generation | 🔜 |
Next: Memory System
Learn about adaptive memory with episodic storage