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, one-off CLI usage with uvx, uv tool run, or pipx, and full CLI examples.

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.

Other Languages

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_readable-0.2.1.tar.gz (51.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_readable-0.2.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file agent_readable-0.2.1.tar.gz.

File metadata

  • Download URL: agent_readable-0.2.1.tar.gz
  • Upload date:
  • Size: 51.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_readable-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0c8e82b5f34763ea9301a77e53b72bb0d4d90e269ad7dff0a069be660ef08e28
MD5 95e6fcc89a4fd4443ff16a51c93b85fb
BLAKE2b-256 eccd934c4adb34aef62f806e50e7285a5c9819fff0fd5d32471cec00e6ae47bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_readable-0.2.1.tar.gz:

Publisher: publish.yml on zydo/agent-readable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_readable-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: agent_readable-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_readable-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98ab09c700396acf3cf2fe475bd49c254851be9f957a7b215ac123b48c42304e
MD5 3d671b409a17a4fa2789fbfe4d0407a6
BLAKE2b-256 3c17d1aeea648d9d2dd31c4d566150f93aaec4698079b284674cabcaa000af79

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_readable-0.2.1-py3-none-any.whl:

Publisher: publish.yml on zydo/agent-readable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page