#i am having problem with making agents communicate to each other.

1 messages · Page 1 of 1 (latest)

forest epoch
#

i need somthing to trigger heartbeat so they would checj thier inboexes. tg doesnt work, bots cant see bots messages.

steady nightBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

regal fieldBOT
#

Yep — don’t use Telegram bot-to-bot messages for this. Use OpenClaw’s native wake path instead.

First: what openclaw --version are you on?

Assuming a recent version, the trigger you want is:

openclaw system event --text "Check your inboxes now" --mode now

That enqueues a system event and triggers heartbeat immediately. If multiple agents have heartbeat configured, it wakes those agent heartbeats.

For an external process/webhook, use:

POST /hooks/wake
#
{
  "text": "Check your inboxes now",
  "mode": "now"
}

So the pattern should be:

  1. Each agent has an inbox somewhere it can read: file, DB, queue, etc.
  2. HEARTBEAT.md says: “Check your inbox; if nothing relevant, reply HEARTBEAT_OK.”
  3. When Agent A writes to Agent B’s inbox, trigger:
openclaw system event --text "New agent inbox item; check inboxes" --mode now
forest epoch
#

agents are in different containers

regal fieldBOT
#

Ah, then use HTTP hooks between containers, not local CLI.

In each target agent container, enable hooks:

{
  hooks: {
    enabled: true,
    token: "use-a-random-shared-secret",
    path: "/hooks"
  }
}

Then from another container call the target Gateway:

#
curl -X POST http://agent-b:18789/hooks/wake \
  -H "Authorization: Bearer use-a-random-shared-secret" \
  -H "Content-Type: application/json" \
  -d '{"text":"New inbox item from another agent; check your inbox","mode":"now"}'

Docker-compose pattern:

services:
  agent-a:
    networks: [agents]
  agent-b:
    networks: [agents]
    ports:
#
      - "127.0.0.1:18789:18789" # optional; internal service name works without exposing publicly
networks:
  agents:

Important bits:

  • Put the agents on the same Docker network.
  • Use the service name, e.g. http://agent-b:18789/hooks/wake.
  • Keep hooks private to Docker/tailnet/localhost; don’t expose them publicly.
  • Use a hooks token, not the gateway token.
  • Still add HEARTBEAT.md in each agent workspace telling it to check its inbox.

Docs: https://docs.openclaw.ai/gateway/heartbeat and https://docs.openclaw.ai/automation/cron-jobs#post-hookswake