/agent-teams
Interact with Microsoft Teams - send messages, read channels, manage reactions
$ npx -y skills add agent-messenger/agent-messenger --skill agent-teams --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/agent-teams
Context preview
The summary Claude sees to decide when to auto-load this skill.
Interact with Microsoft Teams - send messages, read channels, manage reactions
SKILL.md
agent-teams.SKILL.mdname: agent-teams
description: Interact with Microsoft Teams - send messages, read channels, manage reactions
version: 2.36.0
allowed-tools: Bash(agent-teams:*)
metadata:
openclaw:
requires:
bins:
- agent-teams
install:
- kind: node
package: agent-messenger
bins: [agent-teams]Agent Teams
A TypeScript CLI tool that enables AI agents and humans to interact with Microsoft Teams through a simple command interface. Features seamless token extraction from the Teams desktop app (with browser fallback) and multi-team support.
Quick Start
# Get team snapshot (credentials are extracted automatically)
agent-teams snapshot
# Send a message
agent-teams message send <team-id> <channel-id> "Hello from AI agent!"
# List channels
agent-teams channel list <team-id>
Authentication
Two co-equal ways to sign in — pick whichever fits:
1. **`agent-teams auth login`** (work/school **or** personal Microsoft accounts) — device-code sign-in. Open the printed URL, enter the code, and approve in your browser. No desktop app or browser extraction needed. It prompts for your Microsoft email (or pass `--email <email>`) and auto-detects work vs personal, then starts the matching flow; pass `--account-type work|personal` to force it and skip detection. Only `auth login` stores the AAD refresh token required by `message search`. 2. **`agent-teams auth extract`** — zero-config extraction from the Teams desktop app, falling back to a Chromium browser. Best when you're already signed into Teams locally. Yields a Skype token only — sufficient for messaging, but **not** for `message search` (see below).
Credentials are also extracted automatically on first use of any command if none are stored, so `auth extract` can happen silently in the background.
Teams tokens are short-lived (60-90 minutes for extraction, a few hours for device-code). **Device-code accounts (`auth login`) refresh silently** — the CLI re-mints an expired token from the stored refresh token with no re-login needed. Extraction accounts re-extract automatically as long as you're still signed into the Teams desktop app or a supported browser; if that fails, re-run `auth extract` (or switch to `auth login`).
Non-interactive `auth login` (agents / CI)
When there's no TTY, `auth login` splits into two calls:
# 1. Start — returns verification_uri, user_code, and device_code as JSON.
# Pass --email to auto-detect the account type (no prompt without a TTY),
# or --account-type work|personal to force it.
agent-teams auth login --email <email>
# 2. After the user approves in a browser, finish with the device_code
agent-teams auth login --device-code <device_code>
`--client-id <id>` overrides the AAD client ID on either call (or set `AGENT_TEAMS_CLIENT_ID`). `--account-type <work|personal>` selects the account (default `work`); it is preserved across the two-call flow, so pass it to both calls when signing in to a personal account non-interactively.
Multi-Team Support
# List all available teams
agent-teams team list
# Switch to a different team
agent-teams team switch <team-id>
# Show current team
agent-teams team current
# Check auth status (includes token expiry info)
agent-teams auth status
Multi-Account Support (Work / Personal)
# Switch between work and personal accounts
agent-teams auth switch-account work
agent-teams auth switch-account personal
# Use a specific account for one command (without switching)
agent-teams snapshot --account work
Memory
The agent maintains a `~/.config/agent-messenger/MEMORY.md` file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the `Read` and `Write` tools to manage your memory file.
Reading Memory
At the **start of every task**, read `~/.config/agent-messenger/MEMORY.md` using the `Read` tool to load any previously discovered team IDs, channel IDs, user IDs, and preferences.
- If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
- If the file can't be read (permissions, missing directory), proceed without memory — don't error out.
Writing Memory
After discovering useful information, update `~/.config/agent-messenger/MEMORY.md` using the `Write` tool. Write triggers include:
- After discovering team IDs and names (from `team list`, `snapshot`, etc.)
- After discovering useful channel IDs and names (from `channel list`, `snapshot`, etc.)
- After discovering user IDs and names (from `user list`, `user me`, etc.)
- After the user gives you an alias or preference ("call this the standup channel", "my main team is X")
- After discovering channel structure (standard vs private channels)
When writing, include the **complete file content** — the `Write` tool overwrites the entire file.
What to Store
- Team IDs with names
- Channel IDs with names and team context
- User IDs with display names
- User-given aliases ("standup channel", "main team")
- Account preferences (work vs personal)
- Any user preference expressed during interaction
What NOT to Store
Never store tokens, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.
Handling Stale Data
If a memorized ID returns an error (channel not found, team not found), remove it from `MEMORY.md`. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.
Format / Example
# Agent Messenger Memory
## Teams
- `team-id-1` — Acme Corp (default, work account)
- `team-id-2` — Side Project (personal account)
## Channels (Acme Corp)
- `channel-id-1` — General
- `channel-id-2` — Engineering
- `channel-id-3` — Standups
## Users (Acme Corp)
- `user-id-1` — Alice (engineering lead)
- `user-id-2` — Bob (backend)
Read more
name: agent-teams
description: Interact with Microsoft Teams - send messages, read channels, manage reactions
version: 2.36.0
allowed-tools: Bash(agent-teams:*)
metadata:
openclaw:
requires:
bins:
- agent-teams
install:
- kind: node
package: agent-messenger
bins: [agent-teams]Agent Teams
A TypeScript CLI tool that enables AI agents and humans to interact with Microsoft Teams through a simple command interface. Features seamless token extraction from the Teams desktop app (with browser fallback) and multi-team support.
Quick Start
# Get team snapshot (credentials are extracted automatically) agent-teams snapshot # Send a message agent-teams message send <team-id> <channel-id> "Hello from AI agent!" # List channels agent-teams channel list <team-id>
Authentication
Two co-equal ways to sign in — pick whichever fits:
1. **`agent-teams auth login`** (work/school **or** personal Microsoft accounts) — device-code sign-in. Open the printed URL, enter the code, and approve in your browser. No desktop app or browser extraction needed. It prompts for your Microsoft email (or pass `--email <email>`) and auto-detects work vs personal, then starts the matching flow; pass `--account-type work|personal` to force it and skip detection. Only `auth login` stores the AAD refresh token required by `message search`. 2. **`agent-teams auth extract`** — zero-config extraction from the Teams desktop app, falling back to a Chromium browser. Best when you're already signed into Teams locally. Yields a Skype token only — sufficient for messaging, but **not** for `message search` (see below).
Credentials are also extracted automatically on first use of any command if none are stored, so `auth extract` can happen silently in the background.
Teams tokens are short-lived (60-90 minutes for extraction, a few hours for device-code). **Device-code accounts (`auth login`) refresh silently** — the CLI re-mints an expired token from the stored refresh token with no re-login needed. Extraction accounts re-extract automatically as long as you're still signed into the Teams desktop app or a supported browser; if that fails, re-run `auth extract` (or switch to `auth login`).
Non-interactive `auth login` (agents / CI)
When there's no TTY, `auth login` splits into two calls:
# 1. Start — returns verification_uri, user_code, and device_code as JSON. # Pass --email to auto-detect the account type (no prompt without a TTY), # or --account-type work|personal to force it. agent-teams auth login --email <email> # 2. After the user approves in a browser, finish with the device_code agent-teams auth login --device-code <device_code>
`--client-id <id>` overrides the AAD client ID on either call (or set `AGENT_TEAMS_CLIENT_ID`). `--account-type <work|personal>` selects the account (default `work`); it is preserved across the two-call flow, so pass it to both calls when signing in to a personal account non-interactively.
Multi-Team Support
# List all available teams agent-teams team list # Switch to a different team agent-teams team switch <team-id> # Show current team agent-teams team current # Check auth status (includes token expiry info) agent-teams auth status
Multi-Account Support (Work / Personal)
# Switch between work and personal accounts agent-teams auth switch-account work agent-teams auth switch-account personal # Use a specific account for one command (without switching) agent-teams snapshot --account work
Memory
The agent maintains a `~/.config/agent-messenger/MEMORY.md` file as persistent memory across sessions. This is agent-managed — the CLI does not read or write this file. Use the `Read` and `Write` tools to manage your memory file.
Reading Memory
At the **start of every task**, read `~/.config/agent-messenger/MEMORY.md` using the `Read` tool to load any previously discovered team IDs, channel IDs, user IDs, and preferences.
- If the file doesn't exist yet, that's fine — proceed without it and create it when you first have useful information to store.
- If the file can't be read (permissions, missing directory), proceed without memory — don't error out.
Writing Memory
After discovering useful information, update `~/.config/agent-messenger/MEMORY.md` using the `Write` tool. Write triggers include:
- After discovering team IDs and names (from `team list`, `snapshot`, etc.)
- After discovering useful channel IDs and names (from `channel list`, `snapshot`, etc.)
- After discovering user IDs and names (from `user list`, `user me`, etc.)
- After the user gives you an alias or preference ("call this the standup channel", "my main team is X")
- After discovering channel structure (standard vs private channels)
When writing, include the **complete file content** — the `Write` tool overwrites the entire file.
What to Store
- Team IDs with names
- Channel IDs with names and team context
- User IDs with display names
- User-given aliases ("standup channel", "main team")
- Account preferences (work vs personal)
- Any user preference expressed during interaction
What NOT to Store
Never store tokens, credentials, or any sensitive data. Never store full message content (just IDs and channel context). Never store file upload contents.
Handling Stale Data
If a memorized ID returns an error (channel not found, team not found), remove it from `MEMORY.md`. Don't blindly trust memorized data — verify when something seems off. Prefer re-listing over using a memorized ID that might be stale.
Format / Example
# Agent Messenger Memory ## Teams - `team-id-1` — Acme Corp (default, work account) - `team-id-2` — Side Project (personal account) ## Channels (Acme Corp) - `channel-id-1` — General - `channel-id-2` — Engineering - `channel-id-3` — Standups ## Users (Acme Corp) - `user-id-1` — Alice (engineering lead) - `user-id-2` — Bob (backend)
Your agent messages as you — not as a bot One CLI for Slack, Discord, Teams, Webex, Telegram, WhatsApp, LINE, WeChat, iMessage, Instagram, KakaoTalk, and Channel Talk.
Repo: agent-messenger/agent-messenger
Other skills on agent-messenger.
- /agent-channeltalk
Interact with Channel Talk using extracted desktop app or browser credentials - read chats, send messages, search messages, manage groups
Open skill - /agent-channeltalkbot
Interact with Channel Talk workspaces using API credentials - send messages, read chats, manage groups and bots
Open skill - /agent-discord
Interact with Discord servers - send messages, read channels, manage reactions
Open skill - /agent-discordbot
Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
Open skill - /agent-imessage
Interact with iMessage on a Mac via the imsg tool - send messages, read chats, watch for new messages
Open skill - /agent-instagram
Interact with Instagram DMs - send messages, read conversations, manage accounts
Open skill

