KubeMQ
DeployScenariosAI-agent fabric

Drive KubeMQ from an LLM

Orchestrate durable messaging and A2A agents from an LLM over MCP in a single session — the end-to-end fabric in action.

KubeMQ must be running — see the Quickstart (steps 1–2 get you there; instant if it's already up).

The MCP gateway is already live on http://localhost:9090/mcp — no enable step. Once an MCP host is pointed at it and at least one agent is registered, the same conversation can enqueue durable work and call an agent — messaging and agents, one fabric, one session.

Two quick prerequisites

If you haven't done these yet: connect an MCP host to http://localhost:9090/mcp, and register an agent for it to call. Both take a couple of minutes.

1 · One prompt, two tool calls

Ask your connected LLM host something that needs both capabilities, for example:

"Enqueue order 1042 for the fulfillment worker, then ask the order-status agent for an ETA."

The host resolves that into two MCP tool calls against the same /mcp session — one against KubeMQ's durable queue, one against the agent bridge:

queue_send
{ "name": "queue_send", "arguments": { "channel": "orders", "body": "{\"id\":1042}" } }
agent_send
{ "name": "agent_send", "arguments": { "agent_id": "order-status-agent", "message": "What is the ETA for order 1042?" } }

2 · Verify

You should see two results come back in the conversation, both round-tripped through the same MCP session — no separate connection, no glue code.

Expected result

queue_send returns the MCP queue envelope with a generated message ID (and the orders channel ticks in the dashboard):

queue_send result
{
  "content": [
    { "type": "text", "text": "{\"message_id\":\"a1b2c3...\",\"sent_at\":\"2026-06-08T10:00:00Z\",\"is_error\":false}" }
  ],
  "isError": false
}

agent_send returns the order-status agent's reply, bridged from its A2A response:

agent_send result
{
  "content": [
    { "type": "text", "text": "{\"status\":\"in-transit\",\"eta\":\"2 days\"}" }
  ],
  "isError": false
}

Didn't work?

  • MCP host has no tools — confirm it completed the initialize handshake against http://localhost:9090/mcp; see Connect an MCP host.
  • agent_send returns "Agent not found" — register the agent first; the agent_id must match exactly.
  • queue_send returns a -32602 error — the channel name starts with the reserved _AGENTS_. prefix, or channel/body is missing.

Go deeper

Was this page helpful?

On this page