Skip to main content

Examples and Use Cases

Learn from real implementations and common patterns in the ZeroClaw ecosystem.

Example Repository

The ZeroClaw repository includes complete working examples in the examples/ directory:

Custom Provider Example

Integrate any LLM backend by implementing the Provider trait:
The full example is in examples/custom_provider.rs

Custom Channel Example

Connect ZeroClaw to any messaging platform:
Full implementation: examples/custom_channel.rs

Custom Tool Example

Extend agent capabilities with custom tools:
Full implementation: examples/custom_tool.rs

Custom Memory Backend Example

Implement any storage backend for agent memory:
Full implementation with Redis example: examples/custom_memory.rs

WASM Plugin Example

Extend ZeroClaw with WebAssembly plugins:
1

Build WASM module

2

Configure ZeroClaw

3

Use the plugin

The plugin’s exported tools and providers are now available to the agent.
WASM plugins must export specific functions: alloc, dealloc, zeroclaw_tool_execute, zeroclaw_provider_chat. See examples/plugins/echo/README.md for ABI details.

Common Use Cases

Local LLM Integration

Use the Ollama provider example to run agents with local models like Llama, Mistral, or Phi.

Custom Messaging Platforms

Adapt the Telegram channel example for Slack, Discord, Matrix, or proprietary chat systems.

Domain-Specific Tools

Create tools for database queries, API interactions, or business-specific workflows.

Persistent Memory

Implement memory backends using Redis, PostgreSQL, S3, or vector databases.

Hardware Integration

See hardware examples for Raspberry Pi GPIO and STM32 peripherals.

Multi-Provider Strategies

Combine multiple providers with fallback logic for reliability.

Running Examples

Compile and Run

Build for Production

Community Examples

Looking for more examples? Check the community showcase:
Built something cool? Share it in Discussions or submit a PR to add it to the examples directory!

Additional Resources

Architecture Guide

Understand the trait-based design

API Reference

Complete API documentation

Contributing Guide

Learn how to contribute your examples

Troubleshooting

Common issues and solutions