Skip to main content

RecallOS Python SDK (recallos-sdk)

PyPI version Python License: MIT

Persistent memory infrastructure for production AI agents.

RecallOS gives your AI agents persistent, self-updating memory: it extracts durable facts from conversations, stores them with confidence/importance scores, and retrieves them with hybrid vector + keyword ranking to construct token-budgeted context blocks.


Installation

pip install recallos-sdk

Quickstart

from recallos_sdk import MemoryClient

# Connect to local RecallOS or remote instance
memory = MemoryClient(base_url="http://localhost:8420")
# Or with API key:
# memory = MemoryClient(base_url="https://your-domain.com", api_key="rk_live_...")

# 1. Remember facts from conversation
result = memory.remember(
    user_id="user_123",
    text="I prefer dark mode and concise responses with Python examples."
)
print("Created memories:", len(result.created))

# 2. Recall token-budgeted context block
ctx = memory.context(
    user_id="user_123",
    query="How should I format my response?",
    max_tokens=400
)
print("Context for LLM prompt:\n", ctx.context)

# 3. Provide usefulness feedback (adaptive learning)
if ctx.included_memory_ids:
    memory.feedback(memory_id=ctx.included_memory_ids[0], useful=True)

Key Features

  • Automatic Fact Extraction: Extracts durable user facts, preferences, entities, and temporal updates.
  • Hybrid Retrieval: Combines semantic vector similarity, BM25 keyword matching, recency decay, and usefulness scoring.
  • Token-Budgeted Context: Automatically fits the most relevant memories into your prompt token window.
  • Adaptive Memory: Reinforces frequently useful memories and decays stale information over time.
  • Zero Cloud Lock-in: Works out of the box with local SQLite + local Ollama models.

License

MIT License. See LICENSE for details.

Metadata

Release files for recallos-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for recallos-sdk 0.1.0
File Size Uploaded Provenance Actions
recallos_sdk-0.1.0.tar.gz 7.4 kB Without provenance Details for recallos_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for recallos-sdk 0.1.0
File Interpreter ABI Platform Actions
recallos_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for recallos_sdk-0.1.0-py3-none-any.whl

Total release size: 14.0 kB

Release files / recallos_sdk-0.1.0.tar.gz

Download URL recallos_sdk-0.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6bfea726c96436a7ae717825cd2860e621e6b623b237d8dda7ada4df7568c75f
BLAKE2b-256 checksum
How to use checksums
4b2273e9e0a5a96217a8cac61d105965a703d1e62ea7170a3da6357e6245bc70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / recallos_sdk-0.1.0-py3-none-any.whl

Download URL recallos_sdk-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fce6c1269f6a011f2d1f5990c4fb6560f55d0b66ecfcadeed517e1e6e0fedcb
BLAKE2b-256 checksum
How to use checksums
2272816652f2783aafe4c55de212e4f2fe3ccce2c93028beda34671bf3ef2910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for recallos-sdk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page