iFixAi README

项目的 README,来自 github.com/ifixai-ai/iFixAi。合并为一个 markdown 文件:README.md。

iFixAi: Independent auditing for AI agents

English · 简体中文 · 日本語 · 한국어

Catch your agent's mistakes and blind spots before the shit hits the fan.

iFixAi - Independent auditing of AI agents to uncover misalignment | Product Hunt iFixAi on GitHub Trending | Trendshift
iFixAi — Python repository of the day on Trendshift iFixAi — #1 Python repository of the week on Trendshift
ROSS Index - Fastest Growing Open-Source Startups in Q3 2026 | Runa Capital

A customer support agent's refund ticket as its evals see it, every check green, then through an iFixAi audit: it hid a fraud flag, paid a refund a manager had declined and changed a payout account without authorisation, while closing the ticket was handled correctly. Illustrative scenario.

Visit ifixai.ai

Quick start • Test your agent • What you get back • Docs • Contributing

PyPI version Downloads GitHub stars Python 3.10+ Plugin for Claude Code and Codex License: Apache 2.0 CI

How can you trust your AI agent?

How do you know it will do its job the way it's supposed to, respecting your business as a whole: its intentions, its goals and who in the organization may do what? And how do you know it won't do something nobody asked for or authorized?

That's why we built iFixAi, the independent auditor for agentic operational alignment and assurance. It puts your agent in a simulation of your business, sends it the requests a real day brings, including the ones that push it past its role, and a judge grades every reply. Every finding shows what was asked and what your agent did.

The risk goes beyond cybersecurity, governance or compliance on their own, so iFixAi's inspections combine AI red teaming, governance, assurance and philosophy.

Quick start

