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.0.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.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentmem_py-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 648c663d5afcefce75271ec36e486ca460a1d3f137d69810891d05e23dac5c93
MD5 e9063000b307fb516384fb322096cba3
BLAKE2b-256 730576282544d1a874130afec549dbb0c76cd6bc225b85a459b53907eb8dc746

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentmem_py-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 678a6a7dc00dfd290356bb8c045c7c42d099ebcd4fb8365a156b804107e9df9d
MD5 4d2ec7c4b55175fb2e485e30b0e5206f
BLAKE2b-256 2222371e41290d97441949bc11c506b4062fc5d974cde22d67740fc317986c3b

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