Skip to main content

z3rno (Python SDK)

⚠️ Deprecated — full rewrite in progress

z3rno is being rewritten from the ground up as a single open-source Rust monorepo (Apache 2.0), following direct feedback from enterprise users that the current architecture is too complex.

License: Apache 2.0 CI PyPI GitHub downloads PyPI downloads

Python SDK for Z3rno -- thin HTTP client for the Z3rno memory API.

Installation

pip install z3rno

Quickstart

from z3rno import Z3rnoClient

client = Z3rnoClient(base_url="https://api.z3rno.dev", api_key="z3rno_sk_...")
memory = client.store(agent_id="agent-1", content="User prefers dark mode", memory_type="semantic")
results = client.recall(agent_id="agent-1", query="What does the user prefer?", top_k=5)
client.forget(memory_id=memory.id)

Async Usage

from z3rno import AsyncZ3rnoClient

async def main():
    async with AsyncZ3rnoClient(base_url="https://api.z3rno.dev", api_key="z3rno_sk_...") as client:
        memory = await client.store(agent_id="agent-1", content="User prefers dark mode")
        results = await client.recall(agent_id="agent-1", query="preferences")
        await client.forget(memory_id=memory.id)

Methods

Method Description
store(...) Store a new memory with optional type, metadata, relationships, TTL, and importance
recall(...) Recall memories by semantic similarity query
forget(...) Soft-delete a memory by ID
audit(...) Query the audit trail with optional filters and pagination

All methods are available on both Z3rnoClient (sync) and AsyncZ3rnoClient (async).

Features

  • Thin HTTP client -- only httpx, pydantic, and tenacity at runtime. No database drivers.
  • Typed errors -- Z3rnoRateLimitError, Z3rnoAuthenticationError, Z3rnoValidationError, each mapping to a specific HTTP status.
  • Automatic retries -- exponential backoff on connection errors and 5xx responses. Retry-After honored on 429.
  • Context manager support -- use with / async with for automatic cleanup.

Framework Integrations

Each is a separate package that depends on z3rno:

  • z3rno-langchain -- LangChain BaseMemory + BaseRetriever adapter
  • z3rno-crewai -- CrewAI memory provider
  • z3rno-openai -- OpenAI Agents SDK function tools

For Anthropic Claude, see the z3rno-mcp Model Context Protocol server.

For a detailed step-by-step setup, see QUICKSTART.md.

API Documentation

Full API reference: astron-bb4261fd.mintlify.app/sdk/python

Development

uv sync --dev
uv run ruff check .
uv run mypy .
uv run pytest

See CONTRIBUTING.md for the full workflow.

License

Apache 2.0 -- see LICENSE.

Metadata

Release files for z3rno 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for z3rno 0.9.1
File Size Uploaded Provenance
z3rno-0.9.1.tar.gz 415.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for z3rno 0.9.1
File Interpreter ABI Platform
z3rno-0.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 455.0 kB

Release files / z3rno-0.9.1.tar.gz

Download URL z3rno-0.9.1.tar.gz
Size 415.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d8fc33b8ee1ff5a0ad4c172eea430f016b3ba9d4e6d381a64cbbe0140582d6c6
BLAKE2b-256 checksum
How to use checksums
b6d9046cf1c1cbbd418235ca2470231e4067153d2f95ba8b804e72cdcbdf1d11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / z3rno-0.9.1-py3-none-any.whl

Download URL z3rno-0.9.1-py3-none-any.whl
Size 39.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39389d2c17892422b16027f4024126d9760f18334ce70876e7417352b3a76996
BLAKE2b-256 checksum
How to use checksums
5ce0303ab7ed4f5a1523d025243c9c2f8db99274821fabea4452c475471b7a4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for z3rno 0.9.1

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.

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