Skip to content

Feature request: official HOL Guard before_tool_call security example #930

Description

@kantorcodes

Proposal

Add a small official example/docs integration showing how to use HOL Guard at fast-agent's existing ToolRunnerHooks.before_tool_call boundary.

ToolRunnerHooks already exposes before_tool_call immediately before tools execute, and the hook is intentionally low-level/mutation-friendly. That gives fast-agent a concrete place to demonstrate a local security policy decision without adding a new generic hook or HOL Guard dependency to core.

Suggested example behavior

  • install HOL Guard separately; Guard Cloud is not required for the local path;
  • inspect the pending tool call name + structured arguments from the tool-runner context before execution;
  • invoke HOL Guard locally with a bounded timeout/payload;
  • explicit allow -> preserve the pending call and let it execute exactly once;
  • deny -> remove/reject the pending call before execution;
  • review-required -> do not execute until explicitly resolved;
  • unavailable Guard, timeout, malformed output, or unknown decision -> fail closed for the protected call;
  • avoid echoing raw tool arguments/secrets in error diagnostics.

Verification

A focused example/test should prove:

  1. allow -> protected tool executes exactly once;
  2. deny -> protected tool executes zero times;
  3. review/error/timeout/malformed result -> zero executions by default;
  4. no HOL Guard hook configured -> existing fast-agent behavior is unchanged.

I maintain HOL Guard and am disclosing that affiliation. I searched current issues/PRs for HOL Guard / hol-guard and found no existing proposal. If this fits the project, I can follow the repository's normal contribution/test conventions after maintainer direction and keep the change limited to the example/docs plus the smallest contract test.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions