Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

agent-handshake
Check that what your agent is told matches the tools it actually has

PyPI CI License Python 3.11+

agent-handshake checks that what your agent is told matches the tools it actually has.

Status: beta, released (1.0.0b1). Releases up to 0.10.0 on PyPI are a different, closed tool: contract tests between agents. See why it was closed.

Install

pip install --pre agent-handshake

--pre is needed while 1.0 is in beta: without it pip installs 0.10.0, the old tool.

Check a request

handshake check request.json

request.json is a request body as sent to the model, in OpenAI Chat Completions, OpenAI Responses or Anthropic Messages format. Each finding names the rule, where the text is (its path in the request) and the closest real name. Errors make the command exit with code 1; warnings do not, unless --strict is given. Rules and settings: docs/rules/ and docs/configuration.md.

rule finds default
HS001 a tool named in a form that can only be a tool, that the request does not have on, warning
HS002 a tool name that is almost right (case, -/_, prefix, suffix) on, error
HS003 an argument the tool's schema does not have on, error
HS004 an example value outside a field's allowed values off
HS005 example JSON keys that do not match the call or response format off
HS007 prose that may name a tool the request does not have off

Benchmark

Measured once on the frozen configuration, on three sets that share no project: dev (used to build the rules), holdout and holdout-2 (never used to tune them). Recall is over real, fixed mismatches from the projects' history; precision is over hand-labelled findings on the current code of open-source agents. Small samples are marked by their size.

dev holdout holdout-2
recall cases (projects) 25 (12) 14 (10) 4 (4)
catchable cases caught by rules on by default 8/11 4/11 2/2
precision corpus: repositories (requests) 4 (13) 3 (12) 4 (16)
HS001 precision 13/14 0/24 no findings
HS002 precision 11/11 no findings 5/5
HS003 precision 2/2 no findings no findings
known mismatches in the corpus found 22/32 6/24 6/17

The holdout HS001 findings are Code Mode function declarations of one project (tools.x({ ... })), which HS001 reads as calls. Details and the method: benchmarks/README.md; run it with make benchmark.

Known limitations

HS001 can warn about names that are not missing tools:

  • Code Mode declarations. A description that declares functions as tools.x({ ... }) is read as calls to x.
  • Negative forms. "Never attempt 'apply_patch' ... they don't exist" is read as naming apply_patch.
  • Placeholders. "I'm going to use tool_name" is read as naming tool_name.

HS001 findings are warnings, so they do not fail the check unless --strict is used. To silence them, ignore the names or turn the rule off in handshake.yaml (or [tool.handshake] in pyproject.toml):

ignore:
  - tool_name                  # never report this name
  - {rule: HS001, ref: apply_patch}
rules:
  HS001: {enabled: false}      # or turn HS001 off

Contributing

See CONTRIBUTING.md.

License

Apache 2.0. See LICENSE.

Metadata

Release files for agent-handshake 1.0.0b1

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-handshake 1.0.0b1
File Size Uploaded Provenance
agent_handshake-1.0.0b1.tar.gz 876.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-handshake 1.0.0b1
File Interpreter ABI Platform
agent_handshake-1.0.0b1-py3-none-any.whl Python 3 none any Details

Total release size: 913.1 kB

Release files / agent_handshake-1.0.0b1.tar.gz

Download URL agent_handshake-1.0.0b1.tar.gz
Size 876.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6e1daef266385e76bf65038fbdee81e812a2cbe33b9a43a0e5941e07f31388ff
BLAKE2b-256 checksum
How to use checksums
c38e61ac61a45fe5f3f6feac144aeb35ff4d6e68dae2fa835f1619f7146ce0b0
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 log

Release files / agent_handshake-1.0.0b1-py3-none-any.whl

Download URL agent_handshake-1.0.0b1-py3-none-any.whl
Size 37.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
297868956b81c0ff426aea5c5a3cdb921b1e6f68b3dad3dae98f806a490c55b2
BLAKE2b-256 checksum
How to use checksums
59820e1975ffe1179322de0f274f76413db145509ab7b04a98897c6c93aa486a
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 log

Security for agent-handshake 1.0.0b1

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.

Select from 2 files

Attestation for agent_handshake-1.0.0b1.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 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.

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