Anlyon Python SDK
Official Python SDK for Anlyon AI backend primitives.
Installation
pip install anlyon
Quick start
from anlyon import Client
client = Client(api_key="anlyon_live_xxx") # or set ANLYON_API_KEY
# Store a memory
client.memory.remember(content="The customer prefers email over phone.")
# Recall by meaning successful calls expose the canonical response envelope
result = client.memory.recall(query="how should we contact this customer?")
for r in result.data["results"]:
print(r["score"], r["content"])
client.close()
Async
import asyncio
from anlyon import AsyncClient
async def main():
async with AsyncClient(api_key="anlyon_live_xxx") as client:
await client.memory.remember(content="The customer prefers email.")
result = await client.memory.recall(query="contact preference?")
print(result.data["results"])
asyncio.run(main())
Configuration
from anlyon import Client, RetryConfig
client = Client(
api_key="anlyon_live_xxx", # falls back to ANLYON_API_KEY
base_url="http://localhost:4000", # falls back to ANLYON_BASE_URL
timeout=10.0,
retry=RetryConfig(max_attempts=5),
)
Resources
client.memoryremember, remember_many, recall, forget, ingest, upload_file, summarize, consolidate, jobs, collectionsclient.messagespublish, publish_batch, list, get, cancelclient.queues,client.schedules,client.url_groups,client.dlqdurable delivery controlsclient.workflowscreate, list, get, update, delete, trigger, list_runs, get_run, list_run_steps, cancel_run, notifyclient.eventspublish, list, get, topics CRUD, subscriptionsclient.filesupload, presign, download, list, get, deleteclient.cachelookup, store, list, get, delete, flush (semantic cache)client.sessions,client.contextpersistent conversations and token-budgeted contextclient.secrets,client.actions,client.approvals,client.budgetsagent tools and controlsclient.analytics,client.logsusage, delivery analytics, redacted execution history, exportsclient.billing,client.notificationsprovider-safe billing state and notification preferencesclient.flow_control,client.integrationsrate/concurrency controls and Slack/Discord delivery
Write operations accept an idempotency_key so automatic retries can never double-write:
client.memory.remember(content="...", idempotency_key="user-123-pref")
client.messages.publish(url="https://example.com/hook", idempotency_key="order-456")
Error handling
Successful calls return ApiResponse with success, data, pagination,
stats, and request_id, matching the HTTP contract and TypeScript SDK.
For compatibility with the 0.1 release, indexing, iteration, get(), len(),
and equality delegate to response.data; new code should use
response.data explicitly. The legacy shortcut is deprecated for removal in
the next major release.
Failed requests raise typed exceptions (never return an error envelope):
from anlyon import Client, NotFoundError, RateLimitError
client = Client(api_key="anlyon_live_xxx")
try:
client.memory.get("mem_missing")
except NotFoundError:
print("Not found")
except RateLimitError as e:
print(f"Rate limited, retry after {e.retry_after}s")
Metadata
Release files for anlyon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| anlyon-0.1.0.tar.gz | 57.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anlyon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 116.1 kB
Release files / anlyon-0.1.0.tar.gz
| Download URL | anlyon-0.1.0.tar.gz |
|---|---|
| Size | 57.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ff6596d0df966d9bb78f3fbed373ae235163c1ef3dc8f8b3c786f41603e9fc0
|
|
BLAKE2b-256 checksum How to use checksums |
c0a0c3858851ef1a6bdb55b1a7337396a12fceda4cb2d88865b207925ad93438
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 7, 2026.
Transparency logRelease files / anlyon-0.1.0-py3-none-any.whl
| Download URL | anlyon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 58.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3313010ef311da59f7ca3efd7550b6665c2a4161a594151b22e252a4346ed1df
|
|
BLAKE2b-256 checksum How to use checksums |
e4c51a166321ce632705c3928c88679ae2dc4c2fcaad94acb0214c847ed92899
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 7, 2026.
Transparency log