Skip to main content

Hebbrix Python SDK

Typed Python client for Hebbrix memory, retrieval, and outcome-learning APIs.

Install

pip install hebbrix==2.4.0

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, durable memory IDs, and status URL. Reuse the same idempotency key with the same body to recover the same logical resources.

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

hebbrix-2.4.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hebbrix-2.4.0-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file hebbrix-2.4.0.tar.gz.

File metadata

  • Download URL: hebbrix-2.4.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.14

File hashes

Hashes for hebbrix-2.4.0.tar.gz
Algorithm Hash digest
SHA256 f2fd7890ab2d57e3f4e7af33528726884a209e6fbfcaab300cd43bf9732fbb2b
MD5 aa002c1161d1fbadf74a76eda5ab4773
BLAKE2b-256 7371bd8353e96a40ad7ac028b5ee07cd49838feba5733bffe85dc92a90c1a9c1

See more details on using hashes here.

File details

Details for the file hebbrix-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: hebbrix-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.14

File hashes

Hashes for hebbrix-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb0094ac1405c6c16b1a42a2ada54cd0c941d9d7c8f2e32652291d343bc2efc6
MD5 c45009caf340becac00acb9f6ee935d9
BLAKE2b-256 95fb6136fc878b5c31904dfc9d0401b0f7f3156ca06f744ac770154a84f4651e

See more details on using hashes here.

Release history Release notifications | RSS feed

2.4.1

2 files

This release

2.4.0 This release

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

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