Skip to content

Releases

ToolBoundary v1.1.1

Choose a tag to compare

@Jaycubic Jaycubic released this 17 Nov 05:19

A hardening release. Every user should upgrade.

Changed

  • A value or record count given as a string must now be a plain ASCII decimal, such as "25" or "-25.50". Strings with whitespace, underscores, exponents, a leading + or zero, or non-ASCII digits are denied with INVALID_VALUE, because a tool's parser might read them as a different number.
  • A tool with a max_value but no min_value now raises a FutureWarning, because negative values pass such a limit. Behaviour is unchanged until ToolBoundary 2.0, which will imply a floor of 0.

Added

  • Add Boundary(deny_negative_values=True). A max_value without a min_value then gets a floor of 0, and negative values are denied with MIN_VALUE_VIOLATED. An explicit min_value always wins.
  • Add Overview, Safety approach, Supporting evidence and Limitations sections to the README.
  • Add CI checks for ruff formatting and mypy, and test on Python 3.13, Windows and macOS.
  • Add a Security workflow (CodeQL, pip-audit, ruff bandit rules, dependency review), OpenSSF Scorecard and Dependabot.
  • Add performance benchmarks in benchmarks/, and a workflow that fails a pull request if any decision path gets more than 25% slower than the base branch.
  • Check that a release tag matches the package version, and publish signed build attestations to PyPI.

Fixed

  • Give the gateway's ambiguous-body tests short ids, so the suite runs on Windows.

Upgrade notes

  • If a tool with a max_value takes negative values, set a negative min_value. Otherwise set min_value=0 or pass deny_negative_values=True to silence the new warning.
  • If you pass numbers as strings with spaces or other formatting, convert them to numbers or plain decimal strings first.

Full changelog: v1.1.0...v1.1.1

ToolBoundary v1.1.0

Choose a tag to compare

@Jaycubic Jaycubic released this 10 Nov 11:50

ToolBoundary v1.1.0

Release type: Security feature

This release adds a policy gateway that protects your tools from a compromised agent by running policy outside the agent's process.

Policy gateway

In-process checks stop mistakes and misbehaving model output, but code running in the agent's process can get around them. toolboundary.gateway moves policy out of that process.

  • Agents can't approve themselves: the policy runs in the gateway, and the agent holds only an identity key.
  • Deny by default: a request must match a GatewayRule you wrote.
  • Limits come from the real request: value and record count are read from the bytes being forwarded, not from what the agent claims.
  • Credentials stay out of the agent: the gateway adds them when it forwards a request.
  • Ambiguous requests are refused: this covers duplicate JSON keys, encoded path tricks, method-override headers and unlisted query parameters.

Run it in its own process:

python -m toolboundary.gateway --app policy_app:build

Deployment requirements

The gateway only protects you when all of these are true:

  • It runs as a different OS user or in a different container from the agent.
  • The agent has no direct network route to the tools.
  • The agent doesn't hold the tools' credentials.

See the gateway guide for setup.

Other changes

  • Guarding a tool without access_mode now raises FutureWarning. It still falls back to READ_ONLY, and access_mode will be required in 2.0.
  • strict_limits=True now also requires a value when a tool has only a min_value.
  • The docs now say plainly that token request binding stops a request being changed after approval, but doesn't stop a compromised caller declaring a false value.

Known limitations

  • A prompt-injected agent can still do anything its rules allow, so keep rules narrow and limits low.
  • A requires_approval call through the gateway is denied, and there's no built-in way to resume it after a person approves.
  • The gateway covers HTTP tools only, and it doesn't inspect responses.

Closes #25. #26 stays open until access_mode becomes required.

Install

pip install --upgrade toolboundary

Full details are in the changelog.

ToolBoundary v1.0.5

Choose a tag to compare

@Jaycubic Jaycubic released this 10 Nov 09:47

ToolBoundary v1.0.5

Release type: Security

This release closes several ways a denied or limited action could get through, and makes emergency stops, proxy tokens and evidence behave as documented. All users should upgrade.

Security fixes

  • Kill switch for running agents: new kill_switch_file is checked on every call, so creating the file halts a running agent. A running process's environment can't be changed from outside, so kill_switch_env only works if set before the agent starts. Earlier documentation was wrong about this.
  • AgentKey fails closed: AgentKeyProvider no longer allows every call when no client is configured. Demo mode now requires simulate=True.
  • Proxy tokens are narrower: tokens carry the call's access mode, so read-only tokens can't use write methods. Tokens can also be bound to one exact method, path and body with request_method, request_path and request_body, and routes can require this with require_request_binding=True.
  • Limits apply to every argument style: max_value and max_records now cover positional LangChain input and **kwargs functions.
  • No redirects off-route: the proxy returns upstream redirects to the client instead of following them with the client's credentials.
  • Block-lists are harder to evade: blocked operations match regardless of case, surrounding spaces or character width.
  • Better secret handling: nested secrets and more credential names are redacted from audit metadata, and providers no longer receive secret-named arguments.
  • Dependencies and release pipeline: the langchain extra now requires a langchain-core release patched for CVE-2025-68664, GitHub Actions are pinned to commit SHAs, and packages are built outside the publishing job.

Fixes

  • Async @guarded_tool functions now record their real outcome.
  • Positional LangChain arguments are bound into the call digest.
  • Enforced provider denials and outages are audited as DENY.
  • Malformed token signatures now get a 403 and call on_denied.
  • InMemoryTokenStore is thread-safe.
  • Proxy response size and idle connections are limited.
  • guard_tool works with LangChain @tool functions.

Upgrade notes

  • AgentKeyProvider() without a client now raises ConfigurationError. Pass your client, or simulate=True for demos only.
  • Proxy POST, PUT, PATCH and DELETE requests need a token with WRITE access or higher, so pass the real access_mode to check_and_authorize().
  • If you relied on the proxy following upstream redirects, your client must now follow them.
  • Use kill_switch_file for emergency stops.

Known limitations

  • Code in a process holding the TokenIssuer can still mint tokens. To defend against a compromised agent, run the Boundary, issuer and proxy in a separate process. Tracked in #25.
  • Tools guarded without an explicit access mode are treated as READ_ONLY, so set the real mode on every tool that writes or executes. Tracked in #26.

Install

pip install --upgrade toolboundary

Full details are in the changelog.

ToolBoundary v1.0.4

Choose a tag to compare

@Jaycubic Jaycubic released this 25 Oct 16:23

ToolBoundary v1.0.4

Release type: Framework integration

ToolBoundary v1.0.4 introduces an optional CrewAI integration, bringing runtime authorization and policy enforcement directly into CrewAI tool execution.

What's new

CrewAI integration

  • "guard_tool" — wrap an individual CrewAI "BaseTool" with ToolBoundary authorization.
  • "guard_tools" — wrap multiple CrewAI tools and configure per-tool policy overrides.
  • Synchronous and asynchronous execution protection — authorization runs inside the wrapped tool's "_run" and "_arun" execution paths.
  • Structured-tool protection — the authorization check remains in the execution path when CrewAI invokes a structured tool.
  • Positional argument handling — arguments are normalized against the original tool signature before configured value and record-count limits are evaluated.
  • Provider-aware authorization and evidence — when an external provider is configured, the adapter uses ToolBoundary's existing authorization and execution-evidence lifecycle.

Optional dependency

CrewAI remains optional. The core ToolBoundary package does not require CrewAI or add a mandatory framework dependency.

Install the core package:

pip install toolboundary

Install the CrewAI integration:

pip install 'toolboundary[crewai]'

Existing optional integrations remain available:

pip install 'toolboundary[langchain]'
pip install 'toolboundary[redis]'

Compatibility and security model

The CrewAI adapter uses ToolBoundary's existing local policy engine rather than introducing a separate authorization system. Local policy remains authoritative, and an external provider cannot override a local denial.

As with other integrations, tools should be invoked through their guarded wrappers. ToolBoundary is an application-layer enforcement library, not a substitute for credential scoping or network-level egress controls.

Validation

The merged CrewAI integration passed the GitHub Actions build and test checks on Python 3.9, 3.10, 3.11, and 3.12.

Contributors

Thanks to Charles Omeneki for contributing the CrewAI integration and working through review feedback and CI fixes.

