Skip to main content

Memory API for AI agents — Postgres-native, graph memory included, no Neo4j

Project description

agentmem-py

Python SDK for AgentMem — the memory API for AI agents.

Install

pip install agentmem-py

Usage

import os
from agentmem_py import MemoryStore

mem = MemoryStore(api_key=os.environ["AGENTMEM_API_KEY"])

mem.write(content="user prefers dark mode", agent_id="agent-1", scope="user")
hits = mem.search(query="theme preference", agent_id="agent-1", top_k=5)
for h in hits:
    print(h.score, h.content)

Async

import asyncio
from agentmem_py import AsyncMemoryStore

async def main():
    async with AsyncMemoryStore(api_key="...") as mem:
        await mem.write(content="hello", agent_id="agent-1")

asyncio.run(main())

Self-hosting

Pass base_url= to point at your own deployment:

mem = MemoryStore(api_key="...", base_url="https://your-host.example.com/functions/v1/api")

License

Apache-2.0

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

agentmem_py-0.2.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

agentmem_py-0.2.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file agentmem_py-0.2.1.tar.gz.

File metadata

  • Download URL: agentmem_py-0.2.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for agentmem_py-0.2.1.tar.gz
Algorithm Hash digest
SHA256 dfd45325db83e36744bd7c5139a24b1576c09b6f2f7bbd66a7dfe1ab3621446a
MD5 2e3e6e9bc95dccaf171af3fddd67ed79
BLAKE2b-256 b112ed3faef42a46b76e96deee3a78b40c63024b7a4fc810136f1b2e3be93ea5

See more details on using hashes here.

File details

Details for the file agentmem_py-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agentmem_py-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for agentmem_py-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbdc90faf4301670edd73061328771094b29affa356b546336f745396dead9c6
MD5 288fefad9baa554d3ba2bc879ba033e4
BLAKE2b-256 db55ea3a33b8471f22e0b5c1729e7ed6f10bd4c1ad644b70a5e75e20f0514da5

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