MCPcopy Index your code
hub / github.com/agent-messenger/agent-messenger

github.com/agent-messenger/agent-messenger @2.29.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.29.0 ↗ · + Follow
3,753 symbols 12,278 edges 662 files 10 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Agent Messenger

npm platform platform platform platform platform platform platform platform platform platform platform platform

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. Credentials extracted from desktop apps and browsers, or authenticated in seconds — no API keys, no OAuth, no admin approval. TypeScript SDK included.

[!TIP] 🎉 Agent Messenger powers multi-channel messaging in TypeClaw, a TypeScript-native agent runtime.

Table of Contents

Why Agent Messenger?

You shouldn't need a bot token to send a message.

Every platform gates API access behind OAuth apps that need admin approval — days of waiting just to send a message. And even then, your agent is a bot, not you. Different name, different permissions, different context.

Agent Messenger reads session tokens from your Slack, Discord, Teams, KakaoTalk, or Channel Talk desktop app — zero config. If the desktop app isn't installed, it falls back to extracting from Chromium browsers, with auth extract --browser-profile <path> for custom Chromium profile locations. Webex and Instagram tokens are extracted directly from browsers. Telegram authenticates with a one-time phone code, and WhatsApp with a QR code or pairing code. Either way, your agent operates as you — same name, same permissions, same context. Bot tokens are fully supported too for server-side and CI/CD use cases.

[!TIP] For Slack and Discord, QR code sign-in (auth qr) is the recommended way to authenticate — it's the safest and most reliable method. It signs you in through the platform's own login flow instead of reading credentials off disk, and works even without the desktop app. See the Slack and Discord auth guides.

  • QR Code Sign-In (Slack & Discord) — The recommended, safest auth: sign in through the platform's official flow, no credential extraction and no desktop app required (Discord scans with the mobile app)
  • Auto-Extract Auth — Reads tokens from Slack, Discord, Teams, KakaoTalk, and Channel Talk desktop apps, with browser fallback and custom Chromium profile paths via --browser-profile. Webex and Instagram tokens extracted from Chromium browsers. Telegram and WhatsApp authenticate with a one-time code — still under a minute
  • Act As Yourself — Extracts your user session — not a bot token. Your agent sends messages, reacts, and searches as you. Need bot mode? Bot CLIs are included too
  • One Interface — Consistent command style across 12 platforms for supported actions (e.g. message send, message search, channel list, snapshot). Learn once
  • Agent-Native Output — JSON by default for LLM tool use. --pretty for human-readable. Structured output your agent can parse and act on
  • Token Efficient — CLI, not MCP. One skill file, one shell command per action. No server to run, no tool registration. (Why not MCP?)
  • Persistent Memory — Stores workspace IDs, channel mappings, and preferences in ~/.config so your agent never asks twice
  • TypeScript SDK — Import clients directly into your app. Full type safety with Zod schemas

Installation

CLI (global install for terminal / AI agent use):

npm install -g agent-messenger

SDK (project dependency for programmatic use):

npm install agent-messenger

The global install gives you all platform CLIs. The project install gives you both CLIs and the TypeScript SDK.

This installs:

  • agent-slack — Slack CLI (user token, zero-config, or QR code sign-in)
  • agent-slackbot — Slack Bot CLI (bot token, for server-side/CI/CD)
  • agent-discord — Discord CLI (token extraction, or QR code sign-in via the mobile app)
  • agent-discordbot — Discord Bot CLI (bot token, for server-side/CI/CD)
  • agent-teams — Microsoft Teams CLI
  • agent-webex — Cisco Webex CLI (browser token extraction with e2e encryption + OAuth Device Grant, zero-config)
  • agent-webexbot — Webex Bot CLI (bot token, for server-side/CI/CD with real-time Mercury WebSocket listener)
  • agent-telegram — Telegram CLI (user account via TDLib)
  • agent-telegrambot — Telegram Bot CLI (bot token, for server-side/CI/CD)
  • agent-whatsapp — WhatsApp CLI (user account via Baileys, QR code or pairing code auth)
  • agent-whatsappbot — WhatsApp Bot CLI (Cloud API, for server-side/CI/CD)
  • agent-line — LINE CLI (QR code login, Thrift protocol)
  • agent-wechatbot — WeChat Bot CLI (Official Account API, for server-side/CI/CD)
  • agent-imessage — iMessage CLI (runs on a Mac via the imsg tool)
  • agent-instagram — Instagram DM CLI (browser cookie extraction + username/password auth)
  • agent-kakaotalk — KakaoTalk CLI (sub-device login, LOCO protocol)
  • agent-channeltalk — Channel Talk CLI (beta, zero-config, extracted cookies)
  • agent-channeltalkbot — Channel Talk Bot CLI (beta, API credentials, for server-side/CI/CD)

Agent Skills

Agent Messenger includes Agent Skills that teach your AI agent how to use each CLI above. One skill per CLI — install only what you need.

SkillPad

SkillPad is a GUI app for Agent Skills. See skillpad.dev for more details.

Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad Available on SkillPad

Skills CLI

Skills CLI is a CLI tool for Agent Skills. See skills.sh for more details.

npx -y skills add agent-messenger/agent-messenger

Claude Code Plugin

