AI NewsInfrastructureAnnouncement

Hugging Face published safeagents, a local proxy that checks every tool call

Hugging Face released safeagents, a local proxy that checks a coding agent's tool calls before they run. It works with Claude Code, OpenCode and other harnesses.

AI News

Editorial2 min read

LinkedInX

Why it mattersA team can inspect and block an agent's shell commands without modifying the agent. The proxy sits in front of the model and needs only a new base URL.

Hugging Face published safeagents, a local proxy that sits between a coding agent and its model server. The repository is huggingface/safeagents on GitHub. It was created on 28 October. It had 401 stars when the candidate list was built. The license is Apache 2.0.

The proxy inspects every tool call the agent is about to make. It can block the call, let it through, or send it to a judge model for a final decision. The agent sees a normal model API. The only change on the agent side is a new base URL for OpenAI Chat Completions or Anthropic Messages.

What it checks

The README names three stages of check. The first stage reads the request itself. It blocks a call that uses an undeclared tool. It blocks a call that reaches a host the conversation did not mention. It blocks any call that targets the proxy.

The second stage is atif-scan. It turns the conversation into a trace and runs pattern detectors. Named examples in the README: reading /proc/1/environ, using curl --noproxy, accessing a Kubernetes service account token, and namespace manipulation commands. Findings carry a severity.

The third stage is a decision model. A suspicious call that clears the earlier stages can be passed to a judge model. The judge returns allow or block. The judge is optional.

The harness side

The README states that it works with any harness that lets you set a base URL. The named examples are Claude Code, Pi, Hermes and OpenCode. Hugging Face says the install is a one-line script. It covers macOS, Linux, WSL and Windows PowerShell.

The repository also carries a benchmark called safeagents-judge-bench. The v2 version contains 661 real agent tool calls. Each one is labelled allow or block with a misuse category. The benchmark is meant for anyone training or evaluating a judge model.

What a developer can do with it

An unattended agent run is the scariest shape of agent work. A single bad command can read credentials, exfiltrate a token, or reach a service outside the sandbox. Writing your own guardrails inside the agent is one option. The cost is a separate implementation per harness.

This is the other shape. The agent does not change. The proxy is upstream of the model. It sees every tool call in context. One rule set covers Claude Code, OpenCode and any other harness that takes a base URL. The same proxy can also run in --log-only mode first. That logs what the agent would try, before any call is blocked.

Source

huggingface/safeagents on GitHub

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project