Official Python client for the GoodMemory HTTP bridge (phase-39.http-memory.v1).
Project description
goodmemory-client
Official Python client for the GoodMemory
HTTP bridge. Stdlib only — no third-party dependencies. Wire contract:
phase-39.http-memory.v1.
Deploy the bridge (Node/Bun sidecar or Docker; see the bridge guide), then:
pip install goodmemory-client
from goodmemory_client import GoodMemoryClient, Scope
client = GoodMemoryClient(
"http://127.0.0.1:8739",
token="your-bridge-token",
scope=Scope(user_id="u-1", workspace_id="workspace-a", session_id="s-1"),
)
client.wait_until_ready()
# Before your model call
recall = client.recall_context("What should the assistant know before replying?")
print(recall.context_text)
# routing shows silent strategy downgrades (e.g. hybrid -> rules-only when no
# embedding provider is configured on the bridge)
print(recall.routing.resolved_strategy, recall.routing.fallback_reason)
# After the response
client.remember([
{"role": "user", "content": "Remember that the rollout is blocked on QA signoff."},
])
# Corrections, audit, deletion
client.feedback("Keep summaries short.", idempotency_key="fb-1")
export = client.export()
client.revise(memory_id="<memory-id>", content="corrected fact",
reason="user correction", idempotency_key="rev-1")
client.forget("<memory-id>")
Notes:
- Caller headers (
x-goodmemory-*) are derived from theScopeyou pass — the bridge requires the header caller and body scope to match. Per-callscope=overrides re-derive them. operationsdefaults to"*"; pass an explicit list (e.g.["recall-context", "remember"]) for least privilege —export,forget, andreviseare sensitive operations the bridge authorizes individually.- Idempotency keys mirror the server: always required for
feedbackandrevise, required forremember(mode="async")only. - Bridge errors raise
GoodMemoryBridgeErrorwith.code,.status, and.body; connection failures retry, HTTP-status errors never do (a 409idempotency_conflictsurfaces immediately).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goodmemory_client-0.1.0.tar.gz.
File metadata
- Download URL: goodmemory_client-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6a87defb91b050bcedcb67eaf9f1e1ed96a812ff4670635c5bee74eb4a8345b
|
|
| MD5 |
593d5ec2a9423651913d2fa14a3c4665
|
|
| BLAKE2b-256 |
18be79ac3a57f9ccc66950e7736b8f9f01770fc2d360f25f4f99c27207c82975
|
File details
Details for the file goodmemory_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: goodmemory_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f4560d867d850bea08797d5dde6b821386c230093bb0c843cb3bd0f6cf43b95
|
|
| MD5 |
1772d8dd235bfb2becea6b6b4e9d400a
|
|
| BLAKE2b-256 |
2daf63409e49d8b6d3957d8f844c7186fc59b6ec1489fea384174adcc2227853
|