From agent-messenger
Interact with Cisco Webex via CLI: send messages, read spaces, list memberships, snapshot workspaces. Supports browser token extraction and OAuth for AI agents.
npx claudepluginhub agent-messenger/agent-messenger --plugin agent-channeltalkbotThis skill is limited to using the following tools:
A TypeScript CLI tool that enables AI agents and humans to interact with Cisco Webex through a simple command interface. Supports browser token extraction (zero-config, sends as you) and OAuth Device Grant flow.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
A TypeScript CLI tool that enables AI agents and humans to interact with Cisco Webex through a simple command interface. Supports browser token extraction (zero-config, sends as you) and OAuth Device Grant flow.
# Extract token from browser (Chrome, Edge, Arc, Brave) — messages appear as you
agent-webex auth extract
# Or: Log in via OAuth Device Grant (opens browser, messages show "via agent-messenger")
agent-webex auth login
# Get workspace snapshot
agent-webex snapshot
# Send a message
agent-webex message send <space-id> "Hello from AI agent!"
# List spaces
agent-webex space list
Webex supports two authentication methods:
agent-webex auth extract reads your Webex session token from Chrome, Edge, Arc, or Brave. You must be logged into web.webex.com in one of these browsers. No configuration needed.
# Extract token from browser — messages appear as you
agent-webex auth extract
# With debug output
agent-webex auth extract --debug
Supported browsers: Chrome, Chrome Canary, Edge, Arc, Brave, Vivaldi, Chromium
How it works: The Webex web client stores its authentication token in the browser's localStorage. This CLI reads it directly from the browser's LevelDB files — no browser automation, no password prompts. The token is stored locally in ~/.config/agent-messenger/.
When to re-extract: Browser tokens expire. When your token expires, re-run agent-webex auth extract or let auto-extraction handle it (the CLI attempts extraction automatically on each run).
agent-webex auth login starts the Device Grant flow: it displays a verification URL and user code, then opens the browser. You enter the code at the verification page and approve access. The CLI polls for the token automatically. Access and refresh tokens are stored locally, and the access token auto-refreshes via the refresh token.
Note: Messages sent via OAuth Device Grant show "via agent-messenger" because the token is associated with a third-party Webex Integration.
Optionally, pass --token <bot-token> for bot token auth. Or pass --client-id <id> --client-secret <secret> to use your own Webex Integration credentials instead of the built-in ones.
Env vars AGENT_WEBEX_CLIENT_ID / AGENT_WEBEX_CLIENT_SECRET can also override the built-in credentials.
# Log in (Device Grant flow, opens browser)
agent-webex auth login
# Log in with custom Integration credentials
agent-webex auth login --client-id <id> --client-secret <secret>
# Log in with a bot token
agent-webex auth login --token <token>
# Check auth status
agent-webex auth status
# Log out
agent-webex auth logout
--token flag. Never expires. Best for CI/CD.--client-id + --client-secret or set env vars for your own Webex Integration.IMPORTANT: NEVER guide the user to open a web browser, use DevTools, or manually copy tokens from a browser's network inspector. Always use agent-webex auth extract or agent-webex auth login for authentication.
For detailed token management, see references/authentication.md.
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.
At the start of every task, read ~/.config/agent-messenger/MEMORY.md using the Read tool to load any previously discovered space IDs, member info, and preferences.
After discovering useful information, update ~/.config/agent-messenger/MEMORY.md using the Write tool. Write triggers include:
space list, snapshot, etc.)member list, etc.)When writing, include the complete file content. The Write tool overwrites the entire file.
Never store tokens, credentials, or any sensitive data. Never store full message content (just IDs and space context).
If a memorized ID returns an error (space not found, member 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.
# Agent Messenger Memory
## Spaces
- `space-id-1` — Engineering (group)
- `space-id-2` — Alice / Bob (direct)
- `space-id-3` — Standups (group)
## Members (Engineering)
- `person-id-1` — Alice Chen (engineering lead)
- `person-id-2` — Bob Park (backend)
## Aliases
- "standup" -> `space-id-3` (Standups)
- "eng" -> `space-id-1` (Engineering)
## Notes
- Using bot token (no expiry)
- Main space is "Engineering"
Memory lets you skip repeated
space listandmember listcalls. When you already know an ID from a previous session, use it directly.
# Log in (Device Grant flow, opens browser)
agent-webex auth login
# Log in with custom Integration credentials
agent-webex auth login --client-id <id> --client-secret <secret>
# Log in with a bot token
agent-webex auth login --token <token>
# Check auth status
agent-webex auth status
# Log out
agent-webex auth logout
# Show current authenticated user
agent-webex whoami
agent-webex whoami --pretty
Output includes the authenticated user's identity information.
# List spaces
agent-webex space list
agent-webex space list --type group
agent-webex space list --type direct
agent-webex space list --limit 20
# Get space info
agent-webex space info <space-id>
# Send a message
agent-webex message send <space-id> <text>
agent-webex message send <space-id> "Hello world"
# Send a markdown message
agent-webex message send <space-id> "**Bold** and _italic_" --markdown
# List messages in a space
agent-webex message list <space-id>
agent-webex message list <space-id> --limit 50
# Get a single message by ID
agent-webex message get <message-id>
# Delete a message
agent-webex message delete <message-id>
agent-webex message delete <message-id> --force
# Edit a message
agent-webex message edit <message-id> <space-id> <text>
agent-webex message edit <message-id> <space-id> "Updated text" --markdown
# List members of a space
agent-webex member list <space-id>
agent-webex member list <space-id> --limit 100
Get workspace overview for AI agents (brief by default):
# Brief snapshot (default) — fast, minimal output
agent-webex snapshot
# Full snapshot — includes type and lastActivity
agent-webex snapshot --full
Default returns brief JSON with:
With --full, returns:
For messages or members, use message list <space-id> or member list <space-id>.
All commands output JSON by default for AI consumption:
{
"id": "Y2lzY29zcGFyazovL...",
"text": "Hello world",
"personEmail": "alice@example.com",
"created": "2024-01-15T10:30:00.000Z"
}
Use --pretty flag for formatted output:
agent-webex space list --pretty
All commands return consistent error format:
{
"error": "Not authenticated. Run \"auth login\" first."
}
Common errors:
Not authenticated: No valid token. Run auth login firstDevice authorization timed out: User didn't complete verification in time. Run auth login again.401 Unauthorized: Token expired or invalid. Re-run auth login429 Too Many Requests: Rate limited. Wait and retry (Webex allows ~600 requests per minute)404 Not Found: Invalid space ID, message ID, or resourceSpace not found: Invalid space IDMessage not found: Invalid message IDCredentials stored in ~/.config/agent-messenger/webex-credentials.json (0600 permissions):
{
"accessToken": "...",
"refreshToken": "...",
"expiresAt": 1234567890,
"clientId": "...",
"clientSecret": "..."
}
See references/authentication.md for format and security details.
WebexClient is available as a TypeScript SDK for building scripts and automations.
import { WebexClient } from 'agent-messenger/webex'
const client = await new WebexClient().login()
// List spaces
const spaces = await client.listSpaces()
// List members in a space
const members = await client.listMembers(spaces[0].id)
// Send a message
const msg = await client.sendMessage(spaces[0].id, 'Hello from SDK!')
// Send markdown
await client.sendMessage(spaces[0].id, '**Status**: All systems go', { markdown: true })
See the Webex SDK documentation for complete method signatures, types, schemas, and examples.
OAuth tokens auto-refresh, so expiration is handled automatically. If a refresh fails (revoked access, network issues), re-run:
agent-webex auth login
Bot tokens never expire and don't need refreshing.
agent-webex: command not foundagent-webex is NOT the npm package name. The npm package is agent-messenger.
If the package is installed globally, use agent-webex directly:
agent-webex space list
If the package is NOT installed, use npx -y by default. Do NOT ask the user which package runner to use. Just run it:
npx -y agent-messenger webex space list
bunx agent-messenger webex space list
pnpm dlx agent-messenger webex space list
If you already know the user's preferred package runner (e.g.,
bunx,pnpm dlx), use that instead.
NEVER run npx agent-webex, bunx agent-webex, or pnpm dlx agent-webex. It will fail or install a wrong package since agent-webex is not the npm package name.
Webex allows roughly 600 API calls per minute. If you hit a 429, wait a few seconds and retry. For bulk operations, add a sleep 1 between requests.
For auth troubleshooting (token types, storage, permissions), see references/authentication.md.