Hebbrix Python SDK
Typed Python client for Hebbrix memory, retrieval, and outcome-learning APIs.
Install
pip install hebbrix==2.4.1
Python 3.8+ is supported. MemoryClient is asynchronous. SyncMemoryClient
supports the core collection, memory, search, correction, procedure, and
ProofLoop workflows; advanced temporal, working-memory, consolidation,
memory-tool, and RL resources are currently async-only.
Quick start
import asyncio
from hebbrix import MemoryClient
async def main():
async with MemoryClient(api_key="hbx_your_api_key") as client:
collection = await client.collections.create(name="Support memory")
memory = await client.memories.create(
collection_id=collection["id"],
content="Customer prefers concise replies",
wait_for_index=True,
idempotency_key="customer-42-preference-v1",
)
results = await client.search(
"How should replies be formatted?",
collection_id=collection["id"],
)
print(memory, results)
asyncio.run(main())
Durable readiness
Memory writes return either a searchable completion or a durable 202 receipt.
A durable receipt means the database commit succeeded while indexing is still
converging; it is not a failure and does not justify a duplicate write.
When wait_for_index=True, the SDK accepts that receipt and polls the documented
status URL. It returns only after searchable=true. If the caller's deadline
expires, it raises IndexingTimeoutError; the exception retains the original
receipt plus normalized memory_ids, job_id, status_url, request_id,
outbox_event_id, retry timing, and idempotency replay metadata when available.
The synchronous and asynchronous single, batch, inference-job, and update
readiness paths share this behavior. The SDK never repeats the write while it
polls.
Catch the typed deadline without discarding the durable acceptance:
from hebbrix import IndexingTimeoutError
try:
created = await client.memories.create(
content="Customer prefers concise replies",
wait_for_index=True,
idempotency_key="customer-42-preference-v1",
index_timeout=5,
)
except IndexingTimeoutError as exc:
# Resume observation; do not submit an unrelated second write.
if exc.memory_ids:
created = await client.memories.wait_until_searchable(exc.memory_ids[0])
elif exc.job_id:
created = await client.memory_jobs.wait(exc.job_id)
For a timed-out batch, pass exc.receipt to
memories.wait_batch_until_searchable(...). Alternatively, replay the exact
same body with exc.idempotency_key; a changed body with the same key is
rejected by the API rather than creating a second logical write. For an update,
resume polling exc.memory_ids[0] because the relational edit already committed.
For an asynchronous batch receipt:
receipt = await client.memories.create_batch(
[{"content": "First fact"}, {"content": "Second fact"}],
collection_id="collection-42",
wait_for_index=False,
idempotency_key="import-42",
)
completed = await client.memories.wait_batch_until_searchable(receipt)
Pagination
collections.list() returns the current page's collection items for backward
compatibility. Use collections.list_page() when cursor metadata is required.
Memory resources provide the same list()/list_page() distinction.
Advanced capabilities and entitlements
The async client exposes the canonical /v1 temporal, working-memory,
consolidation, memory-tool, and RL contracts. RL metrics and evaluation require
the Pro plan. Process-wide RL training and checkpoint mutation require an admin
role. Entitlement failures raise EntitlementError and preserve the stable
error code, current/required plan, request ID, and support action.
The experimental World Model is intentionally not exported by this public SDK. It remains withdrawn until a trained, versioned production model artifact and an end-to-end public serving contract are available.
The authoritative account capability matrix is available from
GET /v1/users/me/capabilities.
Release compatibility
The production API publishes exact build and artifact compatibility at
GET /v1/release. The public OpenAPI is
/openapi.json.
License
MIT. See LICENSE in the distribution.
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 hebbrix-2.4.1.tar.gz.
File metadata
- Download URL: hebbrix-2.4.1.tar.gz
- Upload date:
- Size: 37.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e54b0655c4c95f5547fecc395042cda069d323afd1a5efa10b49c61b2e25e57b
|
|
| MD5 |
fa40b083e28b39db7f10d002e6a31998
|
|
| BLAKE2b-256 |
06026520b092a1c84a00f4f921ced52505a7b25945b20610b3b0525bf3417eeb
|
Provenance
The following attestation bundles were made for hebbrix-2.4.1.tar.gz:
Publisher:
release.yml on Hebbrix/hebbrix-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hebbrix-2.4.1.tar.gz -
Subject digest:
e54b0655c4c95f5547fecc395042cda069d323afd1a5efa10b49c61b2e25e57b - Sigstore transparency entry: 2620402823
- Sigstore integration time:
-
Permalink:
Hebbrix/hebbrix-python@16fe68b2d734c5bfb08839e925f4e95a6b820bc9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Hebbrix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16fe68b2d734c5bfb08839e925f4e95a6b820bc9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file hebbrix-2.4.1-py3-none-any.whl.
File metadata
- Download URL: hebbrix-2.4.1-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b8d23af3d3aa9ee185fba8476085cfd09e74010366d399a9e4349a403ec810b
|
|
| MD5 |
3e61680bfada86766fffd2a1258f382d
|
|
| BLAKE2b-256 |
ba2b1a2ae55e16ddc365d61afdf168d220e36afa05c4a68340e650a5f1fc936d
|
Provenance
The following attestation bundles were made for hebbrix-2.4.1-py3-none-any.whl:
Publisher:
release.yml on Hebbrix/hebbrix-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hebbrix-2.4.1-py3-none-any.whl -
Subject digest:
4b8d23af3d3aa9ee185fba8476085cfd09e74010366d399a9e4349a403ec810b - Sigstore transparency entry: 2620402841
- Sigstore integration time:
-
Permalink:
Hebbrix/hebbrix-python@16fe68b2d734c5bfb08839e925f4e95a6b820bc9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Hebbrix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16fe68b2d734c5bfb08839e925f4e95a6b820bc9 -
Trigger Event:
workflow_dispatch
-
Statement type: