agi-diy
Python client for api.agi.diy. Lease a VLA policy, run it over the LeRobot remote-inference protocol (zenoh). One call = one token per action in the chunk.
pip install agi-diy
agi login
agi run act/so101 --probe # first run: "installing lerobot[remote] from source (~2 min, once)…", then the chunks
import agi
with agi.Policy("act/so101") as session:
actions = session.predict(
{"observation.state": state, "observation.images.top": top, "observation.images.wrist": wrist},
task="pick up the cube",
) # np.ndarray [action_horizon, dof] — 100×6 for act/so101, 50×6 for smolvla/so101
The key comes from AGI_API_KEY or ~/.agi/credentials (AGI_API_KEY=agi_sk_live_…).
Surface
agi.Policy("act/so101") # POST /v1/sessions → lease; raises agi.NoSlots / agi.InsufficientCredits / agi.AuthError
session.endpoint # "tcp/bore.pub:35706" (verbatim from the runner; session.encoding = "jpeg")
session.deployment # "d_…"
session.url # "zenoh://bore.pub:35706/d_…" → strands_robots.Policy(session.url)
session.connect() # admitted lerobot.remote_inference.RemoteClient
session.predict(obs, task="…") # one chunk, np.ndarray
session.policy() # strands-robots policy: arm.run(session.policy(), seconds=30)
session.rollout_args() # flags for lerobot-rollout
session.close() # DELETE /v1/sessions/:id (also a context manager; atexit ends forgotten leases)
session.detach() # keep the lease past process exit
agi.ensure_lerobot() # install lerobot[remote] now instead of on the first call
agi.models(); agi.me(); agi.usage(); agi.sessions(); agi.health()
CLI (agi or agi-diy, so uvx agi-diy login works): agi login · agi models · agi session act/so101 ·
agi run act/so101 --probe · agi rollout act/so101 -- --robot.type=so101_follower … · agi usage.
agi rollout act/so101 -- --robot.type=so101_follower --robot.port=/dev/tty.usbmodem… \
--robot.cameras='{"cam0": {"type": "opencv", "index_or_path": 0, "width": 640, "height": 480, "fps": 30},
"cam1": {"type": "opencv", "index_or_path": 1, "width": 640, "height": 480, "fps": 30}}' \
--task="pick up the cube"
agi rollout installs lerobot[remote,dataset] plus the extra your --robot.type needs (feetech for SO-101),
leases a slot, fills in the remote flags and --fps from the lease, maps your camera names onto the model's when the
count matches (cameras: cam0 → top, cam1 → wrist), runs lerobot-rollout in this interpreter, and ends the lease
when it exits. --fake runs it with no arm (still state, black frames, real policy, real bill); --dry-run prints
the command and leases nothing. Refusals are one sentence, before any lease: wrong camera count, different --fps,
missing --robot.type. Details: https://api.agi.diy/docs and docs/ROLLOUT.md.
connect(), predict(), agi run and agi rollout speak LeRobot's remote-inference protocol, which is on lerobot
main only (PyPI 0.6.1 lacks it, and PyPI forbids git dependencies). The first call installs
lerobot[remote] @ git+https://github.com/huggingface/lerobot@d3793b7e into the running interpreter
(GIT_LFS_SKIP_SMUDGE=1; uv pip when there is no pip), replaces a transformers outside >=5.4.0,<5.6.0 first,
prints one line, and continues. AGI_NO_INSTALL=1 prints the command instead. Python 3.10–3.12 is what lerobot tests
on; 3.13+ gets a one-line note. agi rollout runs python -m lerobot.scripts.lerobot_rollout in that same
interpreter. The REST part has no dependencies.
Errors subclass agi.Error with .error, .status, .retry_after_s.
Metadata
Release files for agi-diy 0.3.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 | Provenance | |
|---|---|---|---|---|
| agi_diy-0.3.1.tar.gz | 30.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agi_diy-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.6 kB
Release files / agi_diy-0.3.1.tar.gz
| Download URL | agi_diy-0.3.1.tar.gz |
|---|---|
| Size | 30.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d6fd6286c8e3530c2e6f0840b01f14f3e98d7afc14d848ce0cbc434fb94a752
|
|
BLAKE2b-256 checksum How to use checksums |
5102e6a69c65509adae8698ec54b3426f89936948605e6728cbf1b619e8dd247
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.11
|
Release files / agi_diy-0.3.1-py3-none-any.whl
| Download URL | agi_diy-0.3.1-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fecd534ab653692016cec0b9a10293c5ea2c86c877c95d19114d3a488733fe46
|
|
BLAKE2b-256 checksum How to use checksums |
4ef1e1070193aa3278b4e57e9f94bc02231fea2fbc11b949fbeaed9d5ccad2ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.11
|
Security for agi-diy 0.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.