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 --allow-scripts=better-sqlite3,onnxruntime-node,sharp,protobufjs
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)
snapshot = brain.snapshot()
brain.close()

Restore snapshots only into an empty Audrey store, such as a sidecar started with a fresh AUDREY_DATA_DIR:

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audrey_memory-1.3.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

audrey_memory-1.3.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file audrey_memory-1.3.0.tar.gz.

File metadata

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

File hashes

Hashes for audrey_memory-1.3.0.tar.gz
Algorithm Hash digest
SHA256 c84dfa0fd9f46b2e677337ec664ac4cc5d0431ddecfc050329a7d0779e67b0d8
MD5 6ae4b1454bf568b9b14a7078dd523a6c
BLAKE2b-256 c9c0865ecd7774f2fb0cd683ae3226a73811c3467a0a35c9dc88ce4b5d20d400

See more details on using hashes here.

Provenance

The following attestation bundles were made for audrey_memory-1.3.0.tar.gz:

Publisher: publish.yml on Evilander/Audrey

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

File details

Details for the file audrey_memory-1.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for audrey_memory-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4811402e9798bdbf6084b92b2bc59e6657c31596db711aa100391d794d2bd729
MD5 9576ab04e2f12a64471bc546679dae98
BLAKE2b-256 cba0713290ab7f76d98b2557d120f378546d810badc5650e528552e7009ebc60

See more details on using hashes here.

Provenance

The following attestation bundles were made for audrey_memory-1.3.0-py3-none-any.whl:

Publisher: publish.yml on Evilander/Audrey

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

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.23.1

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