Skip to content

Communication matrix

AgentX supports every communication path: human-to-agent (H2A), agent-to-human (A2H), agent-to-agent (A2A), cross-channel, and cross-mesh.

Matrix

PathTelegramWhatsAppDiscordGitLabHTTP API
H2A (human → agent)mention / DMroutemention / DM@usernamePOST /task
A2H reply (agent → human, same thread)streaming editstext chunkstextper-agent tokenJSON
A2H initiate (agent → human, proactive)POST /sendPOST /sendPOST /sendPOST /send
A2A delegation (agent → agent)per-account bot chainshared number + name prefixshared + name prefix@mention webhook
Cross-channel (receive on X, send on Y)POST /sendPOST /sendPOST /sendPOST /send
Cross-mesh (delegate to remote node)mesh taskmesh taskmesh taskmesh taskPOST /mesh/task

POST /send — proactive outbound

Agents can initiate messages on any channel, not just reply:

bash
curl -X POST http://localhost:19900/send \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "telegram",
    "chatId": "-1001234567890",
    "text": "Deploy complete ✓",
    "agentId": "devops",
    "accountId": "default"
  }'

This enables H2A2H chains: a human asks an agent on GitLab to notify someone on WhatsApp. The agent calls /send to deliver across channels.

POST /task — HTTP entry point for H2A

bash
curl -X POST http://localhost:19900/task \
  -H "Content-Type: application/json" \
  -d '{"agent":"support","message":"What is our refund policy?"}'

Response is a streamed SSE feed of the agent's reply. Also available via agentx daemon send <agent> <message>.

POST /mesh/task — cross-node delegation

bash
curl -X POST http://localhost:18800/mesh/task \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $MESH_TOKEN" \
  -d '{"peer":"clawd-server","agent":"devops","message":"Check disk free"}'

See Journey 8 — Mesh federation for the full setup.

GitLab — first-class agent identity

ConcernBehavior
Per-agent identityEach agent owns a GitLab user + PAT. Agents comment as themselves.
Deterministic @mention routingAgent usernames are resolved from tokens at startup via the GitLab API. No manual mapping.
Bot-to-bot handoffQA @mentions devops; devops picks it up automatically.
Eye reactionAgents react with 👀 using their own token (never the global one).
Cascade preventionHidden <!-- agentx:agentId --> signature + sent-note dedup + bot-user detection.
Human mention filteringNotes mentioning a non-agent user are ignored.
Image attachmentsScreenshots in comments are downloaded and passed to the agent.

Channel-specific notes

  • Telegram — multi-account bots, streaming edits with typing indicator, block-stream chunks at ~60 chars.
  • WhatsApp — Baileys integration, QR pairing first run, per-contact/group routing, shared-number A2A with name prefix.
  • Discord — mention-based routing, DM support.
  • Webhooks — generic POST /webhook/:agentId[/:source] for Stripe, Sentry, GitHub, etc.
  • Voice / /ask — short-form prompt endpoint tuned for Siri-style integrations (POST /ask).

Released under the MIT License.