Skip to main content

Pygent 0.3

Pygent is a PyTorch-like framework for composing LLM agents with no hidden per-call state from reusable Module graphs. Version 0.3 provides a single Execution owner for direct and managed calls, an asyncio Runtime, observable model/tool events, OpenAI-compatible adapters, portable tools and MCP adapters, ReAct, SQLite recovery, and HTTP/SSE workers.

First principles

Pygent 0.3 第一原则 is the repository's highest authority. Module-specific first principles, SDK contracts, tests, examples, and code derive from it.

Quickstart

from pygent import AIMessage, Context, RecurrentModule, UserMessage


class Echo(RecurrentModule):
    async def forward(self, message, context):
        output = AIMessage(content=message.content.upper())
        return output, context + message + output


message, context = await Echo().invoke(UserMessage(content="hello"), Context())

Direct invoke(), stream(), and start() need no Runtime. Bind a Module to LocalRuntime when its call contract is supported and the application needs bounded concurrency, cancellation, deadlines, remote placement, durable history, or advanced Execution control. This standard recurrent example returns (message, context); ordinary Module inputs and results are user-defined. See the Execution contract.

Documentation

Development

uv sync --all-extras
uv run pytest -q
uv run ruff check src tests examples benchmarks
uv run mypy src benchmarks
uv build
python -m examples.service.main
uv run --extra performance python -m benchmarks run synthetic-smoke

Python 3.11+ is required. Apache-2.0; see LICENSE.

Metadata

Release files for pygent-ai 0.3.10

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

Source distribution (sdist)

Source distribution for pygent-ai 0.3.10
File Size Uploaded
pygent_ai-0.3.10.tar.gz 658.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for pygent-ai 0.3.10
File
pygent_ai-0.3.10-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
pygent_ai-0.3.10-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
pygent_ai-0.3.10-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
pygent_ai-0.3.10-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
pygent_ai-0.3.10-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 13.1 MB

Release files / pygent_ai-0.3.10.tar.gz

Download URL pygent_ai-0.3.10.tar.gz
Size 658.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a345173f9f11ab704543db9cf6e00bc4aabcc58010b9ff2095b4b183a3ee338a
BLAKE2b-256 checksum
How to use checksums
d4b5d4b1930ffc27fc8352b164ca650e097310fdf9339d476b70dc913513653a
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 8, 2026.

Transparency log

Release files / pygent_ai-0.3.10-cp311-abi3-win_amd64.whl

Download URL pygent_ai-0.3.10-cp311-abi3-win_amd64.whl
Size 2.2 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2a3d3e9bc6ede71b11ca18f311b1d856c6b8538515ed94c042ad769b96c2af39
BLAKE2b-256 checksum
How to use checksums
64b723a5247dc46f632ced01bd908425f68a0e15a1ac96d488ed9594dc583ac6
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 8, 2026.

Transparency log

Release files / pygent_ai-0.3.10-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pygent_ai-0.3.10-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
5da0b84b9f3609a2be27695588d21f2b951cc1f9391962faddaa840107244ed2
BLAKE2b-256 checksum
How to use checksums
91943b253439feea535f9a65bde6db861f439f03447e89c4ccf2eab4e257961f
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 8, 2026.

Transparency log

Release files / pygent_ai-0.3.10-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL pygent_ai-0.3.10-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.7 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
293bf5bcf5de992a7b94f2c6a9cd913f7312ceded335243216db0b59663dab5e
BLAKE2b-256 checksum
How to use checksums
3028c697ec43282e5331cc018f0143ec6a652cdbb161058c78d983c6ac2e8e6e
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 8, 2026.

Transparency log

Release files / pygent_ai-0.3.10-cp311-abi3-macosx_11_0_arm64.whl

Download URL pygent_ai-0.3.10-cp311-abi3-macosx_11_0_arm64.whl
Size 2.4 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cbf1584d6542e25e4cc7ad3e266457681a8da76a1b7a0e88ae083c6768f72554
BLAKE2b-256 checksum
How to use checksums
b66e196cfb4833185537a893b3d8e2bf97b9b56658a0677e7f14d4b7107c08ae
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 8, 2026.

Transparency log

Release files / pygent_ai-0.3.10-cp311-abi3-macosx_10_12_x86_64.whl

Download URL pygent_ai-0.3.10-cp311-abi3-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
8f74ac60de2dcbc6a471bdcfd13622676adbd7136a464abb27b0e457b3283b09
BLAKE2b-256 checksum
How to use checksums
b6a926c0d97fdb71ce4db211c7edc271847819a86865f70e1839b3b1b43b2ac7
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.26

6 release files

0.3.25

6 release files

0.3.24

6 release files

0.3.23

6 release files

0.3.22

6 release files

0.3.21

6 release files

0.3.20

6 release files

0.3.19

6 release files

0.3.18

6 release files

0.3.17

6 release files

0.3.16

6 release files

0.3.15

6 release files

0.3.14

6 release files

0.3.13

6 release files

0.3.12

6 release files

0.3.11

6 release files

This release

0.3.10 This release

6 release files

0.3.9

6 release files

0.3.8

6 release files

0.3.7

6 release files

0.3.6

6 release files

0.3.5

6 release files

0.3.4

6 release files

0.3.3

6 release files

0.3.2

6 release files

0.3.1

6 release files

0.3.0

6 release files

0.2.21

6 release files

0.2.20

6 release files

0.2.19

6 release files

0.2.18

6 release files

0.2.17

6 release files

0.2.16

6 release files

0.2.15

6 release files

0.2.14

6 release files

0.2.13

6 release files

0.2.12

6 release files

0.2.11

6 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 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