← Back to Skills Marketplace
devxoul

Agent Teams

by Jeon Suyeol · GitHub ↗ · v1.10.5
cross-platform ⚠ suspicious
684
Downloads
0
Stars
4
Active Installs
12
Versions
Install in OpenClaw
/install agent-teams
Description
Interact with Microsoft Teams - send messages, read channels, manage reactions
README (SKILL.md)

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 and multi-team support.

Quick Start

# Get team snapshot (credentials are extracted automatically)
agent-teams snapshot

# Send a message
agent-teams message send \x3Cteam-id> \x3Cchannel-id> "Hello from AI agent!"

# List channels
agent-teams channel list \x3Cteam-id>

Authentication

Credentials are extracted automatically from the Teams desktop app on first use. No manual setup required — just run any command and authentication happens silently in the background.

Teams tokens expire in 60-90 minutes. The CLI automatically re-extracts a fresh token when the current one expires, so you don't need to manage token lifecycle manually.

IMPORTANT: NEVER guide the user to open a web browser, use DevTools, or manually copy tokens from a browser. Always use agent-teams auth extract to obtain tokens from the desktop app.

Multi-Team Support

# List all available teams
agent-teams team list

# Switch to a different team
agent-teams team switch \x3Cteam-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)

## Aliases

- "standup" → `channel-id-3` (Standups in Acme Corp)
- "main team" → `team-id-1` (Acme Corp)

## Notes

- User prefers work account by default
- Main team is "Acme Corp"

Memory lets you skip repeated channel list and team list calls. When you already know an ID from a previous session, use it directly.

Commands

Auth Commands

# Extract token from Teams desktop app (usually automatic)
agent-teams auth extract
agent-teams auth extract --debug

# Check auth status (includes token expiry info)
agent-teams auth status

# Logout from Microsoft Teams
agent-teams auth logout

# Switch between work and personal accounts
agent-teams auth switch-account \x3Caccount-type>
agent-teams auth switch-account work
agent-teams auth switch-account personal

Message Commands

# Send a message
agent-teams message send \x3Cteam-id> \x3Cchannel-id> \x3Ccontent>
agent-teams message send \x3Cteam-id> 19:[email protected] "Hello world"

# List messages
agent-teams message list \x3Cteam-id> \x3Cchannel-id>
agent-teams message list \x3Cteam-id> 19:[email protected] --limit 50

# Get a single message by ID
agent-teams message get \x3Cteam-id> \x3Cchannel-id> \x3Cmessage-id>

# Delete a message
agent-teams message delete \x3Cteam-id> \x3Cchannel-id> \x3Cmessage-id> --force

Channel Commands

# List channels in a team
agent-teams channel list \x3Cteam-id>

# Get channel info
agent-teams channel info \x3Cteam-id> \x3Cchannel-id>
agent-teams channel info \x3Cteam-id> 19:[email protected]

# Get channel history (alias for message list)
agent-teams channel history \x3Cteam-id> \x3Cchannel-id> --limit 100

Team Commands

# List all teams
agent-teams team list

# Get team info
agent-teams team info \x3Cteam-id>

# Switch active team
agent-teams team switch \x3Cteam-id>

# Show current team
agent-teams team current

# Remove a team from config
agent-teams team remove \x3Cteam-id>

User Commands

# List team members
agent-teams user list \x3Cteam-id>

# Get user info
agent-teams user info \x3Cuser-id>

# Get current user
agent-teams user me

Reaction Commands

# Add reaction (use emoji name)
agent-teams reaction add \x3Cteam-id> \x3Cchannel-id> \x3Cmessage-id> \x3Cemoji>
agent-teams reaction add \x3Cteam-id> 19:[email protected] 1234567890 like

# Remove reaction
agent-teams reaction remove \x3Cteam-id> \x3Cchannel-id> \x3Cmessage-id> \x3Cemoji>

File Commands

# Upload file
agent-teams file upload \x3Cteam-id> \x3Cchannel-id> \x3Cpath>
agent-teams file upload \x3Cteam-id> 19:[email protected] ./report.pdf

# List files in channel
agent-teams file list \x3Cteam-id> \x3Cchannel-id>

# Get file info
agent-teams file info \x3Cteam-id> \x3Cchannel-id> \x3Cfile-id>

Snapshot Command

Get comprehensive team state for AI agents:

# Full snapshot
agent-teams snapshot

# Filtered snapshots
agent-teams snapshot --channels-only
agent-teams snapshot --users-only

# Limit messages per channel
agent-teams snapshot --limit 10

Returns JSON with:

  • Team metadata (id, name)
  • Channels (id, name, type, description)
  • Recent messages (id, content, author, timestamp)
  • Members (id, displayName, email)

Output Format

JSON (Default)

All commands output JSON by default for AI consumption:

{
  "id": "19:[email protected]",
  "content": "Hello world",
  "author": "John Doe",
  "timestamp": "2024-01-15T10:30:00.000Z"
}

