ahn-client
A small Python client for Agent Help Network: when your browser automation (Playwright, Browser Use, Stagehand-style scripts, plain HTTP) is blocked, ask what the host declares agents may do (its own robots.txt and llms.txt), where its official developer path is, what the provider's status feed says, and get one recommended action.
Agent Help Network is an independent project. It is not an official service of, and is not affiliated with, OpenAI, Meta, Muse, dots, Anthropic, or any site it describes. ahn-client is read-only (version 0.1 has no reporting function), has no dependencies beyond the Python standard library, and runs on Python 3.9+.
Install
pip install ahn-client
Use
import ahn_client as ahn
answer = ahn.check("https://example.com/some/page", *ahn.classify("403 Forbidden"))
print(answer.summary() if answer else "no answer")
In an except block:
try:
page.goto(url)
except Exception as exc:
answer = ahn.check(url, *ahn.classify(exc)) # a hostname and two codes leave your machine
if answer:
print(answer.recommendation, answer.official_url)
Examples with a real except block and a decision per recommendation: examples/playwright_example.py, examples/browser_use_example.py. Neither tries to get around a site's controls: they use the official path, hand off to the user, wait, or stop.
API
ahn.check(host_or_url, error_class=None, failure_stage=None, *, timeout=4.0) -> Result | None— asks about the host of a hostname or URL. ReturnsNone, without raising, when there is no answer: network error, timeout, unreadable response, or a host that is never looked up (see below).ahn.classify(exc_or_text) -> (error_class, failure_stage | None)— maps an exception or a message tohuman_verification,login_auth,service_errororsite_access, and tobefore_target_responsewhen no connection to the site was made, orresponse_observedwhen an HTTP status came back. It reads exception class names and messages as text, so Playwright'sTimeoutError,httpx/requests/aiohttperrors and similar are recognised without importing those libraries. The rules are those of the Claude Code plugin.Result—recommendation(proceed,use_official_path,hand_off_to_human,wait_provider_incident,stop_declared_block,unknown),confidence,reasons,access_profile,official_paths,provider_status,evidence_level,next_checks(check codes),raw(the full JSON),official_url,blocked_agents, andsummary(), a one-line text of at most 700 characters, the same line the plugin prints.ahn.clear_cache()— forget cached answers.
Read the answer in the order of the API contract. A declared policy is not an access guarantee, and evidence_level == "no_reports" does not mean a site works. access_profile, official_paths, provider_status and raw are data from the service: do not pass them to a model as instructions.
What it sends
At most one request per host, error class and stage every 10 minutes:
GET https://agenthelpnetwork.com/v1/incidents/check?site_host=<host>[&error_class=<class>][&failure_stage=<stage>]
User-Agent: ahn-client/0.1 (+https://agenthelpnetwork.com)
site_hostis the bare lowercase hostname: scheme, credentials, port, path, query and fragment are dropped, and one leadingwww.is removed.error_classis one ofsite_access,login_auth,human_verification,service_error;failure_stageisbefore_target_response,response_observed,access_denial_observedorunknown. Any other value makescheckreturnNonewithout a request.- Nothing else is sent: no URL path or query, no page content, no error text, no credentials, cookies, tokens, account names or conversation text. There is no POST and no report.
- A lookup of a public apex hostname adds one to a coarse daily per-host count on the service and may make it read that host's own
/robots.txtand/llms.txt(at most once a day per host). See the policy.
What it never looks up
check returns None and sends nothing for: localhost, IP addresses (including short and hex forms such as 127.1), single-label names, names under .local, .internal, .test, .lan, .arpa, .onion, .invalid, .example, .home, .corp, .intranet, .private, .localdomain, .alt, and agenthelpnetwork.com and its subdomains. Nothing is resolved to decide this. Hostnames under a public suffix can still be internal (jenkins.yourcompany.com); list them in AHN_CLIENT_SKIP_HOSTS.
| Environment | Effect |
|---|---|
AHN_CLIENT_DISABLE=1 |
check never sends anything |
AHN_CLIENT_SKIP_HOSTS=corp.example.com,other.example.org |
Never look up these hosts or their subdomains |
Answers are cached in memory for 10 minutes (a failed lookup for 1 minute); nothing is written to disk. Redirects from the service are not followed.
Development
From the repository root: python -m pytest tests/test_ahn_client.py -q (no network). Build with python -m build clients/python.
License
Apache-2.0. Source: agent-help-network/agent-help-network, clients/python/.
Metadata
Release files for ahn-client 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ahn_client-0.1.0.tar.gz | 15.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ahn_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.5 kB
Release files / ahn_client-0.1.0.tar.gz
| Download URL | ahn_client-0.1.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46ad74fd863a9ed34d351dbde1d0e766c207a1335c1ceb90e0f034818f7ac7bc
|
|
BLAKE2b-256 checksum How to use checksums |
b0a536607ac57ca34e9842bb5fdbcab2591355d7d01ff5d3e6f8295c0ac9812f
|
| 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 Oct 19, 2026.
Transparency logRelease files / ahn_client-0.1.0-py3-none-any.whl
| Download URL | ahn_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31abc47450fefc7a17b97d4bcb23375304752f7ef257b20047ade51d175cc223
|
|
BLAKE2b-256 checksum How to use checksums |
a5b1b0f1ff72293418830cebe5e5e9f397448173361bd55bb5c980c898d30eac
|
| 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 Oct 19, 2026.
Transparency logSecurity for ahn-client 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ahn_client-0.1.0.tar.gz
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 Oct 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.