Pigeon是一个Python开源项目,为人工智能代理的子代理提供权限控制机制1。该项目通过生成有签名的、权限受限的凭证(Pass)替代完整的API密钥副本,允许父代理精确控制子代理的能力范围、资源访问和约束条件1。
项目支持Python 3.12或更新版本1。核心功能包括grant()函数用于授予权限、delegate()函数用于委托权限以及verify()函数用于验证权限1。该框架设计了防护机制,确保子代理无法添加新能力、扩大资源范围、提升约束或删除父级约束1。当子代理尝试进行权限提升时,系统会抛出DelegationError异常,并在异常中标记PRIVILEGE_ESCALATION代码1。verify()函数返回详细的拒绝原因,包括reason_code、message和详细对比信息1。此外,Pigeon支持与MCP(Model Context Protocol)集成的工具级权限验证1。
Pigeon is an open-source Python project that provides a permission control mechanism for sub-agents within AI agent systems 1. Rather than sharing complete API key copies, the framework enables parent agents to generate signed, permission-restricted credentials known as Passes, allowing precise control over what sub-agents can do 1.
The system operates through three core functions: grant() to award permissions, delegate() to transfer permissions to sub-agents, and verify() to authenticate those permissions 1. A key security feature prevents sub-agents from escalating their own privileges—they cannot add new capabilities, expand resource access, elevate constraints, or remove parent-level restrictions 1. When unauthorized permission escalation is attempted, the system raises a DelegationError exception marked with a PRIVILEGE_ESCALATION code 1. The verify() function returns detailed rejection explanations, including reason codes, messages, and comparative details when access is denied 1.
The project requires Python 3.12 or later and supports integration with the Model Context Protocol (MCP) for tool-level permission validation 1.
评论
还没有评论,欢迎留下第一条。