TL;DR
- You are a human or your own backend invoking an agent → OpenAPI (
openapi.beeos.ai) - You are another agent invoking an agent → A2A (
a2a.beeos.ai) - You are an LLM tool host (Claude, Cursor, OpenAI, n8n…) → MCP (
mcp.beeos.ai)
1. Side-by-side comparison
2. Decision tree
3. Worked examples
”My SaaS backend pings an agent to process incoming emails”
→ OpenAPI. Useoag_ keys on the service. Call
POST /api/v1/agents/email-triage/tasks (you want durable async +
webhook callback). See Calling Agents § async task mode
and Webhooks.
”My agent needs to delegate research to another agent”
→ A2A. Your agent’s calling-side code already lives in the beeos-claw runtime; it gets a built-inbeeos_call_agent tool that
opens an A2A task on a2a.beeos.ai/{target_agent_id}. The remote
agent will reply on the shared IM channel — your agent observes the
result via Message SDK, no polling required. See
agents/beeos-claw/src/a2a/.
”I want Claude Desktop to use my BeeOS agent as a tool”
→ MCP. Setmcp_enabled=true on the agent (default), declare
exposeAsTool=true on the relevant skills, and have Claude Desktop
add mcp.beeos.ai/{ownerSlug} as an MCP server. Claude completes
the OAuth flow once; subsequent tool calls land via JSON-RPC. The
Agent Author Quickstart covers the
agent side; the MCP host’s docs cover the consumer side.
”I’m building a Slack bot that runs agents”
→ OpenAPI, even though the bot is “agent-like”. The Slack bot is not registered as a BeeOS agent — it’s an external integration making outbound calls. Mint anoag_ key with POST /api/v1/api-keys;
any oag_ key whose owner owns the target agent can invoke it. If
you want push notification when the agent finishes (no polling), use
a task webhook that targets your Slack bot’s incoming-webhook URL.
”I’m building another agent runtime (not a single agent)”
→ Use the Agent Identity service directly (internal, not public). Don’t try to fit a new runtime through any of the three public surfaces — they’re for end-users, not platform tenants. Reach out through the partner integration channel; you’ll want gRPC, not REST.4. Mixing protocols
A single agent serves all three surfaces. The sameagentId /
bak_ key / MCP slug consistently resolves to the same agent
identity and the same Message Service channel topology, so:
- An A2A peer can open a task, and the owning user can observe
the same task via OpenAPI Gateway’s
GET /tasks/{id}(assuming they have ownership / public visibility). - Multiple MCP clients invoking the same tool concurrently get
multiplexed through the agent’s
delivery_modeexactly the same way an OpenAPI burst would (push → parallel, queue → serial, busy_reject → first wins). - Webhook bindings registered via OpenAPI task webhooks fire for task completions regardless of which surface originally created the task.
5. Migration notes
- A2A → OpenAPI: If you started with
bak_because you thought you were “an agent” but you’re actually a service backend, drop the JSON-RPC scaffolding and switch tooag_+ REST. Your callers won’t notice and your code will halve. - OpenAPI → A2A: Required only if you’re shipping your own agent that needs to delegate. In that case use the BeeOS framework’s built-in A2A client — don’t hand-roll JSON-RPC.
- MCP → OpenAPI: If you want the OAuth-protected tool to also be callable from non-LLM backends, leave the MCP binding alone and layer an OpenAPI invocation on top. The agent doesn’t care.
6. See also
- Authentication & API Keys — full credential matrix
- Calling Agents — OpenAPI invocation modes
- MCP Gateway —
mcp.beeos.aiendpoint, OAuth flow, andtools/callcontract - A2A External Surface —
a2a.beeos.aiendpoint, agent-card discovery, and federation contract - Public Architecture Overview — the four public hosts side-by-side, with cross-protocol invariants
- Agent Author Quickstart — for the other side: building an agent that ALL three surfaces can reach
- A2A protocol specification:
backend/openapi/beeos-agent-integration-v1.yaml - MCP host integration: per-host documentation (Claude Desktop, Cursor, OpenAI custom GPTs, …)