AGNT5 Python SDK
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.
Release files for agnt5 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agnt5-0.11.1.tar.gz | 878.6 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agnt5-0.11.1-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| agnt5-0.11.1-cp310-abi3-manylinux_2_28_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| agnt5-0.11.1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 54.2 MB
Release files / agnt5-0.11.1.tar.gz
| Download URL | agnt5-0.11.1.tar.gz |
|---|---|
| Size | 878.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3dd4a2311191dc6554cbf69c2139e824128f9e670cd76ca361afe9d7859fd2dc
|
|
BLAKE2b-256 checksum How to use checksums |
4fb825ab47df9a739d22c6a02d9364f3903d06d30c750901b97585b93cdf253e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / agnt5-0.11.1-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | agnt5-0.11.1-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 18.0 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
64d519f29d5dca95ccaaa1d1f4b8feff9344e560081ea0f1432fc367eaf0ef62
|
|
BLAKE2b-256 checksum How to use checksums |
ee14e90fabd65fefd2a3c6ed44fbd7fad79c846ff29c4e7ae724b9dd4dd9f71b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / agnt5-0.11.1-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | agnt5-0.11.1-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 19.0 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
2e39dc44fbce95ab61c2ca77e772ad5722ddde26cb0cc2e706fab880696e8386
|
|
BLAKE2b-256 checksum How to use checksums |
1842335190edd6942ecf58f77fa728991b6e130407331daa537b12370084910f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / agnt5-0.11.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | agnt5-0.11.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 16.3 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c0868f38382cf9aea7634d4a36e0a2104f74584c3dc2ef114d7ae916c0892165
|
|
BLAKE2b-256 checksum How to use checksums |
9fa2bed9312531d8a02155aa3af82c9dbcd3feb3544e4ce4ee09b7fcf6b89205
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|