Skip to main content

Hebbrix Python SDK

PyPI version Python versions License

Official Python SDK for the Hebbrix api - the only memory API with Reinforcement Learning.

🚀 Features

  • Complete API Coverage - All 50+ endpoints supported
  • Reinforcement Learning - Train AI agents to optimize memory operations
  • Temporal Knowledge Graphs - Track facts over time with bi-temporal model
  • Procedural Memory - Store and execute learned skills
  • Working Memory - Short-term context buffer for conversations
  • Memory Consolidation - Automatic compression of episodic memories
  • ProofLoop - Learn from outcomes with automatic, verifiable evidence receipts
  • Async/Await - Full async support with httpx
  • Type Hints - Complete type annotations
  • Clean API - Pythonic, intuitive interface

📦 Installation

pip install hebbrix

🔥 Quick Start

import asyncio
from hebbrix import MemoryClient

async def main():
    # Initialize client
    client = MemoryClient(api_key="mem_sk_your_api_key")

    # Create a collection
    collection = await client.collections.create(
        name="My AI Agent",
        description="Personal memory for my chatbot"
    )

    # Store a memory
    memory = await client.memories.create(
        collection_id=collection["id"],
        content="User prefers dark mode and loves Python",
        importance=0.9
    )

    # Search memories
    results = await client.search(
        query="What programming language does user like?",
        collection_id=collection["id"],
        limit=5
    )

    print(results)

    # Close client
    await client.close()

asyncio.run(main())

ProofLoop: search → decision → outcome → proof

search = await client.search_with_proof(
    "What should the agent do next?",
    collection_id="collection-42",
    user_id="customer-7",
)
decision = await client.proofloop.decide(
    policy_key="agent.next_action",
    candidates=[{"action_key": "act"}, {"action_key": "ask"}],
    collection_id="collection-42",
    user_id="customer-7",
    proof_context=search["proof_context"],
)
await client.proofloop.record_outcome(
    decision["decision_id"], success=True, idempotency_key="run-123-result"
)
proof = await client.proofloop.proof(decision["decision_id"])

📚 Complete Documentation

Visit https://docs.hebbrix.com for full documentation.

🔗 Links

📄 License

MIT License - see LICENSE for details


Built with ❤️ by the Hebbrix team

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.2.0.tar.gz (16.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.2.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hebbrix-2.2.0.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hebbrix-2.2.0.tar.gz
Algorithm Hash digest
SHA256 e3e2caeeb5002679b6aafc0efd923490e0ce2eab3bf78cd9e07f1ee3dc3f8a62
MD5 d0eceab79b4170e776ea7e97739ae577
BLAKE2b-256 7e94e981e5cdd51f320e7cb96587d6e49f3c1e1e07589f6fc2cc987cf669065b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hebbrix-2.2.0.tar.gz:

Publisher: release.yml on Hebbrix/hebbrix-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: hebbrix-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hebbrix-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e123d094d492270f9c6dddb1a6199d07a54de3fda8d9cc765255ba47eb7d2e7
MD5 bd242f3f851d262169480717eaa01712
BLAKE2b-256 9ac32ed7de36189370ff578b70d30761bd0a0e880486ec77547dd547b9964432

See more details on using hashes here.

Provenance

The following attestation bundles were made for hebbrix-2.2.0-py3-none-any.whl:

Publisher: release.yml on Hebbrix/hebbrix-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.4.1

2 files

2.4.0

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

This release

2.2.0 This release

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