safeagents is an open-source security tool released by Hugging Face. It runs as a local proxy between a coding agent harness such as Claude Code or OpenCode and the model API, intercepting the tool calls proposed by the model (requests to run commands, read files, and so on) and inspecting them before they are executed. It is published on GitHub under the Apache-2.0 license.
Inspection is organized in three layers: basic validation that blocks undeclared tools and network destinations outside an allowlist, detection of known attack patterns in command strings, and an optional LLM judge. Allowed, flagged, and blocked calls are written to a log. The proxy supports both the OpenAI Chat Completions and Anthropic Messages API formats, so it can be connected to a range of harnesses, and it serves as an audit and firewall layer against prompt injection attacks that would otherwise lead an agent to leak credentials or run harmful commands.