This release is a pre-release and may not be stable for production use.
awp-python
The Python agent SDK for the Agent World Protocol. ClientConnection is the agent side of AWP as a sans-IO state machine, and awp.aio.AsyncClient drives it over a WebSocket.
It targets specification revision 0.1-draft.12, pinned as the spec/ submodule. This is an alpha, so the API will change along with the draft. The reference world, awp-sim, is a separate package built on this one.
Status
In both time models, the demo agent built on the client is Core Agent: AWP-conformant against 0.1-draft.12. awp-conformance reports no failure and nothing untested, and conformance/ holds the reports and the evidence for their manual rows.
Implemented:
- lockstep and streaming sessions, with
world.tickadvances that wait for every per-tick channel; - multi-bind sessions (
embodiments); - inline and
wsstream bindings, and the binary frame codec (every spec vector); - the action lifecycle, checked against the spec's transition table, and idempotent resubmission;
- heartbeats, clock synchronization, receiver reports, and resumption with replay and acknowledgement;
- canonical schema validation in receiver and sender forms;
- task, approval and standing approvals, transfer, reset, snapshots, and command channels.
Not implemented: stream bindings other than inline and ws (webrtc, webtransport, shm, grpc).
Install
pip install --pre awp-python
Requires Python 3.11+.
Using the client
With asyncio:
from awp import ClientConnection
from awp.aio import AsyncClient
conn = ClientConnection({"name": "my-agent", "version": "0.1.0", "vendor": "me"}, ["proprio/json"])
async with AsyncClient(conn, "ws://127.0.0.1:8710") as client:
await client.initialize()
await client.open_session("streaming", embodiment="arm_01", subscribe=["proprio"])
await client.wait_for(lambda e: "proprio" in client.latest)
record = await client.submit(
"move_to_pose",
{"pose": {"frame": "base", "p_m": [0.3, 0.2, 0.5], "q": [0, 0, 0, 1]}},
basis=client.latest["proprio"].frame, # the observation this intent rests on
valid_for_ms=200,
)
print((await client.wait_terminal(record.action_id)).state)
await client.close_session()
Without asyncio, feed ClientConnection the decoded messages and send whatever it queues:
from awp import jsonrpc
events = conn.receive(jsonrpc.decode(text)) # typed events: ActionUpdated, FrameReceived, ...
for out in conn.outgoing(): # messages to send, in order
transport.send(jsonrpc.encode(out))
The connection:
- tracks the action lifecycle against the spec's transition table;
- deduplicates replayed statuses;
- keeps the clock offset from heartbeats;
- reports any violation by the world as a
ProtocolViolationevent.
The demo agent
awp-demo is a scripted agent for awp-sim's arm. It moves, cancels a move, and triggers an envelope refusal. It rides out a lost connection by resuming the session, or by opening a new one if the world no longer holds it.
pip install --pre awp-sim
awp-sim serve & # streaming world on ws://127.0.0.1:8710
awp-demo # or --url, --token ($AWP_URL, $AWP_TOKEN)
Layout
src/awp/ client protocol layer (sans-IO), asyncio adapter, frame codec, schemas, demo agent
src/awp/_spec/ schemas and lifecycle table bundled from spec/ (scripts/sync_spec.py)
tests/ unit tests, and a scripted world that serves over WebSockets
conformance/ conformance reports, the manifests they were run against, and evidence
spec/ agent-world-protocol, pinned at spec-v0.1-draft.12
Development
git clone --recurse-submodules https://github.com/Hyperduality/awp-python
cd awp-python
uv sync
uv run ruff check && uv run ruff format --check
uv run mypy
uv run pytest --cov
uv run python scripts/sync_spec.py --check
AGENTS.md covers moving to a new draft revision and releasing.
License
Apache-2.0. See LICENSE.
Metadata
Release files for awp-python 0.1.0a8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| awp_python-0.1.0a8.tar.gz | 138.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awp_python-0.1.0a8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 204.9 kB
Release files / awp_python-0.1.0a8.tar.gz
| Download URL | awp_python-0.1.0a8.tar.gz |
|---|---|
| Size | 138.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c367f78bc1f9da060432111e78c591727461eae160c0361d3add374c7296c33c
|
|
BLAKE2b-256 checksum How to use checksums |
9a2b7f4f896c1152c7e02665de4295dc4e89186e567228b16d3988e4be8943ca
|
| 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 Oct 20, 2026.
Transparency logRelease files / awp_python-0.1.0a8-py3-none-any.whl
| Download URL | awp_python-0.1.0a8-py3-none-any.whl |
|---|---|
| Size | 66.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0e8e038efa3502c00fbfc4b3d0f74d7c8c6c80cae4f0729e0b84ca49ac30d84
|
|
BLAKE2b-256 checksum How to use checksums |
73ebe883f57d07b6c2603c58a9315e9fcddbf1b6e296e77b096d0d1fa4ca1916
|
| 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 Oct 20, 2026.
Transparency logSecurity for awp-python 0.1.0a8
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for awp_python-0.1.0a8.tar.gz
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 Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.