Skip to main content

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

Project description

dinomem-py

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

Install

pip install dinomem-py

Usage

import os
from dinomem_py import MemoryStore

mem = MemoryStore(api_key=os.environ["DINOMEM_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 dinomem_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

dinomem_py-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

dinomem_py-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file dinomem_py-1.0.0.tar.gz.

File metadata

  • Download URL: dinomem_py-1.0.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dinomem_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f9e57aaab1cf16e51d0c266e5475706c8117ec2c31470a07c76625b444c64419
MD5 fe10e472070b3865b7d2c2b743404933
BLAKE2b-256 80aa1f5202a29af98c981ed7bb15b42ddc36f24aef24c653af3e19f9681542b6

See more details on using hashes here.

File details

Details for the file dinomem_py-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dinomem_py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for dinomem_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 982e7a99e16e26c6480f24356e3ab5de76267dd4d92ce70902fbe8da96068fc9
MD5 a095039012ffd570c3086c17a39d447a
BLAKE2b-256 e5de8379517674f449548cabd494e729543e3b7da8955754e83d543400585e5e

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