Show HN: ToolGuard – AI 智能体工具调用 Pytest 测试框架

1作者: Heer_J4 天前
我厌倦了我的 AI 智能体因为 LLM 幻觉 JSON 键或传递字符串而不是整数而崩溃。所以我构建了 ToolGuard——它使用边缘情况(空值、缺失字段、类型不匹配、10MB 负载)对你的 Python 工具函数进行模糊测试,并给你一个 100 分的可靠性评分。<p>运行测试不需要 LLM。它读取你的类型提示,生成一个 Pydantic 模式,并确定性地破坏事物。<p>pip install py-toolguard<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;Harshit-J004&#x2F;toolguard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Harshit-J004&#x2F;toolguard</a><p>如果你正在构建复杂的工具链,如果你查看该仓库,我将感到非常荣幸。 强烈欢迎对架构进行严厉的反馈!
查看原文
I got tired of my AI agents crashing because the LLM hallucinated a JSON key or passed a string instead of an int. So I built ToolGuard — it fuzzes your Python tool functions with edge-cases (nulls, missing fields, type mismatches, 10MB payloads) and gives you a reliability score out of 100%.<p>No LLM needed to run tests. It reads your type hints, generates a Pydantic schema, and deterministically breaks things.<p>pip install py-toolguard<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;Harshit-J004&#x2F;toolguard" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Harshit-J004&#x2F;toolguard</a><p>If you are building complex tool chains, I would be incredibly honored if you checked out the repo. Brutal feedback on the architecture is highly encouraged!