RIG(运行时集成网关)
RIG是AI代理的工具平台,充当“SDK工具操作系统”
核心功能
- 将SDK转化为工具 -安装封装SDK的“包”(pip或npm包),并将其作为具有JSON模式的结构化工具公开
- 安全运行工具 -通过RIG运行时强制执行验证、机密隔离、策略、批准、重试和审计日志记录
- 出口为MCP -通过RIG Bridge立即将您的工具目录作为MCP服务器公开
关键架构
- 包:封装SDK的pip/npm包(如“驱动程序”)
- 注册表:工具发现和版本管理
- 运行时:策略执行内核(批准、机密、重试、审核)
- 硬性角膜接触镜:用于调用工具的本机API
- MCP电桥:MCP客户端的兼容层
- 中心:团队可选的托管控制平面
快速开始
安装
# Clone the repository
git clone https://github.com/AP3X-Dev/runtime-integration-gateway.git
cd runtime-integration-gateway
# Install in development mode (Windows)
.\install-dev.ps1
# Or manually (cross-platform)
pip install -e packages/rig-core
pip install -e packages/rig-protocol-rgp
pip install -e packages/rig-cli
pip install -e packages/rig-bridge-mcp添加到PATH(Windows)
# PowerShell (run as Administrator)
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
$scriptsPath = "$env:LOCALAPPDATA\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts"
[Environment]::SetEnvironmentVariable("Path", "$userPath;$scriptsPath", "User")
# Restart your terminal, then verify
rig --help用法
# View available packs from the pack index
rig packs --available
# Install a pack (e.g., Stripe)
rig install stripe
# List installed tools
rig list
# Start the RGP server
rig serve
# Start the MCP server
rig mcp可用包
| 包 | 工具 | 描述 |
|---|---|---|
| 条纹 | 8 | 付款处理 |
| 特维里奥 | 5 | 短信、语音、验证 |
| 松弛 | 4 | 团队消息 |
| SendGrid | 2 | 电子邮件传递 |
| 4 | 存储库管理 | |
| 谷歌 | 3 | 纸张、驱动器、Gmail |
| 概念 | 4 | 工作区管理 |
| 表格 | 3 | 数据库管理 |
| 速贝斯 | 4 | 后端服务 |
| 十一个实验室 | 2 | AI语音合成 |
总计:10包39个工具
文档
示例用法
初始化配置:
rig init启动网关:
rig serve列出工具:
rig list调用工具:
rig call echo '{"message":"hi"}'如果工具需要批准,则调用将返回一个带有令牌的approval_required错误。批准:
rig approve 备注
- MCP桥和更新程序在此v0版本库中被删除。
- 包发现使用组rig.packs下的Python入口点。
通过装备节点运行器进行节点包
此仓库还包括一个Node运行器,可以加载npm包并将其工具暴露给Python运行时。
从repo根目录:
npm install
RIG_NODE_PACKS=@rig/pack-echo npm --workspace packages/rig-node-runner start在rig.yaml中启用节点运行器:
node_runner:
enabled: true
url: http://127.0.0.1:8790现在启动RIG服务器并调用节点工具:
rig serve
rig list
rig call echo_node '{"message":"hi"}'