InertiaRSS Track and read blogs, news, and tech you care about
Read Original Open in InertiaRSS

Recommended Feeds

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

博客园 - iTech

7万星的AI交易框架:让大模型模拟投行多空辩论,自动做交易决策 71000颗星的AI交易团队:让大模型模拟投行分工,自动做交易决策 13400颗星的开源项目:输入一句话,AI全自动帮你做短视频 102颗星的沙盒:当AI学会自己写代码、跑测试、做部署 AI 技术日报 - 2026-05-08 29k 星的 PageIndex:不用向量数据库,靠推理就能做 RAG 每天花两小时刷信息?这个开源项目帮你全自动搞定 读源码像读小说?试了 DeepWiki 和 Zread,我再也不想裸读 GitHub 了 Matt Pocock 开源的这套 .claude 技能,为什么让工程师集体上头? Cursor Team Kit:Cursor 官方团队在用的 17 个 AI 工作流 AI 技术日报 - 2026-05-07 AI 技术日报 - 2026-05-06 - iTech AI 技术日报 - 2026-05-05 Anthropic CEO 说 12 个月内程序员要失业,我扒完他的底牌,发现事情没那么简单 把工程师的肌肉记忆装进 Claude Code,这个 4300 Star 的项目我后悔没早用 AI 技术日报 - 2026-05-04 AI 技术日报 - 2026-05-03 AI 技术日报 - 2026-05-02 六大 Agent 框架横评:谁支持 Skills?谁能自动创建 Agent?MCP 呢? Wechatsync:一个 Chrome 插件,一键把文章同步到 31 个平台 LangChain 开源了 Open SWE:Stripe、Ramp、Coinbase 内部都在造的编程 Agent Cockpit:把 Claude Code 从终端里搬出来,装进浏览器 Cursor 把自家的 AI Agent 开放了:写几行 TypeScript 就能调 Cursor 干活 AI 技术日报 - 2026-05-01 AI 写代码每次结果都不一样?Archon 用 YAML 工作流把 AI 编程变成流水线 AI 写代码比你快了,但你还是得学编程——只不过学法得换 腾讯的龙虾特工队:4 个 AI Agent 同日更新,全家桶正式成型 Agno 不做更聪明的 Agent,它要把所有 Agent 框架包进同一个操作系统 Hermes Agent 终于有了像样的 Web 界面,而且还支持远程访问 Datawhale 出了一套 29 学科知识地图,把 AI 的底牌全掀了 Hermes Agent 在聊天框里就能用的 20 种高级功能 一份 AGENTS.md 能顶一次模型升级?Augment Code 用数据说了算 NVIDIA 开源了一个「AI 沙箱」,20K Star,让 Agent 跑代码不再裸奔 60ms 冷启动、5MB 内存:腾讯开源的这个沙箱让 Docker 安全隔离像笑话 AI 技术日报 - 2026-04-30 AI 技术日报 - 2026-04-29 AI 技术日报 - 2026-04-28 Goose:Linux 基金会亲儿子,能撼动 Claude Code 和 OpenCode 吗? AI 技术日报 - 2026-04-27 AI 技术日报 - 2026-04-26 Google 把价值20美元/月的东西免费了,102K人已经抢到了 OpenClaw 和 Claude Code 网络搜索配置指南 AI 技术日报 - 2026-04-25 Anthropic 为什么遥遥领先:从 Cat Wu 专访看AI霸主的底层逻辑 Mac 本地跑大模型完全指南:你的苹果电脑就是 AI 工作站 同样 70B 参数,为什么 MoE 只激活 13B 就能打平 Dense? DeepSeek-V4 技术报告里藏着一条线:华为昇腾 NPU 已完成推理验证 DeepSeek-V4 深夜炸场:1M 上下文、384K 输出、双模型,API 定价直接卷到底 MacBook Air 跑大模型实测:Ollama、llama.cpp、LM Studio 谁才是本地推理之王? AI 技术日报 - 2026-04-24
Hermes Agent Connecting to Microsoft Teams: The Ultimate Guide: 6 Steps to Get Your AI Agent into the Chat
iTech · 2026-05-24 · via 博客园 - iTech

