Skip to main content

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 user
  • inject_memory — get memory injection string for system prompt
  • add_signal — record a behavioral signal
  • get_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_magnet-0.1.8.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_magnet-0.1.8-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_magnet-0.1.8.tar.gz.

File metadata

  • Download URL: agent_magnet-0.1.8.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for agent_magnet-0.1.8.tar.gz
Algorithm Hash digest
SHA256 57b5a21126ad3a0e62816324fc31129e99ea7917dbc9e0797c7e8d016ebb7d0c
MD5 0743e02ba669e9996c57e828d32840f6
BLAKE2b-256 ba2f66d072182a324e999f41cc37ffc179ffcd90b9c75e6b2b8ad8aeb616cb19

See more details on using hashes here.

File details

Details for the file agent_magnet-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: agent_magnet-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for agent_magnet-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 097d7fb1b02f81ac690f49ac8d55c3803691a17b0020a2007761f96fd1de1ff1
MD5 495b039f9a8feae692f60c13f00d4638
BLAKE2b-256 cc4fad70d65f5b7114b7db68fdb36f6439f52bb64d5c29bd3eb22b1e78b62201

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page