ToolBoundary v1.0.3 Release Notes

Choose a tag to compare

@Jaycubic Jaycubic released this 20 Oct 08:33

Release type: Security and correctness

ToolBoundary v1.0.3 tightens network-proxy request validation, makes several policy checks more explicit, and improves the safety and accuracy of execution audit evidence.

Security improvements

Network proxy request validation

  • Prevented client-controlled request paths from changing the configured upstream authority.
  • Rejected path traversal and malformed paths before forwarding a request.
  • Added a configurable request-body size limit. The default maximum is 10 MiB.
  • Rejected invalid or negative Content-Length values and unsupported transfer-encoding requests.

Safer audit metadata

  • Common secret-like argument names are redacted in audit metadata generated by @guarded_tool.
  • Added sensitive_args for application-specific names that must be redacted.
  • Added log_arg_values=False to record argument types rather than argument values.

Correctness fixes

  • Explicit operation allow-lists: when a ToolPermission defines allowed_operations, a call must supply an operation that is present in that allow-list. Missing operations are denied.
  • Numeric policy limits: values used in configured numeric-limit checks are validated; malformed and non-finite values are denied. min_value is supported alongside max_value.
  • Strict limit enforcement: Boundary(strict_limits=True) requires a value when max_value is configured and a record count when max_records is configured.
  • Decorator operation fallback: a wrapped function's operation=None no longer overrides an operation configured on @guarded_tool.
  • Execution evidence for None results: a tool that returns None without raising an exception is recorded as a successful execution, rather than an unknown outcome.

Compatibility and installation

The core package remains dependency-free. Framework and shared-state integrations remain optional extras:

pip install toolboundary
pip install 'toolboundary[langchain]'  # optional LangChain integration
pip install 'toolboundary[redis]'      # optional shared Redis backends

The provider-neutral EvidenceProvider contract, AgentKey reference integration, and optional Redis-backed rate limiter/token store introduced in v1.0.2 remain available in v1.0.3.

Deployment note

NetworkEnforcer only mediates requests routed through the proxy. To prevent an agent from reaching an upstream endpoint directly, configure network egress restrictions (for example, firewall, container, or service-mesh policy) so the upstream is reachable only through the approved path. See the API reference for configuration details.

ToolBoundary v1.0.2

Choose a tag to compare

@Jaycubic Jaycubic released this 15 Oct 09:00

ToolBoundary v1.0.2 brings shared Redis-backed rate limiting and token storage to multi-process deployments, building on the provider-neutral authorization and evidence architecture introduced in v1.0.0 and the AgentKey reference integration included in v1.0.1.

ToolBoundary remains a local runtime enforcement library: external providers can add authorization checks and execution evidence, but they cannot override a local denial.

What's New

1. Shared Redis Backends

This release introduces optional Redis-backed implementations for deployments running multiple processes or replicas.

  • RedisSlidingWindowRateLimiter — shares rate-limit counters across processes using Redis sorted sets and an atomic Lua script.
  • RedisTokenStore — tracks single-use token consumption across processes using Redis SET NX with expiration.
  • Dependency injection — supply a custom rate limiter through Boundary(rate_limiter=...) and a shared token store through NetworkEnforcer(token_store=...).
  • Fail-closed by default — Redis failures deny rate-limited operations or token consumption when shared state cannot be verified. An explicit fail_closed=False option is available for deployments that deliberately choose fail-open behavior.

Redis is an optional dependency. The default in-memory implementations remain available, and installing the core package does not require Redis.

Install the Redis extra:

pip install "toolboundary[redis]"

2. AgentKey Reference Integration

The release includes the ToolBoundary-side reference integration for AgentKey, built against the provider-neutral EvidenceProvider interface.

The integration demonstrates:

  • External authorization before tool execution.
  • Post-execution evidence recording.
  • Observe and enforce modes.
  • Authorization consumption and replay prevention.
  • Preservation of exact tool arguments across authorization and execution.
  • Local-deny-is-final behavior.

AgentKey remains optional. ToolBoundary continues to enforce local policy independently of external provider availability.

3. Provider-Aware Authorization and Evidence

