Self-learning memory infrastructure for AI products
Project description
Agent Magnet
Self-learning memory infrastructure for AI products. It learns from what users do — not what they say.
Installation
pip install agent-magnet
Two Integration Modes
1. MCP Server (Free, Self-Hosted)
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 users
2. Proxy (Hosted, Dashboard included)
Change 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
How It Learns
Magnet observes behavioral signals — corrections, rejections, implicit patterns — and builds a living profile per user. No configuration required.
Three memory layers:
- Behavioral (Redis) — real-time, every request
- Episodic (Qdrant) — semantic recall when relevant
- Knowledge (Neo4j) — long-term entity relationships
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_magnet-0.1.9.tar.gz.
File metadata
- Download URL: agent_magnet-0.1.9.tar.gz
- Upload date:
- Size: 49.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08b25acdb8d103d7878829f8df1f974eb3e2ee4e2bf63716c544e86789245848
|
|
| MD5 |
a3ddc090697dd6e2b3d6890eeca9734c
|
|
| BLAKE2b-256 |
7daa8b0ee34d56eb4a3cebbad7512de8a1a1b2f8850d59c9d2088b44e14051ad
|
File details
Details for the file agent_magnet-0.1.9-py3-none-any.whl.
File metadata
- Download URL: agent_magnet-0.1.9-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed049015090d9a3c2c6426af464797071a6156d62214b0c655b2f4b33f891bd1
|
|
| MD5 |
96ed191cb0d6bd1d147c8b97c03dcbbe
|
|
| BLAKE2b-256 |
90adb9f0c6c1d46c362bb3c16466920980aeeab7f98a0bba7a42b34a762946de
|