Tutorial
Build an AI agent fabric: register a plain-HTTP agent (no SDK), discover and invoke it, stream live results, then orchestrate it from an LLM over MCP.
Tutorial = the end-to-end fabric story (build → discover → stream → LLM orchestration); the A2A and MCP Getting started pages are single-gateway quickstarts. New here? This page is the guided path.
Across five steps you start KubeMQ, build and register a plain-HTTP "research" agent with no KubeMQ SDK, discover it by capability and invoke it synchronously, stream its live task events over SSE, and finally let an LLM discover and call that same agent over MCP — proving the "one fabric" thesis end-to-end. Every step uses Python and curl.
What you'll build
By the last step, an LLM host reaches your custom research agent through the MCP→A2A bridge — discovering it with agent_list and invoking it with agent_send, all over the message broker.
The LLM discovers and invokes the research agent you built — through MCP, Aiway, and the message broker.
Prerequisites
- Docker (to run KubeMQ locally) — or a KubeMQ server already running with the shared HTTP server on port
9090. - Python 3.11+ for the agent server and the clients.
curlfor probing the Aiway endpoints.
No KubeMQ SDK is required anywhere in this tutorial. The agent is a plain HTTP service, and every call to the fabric is JSON over HTTP.
The steps
Follow the steps in order — each one builds on the last.
1. Set up & start KubeMQ
Start a local KubeMQ server and confirm the Aiway endpoints are live.
2. Build & register an agent
Write a plain-HTTP Python agent — no KubeMQ SDK — and register its Agent Card with Aiway.
3. Discover & invoke
Find your agent by capability and call it synchronously with message/send.
4. Stream live results
Use message/stream to receive task.status, task.artifact, and task.done events live over SSE.
5. Orchestrate from an LLM (MCP)
Connect over MCP, discover the agent with agent_list, and invoke it with agent_send — the MCP→A2A bridge in action.
Was this page helpful?