Back to Documentation
Agent Memory
Configure how agents remember and recall information across conversations.
Memory Types
Conversation Memory
Remember recent messages in the current conversation.
Summary Memory
Summarize long conversations to save context.
Vector Memory
Semantic search over past interactions.
Configure Memory
const agent = await client.agents.create({
name: "Support Agent",
memory: {
type: "hybrid",
conversation: { maxMessages: 20 },
summary: { enabled: true, threshold: 10 },
vector: {
enabled: true,
collection: "support_history",
topK: 5
}
}
});Manual Memory Operations
// Add to memory
await client.memory.add(agentId, {
content: "User prefers email communication",
type: "fact"
});
// Search memory
const results = await client.memory.search(agentId, {
query: "communication preferences"
});