Current collected state Current
Observed since 20 Oct, 22:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Agentica Gateway Service - Python OpenClaw
Agentica Gateway 服务,调用 agentica SDK。
支持Lark/Feishu(飞书)、WeCom(企微)、Telegram、Discord、Gradio 等多渠道接入的 AI Agent 网关。
┌─────────────────────────────────────────────────────────┐
│ agentica-gateway │
│ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ FastAPI Application │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────────────┐│ │
│ │ │ REST API │ │WebSocket │ │ Webhooks ││ │
│ │ │ /api/* │ │ /ws │ │ /webhook/* ││ │
│ │ └────┬─────┘ └────┬─────┘ └────────┬─────────┘│ │
│ └───────┼────────────┼────────────────┼──────────┘ │
│ │ │ │ │
│ ┌───────▼────────────▼────────────────▼──────────┐ │
│ │ Core Services │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │
│ │ │ Channels │ │ Router │ │Scheduler │ │ │
│ │ │ Manager │ │ │ │ │ │ │
│ │ └────┬─────┘ └────┬─────┘ └──────────┘ │ │
│ └───────┼────────────┼──────────────────────────┘ │
│ │ │ │
│ ┌───────▼────────────▼──────────────────────────┐ │
│ │ agentica SDK │ │
│ │ Agent | Workspace | Skills | Memory | Tools │ │
│ └────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
pip install -e .
# 可选:安装 Telegram/Discord 支持
pip install -e ".[telegram]"
pip install -e ".[discord]"
pip install -e ".[all]"
复制 .env.example 为 .env 并填写:
# 服务配置
HOST=0.0.0.0
PORT=8789
# 模型配置
MODEL_PROVIDER=zhipuai # zhipuai / openai / deepseek
MODEL_NAME=glm-4.7-flash # glm-4.7-flash is free
# Gradio WebUI
GRADIO_ENABLED=true
GRADIO_PORT=7863
# 飞书
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=xxx
FEISHU_ALLOWED_USERS=ou_xxx,ou_yyy
# Telegram(可选)
TELEGRAM_BOT_TOKEN=xxx
# Discord(可选)
DISCORD_BOT_TOKEN=xxx
python -m uvicorn src.main:app --reload --reload-dir src --port 8789
# 安装 gunicorn
pip install gunicorn
# 启动(4 个 worker 进程)
gunicorn src.main:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8789
agentica-gateway
# 构建并启动
docker-compose up -d
# 查看日志
docker-compose logs -f
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/health | 健康检查 |
| GET | /api/status | 系统状态 |
| POST | /api/chat | 发送消息 |
| POST | /api/memory | 保存记忆 |
| GET | /api/sessions | 列出会话 |
| GET | /api/channels | 渠道状态 |
| POST | /api/send | 发送到渠道 |
ws://localhost:8789/ws
# 连接
→ {"type":"req","id":"1","method":"connect","params":{"auth":{"token":"..."}}}
← {"type":"res","id":"1","ok":true,"payload":{"type":"hello-ok"}}
# 聊天(流式)
→ {"type":"req","id":"2","method":"agent","params":{"message":"你好"}}
← {"type":"event","event":"agent.content","payload":{"delta":"你好"}}
← {"type":"res","id":"2","ok":true,"payload":{"content":"你好!"}}
| 权限 | 范围 | 说明 |
|---|---|---|
contact:user.base:readonly | 用户信息 | 获取用户基本信息(用于解析发送者姓名,避免群聊/私聊把不同人当成同一说话者) |
im:message | 消息 | 发送和接收消息 |
im:message.p2p_msg:readonly | 私聊 | 读取发给机器人的私聊消息 |
im:message.group_at_msg:readonly | 群聊 | 接收群内 @机器人 的消息 |
im:message:send_as_bot | 发送 | 以机器人身份发送消息 |
im:resource | 媒体 | 上传和下载图片/文件 |
| 权限 | 范围 | 说明 |
|---|---|---|
im:message.group_msg | 群聊 | 读取所有群消息(敏感) |
im:message:readonly | 读取 | 获取历史消息 |
im:message:update | 编辑 | 更新/编辑已发送消息 |
im:message:recall | 撤回 | 撤回已发送消息 |
im:message.reactions:read | 表情 | 查看消息表情回复 |
使用飞书文档工具(feishu_doc_*)需要以下权限:
| 权限 | 说明 |
|---|---|
docx:document | 创建/编辑文档 |
docx:document:readonly | 读取文档 |
docx:document.block:convert | Markdown 转 blocks(write/append 必需) |
drive:drive | 上传图片到文档 |
drive:drive:readonly | 列出文件夹 |
这是最容易遗漏的配置! 如果机器人能发消息但收不到消息,请检查此项。
在飞书开放平台的应用后台,进入 事件与回调 页面:
| 事件 | 说明 |
|---|---|
im.message.receive_v1 | 接收消息(必需) |
im.message.message_read_v1 | 消息已读回执 |
im.chat.member.bot.added_v1 | 机器人进群 |
im.chat.member.bot.deleted_v1 | 机器人被移出群 |
Apache-2.0
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 8 Feb 2026 | 12 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:cbe747da690828cf1c0cb9a4533f6ee8a45851ef740ffa5fdb5c88ca2c9bbd55