Skip to main content
ZeroClaw’s memory system is pluggable — you can implement any storage backend from Redis to PostgreSQL. The Memory trait provides a simple async interface for storing and recalling agent memories.

Overview

Memory backends implement the Memory trait:

Step-by-Step Guide

Complete Example

Here’s the full implementation from examples/custom_memory.rs:

Advanced Backends

Redis Backend

Best Practices

Avoid creating new connections for each operation:
Return descriptive errors:
For SQL backends, index searchable fields:
Optimize for bulk inserts/queries:
Benchmark your backend:

Next Steps

Gateway Setup

Expose your agent via HTTP gateway

Deployment

Deploy ZeroClaw to production