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
-
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 usingDomainPackLoader. - Layer 2 (App-Local Extensions & Emergent Overflow): Two-bucket runtime governance (
TBoxRuntimeValidator) routes validated facts todomain:{tenant}:{domain}and novel concepts toapp:{tenant}:{app}with automated ontology promotion (evolve_app_ontology_from_overflow).
- Layer 0 (Platform Upper Ontology): Built-in meta-graph (
-
3-Tier Context Graph + Procedural Playbooks:
- Tier 1 (Episodic & Seed Store): Hybrid RRF search (
pgvectorHNSW + BM25 GIN) with pinned user preferences andPIIScrubber. - Tier 2 (Bi-Temporal Semantic Knowledge Graph): Multi-hop reasoning (
max_hops=2), temporal edge invalidation (t_valid,t_invalid), andEntityResolutionGuard. - Tier 3 (Procedural Reasoning Traces & Playbooks): Records agent tool-call trajectories and caches high-reward reusable playbooks.
- Tier 1 (Episodic & Seed Store): Hybrid RRF search (
-
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 duringrun_memory_maintenance().
-
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, andEnterpriseTlsConfigmTLS).
- Run 100% on PostgreSQL (
-
Multi-Provider LLM & Embedding Adapters:
- Google Gemini, Amazon Bedrock (Claude/Nova + Titan/Cohere Embeddings), OpenAI / Azure OpenAI / vLLM, Ollama, and local SentenceTransformers.
-
Unified FastAPI + MCP Server in One Pod:
adk-memory serve-apiserves 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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentic_composite_memory-0.1.0.tar.gz | 69.9 kB | With provenance | Details for agentic_composite_memory-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentic_composite_memory-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentic_composite_memory-0.1.0-py3-none-any.whl |
Total release size: 156.4 kB
Release files / agentic_composite_memory-0.1.0.tar.gz
| Download URL | agentic_composite_memory-0.1.0.tar.gz |
|---|---|
| Size | 69.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a55d23e6c23ad0a61e45b4ac1ddd85eab85e54416d118e8db2354a219b671d2a
|
|
BLAKE2b-256 checksum How to use checksums |
bf367c9a51a7f0a487ca37139b61b3a16f36d7fb679c0d551a662d822b834b46
|
| 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 logRelease files / agentic_composite_memory-0.1.0-py3-none-any.whl
| Download URL | agentic_composite_memory-0.1.0-py3-none-any.whl |
|---|---|
| Size | 86.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29cf86018b8966a0c1aa6210a1990aee6957e76c7e665db5670fa2a324f7c458
|
|
BLAKE2b-256 checksum How to use checksums |
3f02879761eedcabd890a61790cf69ce319789eddbd7c06d32c98a3c3e4481f5
|
| 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 logSecurity for agentic-composite-memory 0.1.0
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.
Attestation for agentic_composite_memory-0.1.0.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 logA 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.