Hermes Agent (GitHub 164k stars) is not just a coding assistant in the terminal. Through its message gateway, the Agent can connect to 24 messaging platforms — Telegram, Discord, Slack, WeChat, Lark, DingTalk, Microsoft Teams, and more. The Agent capabilities (Skills, tool calls, approval processes) you configure on one platform are universal across all platforms.

This article focuses on the integration method for Microsoft Teams: 6 steps to get your AI Agent bot into Teams chats.

What this article covers

  • Hermes Agent + Teams architecture
  • 6-step integration process
  • Interactive approval cards
  • Automatic meeting summary push
  • Production environment deployment
  • Security configuration

architecture

Teams 群聊 ←── HTTPS Webhook ──→ Hermes Gateway (端口 3978) ←──→ Agent + LLM

and Slack's Socket Mode are different; Teams pushes messages via public HTTPS Webhooks. Your Hermes instance requires a publicly reachable endpoint—use a local development tunneling tool for development and a real domain name in production.

Message trigger rules

scenarios behavior
Private chat (1:1) Triggers Agent response for every message, no need for @
Group chat Responds only when @bot is mentioned
Channel Responds only when @bot is mentioned

Teams treats @mentions as <at>BotName</at> tags and passes them to Hermes, which automatically strips and processes them.

6 Steps to Access

Step 1: Install Teams CLI

Microsoft's @microsoft/teams.cli automation bot registration does not require Azure Portal:

npm install -g @microsoft/teams.cli@preview
teams login

Verify login and obtain your AAD Object ID (needed for whitelist configuration later):

teams status --verbose

Step 2: Expose Webhook Port

Teams cannot push messages to localhost. Local development requires a tunneling tool:

# Microsoft devtunnel(推荐,URL 持久)
devtunnel create hermes-bot --allow-anonymous
devtunnel port create hermes-bot -p 3978 --protocol https
devtunnel host hermes-bot

# 或 ngrok
ngrok http 3978

# 或 cloudflared
cloudflared tunnel --url http://localhost:3978

Note down the output.https:// URL, use next. Keep tunnel running during development.

Step 3: Create Bot

teams app create \
  --name "Hermes" \
  --endpoint "https://<your-tunnel-url>/api/messages"

CLI output CLIENT_ID, CLIENT_SECRET, and TENANT_ID. Save Client Secret immediately—won't be shown again.

Step 4: Configure environment variables

add to ~/.hermes/.env:

# 必填
TEAMS_CLIENT_ID=<your-client-id>
TEAMS_CLIENT_SECRET=<your-client-secret>
TEAMS_TENANT_ID=<your-tenant-id>

# 限制访问用户(强烈建议)
# 用 teams status --verbose 获取 AAD Object ID
TEAMS_ALLOWED_USERS=<your-aad-object-id>

can also use config.yaml to configure:

platforms:
  teams:
    enabled: true
    extra:
      client_id: "your-client-id"
      client_secret: "your-secret"
      tenant_id: "your-tenant-id"
      port: 3978

Step 5: Start gateway

HERMES_UID=$(id -u) HERMES_GID=$(id -g) docker compose up -d gateway

verify if running:

curl http://localhost:3978/health
# 应返回: ok

docker logs -f hermes
# 看到: [teams] Webhook server listening on 0.0.0.0:3978/api/messages

Step 6: Install the app in Teams

teams app get <teamsAppId> --install-link

Open the output link and install it in the Teams client. After installation, send a message to the bot—it's ready.

Interactive approval card

This is one of the most practical features of Teams integration. When an Agent needs to execute a dangerous command (delete files, run shell commands, etc.), it won't let you manually input /approve, but instead sends an Adaptive Card, with 4 buttons:

Button Action
Allow Once Approve this specific command
Allow Session Automatically Approve Similar Commands Within This Session
Always Allow Permanently Approve This Mode
Deny Reject Execution