ToolBoundary provides a provider-neutral architecture for integrating external authorization and evidence systems.

  • ProviderMode.OBSERVE — records provider decisions without blocking locally permitted actions.
  • ProviderMode.ENFORCE — requires external authorization and fails closed on provider denial or unavailability.
  • authorize_call() and record_execution() — support the provider-aware execution lifecycle.
  • Structured decisions and audit metadata — retain authorization results, call digests, execution evidence, and related correlation information.

Local policy remains authoritative. A provider cannot turn a locally denied action into an allowed action.

4. Tests and Documentation

This release adds Redis backend tests covering:

  • Sliding-window allow and deny behavior.
  • Shared state across Redis client instances.
  • Token consumption, expiration, and replay prevention.
  • Integration with Boundary and NetworkEnforcer.
  • Fail-closed and explicitly configured fail-open behavior.
  • Missing optional dependency handling.

The Redis tests use fakeredis with Lua support, so the test suite does not require a live Redis server.

Documentation has also been updated with Redis installation instructions, multi-process deployment examples, backend injection points, and the AgentKey reference integration.

Installation and Upgrade

Standard installation:

pip install --upgrade toolboundary

Installation with Redis support:

pip install --upgrade "toolboundary[redis]"

Redis backend example:

from toolboundary import Boundary
from toolboundary.redis_backend import (
    RedisSlidingWindowRateLimiter,
    RedisTokenStore,
)

limiter = RedisSlidingWindowRateLimiter(
    redis_url="redis://localhost:6379/0"
)

store = RedisTokenStore(
    redis_url="redis://localhost:6379/0"
)

boundary = Boundary(
    # Keep your existing Boundary configuration here.
    agent_name="support-agent",
    rate_limiter=limiter,
)

# For network-layer enforcement, inject the shared token store:
# enforcer = NetworkEnforcer(
#     issuer,
#     routes,
#     token_store=store,
# )

Configure the Redis connection for your environment before using the shared backends in production.

Compatibility

  • Existing in-memory rate limiting and token storage remain supported.
  • Redis is not required for standard ToolBoundary usage.
  • Redis functionality is opt-in through toolboundary[redis].
  • External authorization remains optional.
  • Local enforcement remains authoritative regardless of provider mode.

Evidence and Canonicalization Note

The current Python call-binding implementation uses deterministic JSON key ordering to calculate SHA-256 digests. This is not, by itself, a cross-language canonicalization standard. RFC 8785 (JSON Canonicalization Scheme, JCS) remains the target for separately specified cross-language canonical evidence.

Release Summary

ToolBoundary v1.0.2 combines the AgentKey reference integration and provider-aware authorization architecture with optional Redis-backed shared rate limiting and token storage, while preserving the dependency-free, in-memory default.

Full documentation: GitHub Repository
API Reference: docs/API.md
PyPI: toolboundary

ToolBoundary v1.0.1

Choose a tag to compare

@Jaycubic Jaycubic released this 04 Oct 07:02

ToolBoundary v1.0.1 extends the local runtime security boundary with a provider-neutral authorization and evidence workflow, plus the first ToolBoundary-side AgentKey integration example and end-to-end coverage.

The core principle remains unchanged:

ToolBoundary remains the local enforcement authority.

External providers can add authorization and evidence, but they cannot override a local deny.

Highlights

Provider-aware authorization and evidence

  • Provider-neutral EvidenceProvider protocol.
  • ProviderMode.OBSERVE for non-blocking provider evaluation.
  • ProviderMode.ENFORCE for fail-closed external authorization.
  • Structured LocalDecision and AuthorizationContext.
  • Centralized authorize_call() / record_execution() lifecycle.
  • Exact tool-call freezing before provider authorization.
  • SHA-256 call and result digests for the current ToolBoundary binding model.
  • Single-use authorization consumption and replay prevention.
  • Post-dispatch provider failure isolation so local execution evidence is preserved.

AgentKey reference integration

ToolBoundary now includes the ToolBoundary-side reference integration for AgentKey:

  • toolboundary.integrations.agentkey.AgentKeyProvider
  • Runnable example: examples/agentkey_integration.py
  • End-to-end integration suite: tests/test_agentkey_integration.py

