Suprflo Python SDK
Official Python client for Suprflo — the memory layer for AI agents.
Installation
pip install suprflo
With an optional framework integration (an "extra"):
pip install "suprflo[langchain]"
Optional integrations (extras)
agno, autogen, crewai, langchain, langgraph, livekit, llamaindex,
openai-agents, pipecat, pydantic-ai.
Note:
suprflo[pipecat]requires Python ≥ 3.11 — it pullspipecat-ai >= 1, which dropped 3.9/3.10. On Python 3.9/3.10 the install fails to resolve; use Python 3.11+ for that extra. All other extras support 3.9+.
Quickstart
from suprflo import MemoryClient
client = MemoryClient(api_key="sk-...") # base_url defaults to https://api.suprflo.com
# Add a memory (a string, a {role, content} dict, or a list of either)
client.add(
[
{"role": "user", "content": "I'm vegetarian and allergic to peanuts"},
{"role": "assistant", "content": "Got it — I'll keep that in mind."},
],
user_id="alice",
)
# Search for relevant memories
results = client.search("what can this person eat?", user_id="alice", top_k=5)
for m in results["results"]:
print(m["memory"], m.get("score"))
client.close()
MemoryClient also works as a context manager:
with MemoryClient(api_key="sk-...") as client:
client.add("Prefers window seats", user_id="alice")
Available methods
| Method | Description |
|---|---|
add(messages, *, user_id=None, agent_id=None, run_id=None, app_id=None, metadata=None, infer=True, async_mode=False, timestamp=None) |
Add memories from a message or conversation |
search(query, *, top_k=10, filters=None, threshold=None, rerank=None, memory_types=None, as_of=None, user_id=None, ...) |
Semantic search |
get(memory_id) |
Fetch one memory |
get_all(*, user_id=None, agent_id=None, run_id=None, app_id=None, limit=100, offset=0, memory_types=None) |
List memories |
update(memory_id, data) |
Replace a memory's text |
delete(memory_id) |
Delete one memory |
delete_all(*, user_id=None, agent_id=None, run_id=None, app_id=None) |
Delete a scope of memories |
history(memory_id) |
Change history of a memory |
users() |
Distinct memory subjects |
Non-2xx responses raise suprflo.APIError (with .status_code and .message);
SuprfloError is the base exception class.
LangChain integration
from suprflo import MemoryClient
from suprflo.integrations.langchain import (
SuprfloMemory,
SuprfloRetriever,
create_memory_tools,
)
client = MemoryClient(api_key="sk-...")
# 1. Drop-in conversational memory
memory = SuprfloMemory(client=client, user_id="alice", memory_key="history")
# 2. A retriever for RAG chains
retriever = SuprfloRetriever(client=client, user_id="alice", top_k=5)
docs = retriever.invoke("dietary restrictions")
# 3. Agent tools: save_memory + search_memory
tools = create_memory_tools(client, user_id="alice")
The integration imports langchain-core lazily — the base SDK works without it,
and importing the integration without LangChain installed raises a clear
ImportError telling you to pip install "suprflo[langchain]".
License
MIT
Release files for suprflo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| suprflo-0.1.1.tar.gz | 43.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| suprflo-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 76.6 kB
Release files / suprflo-0.1.1.tar.gz
| Download URL | suprflo-0.1.1.tar.gz |
|---|---|
| Size | 43.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf1e2af1970bc8fc0745151f7a799241798d465830aa2031733e3ae6d7d80642
|
|
BLAKE2b-256 checksum How to use checksums |
6636d7a09767e6e4a48fc9b85be7da757c3d91487535159906c579273197c378
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency logRelease files / suprflo-0.1.1-py3-none-any.whl
| Download URL | suprflo-0.1.1-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
633b3bad2c335fa634a1feec418e34e6d70b3040acf07131299686462458bb8f
|
|
BLAKE2b-256 checksum How to use checksums |
e043807bfa5a2a39a5d75d2c2dc5fac2efc43583360aeb4600943d8793cb6f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency log