Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AGNT5 Python SDK

CI License

Build reliable AI agents and durable workflows in Python. The AGNT5 SDK provides typed components, workflow checkpoints, retries, streaming, tools, human-in-the-loop coordination, evaluation, and runtime observability.

Requirements

  • Python 3.11 or newer
  • An AGNT5 runtime for deployed execution

Installation

pip install agnt5

Quick start

Define a function. Type hints are used to derive its input and output schema.

from agnt5 import FunctionContext, function


@function(retries=3, backoff="exponential")
async def greet(ctx: FunctionContext, name: str) -> dict[str, str]:
    ctx.logger.info("greeting user", extra={"name": name})
    return {"message": f"Hello, {name}!"}

Register application components with a worker for runtime-backed execution:

import asyncio

from agnt5 import Worker


async def main() -> None:
    worker = Worker(service_name="hello-python")
    await worker.run()


asyncio.run(main())

Decorated functions, workflows, agents, tools, and scorers are registered when their modules are imported. See examples/app.py for a complete application entrypoint.

Invoke a deployed component

from agnt5 import Client

client = Client(
    gateway_url="https://gw.agnt5.com",
    api_key="agnt5_sk_...",
    deployment_id="deployment-id",
)

result = client.run("greet", {"name": "Ada"})
print(result)

Client also supports asynchronous submission, status and result polling, streaming events, batches, cancellation, workflow resume, chat, and evaluation. Configuration can be supplied explicitly or through AGNT5_GATEWAY_URL, AGNT5_API_KEY, and AGNT5_DEPLOYMENT_ID.

Core APIs

API Purpose
@function Typed, retryable units of work
@workflow Durable multi-step orchestration and checkpointing
Agent and @agent Model and tool orchestration
@tool Typed tools with generated schemas
ctx.state Durable workflow and component state
ctx.memory Conversation and application memory
Client / AsyncClient Invoke and observe deployed components
Worker Register components and serve runtime dispatch

The shared Rust runtime foundation lives in agnt5dev/sdk-core. Vendor sandbox adapters live in agnt5dev/sdk-integrations.

Examples and documentation

  • examples/ contains functions, workflows, agents, tools, streaming, HITL, MCP, chat, and evaluation examples.
  • docs/ contains SDK-specific guides.
  • AGNT5 documentation covers platform concepts and deployment.

Development

uv sync --all-groups
uv run ruff check src tests
uv run pytest tests/unit -q
uv build --sdist

Development builds use a sibling checkout of sdk-core.

Contributing

See CONTRIBUTING.md. Report security issues according to SECURITY.md.

License

Licensed under the Apache License 2.0.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

agnt5-0.11.0b0-cp310-abi3-manylinux_2_39_x86_64.whl (17.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ x86-64

agnt5-0.11.0b0-cp310-abi3-manylinux_2_39_aarch64.whl (18.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ ARM64

agnt5-0.11.0b0-cp310-abi3-macosx_11_0_arm64.whl (15.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file agnt5-0.11.0b0-cp310-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for agnt5-0.11.0b0-cp310-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b31bdb60c8b8ab2a2f6c34acc7fb9797f70516cd712dd53cb96329902819e147
MD5 af63514eb3e842007d2d9ab6614b37f0
BLAKE2b-256 07c5c91397eabf60bc966fcb9aa51f3ccee52ea2c9141ab64003ff9a4f005da6

See more details on using hashes here.

File details

Details for the file agnt5-0.11.0b0-cp310-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for agnt5-0.11.0b0-cp310-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 e16ff2bb32cbc0fd6926f271a073071368d52a64bbdcdd513d0d1d03d6aff56c
MD5 0de8fedcfe3eff3bebd26fb835f54a7b
BLAKE2b-256 dd56c34b9ea367fc8a9a4479f8f8f67fb6b842b734347fc53cc9d7f6ffb02323

See more details on using hashes here.

File details

Details for the file agnt5-0.11.0b0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for agnt5-0.11.0b0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2f8d8620ffc24638313311550257efdbe34db15e1876b0b4c52faf47c6a20b0a
MD5 8c480654720504fc9f26bdfeea82183c
BLAKE2b-256 aa68ad058a06f779b6a5b94cf398fe3b68b268e35b0632a73427d47561c70215

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.11.0b0 This release

3 files

0.10.0

3 files

0.9.8

3 files

0.9.7

3 files

0.9.6

3 files

0.9.5

3 files

0.9.4

3 files

0.9.3

3 files

0.9.2

3 files

0.9.1

3 files

0.9.0

4 files

0.8.7

4 files

0.8.5

4 files

0.8.4

4 files

0.8.3

4 files

0.8.2

4 files

0.8.1

4 files

0.8.0

4 files

0.7.20

4 files

0.7.18

4 files

0.7.16

4 files

0.7.15

4 files

0.7.14

4 files

0.7.13

4 files

0.7.12

4 files

0.7.11

4 files

0.7.10

4 files

0.7.9

4 files

0.7.8

4 files

0.7.6

4 files

0.7.5

4 files

0.7.4

4 files

0.7.3

4 files

0.7.2

4 files

0.7.1

4 files

0.6.1

4 files

0.6.0

4 files

0.5.2

4 files

0.5.1

4 files

0.5.0

4 files

0.4.3

4 files

0.4.2

4 files

0.4.1

4 files

0.4.0

4 files

0.3.7

4 files

0.3.6

4 files

0.3.5

4 files

0.3.4

4 files

0.3.3

4 files

0.3.1

4 files

0.2.7

4 files

0.2.6

4 files

0.2.5

4 files

0.2.4

4 files

0.2.3

4 files

0.2.2

3 files

0.2.1

3 files

0.2.0

5 files

0.1.3

6 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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