How to Add Long-Term Memory to Anthropic's Managed Agents with Milvus

This post introduces two novel patterns for integrating Milvus with Anthropic's Managed Agents to provide long-term memory. The first pattern enables semantic recall within a single agent session by dual-writing indexed events to a Milvus collection, allowing agents to query their own past decisions and actions using vector search. The second pattern establishes a shared agent memory pool across sessions by partitioning a Milvus collection by tenant, enabling parallel agents to learn from collective experience. The post provides code examples for embedding events, performing session-scoped searches, and utilizing Milvus partition keys for tenant isolation. It also discusses production considerations such as indexing strategy, consistency boundaries, and embedding cost control.
More from the AI Data Storage Engine trail
- Milvus Snapshots: Point-in-Time Collection Views Without Copying Data
- Announcing Milvus 3.0: Lake-Native Vector Search and a More Powerful Retrieval Engine
- How to Recover Milvus Data After etcd Corruption Without a Backup
- Open Tag: An Open-Source Claude Tag for Claude Code and Codex
- How Force Merge Compaction Nearly Doubled Milvus Search QPS