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.2.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.2.0
File Size Uploaded Provenance Actions
botscent-1.2.0.tar.gz 56.8 kB With provenance Details for botscent-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 79.1 kB

Release files / botscent-1.2.0.tar.gz

Download URL botscent-1.2.0.tar.gz
Size 56.8 kB
Tags Source
SHA-256 checksum
How to use checksums
86ebbe55429ee4652b133795057e83bdf2db2a99ddeb7f51571aefd20933415d
BLAKE2b-256 checksum
How to use checksums
cf2f33847c6e1e4846a4b19fc8fc4f229c6b4dd56b3e716fe371f25b74817a15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

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

Download URL botscent-1.2.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcfb01ed1cdec76eedacaa8c0888d989f548d19cfcf85c0c67f89e9510bf0362
BLAKE2b-256 checksum
How to use checksums
43b27718d9348787c6c728470669670d0978a29e2d3f44141414d4066f93ad21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 11, 2026.

Transparency log

Security for botscent 1.2.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for botscent-1.2.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 Nov 11, 2026.

Transparency log

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

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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