Skip to main content

Python SDK for MyMemo — HTTP client for the MyMemo memory ledger

Project description

mymemo

Python SDK for MyMemo — HTTP client for the MyMemo memory ledger.

Install

pip install mymemo

Quick Start

from mymemo import MyMemoConfig, create_clients, MemoryStore, rank
from mymemo.types import MemoryFactDraft, IncidentBase, SearchQuery
import time

# Configure — point to running MyMemo server
config = MyMemoConfig(
    server_url="http://localhost:3000",
)

# Connect
clients = create_clients(config)
store = MemoryStore(clients, dimension=384)

# Write memory
meta = IncidentBase(scope="my-agent", incident_id="1", timestamp=int(time.time()))
store.write(MemoryFactDraft(content="User prefers dark mode", category="user_preference"), meta)

# Search
results = store.get_candidates(SearchQuery(scope="my-agent", keyword="dark"))
ranked = rank(results, SearchQuery(scope="my-agent"))

Features

  • HTTP client — calls the TypeScript core API, no direct database access
  • Idempotent writes — server-side SHA256 deterministic IDs
  • Hybrid search — FTS5 full-text + vector similarity via server
  • Adaptive ranking — server-side time decay, category-specific tuning
  • GC — server-side automatic eviction of stale memories

License

MIT

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

mymemo-0.2.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

mymemo-0.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mymemo-0.2.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mymemo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6d26c14e37fee6a462e6ed4df36e1ffeeb067d24a99c5113919bf1433fea342f
MD5 66989ded63207d9af3c2a695bf432f00
BLAKE2b-256 5c9bc3bbc2f3c93e448a7e01b6788568f82c0359b5f8935f81c11cf30d889bc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mymemo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mymemo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 012f3b0095ffcc632609eaa7ad52f149c40cd0a9e88b3b4c143661031b419d18
MD5 e96d2ed49f0879962a32e6c74e1a91bc
BLAKE2b-256 899bbdb25083b48acd7308861cd3c77883e8560c1aec4d801745e854be052a6f

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