This release is a pre-release and may not be stable for production use.
agent-hooks (Python SDK)
Python implementation of
AGENT-HOOKS-0.1:
interception-point enums, AgentContext builder, Verdict types, host-side
InterceptionEmitter with the four composition profiles, the pluggable
identity-provider seam, and the Conformance Test Kit.
Trust model. agent-hooks is a cooperative contract, not a security boundary: the host framework is fully trusted, interceptors run in-process with full data access, and no complete-mediation claim is made. Read SECURITY.md and spec §1.4 before relying on it.
pip install --pre "agent-hooks-sdk[ctk]"
# import name: agent_hooks
Host (framework adapter) usage
from agent_hooks import AgentContextBuilder, InterceptionBlocked, InterceptionEmitter
builder = AgentContextBuilder(agent_id="my-agent", framework="my-fw", session_id="s-1")
emitter = InterceptionEmitter().register(MyPolicy())
await emitter.emit(builder.agent_startup(tools_registered=["http_get"]))
ctx = builder.pre_tool_call(call_id="tc-1", name="http_get", args={"url": url})
try:
await emitter.emit(ctx)
except InterceptionBlocked as e:
return tool_error(e.result.verdict.reason)
result = invoke_tool(ctx["tool_call"]["args"]) # post-transform args
Interceptor usage
from agent_hooks import AgentContext, Verdict
class MyPolicy:
def intercept(self, ctx: AgentContext) -> Verdict:
if ctx["interception_point"] == "pre_tool_call" and ctx["tool_call"]["name"] == "rm":
return Verdict.deny(reason="dangerous")
return Verdict.allow()
Verdict.allow(), Verdict.deny(...), Verdict.warn(...) (allow + recorded
warning) and Verdict.escalate(...) (liftable deny for the approval seam, §9)
are the constructor shortcuts for the §5 shapes.
Running the CTK against your framework
Implement agent_hooks.ctk.Harness (see
conformance/HARNESS.md),
then:
pytest --agent-hooks-harness=my_pkg:MyHarness
The vectors ship inside the wheel; pass --agent-hooks-vectors=<dir> only to
run a different vector set.
Metadata
Release files for agent-hooks-sdk 0.1.0b1
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 | |
|---|---|---|---|---|
| agent_hooks_sdk-0.1.0b1.tar.gz | 138.5 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| agent_hooks_sdk-0.1.0b1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| agent_hooks_sdk-0.1.0b1-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| agent_hooks_sdk-0.1.0b1-cp310-abi3-manylinux_2_28_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| agent_hooks_sdk-0.1.0b1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| agent_hooks_sdk-0.1.0b1-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 3.1 MB
Release files / agent_hooks_sdk-0.1.0b1.tar.gz
| Download URL | agent_hooks_sdk-0.1.0b1.tar.gz |
|---|---|
| Size | 138.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
85f23e27e5b8c33ba977a0fcd19bb21960a0eb8eb9534813855a2b97d83e3b44
|
|
BLAKE2b-256 checksum How to use checksums |
e78d5883ece695a1bd2b2ae06c9a6e0eac158c683fe2dbc095fcdaeacb6053db
|
| 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 5, 2026.
Transparency logRelease files / agent_hooks_sdk-0.1.0b1-cp310-abi3-win_amd64.whl
| Download URL | agent_hooks_sdk-0.1.0b1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 490.9 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d7ccf044b5ee2cb7b2b54550c0644bb60a868c037b301c8b17ee2035ce57cb9d
|
|
BLAKE2b-256 checksum How to use checksums |
1abefc8f36e6ed5cffe9fcfb6571a76670fb881569837d39e9a8d15c63aaa3dc
|
| 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 5, 2026.
Transparency logRelease files / agent_hooks_sdk-0.1.0b1-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | agent_hooks_sdk-0.1.0b1-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 661.2 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
c5e98f37fc078d7abd4cdb5fdcaacac8048431b4077d60f364c0a0953dd1cc91
|
|
BLAKE2b-256 checksum How to use checksums |
824976110c1e672b80f07596a6a916b9ecd2bf16f38f6030f48a3e81a4e00368
|
| 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 5, 2026.
Transparency logRelease files / agent_hooks_sdk-0.1.0b1-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | agent_hooks_sdk-0.1.0b1-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 638.5 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
66fb35c8d36948533ea88498a8884d094ca9534ab01c92ee6813b87d0db9d7c8
|
|
BLAKE2b-256 checksum How to use checksums |
100e9682d6fb97a19d84069ddd39288f7cae7c629e2c7cbdc7349d4da8152635
|
| 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 5, 2026.
Transparency logRelease files / agent_hooks_sdk-0.1.0b1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | agent_hooks_sdk-0.1.0b1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 582.6 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cec8825a0c9a8aa4b14186598cb798cde86219c98f1358a7eee936617afbe0ab
|
|
BLAKE2b-256 checksum How to use checksums |
10c6148717d4e528ad30d9de073bd884712181c5ab538ea52ff50b3a8e5955a7
|
| 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 5, 2026.
Transparency logRelease files / agent_hooks_sdk-0.1.0b1-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | agent_hooks_sdk-0.1.0b1-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 610.2 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
338691d89353f62056b885c056390fbbce15a333edc38d9374f5ce4adb9f66f7
|
|
BLAKE2b-256 checksum How to use checksums |
7a4fb5e6643af6b922bbad80dfbeaba8ef68971c059deccd09a212fe19d17e9e
|
| 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 5, 2026.
Transparency logSecurity for agent-hooks-sdk 0.1.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 6 files in this release have been uploaded with provenance metadata.
Attestation for agent_hooks_sdk-0.1.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 5, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.