Typed Python client for the Audrey LLM memory server
Project description
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:
npx 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-Agentheader on client requests - Snapshot export and restore support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file audrey_memory-1.0.0.tar.gz.
File metadata
- Download URL: audrey_memory-1.0.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b47d7488b269d47cb73307a419cb08d74f822febc75380dd03a3656b93abae5
|
|
| MD5 |
52d52ebc88db5e83919226fab144e891
|
|
| BLAKE2b-256 |
f082939c1f6639a0bad8288e9a1a9ad9612702cc95ec8ca946b3d07fdb7f0d0e
|
Provenance
The following attestation bundles were made for audrey_memory-1.0.0.tar.gz:
Publisher:
publish.yml on Evilander/Audrey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
audrey_memory-1.0.0.tar.gz -
Subject digest:
5b47d7488b269d47cb73307a419cb08d74f822febc75380dd03a3656b93abae5 - Sigstore transparency entry: 1527743727
- Sigstore integration time:
-
Permalink:
Evilander/Audrey@970752172441967c3ede79562eca69b08efb1f12 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Evilander
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@970752172441967c3ede79562eca69b08efb1f12 -
Trigger Event:
release
-
Statement type:
File details
Details for the file audrey_memory-1.0.0-py3-none-any.whl.
File metadata
- Download URL: audrey_memory-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a2c90e746f5ee14f7d205d2b517bc99fbb110996cfd6d1f1a71e8a1f6ba2771
|
|
| MD5 |
5e65485934ec37972b4d51901a58fb06
|
|
| BLAKE2b-256 |
8f5580a9923d6fd37ef3d20f44c717c6bb5a42bead6c885a409f2b79d2f04677
|
Provenance
The following attestation bundles were made for audrey_memory-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Evilander/Audrey
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
audrey_memory-1.0.0-py3-none-any.whl -
Subject digest:
8a2c90e746f5ee14f7d205d2b517bc99fbb110996cfd6d1f1a71e8a1f6ba2771 - Sigstore transparency entry: 1527743963
- Sigstore integration time:
-
Permalink:
Evilander/Audrey@970752172441967c3ede79562eca69b08efb1f12 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Evilander
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@970752172441967c3ede79562eca69b08efb1f12 -
Trigger Event:
release
-
Statement type: