Skip to main content

with open("README.md", "r", encoding="utf-8") as f: txt = f.read()

1. ASI03: Roadmap -> Covered

old_asi03 = "| ASI03 | Identity Abuse | Signed delegation tokens bind the original user intent, a tool subset, and a TTL across every A-to-B-to-C hop. Scope is monotonically narrowing and the intent digest is immutable along the chain. |" new_asi03 = "| ASI03 | Identity Abuse | Signed delegation tokens bind the original user intent, a tool subset, and a TTL across every A-to-B-to-C hop. Scope is monotonically narrowing and the intent digest is immutable along the chain. |" txt = txt.replace(old_asi03, new_asi03)

2. Test count

txt = txt.replace("193/193 tests passing", "193/193 tests passing")

3. Delegation section

delegation_doc = """## Delegation (inter-agent trust)

An allow-list answers "may this agent call this tool?". It cannot answer "is this agent acting on a request a user actually made?" — and that gap is where ASI03 (Agent Identity & Privilege Abuse) lives:

A low-privilege support agent forwards a "request" to a high-privilege finance agent. The finance agent trusts the internal call and issues a refund without ever re-checking what the original user asked for. No individual permission was violated; the authority was laundered across the hop.

AgentBrake issues signed delegation tokens. A token cryptographically binds the delegator, the delegatee, a digest of the original user intent, the delegated tool subset, and an expiry — signed under a dedicated domain so a token signature can never be replayed as a receipt signature, or the reverse.

from agentbrake import delegation

token = delegation.grant(
    delegator="support-agent",
    delegatee="finance-agent",
    intent="Refund order #4521 for jane@corp.com",
    tools=["lookup_order", "issue_refund"],
    ttl_seconds=300,
)

with agentbrake.run(delegation=token) as r:
    dispatch("issue_refund", {...})     # in scope
    dispatch("send_email", {...})       # AgentBrakeInterrupt(DELEGATION) + signed receipt

Sub-delegation chains (A to B to C) are first-class. Each hop is verified on issue and on acceptance, so a token forged outside this code is rejected the same way:

sub = delegation.grant(
    delegator="finance-agent",
    delegatee="payment-bot",
    tools=["issue_refund"],          # must be a subset of the parent - ValueError otherwise
    parent=token,                     # inherits the original intent digest
    ttl_seconds=60,
)

Four invariants hold across a chain: every signature verifies; each hop's delegatee is the next hop's delegator; scope only narrows (tools[i+1] is a subset of tools[i]); and the intent digest is identical at every hop — the original request cannot be rewritten in transit. Effective expiry is the minimum across the chain, and the TTL is re-checked on every call, not just at acceptance.

Every grant, acceptance, and block mints a signed receipt into the same hash-chained ledger as flow blocks — same export bundle, same agentbrake verify CLI. Verification is deep: the verifier re-checks the signature of the token embedded in each receipt, not just the receipt itself.

Limitations (read these)

  • Identity binding requires pinning. Without a pinned directory, a token proves "signed by the holder of key X, who claims to be support-agent" — not that the key belongs to that agent. Pass trusted_agents={"support-agent": pub_hex} to delegation.verify() to bind identities to keys; only then is impersonation ruled out.
  • The user's intent is attested by the root agent, not signed by the user. The token freezes what the root agent declared. A compromised root agent can declare a false intent. Client-signed intent is future work.
  • Scope is tool names, not arguments. "May refund up to EUR 100" is not expressible yet — only "may call issue_refund".
  • TTLs run on the local clock, self-reported like every other timestamp in AgentBrake.
  • Same-process key exposure applies, exactly as documented for local-mode receipts.

"""

marker = "## Delegation (inter-agent trust)

An allow-list answers "may this agent call this tool?". It cannot answer "is this agent acting on a request a user actually made?" — and that gap is where ASI03 (Agent Identity & Privilege Abuse) lives:

A low-privilege support agent forwards a "request" to a high-privilege finance agent. The finance agent trusts the internal call and issues a refund without ever re-checking what the original user asked for. No individual permission was violated; the authority was laundered across the hop.

AgentBrake issues signed delegation tokens. A token cryptographically binds the delegator, the delegatee, a digest of the original user intent, the delegated tool subset, and an expiry — signed under a dedicated domain so a token signature can never be replayed as a receipt signature, or the reverse.

from agentbrake import delegation

token = delegation.grant(
    delegator="support-agent",
    delegatee="finance-agent",
    intent="Refund order #4521 for jane@corp.com",
    tools=["lookup_order", "issue_refund"],
    ttl_seconds=300,
)

with agentbrake.run(delegation=token) as r:
    dispatch("issue_refund", {...})     # in scope
    dispatch("send_email", {...})       # AgentBrakeInterrupt(DELEGATION) + signed receipt

Sub-delegation chains (A to B to C) are first-class. Each hop is verified on issue and on acceptance, so a token forged outside this code is rejected the same way:

sub = delegation.grant(
    delegator="finance-agent",
    delegatee="payment-bot",
    tools=["issue_refund"],          # must be a subset of the parent - ValueError otherwise
    parent=token,                     # inherits the original intent digest
    ttl_seconds=60,
)

Four invariants hold across a chain: every signature verifies; each hop's delegatee is the next hop's delegator; scope only narrows (tools[i+1] is a subset of tools[i]); and the intent digest is identical at every hop — the original request cannot be rewritten in transit. Effective expiry is the minimum across the chain, and the TTL is re-checked on every call, not just at acceptance.

Every grant, acceptance, and block mints a signed receipt into the same hash-chained ledger as flow blocks — same export bundle, same agentbrake verify CLI. Verification is deep: the verifier re-checks the signature of the token embedded in each receipt, not just the receipt itself.

Limitations (read these)

  • Identity binding requires pinning. Without a pinned directory, a token proves "signed by the holder of key X, who claims to be support-agent" — not that the key belongs to that agent. Pass trusted_agents={"support-agent": pub_hex} to delegation.verify() to bind identities to keys; only then is impersonation ruled out.
  • The user's intent is attested by the root agent, not signed by the user. The token freezes what the root agent declared. A compromised root agent can declare a false intent. Client-signed intent is future work.
  • Scope is tool names, not arguments. "May refund up to EUR 100" is not expressible yet — only "may call issue_refund".
  • TTLs run on the local clock, self-reported like every other timestamp in AgentBrake.
  • Same-process key exposure applies, exactly as documented for local-mode receipts.

Security coverage"

i = txt.find(marker) if i != -1: txt = txt[:i] + delegation_doc + txt[i:]

with open("README.md", "w", encoding="utf-8") as f: f.write(txt)

checks = [] if new_asi03 in txt: checks.append("ASI03 updated") if "193/193" in txt: checks.append("test count updated") if "## Delegation" in txt: checks.append("delegation section added") print("OK -", ", ".join(checks))e | Observability + caching | After | Yes (open core) | | AgentOps | Observability + replay | After | No (cloud) |

We don't compete with these — we complement them. Run AgentBrake as your last line of defense before the tool actually executes.

Security coverage - OWASP Top 10 for Agentic Applications (2026)

AgentBrake maps to the OWASP Top 10 for Agentic Applications (2026) - the peer-reviewed risk taxonomy security teams now use to evaluate agent deployments. Every enforcement decision AgentBrake makes produces an Ed25519-signed, hash-chained receipt that a third party (an auditor, a client's security team) can verify offline with only the public key - no trust in the AgentBrake server required.

OWASP Risk AgentBrake
ASI02 Tool Misuse Tool allow-list + loop / retry-storm detection stop recursive tool abuse.
ASI01 Agent Goal Hijack Flow-control engine (taint tracking) blocks injection to exfiltration.
ASI08 Cascading Failures Circuit-breaker halt-and-escalate before a failure snowballs.
ASI10 Rogue Agents Verifiable audit trail for post-incident forensics.
ASI03 Identity Abuse Signed delegation tokens bind the original user intent, a tool subset, and a TTL across every A-to-B-to-C hop. Scope is monotonically narrowing and the intent digest is immutable along the chain.
ASI06 Memory Poisoning Roadmap - signed memory entries.

Not in scope (by design): AgentBrake enforces actions, not content. Use it alongside text-filtering guardrails.

Why this matters now

  • EU AI Act high-risk obligations live since August 2, 2026. Penalties up to 7% of global turnover.
  • OWASP published a dedicated Top 10 for Agentic Applications (Dec 2025).
  • Auditors want evidence. AgentBrake produces that record and makes it independently verifiable.

Built by BOSSMETALIQUE. MIT License. Feedback welcome on GitHub Issues.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_agentbrake-0.2.0.tar.gz (87.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_agentbrake-0.2.0-py3-none-any.whl (70.6 kB view details)

Uploaded Python 3

File details

Details for the file py_agentbrake-0.2.0.tar.gz.

File metadata

  • Download URL: py_agentbrake-0.2.0.tar.gz
  • Upload date:
  • Size: 87.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for py_agentbrake-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8492a9757d0035fce0c6030f0dfd8d05cc929058544b91ad3d4f4fc0a4482801
MD5 66f613cc28125e56ae47861975dd9536
BLAKE2b-256 b1b0c3dc4ab369381a50b989408110d8d6dbd44a340adbd773b60aee4333f829

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_agentbrake-0.2.0.tar.gz:

Publisher: publish.yml on BOSSMETALIQUE/agentbrake

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_agentbrake-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: py_agentbrake-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 70.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for py_agentbrake-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54e1b1b78aef0ed048f35a99076af5831adde9862183cde7267980303d127d0a
MD5 5f55666074a0faaf3430394b34465f03
BLAKE2b-256 23369d73cd8749478a2b8e2f9297f24b74d76d15772ae6af506dc2e8c8c6dfe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_agentbrake-0.2.0-py3-none-any.whl:

Publisher: publish.yml on BOSSMETALIQUE/agentbrake

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page