Skip to main content

agentmemory-native

AgentMemory for Python, without installing .NET: the AgentMemory library compiled with Native AOT into one shared library, with a small Python binding (ctypes, standard library only). It recalls a person's memories from Neo4j and, in the writing profiles, turns what they say into facts and preferences.

It is the memory behind a voice assistant: a speech server recalls before each reply and saves after the person's turn, within a time limit it sets (about 100 ms a recall with a local embedding model).

Requirements

  • Linux x86-64 with glibc 2.34 or newer (Ubuntu 22.04+, Debian 12+), CPython 3.10 or newer.
  • Neo4j 5.26 with the AgentMemory schema.
  • An OpenAI-compatible embeddings endpoint (for example Ollama with bge-m3), and for writing, an OpenAI-compatible chat model.

Install

pip install agentmemory-native

Recall

import agentmemory_native as am

config = {
    "schemaVersion": 1,
    "profile": "read_only",
    "owner": {"mode": "fixed", "id": "user-42"},
    "store": {"uri": "bolt://localhost:7687", "username": "neo4j", "password": "your-password"},
    "embedding": {"dimensions": 1024, "model": "bge-m3",
                  "endpoint": {"url": "http://localhost:11434/v1/embeddings"}},
}

with am.MemoryClient(config) as memory:
    result = memory.get_context(session_id="conversation-1", query="Where do I work?",
                                max_facts=10, max_preferences=5, min_score=0.7,
                                max_entities=10, max_relationships=10, time_windows=True)
    for fact in result.facts:
        print(fact.subject, fact.predicate, fact.object)

Recall reads one owner's memory only. AsyncMemoryClient offers the same calls for asyncio.

Remember

With the explicit_write or learning profile, a writer (any OpenAI-compatible chat model) and a state directory for the write journal, memory.remember(source_id=..., session_id=..., text=..., occurred_at=...) saves what the person said and returns a receipt: what was kept, and whether recall can find it yet. Forgetting and erasing an owner are calls of their own.

The contract

Requests and results are JSON documents, versioned (ABI 1, schema version 1). The full contract, the error codes and the configuration are in native/CONTRACT.md.

Licence

MIT. The wheel carries the licences of the packages compiled into the library (licenses/THIRD-PARTY-NOTICES.txt) and a manifest of the library's build (agentmemory_native/_native/MANIFEST.json); the binding refuses a library whose bytes differ from it.

Metadata

Release files for agentmemory-native 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for agentmemory-native 0.1.0
File Interpreter ABI Platform Actions
agentmemory_native-0.1.0-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details for agentmemory_native-0.1.0-py3-none-manylinux_2_34_x86_64.whl

Release files / agentmemory_native-0.1.0-py3-none-manylinux_2_34_x86_64.whl

Download URL agentmemory_native-0.1.0-py3-none-manylinux_2_34_x86_64.whl
Size 9.8 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
75772ffad4066dc5735722056a3308c8bff35c2b51fbe934015ddca65eb0038e
BLAKE2b-256 checksum
How to use checksums
4659e2d1da98d533b7343b9bf1b19d1169e1444a955ae7f0fe0f1827fb2193b7
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 21, 2026.

Transparency log

Security for agentmemory-native 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

1 file in this release has been uploaded with provenance metadata.

Attestation for agentmemory_native-0.1.0-py3-none-manylinux_2_34_x86_64.whl

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 21, 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