Skip to main content

Agentic Composite Memory (agentic-composite-memory)

An enterprise-grade, domain-agnostic, multi-tenant Composite Memory SDK, FastAPI Service & MCP Server engineered for Google Agent Development Kit (ADK) and multi-agent A2A ecosystems.


Installation

# Core SDK, ADK Integration, FastAPI + MCP Server, Postgres/Redis/Neo4j adapters
pip install agentic-composite-memory

# With Cloud IAM Auth & Bedrock / Cloud extras
pip install "agentic-composite-memory[aws,gcp,azure,ontology]"

# Everything included
pip install "agentic-composite-memory[all]"

Key Capabilities

  1. 3-Layer Ontology-Grounded Memory:

    • Layer 0 (Platform Upper Ontology): Built-in meta-graph (p:Actor, p:Object, p:Event, p:Concept, p:CandidateConcept) with zero configuration required.
    • Layer 1 (Federated Domain Packs): Register domain ontologies via JSON/YAML, Python Pydantic models, or W3C OWL/SHACL Turtle (.ttl) files using DomainPackLoader.
    • Layer 2 (App-Local Extensions & Emergent Overflow): Two-bucket runtime governance (TBoxRuntimeValidator) routes validated facts to domain:{tenant}:{domain} and novel concepts to app:{tenant}:{app} with automated ontology promotion (evolve_app_ontology_from_overflow).
  2. 3-Tier Context Graph + Procedural Playbooks:

    • Tier 1 (Episodic & Seed Store): Hybrid RRF search (pgvector HNSW + BM25 GIN) with pinned user preferences and PIIScrubber.
    • Tier 2 (Bi-Temporal Semantic Knowledge Graph): Multi-hop reasoning (max_hops=2), temporal edge invalidation (t_valid, t_invalid), and EntityResolutionGuard.
    • Tier 3 (Procedural Reasoning Traces & Playbooks): Records agent tool-call trajectories and caches high-reward reusable playbooks.
  3. Hot-Path vs. Sleep-Time Batch Extraction:

    • ExtractionMode.HOT_PATH: Immediate LLM/rule ontology extraction on every turn.
    • ExtractionMode.SLEEP_TIME_BATCH: Sub-10ms raw episodic write on the hot path, with background batch ontology extraction during run_memory_maintenance().
  4. Independent Per-Port or Single-Stack Database Adapters:

    • Run 100% on PostgreSQL (CompositeMemoryService.from_postgres_stack), 100% on Redis (CompositeMemoryService.from_redis_stack), or Mix-and-Match per port (e.g., PostgreSQL + Neo4j/Neptune + Redis).
    • Built-in Enterprise Cloud DB Auth (AwsIamDatabaseAuthProvider, GcpCloudSqlIamAuthProvider, AzureEntraDatabaseAuthProvider, VaultOrSecretManagerAuthProvider, and EnterpriseTlsConfig mTLS).
  5. Multi-Provider LLM & Embedding Adapters:

    • Google Gemini, Amazon Bedrock (Claude/Nova + Titan/Cohere Embeddings), OpenAI / Azure OpenAI / vLLM, Ollama, and local SentenceTransformers.
  6. Unified FastAPI + MCP Server in One Pod:

    • adk-memory serve-api serves both REST (/v1/...) and MCP (/mcp/http, /mcp/sse, /v1/mcp/tools, /v1/mcp/call) simultaneously.

Quickstart

1. Single-Stack PostgreSQL or Redis Factory

from agentic_memory_sdk import (
    CompositeMemoryService,
    BedrockEmbeddingAdapter,
    BedrockOntologyExtractorAdapter,
    AwsIamDatabaseAuthProvider,
)

# Example: 100% PostgreSQL stack with AWS RDS IAM Auth + Amazon Bedrock
auth = AwsIamDatabaseAuthProvider(region="us-east-1", service="rds-db")
service = CompositeMemoryService.from_postgres_stack(
    dsn="postgresql://iam_user@mydb.cluster.us-east-1.rds.amazonaws.com:5432/memory",
    embedding_adapter=BedrockEmbeddingAdapter(region="us-east-1", target_dim=16),
    extractor_adapter=BedrockOntologyExtractorAdapter(region="us-east-1"),
    auth_provider=auth,
)

2. Extending agentic-memory-sdk with Custom Adapters

Every boundary in agentic-memory-sdk is a structural typing.Protocol in agentic_memory_sdk.ports and agentic_memory_sdk.auth. You can extend any port without subclassing internal classes:

from agentic_memory_sdk.ports import EmbeddingAdapter, PlaybookStoreAdapter
from agentic_memory_sdk.models import PlaybookRecord

class MyCustomEmbeddingAdapter:
    """Implements EmbeddingAdapter Protocol via structural subtyping."""
    async def embed(self, text: str) -> list[float]:
        # Call your custom internal embedding gateway
        return [0.1] * 16

3. Running the Unified FastAPI + MCP Server

# Start unified REST + MCP server on port 8095
adk-memory serve-api --host 0.0.0.0 --port 8095 --mode in_memory

Metadata

Release files for agentic-composite-memory 0.1.1

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

Source distribution (sdist)

Source distribution for agentic-composite-memory 0.1.1
File Size Uploaded Provenance Actions
agentic_composite_memory-0.1.1.tar.gz 75.3 kB With provenance Details for agentic_composite_memory-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentic-composite-memory 0.1.1
File Interpreter ABI Platform Actions
agentic_composite_memory-0.1.1-py3-none-any.whl Python 3 none any Details for agentic_composite_memory-0.1.1-py3-none-any.whl

Total release size: 165.7 kB

Release files / agentic_composite_memory-0.1.1.tar.gz

Download URL agentic_composite_memory-0.1.1.tar.gz
Size 75.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9dc539d50471793d7510a5bcbdf56558c33150554a5670bb94d953676d1247fb
BLAKE2b-256 checksum
How to use checksums
f3c5fd1d6a388cc32cf002c4719c2be508bae0008730c7ffab827503d4326d73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Release files / agentic_composite_memory-0.1.1-py3-none-any.whl

Download URL agentic_composite_memory-0.1.1-py3-none-any.whl
Size 90.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d407b9db25dafa553d5a795f68435839e2c9fa32af0a6247714a72c83a219f5
BLAKE2b-256 checksum
How to use checksums
8c78aee5b5d082d257f7f2068e0fa57bc9b796fbd1a342356182f74f45dabbd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

Security for agentic-composite-memory 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentic_composite_memory-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.

Transparency log

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