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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agnt5-0.9.4-cp310-abi3-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: agnt5-0.9.4-cp310-abi3-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 17.0 MB
- Tags: CPython 3.10+, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b744d4f33c3c27ccf3d122ed4cd731982c665b67597d3d287714dbd5f60a5812
|
|
| MD5 |
ff989305578ff5d42dbee92caa61a83e
|
|
| BLAKE2b-256 |
c99cd3850cebb8d5a656a5a12a3b6cc09ae3291348a383805b656d0683cc2021
|
File details
Details for the file agnt5-0.9.4-cp310-abi3-manylinux_2_39_aarch64.whl.
File metadata
- Download URL: agnt5-0.9.4-cp310-abi3-manylinux_2_39_aarch64.whl
- Upload date:
- Size: 17.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.39+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f0d3c9f9fdd2054c26928c588dbbb77d80143002c8d577acd4c24c7b04b02fb
|
|
| MD5 |
77305e6a94105e061e0e57fd7fda7a82
|
|
| BLAKE2b-256 |
01354bc642a3667f947ebf689f063adf7d75550f6f1c7288f3d2626b5d125485
|
File details
Details for the file agnt5-0.9.4-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: agnt5-0.9.4-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 15.4 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b9b82cf08757a03d915298e4baab7221d341c2b10c77e34b19bc263eb901928
|
|
| MD5 |
0a7c392ce0defb3c2710394540a92525
|
|
| BLAKE2b-256 |
1083e8e3f817bdbee8b0ac6b80a9af17ab82ec167d0dd2ed7e4a55a2908f6052
|