Skip to main content

AGM -- Agent Memory Management

agm-memory-mcp -- Provenance-tagged memory infrastructure for multi-agent AI systems, available as an MCP server.

Solves two problems current agent memory systems ignore:

  1. Agent identity and trust -- knowing which agent wrote what and whether it can be trusted
  2. Memory poisoning -- detecting and containing malicious or corrupted memories before they propagate through agent reasoning

Existing systems (MemGPT, Mem0, HippoRAG) have no memory states, no trust provenance, and no causal ordering. AGM is infrastructure for pipelines that need those properties.


Install

pip install agm-memory-mcp

Python import name:

import agent_memory_mcp

CLI command:

agm-memory-mcp --help

Requirements

  • Python 3.11+
  • A running AgentMemory HTTP API endpoint

This package is the MCP bridge. It does not embed the full backend. To run the backend locally (needs only Docker):

git clone https://github.com/Deep-De-coder/AGM
cd AGM/agent-memory
docker compose up --build        # API on http://localhost:8000

Configuration

Set either CLI args or environment variables.

Environment variables:

  • AGENT_MEMORY_API_URL (default: http://localhost:8000)
  • AGENT_MEMORY_API_PREFIX (default: empty string)

Examples:

# Linux/macOS
export AGENT_MEMORY_API_URL=https://your-api.example.com
export AGENT_MEMORY_API_PREFIX=/api/v1
agm-memory-mcp
# Windows PowerShell
$env:AGENT_MEMORY_API_URL="https://your-api.example.com"
$env:AGENT_MEMORY_API_PREFIX="/api/v1"
agm-memory-mcp

Or pass options directly:

agm-memory-mcp --api-url https://your-api.example.com --api-prefix /api/v1

Health Check

Validate connectivity before starting MCP transport:

agm-memory-mcp --check

Shows resolved URL and API status. Exits 0 on success, 1 on failure.


Run as Module

python -m agent_memory_mcp

Equivalent to running agm-memory-mcp.


MCP Client Config Example (Claude Desktop / compatible)

{
  "mcpServers": {
    "agm-memory": {
      "command": "agm-memory-mcp",
      "args": [
        "--api-url",
        "https://your-api.example.com"
      ]
    }
  }
}

You can also use env vars instead of args.


Included MCP Tools (14)

  1. write_memory
  2. read_memory
  3. query_memories
  4. get_safe_memories
  5. get_trust_score
  6. get_provenance
  7. flag_memory
  8. register_agent
  9. check_violations
  10. acknowledge_violation
  11. get_notifications
  12. run_rules_check
  13. consolidate_memories
  14. get_rules_reference

Rule Model

AGM includes 15 embedded detection rules (RULE_001 through RULE_015) for:

  • write flooding
  • trust-chain contamination
  • contradiction detection
  • rapid rewrite anomalies
  • high-stakes unverified content
  • inter-agent session violations
  • expired safety context
  • anonymous agent writes
  • bulk near-duplicate content
  • trust cliff detection
  • behavioral drift
  • causal orphan detection
  • anergy bypass attempts
  • high-taint writes (causal contamination)
  • sandbagging (evaluation vs. production behavior gap)

Use get_rules_reference to inspect rule metadata at runtime.


License

MIT

Metadata

Release files for agm-memory-mcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agm-memory-mcp 0.1.4
File Size Uploaded Provenance
agm_memory_mcp-0.1.4.tar.gz 24.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agm-memory-mcp 0.1.4
File Interpreter ABI Platform
agm_memory_mcp-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / agm_memory_mcp-0.1.4.tar.gz

Download URL agm_memory_mcp-0.1.4.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
978f0f32b33e054199a404ef4455f379730dd6a2af84505ee6c31f821a540a76
BLAKE2b-256 checksum
How to use checksums
3d4756e77b329bdf07b07c348ba88ba38ae41f9b2f21942056ea7882f747372e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / agm_memory_mcp-0.1.4-py3-none-any.whl

Download URL agm_memory_mcp-0.1.4-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13871c8c5d0a48bb00856db50a3fc7fe995f03fa11df4d4fe4be8ba5265f1b00
BLAKE2b-256 checksum
How to use checksums
f5138817814bd36162c6f96e5ad2cc00ae427acc0805db9e4db9c610f0bc0289
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for agm-memory-mcp 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page