Skip to main content

anyagent

One API over the coding agents installed on a machine: Claude Code, Codex, Cursor, opencode, Kiro, Grok, Hermes, Qwen, pi, Antigravity. This package ships the anyagent binary inside the wheel (it lands on your venv's PATH), spawns it, and talks to it over JSON lines. Every rule lives in the binary; the package is a thin, typed pipe.

pip install anyagent-py
import asyncio, os
from anyagent import Runtime, kind_of

async def main():
    rt = await Runtime.start()
    session = await rt.open("claude", dir=os.getcwd())
    await session.prompt("explain this repo")
    async for ev in session.events():
        kind = kind_of(ev)
        if kind == "TextDelta":
            print(ev["kind"]["TextDelta"]["text"], end="", flush=True)
        if kind == "RequestOpened" and "Permission" in ev["kind"]["RequestOpened"]:
            await session.answer(ev["kind"]["RequestOpened"]["Permission"]["id"], {"Permission": "AllowOnce"})
        if kind == "TurnEnded":
            break
    await session.close()
    await rt.close()

asyncio.run(main())

kind_of(ev) is the variant name of ev["kind"], for both the object form {"TextDelta": {...}} and the bare-string form "ContextCompacted".

session.info and session.status stay current. A session error (AuthRequired, ProcessExited) raises from the async for; a reader that falls 4096 events behind gets ConsumerLagged and its session is closed.

One-shot text, no session: await rt.generate("codex", "one-line title for this diff", dir=dir).

Test your app without agents: build the binary with --features mock and pass Runtime.start(bin=..., mock="packages/mock-scripts/turn.json").

Docs: https://anyagent.mintlify.site/sidecar · Types: anyagent.types is generated from the binary's JSON schema, so commands and events are one contract.

Release files for anyagent-py 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for anyagent-py 0.0.4
File
anyagent_py-0.0.4-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
anyagent_py-0.0.4-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details
anyagent_py-0.0.4-py3-none-manylinux_2_39_aarch64.whl Python 3 none Linux glibc 2.39+ ARM64 Details
anyagent_py-0.0.4-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
anyagent_py-0.0.4-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size:11.0 MB

Release files / anyagent_py-0.0.4-py3-none-win_amd64.whl

Download URL anyagent_py-0.0.4-py3-none-win_amd64.whl
Size 2.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f4326bb206d79e8ce62ab6702e39fa92a7511a851ccc4e2aeb6d3ceb31e0fe3b
BLAKE2b-256 checksum
How to use checksums
1e8e5d54ef579d38ae1d1a0f40f581800c96d39f7115d3e6a64190548e1ba2d2
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 Sep 13, 2026.

Transparency log

Release files / anyagent_py-0.0.4-py3-none-manylinux_2_39_x86_64.whl

Download URL anyagent_py-0.0.4-py3-none-manylinux_2_39_x86_64.whl
Size 2.2 MB
Tags Linux glibc 2.39+ x86-64 Python 3
SHA-256 checksum
How to use checksums
39b4ecdb89666e6e966be5648bcbf5a4efcc3fddfca7189b736b69f9e72afc2c
BLAKE2b-256 checksum
How to use checksums
d2370085d8259b00f8ea6151b8d1ae779e32c6828cc2bff4d3da5b54ad30fecc
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 Sep 13, 2026.

Transparency log

Release files / anyagent_py-0.0.4-py3-none-manylinux_2_39_aarch64.whl

Download URL anyagent_py-0.0.4-py3-none-manylinux_2_39_aarch64.whl
Size 2.1 MB
Tags Linux glibc 2.39+ ARM64 Python 3
SHA-256 checksum
How to use checksums
1296a261b7c84141144980c5ddaf09c565ee7f932e5a27ca753e13b91f8431d5
BLAKE2b-256 checksum
How to use checksums
c3e60bd851ab53aa887da69b42880fa55586cde1c87dd3a8b33b82d6dfb83c52
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 Sep 13, 2026.

Transparency log

Release files / anyagent_py-0.0.4-py3-none-macosx_11_0_arm64.whl

Download URL anyagent_py-0.0.4-py3-none-macosx_11_0_arm64.whl
Size 2.1 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
78d86cf8427df8ca53454228b94214dd481a4200c4c8b895315a0b152e2be06e
BLAKE2b-256 checksum
How to use checksums
e83ab9e593fddf954c29129f3e01a7b5ffaf677ff865995da1dcd69bf49984b6
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 Sep 13, 2026.

Transparency log

Release files / anyagent_py-0.0.4-py3-none-macosx_10_12_x86_64.whl

Download URL anyagent_py-0.0.4-py3-none-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
487cac6744b147ada04e811343f74843149b6181e4c2ace264d26fbab462b232
BLAKE2b-256 checksum
How to use checksums
587bcb71ba9c13ff470d546af72aa71ee4c641427993af6304853a5a096475db
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 Sep 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.4 This release

5 release files

0.0.3

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page