Skip to main content

Botscent — Detect AI agents on your site.

Botscent

Botscent tells your site if an AI agent is browsing it, and which agent.

Website · Docs · GitHub

This package is the server half of Botscent for Python. It reads what one request declares: a Web Bot Auth signature checked against the keys bundled in each release, a user-agent token that an agent or crawler publishes for itself, or your host's verified-bot field. It reads headers only and calls no service. Its one dependency is cryptography.

The page half runs in the browser and finds agents inside a person's own browser. Add it from npm or with a script tag. See the quickstart.

Install

pip install botscent

Add it

# FastAPI and Starlette: request.state.botscent
from botscent.asgi import BotscentMiddleware
app.add_middleware(BotscentMiddleware)
# Django: request.botscent
MIDDLEWARE = [..., "botscent.django.BotscentMiddleware"]
# Flask: flask.g.botscent
from botscent.flask import Botscent
Botscent(app)
# Any other framework
import botscent
verdict = botscent.inspect(request)  # a Request, a dict of headers, or anything with .headers

Each call returns a verdict:

{"type": "agent", "agent_name": "chatgpt", "reasons": ["signer.web-bot-auth.verified"]}

human means that Botscent found no agent evidence. It does not prove that a person is there.

Give an agent access

if botscent.is_verified(verdict, "chatgpt"):
    ...  # a signature verified against ChatGPT's bundled keys

Warning: Use only is_verified for access. Anyone can send the headers that produce a name.

Verify

npx botscent check https://your-site.example/

More

MIT.

Metadata

Release files for botscent 1.1.0

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

Source distribution (sdist)

Source distribution for botscent 1.1.0
File Size Uploaded
botscent-1.1.0.tar.gz 56.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for botscent 1.1.0
File Interpreter ABI Platform
botscent-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 78.9 kB

Release files / botscent-1.1.0.tar.gz

Download URL botscent-1.1.0.tar.gz
Size 56.7 kB
Tags Source
SHA-256 checksum
How to use checksums
10d45a56ca3c020e9549e2d622ab11183dc37aa12bf10655cc33ecb33b6867cc
BLAKE2b-256 checksum
How to use checksums
d376b543e2914e84a0ea2e5029b0d27f3d711ac01bfe7235a422700795442dbb
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 8, 2026.

Transparency log

Release files / botscent-1.1.0-py3-none-any.whl

Download URL botscent-1.1.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8de165f4c47b4fdff40054ba00d8c6ad1df18cd6d133226aa765cb4cb91b9031
BLAKE2b-256 checksum
How to use checksums
25387a94f6b065875228d5a50e4a178a9ccc7e789ddda16a5e35d8e9d1001ee4
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

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