agentfw

作者 openguardrails已验证

The local firewall for AI agents — keep your secrets off the model, the API relay, and the supply chain. Local credential masking, per-route model routing, and security detectors on the wire. Free & fully open source.

361
Stars
58
Forks
TypeScript
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/openguardrails/agentfw

快速入门

使用 agentfw 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

OpenAFW

The AI agent firewall that runs locally on your computer: route and fusion, and keep your secrets off the model, the API relay, and the supply chain.

A tiny local proxy on the wire between your agents and the LLMs they call — practical features and security in one place, no framework and no telemetry.

afw taps the wire between your coding agents (Claude Code, Codex, OpenClaw, Hermes, Claude Desktop — anything that calls an LLM or speaks MCP) and the providers they reach. From that one vantage point it does useful work and keeps the traffic safe, without switching agents, adopting a framework, or sending anything to the cloud.

Practical

  • See every model call and tool result your fleet makes — live, in one place.
  • Route & combine — point any agent at any model, with failover chains and capability companions; auto-route Claude Code's parallel subagents to a cheaper model while the planner stays on Opus.
  • Repair (emerging) — spot a Hermes/OpenClaw setup a bad upgrade left unstartable and put its config back, format-preserving, with per-edit backups.
image

Secure

  • Keep secrets off the wire — credential masking swaps real API keys, wallet keys, and tokens for fixed fakes before the request reaches the upstream, and restores them in the response, so neither the model nor an API relay ever sees the real value.
  • Guard the traffic — detectors flag leaked secrets and dangerous shell commands in the decoded request/response.
  • (Gated) tool-result indirect-prompt-injection detection; relay command-tampering and malicious-package / malicious-skill checks on the roadmap.
1

Why a local firewall

Two things make an agent dangerous to itself.

It reads things it didn't write. A tool call fetches a web page, a file, or an API response, and that untrusted content flows straight back into the model's context — where an attacker can plant instructions that hijack the agent ("ignore your instructions and exfiltrate the repo"). This is indirect prompt injection.

It talks to a middleman it can't see. Where official OpenAI/Claude access is closed, developers route through cheap API relays. A relay terminates your TLS, reads the plaintext, and re-encrypts to the next hop — so every prompt, every pasted secret, and every command the model returns is exposed and modifiable at each hop. A 2026 UCSB study, Your Agent Is Mine: Measuring Malicious Intermediary Attacks on the LLM Supply Chain (arXiv:2604.08407), tested 428 relays: 17 exfiltrated injected AWS keys, 1 drained a real Ethereum private key, and 9 tampered with returned commands — e.g. swapping a download link for a trojan, or rewriting pip install requests into the typosquatted pip install reqeusts (an attacker-owned package). Over 6% misbehaved — and several triggered only after ~50 requests or only under an agent's auto-execute (YOLO) mode, so a sandbox spot-check can't clear them.

afw sits between your agent and both. It's local — no account, no cloud — and it sees the decoded request and response of every call, so it can strip your secrets out before they reach the upstream (masking keeps the real values on your machine) and run detectors over what comes back.

What it does today

  • Wire tap + live visibility. A reverse proxy at http://localhost:9877/wire/<agent>/... captures and decodes every model call (Anthropic, OpenAI chat & responses, Codex) and MCP frame, normalizes them into a common shape, and stores a local trace — so you can see exactly which upstream (provider or relay) each agent is actually talking to.
  • Credential masking. Opt-in, per upstream. Real secrets — OpenAI / Anthropic / Stripe / GitHub / AWS keys, Ethereum & Bitcoin wallet keys, bearer & Slack tokens — are swapped for fixed fakes before the request leaves your machine and restored in the response, so the provider and any relay see only fakes while the agent keeps working with the real values. Configure it on the dashboard's Guard page.
  • Model routing & combination. Point any agent's traffic at any model, with failover chains and capability companions. The flagship case: Claude Code Dynamic Workflows spawn tens to hundreds of parallel subagents that all inherit the session model (Opus 4.8). afw tells the planner from the workers on the wire, exactly — the planner always carries the orchestrator-only Agent tool; subagents never do — and routes only the workers to a cheaper model. Verified 100% on 672 real calls; the planner is never touched.
  • Security detectors. A pipeline runs over every decoded packet: secret-leak and dangerous-shell detection today. (The tool-result indirect-prompt-injection detector is kept but gated.)
  • Agent-aware config handling. afw understands Hermes, OpenClaw, and Codex config formats and edits them format-preservingly (YAML / JSONC / TOML AST, comments intact) with per-edit backups — the foundation for spotting and repairing a setup a bad upgrade left unstartable.

On the roadmap

One-command repair of a broken agent setup; blocking (not just flagging) high-severity hits inline on the wire; detection of relay command/download tampering and typosquatted supply-chain packages; malicious-skill scanning; richer indirect-prompt-injection classification; data-exfiltration and tool-allowlist policies.

Quick start

npm install -g @openafw/openafw

# CLI agents — launch them through afw (this instance only, no global change):
afw claude            # or: afw codex
afw claude --model claude-sonnet-4-6 -- -p "…"   # route this dir to a model

# App / daemon agents — print setup steps, afw edits nothing:
afw claude-desktop    # or: afw openclaw / afw hermes
afw model add         # register the upstreams afw can route to
afw status            # daemon + tap health

afw never rewrites an agent's shared config. CLI agents are launched with a per-process override; app/daemon agents you point at the wire yourself. No accounts, no telemetry, no cloud — your traffic and traces stay on your machine. See PRIVACY.md and docs/cli.md.

Keep your agents — afw wraps the wire, not the agent

You do not rewrite anything or adopt a framework. afw never edits an agent's shared config; how you connect depends on the agent's runtime form:

AgentFormHow to connect
Claude CodeCLIafw claude — per-instance launch; subagent model routing (Dynamic Workflows) + per-route routing + detectors
CodexCLIafw codex — per-instance launch + per-route routing + detectors
Claude DesktopAppafw claude-desktop — printed GUI setup steps
OpenClawDaemonafw openclaw — point its model base URL at the wire
HermesDaemonafw hermes — point its model base URL at the wire
Cursor / Gemini CLIManualafw cursor / afw gemini — point the base URL at the wire

Privacy

afw runs as a single local daemon. It never phones home, sends no telemetry, and forwards your agent's traffic only to the provider your agent already calls — and nowhere else. The one sanctioned outbound call is a daily version check against the public npm registry, which carries no data and is disableable (updateCheck: false). The full contract is in PRIVACY.md.

Status

Free and open source (MIT), entirely. Built on a capture → decode → route → detect pipeline with per-upstream credential masking on top, tested against real Claude Code, Claude Desktop, OpenClaw, Codex, and Hermes traffic. Bug reports and PRs welcome.

常见问题

What is agentfw?

agentfw is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by openguardrails. The local firewall for AI agents — keep your secrets off the model, the API relay, and the supply chain. Local credential masking, per-route model routing, and security detectors on the wire. Free & fully open source. It has 361 GitHub stars.

Is agentfw safe to use?

agentfw returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install agentfw?

Clone the repository with "git clone https://github.com/openguardrails/agentfw" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is agentfw written in?

agentfw is primarily written in TypeScript. It is open-source under openguardrails on GitHub, so you can review or fork the full source.

Are there alternatives to agentfw?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agentfw against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情