Skip to main content

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.memory remember, remember_many, recall, forget, ingest, upload_file, summarize, consolidate, jobs, collections
  • client.messages publish, publish_batch, list, get, cancel
  • client.queues, client.schedules, client.url_groups, client.dlq durable delivery controls
  • client.workflows create, list, get, update, delete, trigger, list_runs, get_run, list_run_steps, cancel_run, notify
  • client.events publish, list, get, topics CRUD, subscriptions
  • client.files upload, presign, download, list, get, delete
  • client.cache lookup, store, list, get, delete, flush (semantic cache)
  • client.sessions, client.context persistent conversations and token-budgeted context
  • client.secrets, client.actions, client.approvals, client.budgets agent tools and controls
  • client.analytics, client.logs usage, delivery analytics, redacted execution history, exports
  • client.billing, client.notifications provider-safe billing state and notification preferences
  • client.flow_control, client.integrations rate/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)

Source distribution for anlyon 0.1.0
File Size Uploaded
anlyon-0.1.0.tar.gz 57.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anlyon 0.1.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release 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