After Clicking the Button, the Card Will Be Immediately Updated to Show the Approval Decision, and the Agent Will Continue or Stop Execution.

Meeting Minutes Are Automatically Pushed

The Hermes Agent's Teams Integration Not Only Supports Chatting but Also Automatically Pushes Meeting Minutes. After Enabling the Teams Meeting Pipeline Plugin, Minutes Are Automatically Generated and Pushed to the Specified Teams Channel or Chat After the Meeting Ends.

Two Push Modes:

Mode Applicable Scenarios Limitations
incoming_webhook Simple Push to Channel Does Not Support Threads, No Reply Function
graph Posting as Bot, Supports Threads Requires Microsoft Graph Permissions

graphMode Configuration:

platforms:
  teams:
    enabled: true
    extra:
      client_id: "..."
      client_secret: "..."
      tenant_id: "..."
      delivery_mode: "graph"
      chat_id: "19:meeting_..."    # 推送到聊天
      # 或
      # team_id: "..."
      # channel_id: "..."          # 推送到频道

Production Environment Deployment

Local Development Use Tunnel, Production Environment Use Real Domain:

# 创建 Bot 时直接用生产域名
teams app create \
  --name "Hermes" \
  --endpoint "https://your-domain.com/api/messages"

# 已有 Bot 更新端点
teams app update --id <teamsAppId> --endpoint "https://your-domain.com/api/messages"

Requirements:
- Port 3978 (or TEAMS_PORT specified port) can be accessed from the public network
- TLS certificate is valid (Teams rejects self-signed certificates)

Security Configuration

⚠️ Must set TEAMS_ALLOWED_USERS, otherwise anyone who can find or install your Bot can interact with it.

Security best practice:

  • TEAMS_ALLOWED_USERS Enter the AAD Object ID of authorized users, silently discard unauthorized messages
  • TEAMS_CLIENT_SECRET Treat as a password, rotate regularly
  • ~/.hermes/.env Set file permissions to 600: chmod 600 ~/.hermes/.env
  • Public endpoint /api/messages is authenticated by Teams Bot Framework — requests without a valid JWT will be rejected

Configuration reference

Variable Description
TEAMS_CLIENT_ID Azure AD App (Client) ID
TEAMS_CLIENT_SECRET Azure AD Client Secret
TEAMS_TENANT_ID Azure AD Tenant ID
TEAMS_ALLOWED_USERS Comma-separated AAD Object ID whitelist
TEAMS_ALLOW_ALL_USERS SettrueSkip whitelist (not recommended)
TEAMS_HOME_CHANNEL Conversation ID for scheduled/active messages
TEAMS_PORT Webhook port (default 3978)

FAQ

Question Solution
Health endpoint is normal but Bot is not responding Check if the tunnel is still running, and if the Bot endpoint matches the tunnel URL
KeyError: 'teams'Log errors Restart container
Authentication error Verify CLIENT_ID, CLIENT_SECRET, TENANT_ID
Bot received message but ignored AAD Object ID not in ALLOWED_USERS
Tunnel URL changes after restart devtunnel uses named tunnel URL for persistence; ngrok free version changes each time, need to use teams app update to update
No inference provider configured Check ANTHROPIC_API_KEY (or other LLM key) is configured

Hermes Agent supports 24 message platforms

Teams is just one of them. Hermes Agent also supports:

Telegram, Discord, Slack, WhatsApp, Signal, Email, SMS (Twilio), Home Assistant, Mattermost, Matrix, DingTalk, Lark, WeCom, WeCom Callback, WeChat, iMessage (BlueBubbles), QQ Bot, YuEbao, Microsoft Teams, Teams Meetings, LINE, SimpleX Chat, ntfy, Open WebUI, Webhooks.

The same Agent, a set of Skills and tool configurations, work across all platforms.


Author: itech001
Source: Official Account: AI Artificial Intelligence Era
website : https://www.theaiera.cn/
Sharing the latest AI news and research every day.

Originally published on AI Artificial Intelligence Era, attribution required when reposting.