Skip to main content

AGM — Agent Memory Management. Provenance-tagged memory infrastructure for multi-agent AI systems. MCP server with trust scoring, behavioral fingerprinting, and memory poisoning defense.

Project description

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.


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 13 embedded detection rules (RULE_001 through RULE_013) 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

Use get_rules_reference to inspect rule metadata at runtime.


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

agm_memory_mcp-0.1.2.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

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

agm_memory_mcp-0.1.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file agm_memory_mcp-0.1.2.tar.gz.

File metadata

  • Download URL: agm_memory_mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agm_memory_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 75901375bed1b10324ef709d97fb8ce4cb8d8047c7e4f773917ca964a97dbe52
MD5 c1d3b16ae9b49f162295c03a5e5e3d73
BLAKE2b-256 9b2158f6cdd50b12e2495fcba30c658fa559b16e9fade0a22dbd7b7be360d9e0

See more details on using hashes here.

File details

Details for the file agm_memory_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agm_memory_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agm_memory_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd684a87a5289603cec3e44f1fee2548587d15ec440712fb1543b97164ccb037
MD5 93b568b0968a8cc753d1b2cf280b9a54
BLAKE2b-256 a7397b63eaba602a956db89cb9dc4575484ee87e5668e0e61999c326ec56ced5

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