Observed since 20 Oct, 22:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Self-learning memory infrastructure for AI products
Self-learning memory infrastructure for AI products. It learns from what users do — not what they say.
pip install agent-magnet
Run on your own infrastructure. You control your data.
Add to your MCP config (Claude Desktop / Cursor / any MCP client):
{
"mcpServers": {
"agent-magnet": {
"command": "agent-magnet-mcp",
"env": {
"MAGNET_REDIS_URL": "your_redis_url",
"MAGNET_OPENAI_KEY": "your_openai_key"
}
}
}
}
Tools available:
get_profile — get learned memory profile for a userinject_memory — get memory injection string for system promptadd_signal — record a behavioral signalget_cold_start — get onboarding profile for new usersget_team_profile — get shared team memory (requires Redis)get_merged_injection — merged user + team + org memory injectionget_project_memory — per-user breakdown of what was learned in a projectshare_to_team — explicitly share a personal preference to team memoryforget_team — remove a preference from team memoryadd_team_signal — record a signal directly to team scopeChange one line. We handle the infrastructure.
from openai import OpenAI
client = OpenAI(
api_key="mg_sk_...",
base_url="https://magnet-gateway.onrender.com/v1",
default_headers={"x-session-id": "user_123"}
)
Get your API key: agentmagnet.app
Memory works for individual users out of the box. To share memory across a team, add Redis and a shared MAGNET_TEAM_ID.
Solo (local SQLite, no Redis needed):
agent-magnet init
# Use local storage? Y
# Team ID: (press Enter to skip)
Each person's preferences are stored privately on their machine.
Team (shared Redis):
agent-magnet init
# Use local storage? N
# Redis URL: redis://your-redis-host:6379
# Team ID: acme-eng
All team members point to the same Redis. Memory is scoped per-user but team-level insights are available.
What team memory gives you:
get_project_memory(project_id="acme-app")
# →
# {
# "contributors": {
# "ahmet": {"prefers": ["short responses", "Turkish"], "watch_out": ["never use em-dashes"]},
# "ayse": {"prefers": ["detailed explanations"], "dislikes": ["bullet lists"]}
# },
# "team_shared": {
# "prefers": ["short responses"], ← promoted because 2+ users share it
# "watch_out": []
# }
# }
Explicitly share a preference to team:
share_to_team(user_id="ahmet", fact_or_subject="short responses", team_id="acme-eng")
Team memory requires Redis. If you try to use team tools in local mode you'll get:
Team memory requires shared storage. Set MAGNET_REDIS_URL for all team members to use the same Redis instance.
Magnet observes behavioral signals — corrections, rejections, implicit patterns — and builds a living profile per user. No configuration required.
Three memory layers:
Agent Magnet is fully usable without an account. The free tier is not a demo — it's the real thing.
Free (no account needed)
compress_context, retrieve_original)Premium (API key from agentmagnet.app)
compression_stats)To enable premium features, set MAGNET_API_KEY=mg_sk_... in your environment or pass it during agent-magnet init.
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.34 | 5 Sept 2026 | 11 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:38 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:be02b977b41db2ae7352df8d5bc23954f545a3e748e0360531c7c9fc5b2fc015