Skip to main content

agent-readable

CI PyPI

Stop coding agents from hallucinating Python APIs. agent_help(target) reads the live public API surface from any Python class, module, function, or method and renders compact, agent-oriented Markdown with current signatures and docstring summaries. When a library opts in, it can also return class-level usage rules such as lifecycle order, preconditions, and anti-patterns.

To let your coding agent automatically call agent_help() before using an unfamiliar API, install the companion skill:

npx skills add zydo/skills --skill agent-readable

logging.Logger compared with agent_help() and help()
agent_help vs help

Quickstart

See Getting started for installation and one-off CLI usage in two parallel series — uv and pip.

from agent_readable import agent_help
import logging

print(agent_help(logging.Logger))

agent_help() works on plain Python objects with no setup required. It returns a curated public API list from runtime introspection, so agents see what exists in the installed version instead of guessing from stale training data.

Library authors can optionally add usage rules next to the code:

class Sensor:
    """Reads a value from a hardware sensor."""

    def read(self) -> float:
        """Read the current sensor value."""

    @classmethod
    def __agent_notes__(cls) -> str:
        return """
## Do

- Call `calibrate()` once during setup, before `read()`.

## Do not

- Do not call `read()` before calibration on first use.
"""

Docs

  • Getting started: installation, quickstart, CLI usage, and other language implementations.
  • Why it matters: the API hallucination problem, token efficiency, and how this compares to other agent-doc patterns.
  • Examples: wrapping existing classes, inherited notes, duck typing, plain classes, modules, functions, and methods.
  • Authoring guide: __agent_help__, __agent_notes__, class docstring hints, freshness guidance, and API reference.
  • FAQ: common questions about agent skills, docstrings, AGENTS.md, third-party libraries, and constrained decoding.
  • Benchmark: methodology and harness measuring whether agent_help() context reduces hallucinated-API failures.

Other Languages

License

MIT

Release files for agent-readable 0.3.1

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

Source distribution (sdist)

Source distribution for agent-readable 0.3.1
File Size Uploaded
agent_readable-0.3.1.tar.gz 51.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-readable 0.3.1
File Interpreter ABI Platform
agent_readable-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.2 MB

Release files / agent_readable-0.3.1.tar.gz

Download URL agent_readable-0.3.1.tar.gz
Size 51.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a8197711e9bddd99f982aadb9b2e9909ed8c42a2698d8063cd872cb55af47e66
BLAKE2b-256 checksum
How to use checksums
7c585874285dbf2e7c245adb1c098240747719bd4e4b6eabe6e4871b99207b22
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 Aug 23, 2026.

Transparency log

Release files / agent_readable-0.3.1-py3-none-any.whl

Download URL agent_readable-0.3.1-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6126082d0f0723cc336a4bcd32d6f5d37629f1d6732d16adef3883a7ca2ea42d
BLAKE2b-256 checksum
How to use checksums
66ccff082592de3bc8f0da9087555c60fc618d5e1dc2d9fcc0250fb055ede74c
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 Aug 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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