Skip to main content

Audrey Python SDK

Typed Python client for the Audrey REST API.

Install

pip install audrey-memory

For local development from this repository:

cd python
python -m pip install -e .

Quick Start

Start Audrey's REST API:

npm install -g audrey
audrey serve

Then use the client:

from audrey_memory import Audrey

brain = Audrey(
    base_url="http://127.0.0.1:7437",
    api_key="secret",
    agent="support-agent",
)

memory_id = brain.encode(
    "Stripe returns HTTP 429 above 100 req/s",
    source="direct-observation",
    tags=["stripe", "rate-limit"],
)

results = brain.recall("stripe rate limits", limit=5)
brain.close()

Context keys and values must be strings, for example context={"project": "support"}. brain.status() returns the server's episodes, semantics, procedures, and healthy fields along with vector-index health details.

Snapshot export and restore require the sidecar to be started with AUDREY_ENABLE_ADMIN_TOOLS=1. With that explicitly enabled:

with Audrey(base_url="http://127.0.0.1:7437", api_key="secret") as brain:
    snapshot = brain.snapshot()

Snapshots cover the whole store. Restore only into an empty Audrey store, such as a sidecar started with a fresh AUDREY_DATA_DIR and admin tools enabled:

restore_target = Audrey(base_url="http://127.0.0.1:7437", api_key="secret")
restore_target.restore(snapshot)
restore_target.close()

Async usage:

import asyncio

from audrey_memory import AsyncAudrey


async def main() -> None:
    async with AsyncAudrey(base_url="http://127.0.0.1:7437") as brain:
        await brain.health()
        await brain.encode("Deploy failed due to OOM", source="direct-observation")
        await brain.recall("deploy failure", limit=3)


asyncio.run(main())

Features

  • Sync and async clients powered by httpx
  • Pydantic request and response models
  • Bearer auth via AUDREY_API_KEY
  • Optional X-Audrey-Agent header on client requests
  • Snapshot export and restore support

Metadata

Release files for audrey-memory 2.1.0

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

Source distribution (sdist)

Source distribution for audrey-memory 2.1.0
File Size Uploaded Provenance Actions
audrey_memory-2.1.0.tar.gz 11.3 kB With provenance Details for audrey_memory-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for audrey-memory 2.1.0
File Interpreter ABI Platform Actions
audrey_memory-2.1.0-py3-none-any.whl Python 3 none any Details for audrey_memory-2.1.0-py3-none-any.whl

Total release size: 19.0 kB

Release files / audrey_memory-2.1.0.tar.gz

Download URL audrey_memory-2.1.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0539480c56c0282467287f2eadcccc118e8952700e467daacd3a5e8316e04a76
BLAKE2b-256 checksum
How to use checksums
93a61ef02e645f5f97415b584682bbda29a2a9816b44b929b266986647d26ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / audrey_memory-2.1.0-py3-none-any.whl

Download URL audrey_memory-2.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc1c5a858e7fc003e082df0ef423906df069eb3d0dbda83e3566d4d7d4349ab7
BLAKE2b-256 checksum
How to use checksums
7abed0185f746bb909044d3d56c8c614a8bc6c548185dac9fba1ad4ab07dba36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for audrey-memory 2.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for audrey_memory-2.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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