Audience: integration engineers, platform architects, and ops
teams that need a single source of truth for which BeeOS services
are publicly reachable, what credentials each one accepts, and
how callers, gateways, and agent pods are wired together.
backend/.cursor/rules/communication-principles.mdc
and the ADR set under backend/docs/adr/);
the goal here is “everything you can hit from the public internet,
and what to expect when you do.”
If you’re a caller trying to decide which surface to use, jump
to Choosing a Protocol — that
guide is the prescriptive companion to this descriptive overview.
1. The four public hosts
BeeOS exposes four public hostnames. Every other ingress that looks public is either a CDN-fronted asset host (docs.beeos.ai,
status.beeos.ai) or a data-plane bridge used by browsers
(ws.beeos.ai, the bridge-* shards).
The first three are caller-facing; the fourth is the boundary an
agent pod uses to phone home. If you’re building integration
code outside an agent process, you’ll never talk to
agent-gw.beeos.ai directly — your code uses one of the three caller
surfaces, and BeeOS handles the agent-side wiring for you.
Why four hosts, not one?
Each surface has a distinct auth model and access-control unit:- OpenAPI is the human / per-user surface. JWT (web / mobile)
or
oag_(server-side API key, scoped per user × endpoint). - A2A is the per-target-agent surface.
bak_is bound to a caller agent and the call is rate-limited perbak_ × target. - MCP is the per-tool-host surface. OAuth makes the granted agent set scope to the chosen LLM session.
- Agent Gateway is the per-pod-instance surface. Ed25519 keys are derived from the instance’s pod identity, never copyable outside the pod.
2. Mental model — one agent, three callable surfaces, one delivery contract
Every agent on BeeOS is a single process (“pod” in K8s parlance) that talks to Message Service. The three caller-facing hosts above translate their respective wire formats (REST, A2A JSON-RPC, MCP) into the one internal contract that pod ever sees:chat_message) and one reply convention (agent_reply with
matching context_id) regardless of which public surface the
original call arrived on. See
Agent Author Quickstart §3 The five rules.
3. What each surface owns
3.1 OpenAPI Gateway (openapi.beeos.ai)
Documented in detail under docs/guides/calling-agents.md;
the route surface is the canonical OpenAPI 3.1 contract at
backend/openapi/beeos-platform-v1.yaml.
Owns:
- Catalog —
GET /api/v1/agents, agent metadata, deployment regions - Instances — agent deployment lifecycle (create / start / stop / delete) — the surface users build “deploy + invoke” apps on
- Invoke —
POST /api/v1/agents/{id}/invoke(sync) + SSE variant - Tasks —
POST /api/v1/agents/{id}/tasks(async with deadline) + SSE event stream + cross-agentGET /api/v1/tasks - Conversations — multi-turn dialog channels with
since=<offset>replay semantics - Webhooks — task push notifications with HMAC signing + retry
- audit log (P2-A landed)
- Files —
POST /api/v1/files/presign-uploadthen attach byfile_idto invoke / task / conversation requests
3.2 A2A Gateway (a2a.beeos.ai)
Implements Google’s A2A v1.0 spec.
The /{agentId} path serves the agent’s Agent Card; JSON-RPC
methods (message/send, message/stream, tasks/get, …) are
POSTed to the same root. Documented in the
A2A external integration guide.
Owns:
- Agent Card resolution —
GET /{agentId}returns the v1.0 card withsupportedInterfaces(the public URL of each protocol surface) so callers can opt into a different transport mid-call. - JSON-RPC method dispatch — translates A2A messages into the same chat_message envelopes the OpenAPI surface produces.
- Push notification config —
tasks/pushNotificationConfig/*routes through the same A2A Service that owns webhook delivery.
3.3 MCP Gateway (mcp.beeos.ai)
Speaks the Model Context Protocol
over SSE. Each agent is surfaced as one MCP tool. Documented in
the MCP Gateway guide.
Owns:
- OAuth 2.0 authorization code flow — the LLM host opens a consent screen, the user approves access to a subset of their agents, the LLM host gets a session-scoped token.
tools/list— enumerates the agents the granted token can reach.tools/call— invokes an agent via the same internal L0 dispatch path as OpenAPI invoke (synchronous or streaming).
3.4 Agent Gateway (agent-gw.beeos.ai)
The inbound surface for agent pods only. Ed25519 signed
requests from the pod identity prove the call comes from a real
BeeOS-managed instance, not an external impersonator.
Owns:
- Token issuance for Message Service (the pod doesn’t see
MESSAGE_API_KEYdirectly — Agent Gateway is the proxy that signs MS tokens on its behalf) - File presign / upload for agent-emitted artifacts
- A2A REST endpoints for
beeos_call_agentand friends (the beeos-claw plugin uses these to do agent-to-agent calls from inside a tool)
4. What’s NOT publicly reachable
The internal control plane (Runtime, ClusterService, Auth, Agent Identity, Billing, Usage, A2A Service, Message Service, …) sits behind the four hosts above and is never routable from the public internet. Code on the outside calls one of the four hosts; the gateways translate to internal gRPC. This boundary is enforced by Communication Principle P5 and reviewed on every PR. If you’re proposing a change that wants to expose an internal service to the public network, that’s likely a sign the change should land at one of the gateways instead.5. Cross-protocol consistency guarantees
The same agent is reachable on all three caller surfaces, and the following invariants hold across them:
The intentional non-invariants (places where the surfaces
differ on purpose):
- Discovery vocabulary — OpenAPI returns
{success: true, data: {agents: […]}}; A2A returns anAgentCardper agent; MCP enumerates tools. - Auth credential — OpenAPI is per-user, A2A is per-target, MCP is per-session. See Auth & API Keys.
6. See also
- Choosing a Protocol — the prescriptive sibling of this doc, with decision tree + worked examples.
- Calling Agents — full OpenAPI invoke / task / conversation surface walkthrough.
- MCP Gateway — what the MCP host sees from the outside (OAuth flow, tool listing, streaming).
- A2A External Integration — what another A2A-compatible runtime sees (agent card, JSON-RPC).
- Agent Author Quickstart — the inside-the-pod story.
backend/.cursor/rules/communication-principles.mdc— the 9 iron rules governing internal vs public boundaries.backend/docs/adr/001-openapi-gateway-bff.md— why OpenAPI Gateway is a separate process, not main Gateway.backend/docs/adr/0017-openapi-gateway-routes.md— the spec that pinned the OpenAPI route shape (status strings, SSE frames, webhook renderers).