Grok Bot: Can I send it a message from outside?

I’m talking with my Grok Bot about how event listeners work for e.g. the Github Plugin - it looks like it can listen for events which is cool

How can I build a plugin for Grok Bot that lets my app send a listen event in?

I’d love to use it internally and/or publish it for others to use, thanks!

Context: I’m building comment.io, which would be a perfect complement for Grok Bot

Hi @max_winderbaum Thanks for the post and thanks for being an early Beta user of Grok Bot. Being able to have your Grok Bot respond to an inbound webhook event is a great idea, and we are tracking the ask. I’ll let you know if I have any updates to share here.

Right now, this behavior is pretty much available with Cursor Cloud Agent Automations, e.g:

1. Create an Automation with a webhook trigger.

2. Add a comment.io MCP server as a tool.

3. Have comment.io POST to the Automation’s private webhook endpoint.

That would start a Cursor cloud agent rather than wake an existing Grok Bot conversation. So I agree it would be cool to have this kind of capability added to Grok Bot.

Hey @kevinn - I’d love to be a design partner if / when you build it! I’m super invested in this feature being done right

I found a practical workaround. Grok Bot runs a private HTTP gateway on its computer, normally on port 1340. Its bearer token and connection details are stored at:

`/home/box/sand-data/gateway.json`

The safe way to access it externally is through an SSH tunnel rather than exposing port 1340 publicly:

ssh -L 1340:127.0.0.1:1340 box@YOUR_GROKBOT_HOST

I installed tailscale on the computer and it works great!

Retrieve the token securely:

TOKEN=$(ssh box@YOUR_GROKBOT_HOST \\
  'jq -r .token /home/box/sand-data/gateway.json')

List the available agents:


curl -sS -X POST http://127.0.0.1:1340/api/listAgents \\
  -H "Authorization: Bearer $TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{}'

Then send a message to an agent by UUID:


curl -sS -X POST http://127.0.0.1:1340/api/sendPrompt \\
  -H "Authorization: Bearer $TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{
    "agentId": "YOUR_AGENT_UUID",
    "prompt": "I just discovered grokbot, how awesome is it!!."
  }'

I’ve tested both listAgents and sendPrompt against a live Grok Bot installation.

Important caveat: this is an undocumented internal API, not an officially supported Cursor integration, so its routes or storage paths may change after an update. Treat the gateway token like a password and never expose port `1340` directly to the public internet. For production, put a narrow authenticated webhook relay in front of it.

Following up on inbound webhooks for an existing Grok Bot (not a new Cloud Agent).

We need a custom Slack bot (separate Slack app from Cursor’s) to wake a specific Grok Bot the moment someone DMs or @mentions it. Built-in Slack routine listeners go through Cursor’s Slack app, so they hear that app, not ours.

A webhook-trigger routine now exists on the Grok Bot side, which looks like the right shape. Creating one crashed the info pane (reading ‘platform’). I filed that as a Bug Report and pulled the routine so the pane works again.

Until that works, we’re polling Slack on a one-minute cron so staff messages aren’t dropped. That’s a workaround, not a product.

What we’d actually want: this Grok Bot is that Slack bot. Events for that bot wake this conversation. We already sent that via Help → Send Feedback too.

You said you were tracking inbound webhooks here. Happy to be a design partner on the Slack-bot case.

That would be great! I’m trying to figure out a way of doing it.

really excited for this feature so we can push to grok bot

Between my Hermes and Grok Bot they found this hacky way for 2-way comms

(Grok Bot already has ssh to Hermes and uses cli and/or api to initiate stuff)

Hermes triggers a Cursor Webhook

Grok Bot receives the kick, but no DATA is passed…

So, they agreed (without my intervention):

  • Hermes will write message in a file
  • Grok Bot will receive the wake event and read the file via ssh (tailscale)

Had the same problem as others, Cursor’s Slack connector posts as the logged-in human. That is me. It is not a bot. I probably found a slightly different solution

Grok Bot (the app) is not in Slack as itself either. If a reply goes through Cursor’s Slack integration, Slack shows the logged-in user’s name.

So I made a Slack app. You set that up at api.slack.com: Create New App → From a manifest. Grok Bot can write the JSON (I used the Hermes Slack manifest as a blueprint). Slack creates a bot user from that ( (at)GrokBot in my case). When the agent writes through that app, Slack shows the bot, not me.

I have an always-on Mac Mini (Hermes and other things live there too) with Grok Bot.app connected for local files and LAN.

Next to the app, a lightweight LaunchAgent listens to Slack in Socket Mode. No model is running while it waits.

Inbound:

  1. Slack delivers an event to that listener.
  2. The listener writes the payload to a local file.
  3. It POSTs to a Cursor webhook routine. That webhook is generic, not “Slack.” It only wakes the agent inside Grok Bot.app.
  4. The agent reads the file on the Mini and replies with Slack chat.postMessage as that bot user.

You cannot trust the webhook body, so a local listener that delivers the payload is a good alternative.

Do not put that listener on Grok Bot’s cloud computer. Update/Reset rebuilds it, so the listener would be gone.

Maybe interesting for other use cases:

  • The Cursor webhook can be used as a doorbell.
  • Write the payload first, then ring.
  • A missing body is normal.

Maybe I will use the same approach for Telegram integration.
Why did I want to have GrokBot in Slack in the first place? I wanted a channel for me to get in touch with Hermes and GrokBot and also for them to message each other (with me seeing what’s up).