Skip to main content

Python client for the Aicery AI agent runtime — runs, agents, and SSE streaming

Project description

aicery-sdk

Official Python client for the Aicery AI agent runtime.

About Aicery

Aicery is an open-source AI agent runtime — orchestration, tools, trace, and replay. It is the engine under your application, not a vertical SaaS product.

Agents are replaceable. Runtime is permanent.

The runtime runs LangGraph agents, executes tools safely, records step-by-step traces, and replays runs with frozen mocks. You bring UI, business rules, and data connectors; Aicery handles runs, providers, and observability.

This package (aicery-sdk) is a thin HTTP client for the runtime API (/v1/runs, /v1/agents, SSE streaming). It does not include the runtime server — run the Aicery stack locally or point the client at your deployment.

Install

pip install aicery-sdk

Requires Python 3.11+.

Prerequisites

A running Aicery runtime (default: http://localhost:8000). From the main repo:

git clone https://github.com/mrkkyatilla/aicery.git
cd aicery
make install && make up && make migrate

Default API key for local dev: dev.

Quick start

from aicery_sdk import AiceryClient

client = AiceryClient(base_url="http://localhost:8000", api_key="dev")

run = client.create_run(agent_id="echo", input="hello", execute=True)
final = client.get_run(run.id)

print(final.status)       # completed
print(final.output_text)  # echo:hello

create_run may return status: pending immediately; call get_run for the final output.

Configuration

From aicery.yaml (recommended in projects):

client = AiceryClient.from_config("aicery.yaml")

From environment:

client = AiceryClient.from_env()
# API_KEY or AICERY_API_KEY (default: dev)
# AICERY_RUNTIME_URL (default: http://localhost:8000)

List agents

agents = client.list_agents()
for agent in agents:
    print(agent["id"], agent.get("name"))

Streaming

run = client.create_run(agent_id="research", input="Summarize README", execute=True)

for event in client.stream_run(run.id):
    if event.event == "token":
        print(event.data, end="", flush=True)

API surface (v0.0.x)

Method Description
create_run(...) Start or execute an agent run
get_run(run_id) Fetch run status and output
list_agents() List available agents
stream_run(run_id) SSE token/step stream
resume_run(...) HITL resume after approval
from_config(path) Load client from aicery.yaml
from_env() Load client from environment

Related

Development

From the monorepo (editable install):

pip install -e ./sdk/python
pytest sdk/python/tests

Project details


Download files

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

Source Distribution

aicery_sdk-0.0.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

aicery_sdk-0.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file aicery_sdk-0.0.2.tar.gz.

File metadata

  • Download URL: aicery_sdk-0.0.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aicery_sdk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 23acbfabe965c557a080611352b8c836d84720f100642df0c5f74bd59cf0be8a
MD5 cd5c3bab190828eafa5b9e887130476d
BLAKE2b-256 e8c431c2f0bb4663bc78c4b3e1a9ebbed0bd2189affb5552eb0b16980e9491d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for aicery_sdk-0.0.2.tar.gz:

Publisher: publish-pypi.yml on mrkkyatilla/aicery

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

File details

Details for the file aicery_sdk-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: aicery_sdk-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aicery_sdk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb6470362bd4c6d2ab07473df2fb4cdd44dbb5315ca2bcb0ea2258a0e7c6ceb2
MD5 5f372caa8cfb9c1eb1e8b537bb688395
BLAKE2b-256 977549a70ee19517fab9ee1b29406c0a9d347cef2c042eee5b8cf610c6e9ee99

See more details on using hashes here.

Provenance

The following attestation bundles were made for aicery_sdk-0.0.2-py3-none-any.whl:

Publisher: publish-pypi.yml on mrkkyatilla/aicery

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page