Observed since 20 Oct, 22:44 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Plug-and-play memory for AI agents. Simple, fast, and powerful.
Give your AI agents memory they control. A tool your agents can use to remember important information, learn from interactions, and maintain context across conversations.
Your AI agents need memory they can control. AgentMind is a tool you give to your agents, allowing them to decide what to remember, when to remember it, and how to use that knowledge. Instead of you managing context and memory, your agent does it autonomously.
Perfect for:
Give your agent a memory tool it can use autonomously:
# Define a tool for your agent to use
def remember_tool(content: str, importance: float = 0.5):
"""Tool for the agent to store important information."""
memory = Memory(api_key="am_live_YOUR_API_KEY", user_id="customer_123")
memory_id = memory.remember(
content=content,
metadata={"importance": importance, "source": "agent_decision"}
)
return f"Remembered with ID: {memory_id}"
def recall_tool(query: str, limit: int = 5):
"""Tool for the agent to recall relevant information."""
memory = Memory(api_key="am_live_YOUR_API_KEY", user_id="customer_123")
memories = memory.recall(query, limit=limit)
return memories if memories else "No relevant memories found"
# Your agent can now decide what to remember
agent = YourAgent(
tools=[remember_tool, recall_tool],
system_prompt="You have access to memory tools. Use them to remember important information about users, their preferences, and past interactions."
)
# The agent autonomously manages its memory
response = agent.chat("I prefer email communications")
# Agent might call: remember_tool("User prefers email.", importance=0.9)
# Later, the agent uses its memory
response = agent.chat("How should you contact me?")
# Agent calls: recall_tool("user communication preferences")
# Returns: "You prefer email communications"
Initialize memory:
from agentmind import Memory
# Simple cloud setup - just pass your API key
memory = Memory(api_key="am_live_YOUR_API_KEY")
Store anything - strings, dicts, lists:
# Simple memory with auto-generated ID
memory_id = memory.remember("Customer prefers email over phone calls")
# Returns: "mem_7a8c3b4f"
# Store with custom ID for easy retrieval
memory.remember("API rate limit is 1000 requests per hour", id="api_limits")
# Store data of any size or type
memory.remember({
"user_type": "enterprise",
"features": ["sso", "analytics", "priority_support"],
"contract_value": 50000
}, id="customer_profile")
Retrieve instantly by ID:
# Get your data back
memory.get("api_limits") # "API rate limit is 1000 requests per hour"
profile = memory.get("customer_profile") # Returns the full customer dict
# Get with metadata
data = memory.get(memory_id, include_metadata=True)
# Returns: {"content": "Customer prefers email...", "timestamp": "2024-01-15T14:30:00Z", "session_id": "chat_001"}
Natural language search - the real power:
# Store customer feedback and issues
memory.remember("Customer says checkout is too complicated")
memory.remember("App crashes when files are too big")
memory.remember("Enterprise client wants single sign-on")
memory.remember("Mobile app is slow according to users")
# Ask questions naturally - AI finds relevant memories
ui_feedback = memory.recall("What do customers think about our interface?")
# Finds: ["Customer says checkout is too complicated", "Mobile app is slow according to users"]
technical_issues = memory.recall("What problems are users having?")
# Finds: ["App crashes when files are too big"]
sales_needs = memory.recall("What do enterprise customers want?")
# Finds: ["Enterprise client wants single sign-on"]
That's it. No vector DBs to manage. No complex prompt engineering. Just a conscience that works.
pip install agentmind
from langchain import ConversationChain
from langchain.llms import OpenAI
from agentmind.integrations.langchain import AgentMindMemory
# Use AgentMind as LangChain's memory - persists across sessions!
memory = AgentMindMemory(api_key="am_live_YOUR_API_KEY", user_id="user_123")
chain = ConversationChain(
llm=OpenAI(),
memory=memory
)
# First conversation
chain.predict(input="I'm working on a React app with TypeScript")
chain.predict(input="I need help with state management")
# Later session - the AI remembers!
response = chain.predict(input="What technology stack am I using?")
# Output: "You're working on a React app with TypeScript. Last time we discussed
# state management options for your project."
from openai import OpenAI
from agentmind import Memory
from agentmind.integrations.openai import enhance_with_memory
client = OpenAI()
memory = Memory(api_key="am_live_YOUR_API_KEY", user_id="founder_1234")
# Track founder's journey and challenges
memory.remember("Building a fintech startup focused on small business lending")
memory.remember("Team of 8 people, raised $2M seed round last month")
memory.remember("Revenue goal: $1M ARR by end of year")
# Founder asks for strategic advice
messages = [
{"role": "user", "content": "Should I hire a compliance officer or outsource SOC2?"}
]
# Automatically inject relevant context
enhanced_messages = enhance_with_memory(messages, memory)
response = client.chat.completions.create(
model="gpt-4",
messages=enhanced_messages
)
# AI response considers the startup's size (8 people), funding ($2M), and revenue goals
# Find memories by meaning, not just keywords
memories = memory.recall(
"technical challenges",
strategy="semantic",
limit=5
)
# Context-aware retrieval
context = memory.recall("user's communication preferences")
# Finds: "I prefer direct and concise communication style"
# Multi-strategy search
relevant = memory.recall(
"recent product feedback",
strategy="hybrid", # Combines semantic + recency
user_id="customer_123"
)
# Check existence before retrieval
if memory.exists("user_preferences"):
prefs = memory.get("user_preferences")
# Clean up whenever needed, or let the agent manage memory itself
memory.delete("temporary_data")
# See everything in memory
all_memories = memory.list()
for mem in all_memories:
print(f"{mem['id']}: {mem['preview']} ({mem['size']})")
# Output:
# api_limits: API rate limit is 1000 requests per hour (45 chars)
# customer_profile: {"user_type": "enterprise", "features": ["sso", "analytics"... (127 chars)
# mem_7a8c3b4f: Customer prefers email over phone calls (39 chars)
# user_feedback_mobile: Mobile app is slow according to users (38 chars)
# enterprise_sso_req: Enterprise client wants single sign-on (38 chars)
# Get full data
with_data = memory.list(include_data=True)
# Filter memories
user_memories = memory.list(user_id="user_123")
recent = memory.list(created_after="2024-01-20")
important = memory.list(category="important")
# Paginate through large memory stores
page1 = memory.list(limit=50, offset=0)
page2 = memory.list(limit=50, offset=50)
# Get complete details about a memory
details = memory.inspect("mem_abc123")
print(f"Created: {details['metadata']['created']}")
print(f"Size: {details['metadata']['size']}")
print(f"Type: {details['metadata']['type']}")
print(f"Content: {details['content']}")
# Batch operations - returns list of IDs
memory_ids = memory.remember_batch([
"Q1 OKRs: Increase ARR by 50%",
{"content": "User interview: Needs better integrations", "id": "interview_001"},
{"content": "Competitor launched similar feature", "metadata": {"urgent": True}}
])
# Clean up old memories
memory.forget_before(date="2023-01-01")
# Export for compliance
data = memory.export_user_data(user_id="customer_123")
# Auto-summarize conversations
summary = memory.summarize_session(session_id="chat_123")
# Export user data (GDPR)
data = memory.export_user_data(user_id="user_123")
Fully managed memory infrastructure - no databases to maintain:
memory = Memory(api_key="am_live_YOUR_API_KEY")
# We handle storage, scaling, backups, and search
# Get your API key at https://agent-mind.com
For development and testing:
memory = Memory(local_mode=True)
# Stores memories locally for development
→ Get your API key to start using AgentMind cloud.
We love contributions! See CONTRIBUTING.md for guidelines.
git clone https://github.com/muiez/agentmind
cd agentmind
pip install -e ".[dev]"
pytest
MIT License - see LICENSE for details.
Built with ❤️ for the AI community. Give your agents the memory they deserve.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.5 | 26 Sept 2025 | 13 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:44 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:762fdec69f9db9d36a3e962c64b0eaa275e6fcd27d9ae7503c7223c4fed35bce