Skip to main content

Wontopos — long-term memory for AI agents. Pure semantic retrieval, identical recall in every language, ~100× lower LLM bill.

Project description

Wontopos — long-term memory for AI agents

pip install wontopos
from wontopos import Client

mem = Client(api_key="wos-...")
mem.add("she prefers tea over coffee", user_id="alice")

# one call → short-term + long-term + context, ready for your LLM prompt
ctx = mem.recall("what does alice drink?", user_id="alice")

Why

  • Pure semantic retrieval — no keyword/BM25. Identical recall in every language (한국어 · 日本語 · 中文 · English).
  • No LLM in the loopstore / search / recall never call a language model. You pay embeddings, not generation.
  • Bounded retrievalrecall() returns a small, fixed-size slice (~1,200 tokens) regardless of how much you've stored. Your LLM bill stops growing with history.

Methods

Method Purpose
add(content, user_id, **metadata) Store one memory
add_turn(user_id, user_msg, assistant_msg) Store a conversation exchange
add_bulk(content, user_id, category=, timestamp=) Backfill a long history
update(user_id, old_memory_id, new_content) Supersede an old fact
search(query, user_id, limit=10, **opts) Semantic search
recall(query, user_id) One-call context (short + long + surrounding)
history(user_id) Recent turns (short-term)
stats(user_id) Counts
delete(user_id, memory_id) Delete one memory
delete_all(user_id) GDPR erase (delete every memory for the user)

All methods take a user_id — memories are isolated per user, then per account (your API key).

Errors

Any non-2xx response raises WosError(status, message):

from wontopos import Client, WosError

try:
    mem.search("...", user_id="alice")
except WosError as e:
    if e.status == 401:
        print("API key invalid or revoked")
    elif e.status == 429:
        print("Rate limited — back off")
    else:
        print(e.status, e.message)

Self-host

Point at your own engine:

mem = Client(api_key="...", base_url="https://wos.your-host.com")

Links

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

wontopos-2.2.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

wontopos-2.2.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file wontopos-2.2.1.tar.gz.

File metadata

  • Download URL: wontopos-2.2.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for wontopos-2.2.1.tar.gz
Algorithm Hash digest
SHA256 f6898e3ae52febdfedf1f427e8ba6ca0ba3499930f4b62890d6d61e6fb2e5ae2
MD5 46cbe255c2e9dc2c7e383c2ab13cb7e4
BLAKE2b-256 dffde1b1d8107e7d7818986b14c46ad5f0d0b22aacc1e24d0d2a49246724b3de

See more details on using hashes here.

File details

Details for the file wontopos-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: wontopos-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for wontopos-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5da4eeda732a1ceb23cfa363a3d092791f1a3b238fc756e090704a901e3c47a4
MD5 eae272c87f4123ba954859eb175cac00
BLAKE2b-256 a37b8e7228fa42253d1eb6bb4659beda162190f7801be2a2f6295b691b7c84fc

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