PraqtorDB for Apps — Python SDK
Give your application's end users persistent, isolated memory — a per-user knowledge
graph and AI-generated Deep Memory briefing — over two HTTP calls. This SDK wraps the
PraqtorDB for Apps data-plane API (/v1).
Install
pip install -e sdk/python # local/dev (from this repo)
# pip install praqtordb-apps # once published
Quickstart
from praqtordb_apps import Client
c = Client(api_key="pk_live_...") # your app's secret key
c.add(end_user_id="sarah", text="On the Pro plan at Acme.")
print(c.search(query="plan", end_user_id="sarah"))
That's it — the memory is chunked, embedded, and auto-extracted into notes, entities,
and a Deep Memory briefing for sarah, isolated from every other user in your app.
Configuration
Client(api_key="pk_live_...", base_url="https://praqtordb-for-apps.fly.dev", timeout=30.0)
api_key— your app's secret key (sent as theX-API-Keyheader). Required.base_url— the API host. Defaults to the hosted API; override for self-hosted/staging.
Methods
| Method | Endpoint | Description |
|---|---|---|
add(end_user_id, text, source_type="chat") |
POST /v1/memory |
Store a memory for one user. |
search(query, end_user_id=None, limit=10) |
POST /v1/search |
3-layer retrieval (semantic + keyword + graph), RRF-fused. Omit end_user_id to search the whole app. |
list_users() |
GET /v1/users |
List the app's end users. |
get_user(end_user_id) |
GET /v1/users/{id} |
Full detail: briefing, memories, entities, conversations. |
delete_user(end_user_id) / forget(...) |
DELETE /v1/users/{id} |
GDPR cascade erasure for one user. |
preload(end_user_id, notes=[...], ...) |
POST /v1/users/{id}/profile |
Pre-load a user's memory before they ever chat (CSV/CRM import). |
Pre-load (the "known on message one" pattern)
c.preload(
end_user_id="jordan_cfo",
notes=["Plan: Enterprise", "Company: Acme Robotics", "Renewal: 2026-03-15"],
entities=[{"name": "Acme Robotics", "type": "COMPANY"}],
topics=["enterprise", "onboarding"],
)
The user now has a populated Deep Memory briefing and searchable history — so the very
first time they message your bot, it already knows them. Supply briefing=... to set the
profile verbatim (no LLM call); omit it and one is synthesized from the notes.
Async
Same surface, for asyncio apps and agents:
import asyncio
from praqtordb_apps import AsyncClient
async def main():
async with AsyncClient(api_key="pk_live_...") as c:
await c.add(end_user_id="sarah", text="On the Pro plan")
print(await c.search(query="plan", end_user_id="sarah"))
asyncio.run(main())
Errors
from praqtordb_apps import PraqtorAPIError, PraqtorError
try:
c.get_user("nobody")
except PraqtorAPIError as e:
print(e.status_code, e.detail) # e.g. 404 "unknown end_user_id"
except PraqtorError as e:
print("network/transport error:", e)
Requirements
Python 3.9+, httpx.
Metadata
Release files for praqtordb-apps 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| praqtordb_apps-0.1.0.tar.gz | 6.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| praqtordb_apps-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.1 kB
Release files / praqtordb_apps-0.1.0.tar.gz
| Download URL | praqtordb_apps-0.1.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bc8bc71863c9920211c334f9aa35d2d34ac9c9248e2748605e5a543d3b44be5
|
|
BLAKE2b-256 checksum How to use checksums |
05aceb90e8183d066c227918682c0e1b0b39f4a04f89ac279cdfb8d7a2c383d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / praqtordb_apps-0.1.0-py3-none-any.whl
| Download URL | praqtordb_apps-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
591bc895b51feac3ac90371462316a01d971484526e2df99c7ebf71b4a12fab7
|
|
BLAKE2b-256 checksum How to use checksums |
5baa8f8c9c3483ee77ff6e11e5dc02f34260db08f8de1080119a049155ae9fb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for praqtordb-apps 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.