claude plugin marketplace add agent-messenger/agent-messenger
claude plugin install agent-messenger

Or within Claude Code:

/plugin marketplace add agent-messenger/agent-messenger
/plugin install agent-messenger

Quick Start

Get up and running in 30 seconds:

# 1. See your workspace at a glance
agent-slack snapshot --pretty

# 2. Send a message
agent-slack message send general "Hello from the CLI!"

That's it. Credentials are extracted automatically from your Slack desktop app on first run. No OAuth flows. No API tokens. No configuration files.

No desktop app? QR code sign-in is the recommended way to authenticate Slack and Discord. In Slack, open "Sign in on mobile", copy the QR image, and pipe it in; in Discord, scan the printed QR with the mobile app:

bash pbpaste | agent-slack auth qr # paste Slack's "Sign in on mobile" QR agent-discord auth qr # scan the printed QR with the Discord app

Custom config directory

By default, Agent Messenger stores credentials, sync state, and derived-key caches under ~/.config/agent-messenger. To relocate everything (e.g. for CI sandboxes, multi-tenant setups, or non-default home directories), set the AGENT_MESSENGER_CONFIG_DIR environment variable:

export AGENT_MESSENGER_CONFIG_DIR="$HOME/.local/share/agent-messenger"
agent-slack auth extract

The variable is read on every CLI/SDK invocation and applies to all platforms (Slack, Discord, Teams, Webex, Telegram, WhatsApp, LINE, WeChat, iMessage, Instagram, KakaoTalk, Channel Talk, and their bot variants). Explicit configDir arguments to credential managers still take precedence.

Telegram Quick Start

Get up and running with Telegram in a minute:

bunx --package agent-messenger agent-telegram auth login

# Send a message
bunx --package agent-messenger agent-telegram message send <chat-id-or-@username> "Hello from the CLI!"

The CLI automatically provisions API credentials via my.telegram.org if needed. For CI/CD, set AGENT_TELEGRAM_API_ID and AGENT_TELEGRAM_API_HASH environment variables.

SDK

Use Agent Messenger as a TypeScript library. Each platform exports a typed client, credential manager, types, and Zod schemas.

Quick Example

import { SlackClient } from 'agent-messenger/slack'

const slack = await new SlackClient().login()
const channels = await slack.listChannels()
await slack.sendMessage(channels[0].id, 'Hello from the SDK!')

Credentials are resolved the same way as the CLI — auto-extracted from your desktop apps. Call .login() with no arguments for auto-extraction, or pass credentials explicitly:

const slack = await new SlackClient().login({ token: 'xoxc-...', cookie: 'xoxd-...' })

Available Imports

Import Path Client
agent-messenger/slack SlackClient
agent-messenger/slackbot SlackBotClient
agent-messenger/discord DiscordClient
agent-messenger/discordbot DiscordBotClient
agent-messenger/teams TeamsClient
agent-messenger/webex WebexClient
agent-messenger/webexbot WebexBotClient
agent-messenger/telegrambot TelegramBotClient
agent-messenger/whatsapp WhatsAppClient
agent-messenger/whatsappbot WhatsAppBotClient
agent-messenger/line `LineClie

Extension points exported contracts — how you extend this code

PlatformAdapter (Interface)
(no doc) [18 implementers]
src/tui/adapters/types.ts
WebexListenerClient (Interface)
(no doc) [6 implementers]
src/platforms/webex/listener.ts
ReadonlyStatement (Interface)
(no doc)
src/shared/sqlite.ts
Args (Interface)
(no doc)
scripts/kakao-loco-capture.ts
PageProps (Interface)
(no doc)
docs/src/app/docs/[[...slug]]/page.tsx
CLIResult (Interface)
(no doc)
e2e/helpers.ts
TrackedMessage (Interface)
(no doc)
e2e/discordbot.e2e.test.ts
PlatformState (Interface)
(no doc)
src/tui/app.ts

Core symbols most depended-on inside this repo

login
called by 789
src/tui/adapters/types.ts
formatOutput
called by 537
src/shared/utils/output.ts
runCLI
called by 276
e2e/helpers.ts
handleError
called by 265
src/shared/utils/error-handler.ts
on
called by 246
src/platforms/webex/listener.ts
parseJSON
called by 220
e2e/helpers.ts
close
called by 180
src/platforms/webex/encryption.ts
get
called by 169
src/platforms/line/e2ee-storage.ts

Shape

Method 1,588
Function 1,252
Interface 563
Class 350

Languages

TypeScript100%

Modules by API surface

src/platforms/kakaotalk/client.ts84 symbols
src/platforms/slack/client.ts75 symbols
src/platforms/webex/client.ts70 symbols
src/platforms/teams/client.ts69 symbols
src/platforms/instagram/client.ts60 symbols
src/platforms/webex/typings/webex-message-handler.d.ts50 symbols
src/platforms/slack/token-extractor.ts47 symbols
src/platforms/discord/client.ts45 symbols
src/platforms/telegram/types.ts44 symbols
src/tui/app.ts41 symbols
src/platforms/discord/token-extractor.ts39 symbols
src/platforms/discordbot/client.ts36 symbols

For agents

$ claude mcp add agent-messenger \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page