S3 Adapter
Overview
The S3 adapter stores memory entries as versioned JSON objects in any S3-compatible bucket. This makes SenseLab compatible with the broader cloud storage ecosystem — AWS S3, Accelerated Cloud Storage (ACS), Cloudflare R2, MinIO, DigitalOcean Spaces, and others. Best for:- Distributed teams needing shared memory across regions
- AI training pipelines where memory lives alongside model weights and datasets
- Serverless environments where a local filesystem isn’t available
- Large-scale deployments storing millions of memory entries
Installation
boto3. AWS credentials are resolved via the standard credential chain (env vars, ~/.aws/credentials, IAM role, etc.).
Configuration
YAML
Environment Variables
Programmatic
Object Layout
Entries are stored as JSON objects with the following key structure:amfs/ and namespace default:
MemoryEntry — no deltas, no dependencies. This makes individual entries independently readable and portable.
Using with ACS (Accelerated Cloud Storage)
Accelerated Cloud Storage provides S3-compatible object storage optimized for AI workloads. To use SenseLab with ACS:Using with MinIO
For local development or self-hosted S3:Watch (Polling)
The S3 adapter implementswatch() via periodic polling (every 5 seconds by default), since S3 does not support native change notifications. For real-time streaming, use the HTTP API server with SSE.
Limitations
- No native full-text search —
search()falls back to scanning all entries and filtering in memory. For high-volume search, use the Postgres adapter or route through the HTTP API. - No native vector search —
semantic_search()requires an embedder and scans entries in memory. For production-scale semantic search, combine with Postgres + pgvector. - Eventual consistency — S3 provides strong read-after-write consistency for PUTs, but LIST operations may show stale results briefly.
Next Steps
- Postgres Adapter — full-text + vector search with native SQL
- HTTP API Server — serve SenseLab over REST for any client
- Docker & Kubernetes — deploy SenseLab with S3 backend on Kubernetes
