Skip to main content

Enterprise-grade agent memory management solution with region governance.

Project description

Agent Memory Hub

PyPI Python Versions CI Docs PyPI Status

Enterprise-grade agent memory management solution with region governance.

agent-memory-hub provides a standardized, secure, and compliant way for AI agents to store and recall memories. It enforces region residency requirements (data sovereignty) and provides a clean abstraction over storage backends, defaulting to Google Cloud.

Features

  • Session-based Memory: Isolate memory by agent and session ID.
  • Region Governance: Enforce data residency (e.g., us-central1, europe-west1).
  • Backend Agnostic: Adapter pattern supports multiple backends (Default: Google ADK/GCS).
  • Enterprise Security: No hardcoded secrets, strictly typed, and compliance-ready.

Installation

pip install agent-memory-hub

Quick Start

from agent_memory_hub import MemoryClient

# Initialize the client with strict region requirements
memory = MemoryClient(
    agent_id="travel_agent",
    session_id="sess_001",
    region="asia-south1",
    region_restricted=True
)

# Store a memory (will fail if backend is not in asia-south1)
memory.write("User prefers vegetarian food", "episodic")

# Recall memory
print(memory.recall("episodic"))

Region Governance

This SDK is designed for global deployments where data sovereignty is critical. When region_restricted=True is set, the SDK performs a handshake with the control plane to verify that the underlying storage is physically located in the requested region before writing any data.

GCP Prerequisites

By default, this package uses Google Cloud Storage as the backing store.

  1. Authentication: Ensure GOOGLE_APPLICATION_CREDENTIALS is set or you are authenticated via gcloud auth application-default login.
  2. Permissions: The service account requires storage.objects.create and storage.objects.get permissions on the target bucket.
  3. Buckets: Buckets should be named following the convention memory-hub-{region}-{environment} (e.g., memory-hub-asia-south1-prod).

Development

Pre-commit Testing

Before pushing code, run the pre-commit validation script to catch issues early:

python scripts/pre_commit_test.py

This runs:

  • Linting (Ruff)
  • Security audits (pip-audit, Bandit)
  • Full test suite
  • Coverage check (minimum 70%)
  • Package build validation

Security & Compliance

  • No Secrets: This library does not handle secrets directly. Use IAM roles.
  • Dependency Pinning: All dependencies are pinned to secure versions.
  • Audit: Compatible with pip-audit and bandit.

Roadmap & Contributing

We have a detailed feature roadmap including Observability, AWS support, and Vector Search. Check out ROADMAP.md to see what's planned and how you can contribute!

See SECURITY.md for vulnerability disclosure.

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_memory_hub-0.3.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

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

agent_memory_hub-0.3.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file agent_memory_hub-0.3.0.tar.gz.

File metadata

  • Download URL: agent_memory_hub-0.3.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_memory_hub-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f0e3c6dd4bf9156b0eb5d2dfcc6184a56e604f2543931d9a7cf3cd8bb0c4b51f
MD5 f5b0e35b15b7871677abe1733883662e
BLAKE2b-256 42090d4d1a9b6f6efdf7bc691d66a1f08e4ff7078fb31f0716c4663664688d76

See more details on using hashes here.

File details

Details for the file agent_memory_hub-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_memory_hub-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cd09ce2d881faf8f0d359edbc2d40f23fbd23277032ecdbf8893b2616fb1f5e
MD5 018d535a49d416679815ab653a3d51d4
BLAKE2b-256 3c5e205b533d0c8ccfeb87087e3b2d85299ae1c23ddacaccf52607a1ff70ab9b

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