Pretty (Human-Readable)

Use --pretty flag for formatted output:

agent-teams channel list --pretty

Key Differences from Discord/Slack

Feature Teams Discord Slack
Server terminology Team Guild Workspace
Channel identifiers UUID format (19:[email protected]) Snowflake IDs Channel name or ID
Token storage Cookies SQLite LevelDB LevelDB
Token expiry 60-90 minutes Rarely expires Rarely expires
Mentions \x3Cat id="user-id">Name\x3C/at> \x3C@user_id> \x3C@USER_ID>

Important: Teams uses UUID-style channel IDs (like 19:[email protected]). You cannot use channel names directly - use channel list to find IDs first.

Common Patterns

See references/common-patterns.md for typical AI agent workflows.

Templates

See templates/ directory for runnable examples:

  • post-message.sh - Send messages with error handling
  • monitor-channel.sh - Monitor channel for new messages (with token refresh)
  • team-summary.sh - Generate team summary

Error Handling

All commands return consistent error format:

{
  "error": "Not authenticated. Run \"auth extract\" first."
}

Common errors:

  • Not authenticated: No valid token (auto-extraction failed — see Troubleshooting)
  • Token expired: Token has expired and auto-refresh failed — see Troubleshooting
  • No current team set: Run team switch \x3Cid> first
  • Message not found: Invalid message ID
  • Channel not found: Invalid channel ID
  • 401 Unauthorized: Token expired and auto-refresh failed — see Troubleshooting

Configuration

Credentials stored in: ~/.config/agent-messenger/teams-credentials.json

Format:

{
  "token": "skypetoken_asm_value_here",
  "token_extracted_at": "2024-01-15T10:00:00.000Z",
  "current_team": "team-uuid-here",
  "teams": {
    "team-uuid-here": {
      "team_id": "team-uuid-here",
      "team_name": "My Team"
    }
  }
}

Security: File permissions set to 0600 (owner read/write only)

Limitations

  • No real-time events / WebSocket connection
  • No voice/video channel support
  • No team management (create/delete channels, roles)
  • No meeting support
  • No webhook support
  • Plain text messages only (no adaptive cards in v1)
  • User tokens only (no app tokens)
  • Token expires in 60-90 minutes - auto-refreshed, but requires Teams desktop app to be logged in

Troubleshooting

Authentication fails or token expired

Credentials and token refresh are normally handled automatically. If auto-extraction fails, run it manually with debug output:

agent-teams auth extract --debug

Common causes:

  • Teams desktop app is not installed or not logged in
  • Teams Cookies database is locked or inaccessible
  • Token expired and Teams desktop app session also expired (re-login to Teams)

agent-teams: command not found

agent-teams is NOT the npm package name. The npm package is agent-messenger.

If the package is installed globally, use agent-teams directly:

agent-teams team list

If the package is NOT installed, use bunx agent-messenger teams:

bunx agent-messenger teams team list

NEVER run bunx agent-teams — it will fail or install a wrong package since agent-teams is not the npm package name.

References

