# Add tools to your agentagent = YourAgent( tools=[remember_tool, recall_tool])# Agent remembers important contextuser: "I'm allergic to peanuts and love Italian food"agent: memory.remember("User allergic to peanuts, loves Italian food")user: "Book me a restaurant"agent: memory.recall("dietary restrictions and preferences")agent: "I found an Italian restaurant with a peanut-free menu"
from agentmind import Memorymemory = Memory(api_key="YOUR_API_KEY")# Natural conversation with memoryuser: "I'm building a SaaS app"agent: memory.remember("Building a SaaS application")agent: "Great! What's your tech stack?"user: "Next.js and Supabase"agent: memory.remember("Tech stack: Next.js, Supabase")agent: "Nice modern stack. What features are you building?"user: "User auth and payments"agent: memory.remember("Working on: authentication, payments")agent: "For payments with Next.js, I recommend Stripe..."# Days later - agent remembers everythinguser: "How do I add subscriptions?"agent: memory.recall("tech stack payments")# Agent knows: Next.js, Supabase, working on paymentsagent: "Since you're using Next.js with Stripe, here's how to add subscriptions..."
# Ask questions in plain Englishmemory.recall("What did the user say about pricing?")memory.recall("Any bugs reported yesterday?")memory.recall("What's their tech stack?")memory.recall("Show me all customer complaints")# Memory understands contextmemory.remember("User wants to cancel subscription")later = memory.recall("cancellation requests") # Finds it!# Store complex datamemory.remember({ "customer": "acme_corp", "plan": "enterprise", "mrr": 5000})# Search naturallyresult = memory.recall("enterprise customers")# Returns the Acme Corp data