The integration demonstrates:

  1. Local allow followed by external provider allow.
  2. Provider denial blocking execution in enforce mode.
  3. Consumed-grant replay prevention.
  4. Post-dispatch execution reporting.
  5. Local-deny-is-final behavior.
  6. Exact argument preservation between authorization and evidence.
  7. Session and authorization correlation.
  8. Observe versus enforce behavior.

AgentKey remains optional. The core ToolBoundary package does not require an external service.

Documentation

Updated documentation covers:

  • External authorization providers.
  • Provider configuration and execution flow.
  • AgentKey interoperability.
  • Provider-aware audit metadata.
  • Current evidence and call-binding behavior.

See:

  • README.md
  • docs/API.md
  • examples/agentkey_integration.py
  • tests/test_agentkey_integration.py

Important Evidence Note

The current v1.0.x Python implementation uses deterministic JSON key ordering for its local SHA-256 call binding.

This should not be interpreted as a cross-language canonicalization standard.

Cross-language native signed evidence is being designed separately around RFC 8785 (JCS) so that independently implemented verifiers can reproduce the same canonical representation.

Existing v1.0.x call-digest behavior is intentionally not changed in this patch release.

Compatibility

Local-only ToolBoundary usage remains supported without any external provider:

boundary.check(...)

Existing policy enforcement remains local and provider-free by default.

External providers are opt-in.

Test Coverage

The release includes dedicated provider and AgentKey integration coverage for:

  • authorization success and denial;
  • observe/enforce semantics;
  • replay prevention;
  • execution success and failure reporting;
  • provider recording failures;
  • local deny isolation;
  • exact-call binding;
  • field mapping;
  • session correlation;
  • approval-required responses;
  • provider receipt semantics.

What's Next

Follow-up work is tracked in GitHub issues, including:

  • RFC 8785/JCS canonical evidence;
  • native tamper-evident evidence records;
  • offline evidence verification and optional Ed25519 signatures;
  • additional framework integrations;
  • OpenTelemetry observability;
  • stronger property/fuzz testing for evidence formats.

Contributors

Thanks to the contributors and reviewers helping extend ToolBoundary, including the ongoing Redis shared-rate-limit work in PR #9 and the AgentKey technical collaboration.

Links

v1.0.0 — Provider-Neutral Authorization & Evidence Layer

Choose a tag to compare

@Jaycubic Jaycubic released this 25 Sep 17:59

v1.0.0 — Provider-Neutral Authorization & Evidence Layer

ToolBoundary v1.0.0 introduces a provider-neutral authorization and evidence layer for AI-agent tool execution.

The core security boundary remains local:

ToolBoundary remains the local enforcement authority.

External providers can add stricter authorization and verifiable evidence, but they can never override a local deny.

What's New

  • Provider-neutral EvidenceProvider protocol
  • ProviderMode.OBSERVE and ProviderMode.ENFORCE
  • Structured LocalDecision
  • authorize_call() and record_execution() lifecycle
  • Deterministic canonicalization of tool-call data
  • SHA-256 exact-call binding
  • Single-use authorization and replay prevention
  • Execution-result binding
  • Provider-aware @guarded_tool
  • Provider-aware LangChain integration
  • Post-dispatch evidence resilience
  • Expanded provider contract tests

AgentKey Interoperability

ToolBoundary is designed to work with optional external authorization and evidence providers.

AgentKey is one example of this model, providing external authorization and verifiable evidence for AI-agent actions.

ToolBoundary does not require AgentKey.

                    TOOLBOUNDARY
                         |
             ┌───────────┴───────────┐
             │                       │
        Local Authority       Optional Provider
             │                       │
             │                    AgentKey
             │                       │
             └───────────┬───────────┘
                         ▼
                  Tool Execution

ToolBoundary v0.1.0

Choose a tag to compare

@Jaycubic Jaycubic released this 27 Aug 10:31

Initial public release of ToolBoundary.

ToolBoundary provides runtime boundary enforcement for AI agents, including permission controls, boundary enforcement, auditing, rate limiting, token controls, network enforcement, and LangChain integration.