agentmemry
v1.0.0
Published
Persistent memory for AI agents. Store and search memories by meaning.
Maintainers
Readme
AgentMemory
Persistent memory for AI agents. Store and search memories by meaning.
Install
npm install agentmemoryQuick Start
import AgentMemory from 'agentmemory'
const mem = new AgentMemory('am_your_api_key')
// Store a memory
await mem.store('User loves Thai food and is vegetarian')
// Search by meaning
const results = await mem.search('restaurant recommendations')
// → Returns the Thai food memory!API
new AgentMemory(apiKey)
Create a client with your API key. Get one at agentmemry.ai
mem.store(content, options?)
Store a memory with optional metadata and namespace.
await mem.store('User prefers dark mode', {
metadata: { category: 'preferences' },
namespace: 'user_123'
})mem.search(query, options?)
Search memories by meaning. Returns matches with similarity scores.
const results = await mem.search('UI settings', { limit: 5 })
// [{ content: 'User prefers dark mode', similarity: 0.82, ... }]mem.list(options?)
List recent memories.
const memories = await mem.list({ namespace: 'user_123', limit: 20 })mem.delete(id)
Delete a memory by ID.
await mem.delete('memory-uuid-here')Get an API Key
Sign up at agentmemry.ai — free tier includes 1,000 requests/month.
License
MIT