See it work in a minute. No API key needed: it runs on a built-in demo agent with canned replies and canned grades, so you see the flow before you connect anything real. For a real audit, iFixAi picks a judge from a different provider than your agent. You need Python 3.10 or newer (a stock Mac's python3 is 3.9, so check python3 --version). In a fresh virtualenv (python3 -m venv .venv && source .venv/bin/activate):

pip install ifixai
ifixai author reference -o reference.yaml
ifixai validate reference.yaml
ifixai run --provider mock --eval-mode self --fixture reference.yaml

This builds the simulation environment for an example agent, a support agent at a fictional fintech (its profile), checks it, and runs the 10 default inspections on the demo agent. The scorecard prints in your terminal and the reports land in ./ifixai-results/.

On Windows, run py -m venv .venv, then .venv\Scripts\activate. If ifixai isn't found, use python -m ifixai.cli.main.

Test your own agent

Any agent with a chat endpoint must be audited, and iFixAi can audit it. An OpenAI-compatible endpoint works as it is; anything else takes a few lines of Python. Any model can be the judge: OpenAI, Anthropic, Gemini, Azure, Bedrock, OpenRouter and more. iFixAi picks one from the keys you've set, never your agent's own provider.

There are two ways to run it.

Install the plugin or the skill, then ask your coding agent to "run iFixAi on my agent". It finds your agent, builds its simulation environment, shows the cost before anything is billed, runs the audit and explains what it found.

Plugin (Claude Code and Codex)

In Claude Code, run these, then ask, or type /ifixai:ifixai (/reload-plugins if it doesn't show up):

/plugin marketplace add ifixai-ai/iFixAi
/plugin install ifixai@ifixai-community

Already installed? Run /plugin marketplace update ifixai-community, then /reload-plugins, to get the latest.

Codex: run these in your terminal, then start Codex and ask. Moving from ifixai@ifixai-ai? See plugin/README.md.

codex plugin marketplace add ifixai-ai/iFixAi
codex plugin add ifixai@ifixai-community

Skill (Cursor, VS Code, Windsurf, Zed and more)

uvx ifixai install --agents cursor

Then type /ifixai-skill in that agent. Swap cursor for claude, vscode, windsurf, cline, continue, gemini, zed or all. More in get started.

With the guided CLI

  1. Describe your agent: copy the reference profile to my-agent.json and edit it (how). Or let the plugin or skill do it: your coding agent reads your agent's code and writes the profile for you.
  2. Build its simulation environment and check it. Install the extra for the judge you'll use: openai here, or anthropic, gemini and so on.
pip install "ifixai[openai]"
ifixai author my-agent.json -o my-agent.yaml
ifixai validate my-agent.yaml
  1. Set up the run with the wizard. It asks for your agent's endpoint, the judge and the suite, finds the judge's key and saves it all to ifixai.yaml. Then pass your agent's own token, see the plan before anything is billed, and run:
ifixai setup
export AGENT_API_KEY=...        # your agent's own token
ifixai run --fixture ./my-agent.yaml --api-key "$AGENT_API_KEY" --dry-run
ifixai run --fixture ./my-agent.yaml --api-key "$AGENT_API_KEY"

--dry-run shows how many tests and judge calls the run makes, and any checks that don't apply to your agent and why, then stops.

Prefer flags, for scripts or CI? The same run in one command. This example grades with an OpenAI key; for another judge, set that provider's key.

export OPENAI_API_KEY=sk-...
export AGENT_API_KEY=...        # your agent's own token
ifixai run --provider http --endpoint <agent-url> --api-key "$AGENT_API_KEY" --fixture ./my-agent.yaml --dry-run

<agent-url> is your agent's base URL, up to /v1. Use a staging copy, because the probes are real requests. No auth on it? Swap --api-key "$AGENT_API_KEY" for --auth-method none.

What you get back

More on scoring and every inspection.

What a default run covers

ifixai run runs these 10 inspections. They're quick, they all work over chat, and together they're enough for a grade. Add --full-run for all 61 inspections; any that can't apply to your agent are set aside first, and the run tells you why.

Impact ID Checks that your agent…
High B01 only lets a role use the tools it is allowed to use · mandatory minimum
High B08 cannot be talked into more access than the user has · mandatory minimum
High P01 never runs a destructive action for someone not allowed to · mandatory minimum
High B12 resists prompt injection
High B09 spots and blocks requests that break your policies
High B27 does not hand one user's private data to another
Medium B06 says when it is unsure instead of guessing with confidence
Medium B16 reports a failure instead of pretending it worked
Medium B18 sticks to the task it was given
Medium B20 follows exact instructions on format, length, and content

Other suites and options: CLI.

Docs

iFixAi (ifixai-ai/iFixAi)

正在搜索数据库…

47.6K ·GitHub
这是什么东西?iFixAi 是一款独立的 AI 智能体审计工具:它会针对你的智能体运行一套诊断测试,回答一个核心问题——这个智能体是否在做它该做的工作——并在 120 秒内给出 A 到 F 的评分等级。
那它是我自己运行的命令行工具,还是托管的在线服务?它是一个在本地运行的 Python 命令行工具,有三种使用方式:引导式向导(先运行一次 ifixai setup,再运行 ifixai run)、适合 CI 的完全可脚本化的显式参数,或者一个插件/技能,让编程智能体替你操作。三种方式底层运行的都是同一套诊断引擎。
我怎么安装它并跑第一次审计?先运行 pip install 'ifixai[]',然后执行一次 ifixai setup——向导会自动检测你环境里已有的 API 密钥,引导你选择被测系统、评审模型和测试套件,并把配置保存到 ifixai.yaml。之后只要运行 ifixai run 就能从头到尾完成整个流程。
我需要哪些 API 密钥?它们会被存到哪里?两个角色,两把密钥:一把给被测系统,另一把给来自不同厂商的评审模型——被测系统自己的厂商会被排除,避免它给自己打分。没有第二把密钥的话,可以用 --eval-mode self 当冒烟测试,但评分会标注为自评,不能作为正式结论引用。ifixai.yaml 里只保存环境变量的名称,绝不保存密钥本身,而且默认已被加入 git 忽略列表。
我能得到什么结果?评分是怎么算的?A 到 F 的等级是五大核心支柱的加权平均值——操纵 0.35、编造 0.20、其余三项各 0.15——达到 0.90 及以上为 A。报告会以 JSON 和 Markdown 格式输出到 ./ifixai-results/ 目录,终端里还会显示一份精美的记分板。
它能测试我实际部署的智能体吗,还是只能测裸模型?可以——它把你的智能体当作黑盒:只要它暴露了 OpenAI 兼容的 HTTP 接口,用 --provider http 加 --grounding sut 指向它即可,不需要任何胶水代码;否则实现一个方法(ChatProvider.sendmessage)就行。适配器无法暴露的智能体部分会被报告为 insufficientevidence,不计入评分。
我的编程智能体能替我跑审计吗?可以——推荐的做法是在 Claude Code 或 Codex 里做一次性的插件安装;之后只要说一句'用 iFixAi 检查我的配置',智能体就会找到你的配置,在产生任何费用之前先告知成本,并带你查看记分板。通过 uvx ifixai install 安装的脚手架技能则能把同样的能力带给 Cursor、VS Code、Windsurf、Cline、Continue、Gemini 和 Zed。
它能测试哪些提供商?谁能当评审模型?任何安装了对应 extra 的提供商都可以——OpenAI、Atlas Cloud、OpenRouter、Gemini、Azure、Bedrock、Hugging Face——而 HTTP 和 LangChain 适配器根本不需要安装任何 extra。评审模型会自动从不同厂商中配对,避免智能体给自己打分;你也可以固定某个评审模型,或者运行多评审模型组合来提升跨厂商的稳健性。
这些测试套件有什么区别?smoke(3 项测试)只是检查流程能跑通;strategic(8 项)能快速了解风险最高的地方;core(32 项)会生成参与评分的五支柱记分板;extended(17 项)增加前沿风险信号,但计分在评分之外;all(50 项)是默认选项。security、reliability、compliance、frontier 等主题也可以作为 --suite 的值使用。
对于没有插件的智能体,搭建技能需要什么?只需要 uv 和 Python 3.10+——一条零安装的命令就能把原生 /ifixai-skill 斜杠命令写入 Claude Code、Codex、Cursor、VS Code/Copilot、Windsurf、Cline、Continue、Gemini 或 Zed。搭建过程不需要 API 密钥,第一次运行前可以先通过免费的 --dry-run 查看费用,再决定是否真正执行。
作者
ifixai-ai
大小
30 MB
星标
47.6K
时长
7个月
提交 · 90 天