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.3

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.3
File
anyagent_py-0.0.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
anyagent_py-0.0.3-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details
anyagent_py-0.0.3-py3-none-manylinux_2_39_aarch64.whl Python 3 none Linux glibc 2.39+ ARM64 Details
anyagent_py-0.0.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
anyagent_py-0.0.3-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.3-py3-none-win_amd64.whl

Download URL anyagent_py-0.0.3-py3-none-win_amd64.whl
Size 2.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
ee98c923fa0615d7e4c397c0b8eca5e8623fb98c1fedb0db0458982c8b81e1b8
BLAKE2b-256 checksum
How to use checksums
b401c42412239aa683df6981ad8e8e2313a6114237642b6dd312e158484c7627
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.3-py3-none-manylinux_2_39_x86_64.whl

Download URL anyagent_py-0.0.3-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
e5cbde49ab01f51e4b11fdfc1e22682e4aed36f0b49b8084c689bcc7c852792d
BLAKE2b-256 checksum
How to use checksums
287a4dd0aa3f04d1c217b3d305a653a7cbbd6b1d873ee1539ae46f5ad8a697ab
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.3-py3-none-manylinux_2_39_aarch64.whl

Download URL anyagent_py-0.0.3-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
98b7ae93fc53e826a5c402ef547d93302ef7ae6b51b59a9d15bffab8199ba210
BLAKE2b-256 checksum
How to use checksums
79944a31d02574e77a4dafc9221ed9ea30dc6e9bace69ae7a34f3ad9ccfe3c0b
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.3-py3-none-macosx_11_0_arm64.whl

Download URL anyagent_py-0.0.3-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
cc9fe5a779c41466975a3de73d11c30cabd502e75b25f4969cb629419323782d
BLAKE2b-256 checksum
How to use checksums
866de0aedad02bdd3e1920e08507c42c7ec489d7165b8867147cd33be0b50150
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.3-py3-none-macosx_10_12_x86_64.whl

Download URL anyagent_py-0.0.3-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
bf3ffaf9445a2c4b75b523db86649560d183f9f4808d34ffbf05e73d46152fda
BLAKE2b-256 checksum
How to use checksums
8c875347c448de2a60ef58e1c0376795fbb3c18fcce2ddfcbe233ed60f6d8e0c
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

0.0.4

5 release files

This release

0.0.3 This release

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