Usage Guidance
This skill appears to do what it says (manage Microsoft Teams), but it performs sensitive local operations: the CLI will scan your Teams desktop app data directories and extract the skypetoken_asm cookie to authenticate, and it will store that token (plaintext) under ~/.config/agent-messenger/. Before installing, consider: 1) review the agent-messenger package source code (or vendor) to confirm how token extraction and storage are implemented; 2) be aware you may need to grant your terminal/full-disk access to read Teams data (macOS) which increases exposure; 3) storing tokens in plaintext means anyone with access to your user account could reuse them (though tokens expire in ~60–90 minutes); 4) if you have strict security/compliance needs, run this tool in an isolated environment or decline installation; 5) ask the publisher to update registry metadata to declare required config paths (Teams app data locations) so the access is explicit. If you want, I can list precise questions to ask the maintainer or suggest safer alternatives (official Microsoft Graph API integrations) that use managed API credentials instead of local cookie extraction.
Capability Analysis
Type: OpenClaw Skill Name: agent-teams Version: 1.10.5 The bundle facilitates Microsoft Teams interaction by automatically extracting session tokens from the desktop app's SQLite cookie database via the `agent-teams auth extract` command. While this is the stated purpose, the 'silent' background extraction of sensitive authentication cookies is a high-risk behavior. Furthermore, SKILL.md contains explicit instructions for the AI agent to avoid manual authentication methods and to maintain persistent state in a local MEMORY.md file, which could be leveraged for unauthorized access or data persistence if the underlying agent-messenger NPM package is untrusted.
Capability Assessment
Purpose & Capability
The name/description (interact with Teams) align with the code and scripts: they call a CLI (agent-teams) that lists teams/channels, sends messages, monitors channels, etc. However, the SKILL.md and reference docs describe reading the Teams desktop app cookie DB (skypetoken_asm) and storing tokens locally — a legitimate but invasive technique that was not declared in the registry metadata (no required config paths).
Instruction Scope
Runtime instructions explicitly direct the agent/tool to locate and read Teams desktop app data directories and the Cookies SQLite DB on macOS/Linux/Windows, extract skypetoken_asm, and store tokens in ~/.config/agent-messenger/teams-credentials.json. The SKILL.md also instructs the agent to always read and sometimes overwrite a persistent memory file (~/.config/agent-messenger/MEMORY.md) at the start of every task. Those filesystem reads/writes go beyond the declared requirements and involve sensitive local tokens.
Install Mechanism
Install spec is a Node package (agent-messenger) that creates the agent-teams binary. Installing an npm/Node package is a common approach; it is a moderate-risk install because it writes and runs third-party code on the host. No remote ad-hoc downloads or obscure URLs were present in the manifest.
Credentials
No environment variables are requested, which is consistent, but the skill requires access to local Teams app data (Cookies DB) and will store tokens in plaintext at ~/.config/agent-messenger/teams-credentials.json (permissions 0600 recommended). That access to local credentials is sensitive and should be justified/explicitly declared in metadata; storing tokens in plaintext increases risk if the file or machine is compromised.
Persistence & Privilege
The skill uses a per-user persistent memory file (~/.config/agent-messenger/MEMORY.md) for agent state; it does not declare an always:true privilege and does not modify other skills. Persisting IDs/aliases across sessions is reasonable for a messaging integration, but the instructions require the agent to read this file at the start of every task which gives the skill persistent context across agent runs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-teams
  3. After installation, invoke the skill by name or use /agent-teams
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.10.5
- Documentation updated for version 1.10.5. - No changes to code or functionality; only SKILL.md was modified.
v1.10.4
**This release adds agent memory guidance and strengthens authentication safety instructions.** - Expanded SKILL.md with detailed instructions on using `MEMORY.md` for agent-managed persistent memory (IDs, aliases, user preferences). - Clarifies best practices: always use `agent-teams auth extract` for authentication; never instruct users to manually extract tokens or use browser tools. - Emphasizes not to store sensitive data or message/file contents in memory. - Advises on how to handle stale IDs and keep memory data current. - No CLI/command changes. Documentation only.
v1.10.3
- Documentation updated to reflect version 1.10.3. - No functional changes; SKILL.md version field incremented only. - All usage examples, command references, and CLI behaviors remain unchanged.
v1.10.2
- SKILL.md updated to version 1.10.2. - No functional or feature changes; only the version number was incremented in the documentation.
v1.10.1
- Version bump from 1.10.0 to 1.10.1 in SKILL.md. - No other changes; documentation and commands remain the same.
v1.10.0
- Version bumped to 1.10.0. - Documentation updated in SKILL.md; no feature or command changes listed. - No new commands, flags, or behavioral differences introduced in this release.
v1.9.3
- Bumped version to 1.9.3. - Documentation update only: SKILL.md modified, no changes to features, APIs, or commands. - No user-facing or behavioral changes in this release.
v1.9.2
- Documentation update only: SKILL.md updated to version 1.9.2. - No functional or CLI changes; all usage, features, and limitations remain the same. - Version number updated for SKILL.md consistency.
v1.9.1
- Bump version to 1.9.1 in SKILL.md. - No functional or documentation changes beyond version update.
v1.9.0
- Version updated to 1.9.0 in documentation. - No new features, fixes, or functional changes documented—metadata update only. - All command references, usage, and documentation remain unchanged.
v1.8.1
- Added documentation for multi-account support, including commands to switch between work and personal Microsoft Teams accounts. - Expanded authentication section with new "auth switch-account" and usage of `--account` flag for commands. - Updated team commands to include "team remove". - Added an "Auth Commands" section detailing all authentication-related CLI options. - Clarified quick start and usage examples for new account-related options.
v1.8.0
- Automatic extraction and refresh of Microsoft Teams tokens from the desktop app; no manual authentication setup required. - Full multi-team support: list, switch, and show current team directly from the CLI. - Expanded command set: manage messages, reactions, users, files, channels, snapshots, and team info—all via simple CLI commands. - All outputs default to JSON for easy integration; add `--pretty` for human-readable output. - Improved error handling with consistent JSON error messages and troubleshooting guidance. - Security and credentials management: tokens stored securely with proper file permissions.
Metadata
Slug agent-teams
Version 1.10.5
License
All-time Installs 4
Active Installs 4
Total Versions 12
Frequently Asked Questions

What is Agent Teams?

Interact with Microsoft Teams - send messages, read channels, manage reactions. It is an AI Agent Skill for Claude Code / OpenClaw, with 684 downloads so far.

How do I install Agent Teams?

Run "/install agent-teams" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Teams free?

Yes, Agent Teams is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Agent Teams support?

Agent Teams is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Teams?

It is built and maintained by Jeon Suyeol (@devxoul); the current version is v1.10.5.

💬 Comments