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.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 audrey-memory 2.1.1
File Size Uploaded Provenance Actions
audrey_memory-2.1.1.tar.gz 11.3 kB With provenance Details for audrey_memory-2.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 19.0 kB

Release files / audrey_memory-2.1.1.tar.gz

Download URL audrey_memory-2.1.1.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5a10d0a70b2bd49dd59537ae8f2e57a5e7622e89bb467abef57f8b1dcd2feca1
BLAKE2b-256 checksum
How to use checksums
059efa5121db059a2e4fb01b1b0d518836afee6a0e242388c96583fb20bbba77
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.1-py3-none-any.whl

Download URL audrey_memory-2.1.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26fdb2acaf8e98361e3c75a48403f9bb97b16c0e4aaefd8db1809992fd210564
BLAKE2b-256 checksum
How to use checksums
d68b27d31caefa7e9f38263977ca3bee38d2441e895f0e1d98d944838ab29bdd
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.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.

Full provenance

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

Select from 2 files

Attestation for audrey_memory-2.1.1.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