Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

ADR-003: Separate interactive chat from agent-to-agent protocols

Chat exposes AG-UI for the composed customer workflow and A2A endpoints for agents that explicitly register an A2A server.

November 4, 2026AcceptedIntegration

1. Context & Problem

The customer-facing interactive chat experience and external agent-to-agent integrations serve different audiences and interaction models. The interactive customer workflow validates an incoming request, coordinates handoffs among local specialist agents, and formats a unified answer. In contrast, agent-to-agent clients discover and call individual agents directly.

Treating both needs as a single undifferentiated entry point would tightly couple the customer chat experience to agent integration protocols and create confusion between invoking a full coordinated workflow and calling an individual specialist agent.

2. Business Value

  • Clear product boundaries: Keeps the interactive shopper experience cleanly separated from external agent-to-agent interoperability.
  • Stronger access governance: Separating agent discovery from agent invocation ensures that listing available agents never implies permission to call them.
  • Explicit capability exposure: Only agents intentionally configured for external agent-to-agent use are exposed, preventing unintended direct access to internal workflow steps.
  • Predictable client contracts: Interactive applications receive full workflow orchestration, while agent clients get direct protocol-level access where supported.

3. How It Works

The chat system provides distinct entry points depending on who is calling and what they need:

  • Interactive customer workflow: Customer-facing applications connect to the interactive workflow channel. Every request through this channel goes through request validation, coordinated handoffs to the appropriate local specialists, and final response formatting before returning an answer.
  • Agent discovery: A separate discovery directory lets agent-to-agent consumers see which agents are registered and available. Seeing an agent in this directory only identifies it—it does not grant permission to invoke it.
  • Direct agent-to-agent calls: Individual agents expose direct agent-to-agent access only when they explicitly opt in. Direct calls require proper authorization and run only the targeted specialist agent—they do not automatically trigger the full customer workflow’s validation, routing, specialist handoffs, or final response formatting.
  • Selective participation: Supporting one communication style for a service does not mean every local or remote agent participates in every protocol.

4. Trade-offs & Lessons Learned

  • Multiple protocol surfaces to maintain: Supporting separate interactive and agent-to-agent bindings increases endpoint compatibility, documentation, and testing effort across protocols.
  • Alignment discipline: The agent discovery directory, explicit server registrations, and the set of agents actually hosted by the service must be kept in sync.
  • No implicit workflow guarantees on direct calls: External callers invoking an individual agent directly cannot assume that the customer workflow’s validation, routing, or response-formatting behavior will run for them.
  • Alternatives considered:
    • Expose only the composed interactive workflow: Would keep the public surface smaller, but would block direct agent-to-agent interoperability for consumers needing to discover and invoke individual agents.
    • Use the agent-to-agent protocol as the customer chat endpoint: Would conflate calling a single agent with running the coordinated customer workflow, leaving local validation, specialist handoffs, and response formatting outside the implied contract.
    • Expose one protocol for every agent: Would simplify client assumptions, but would advertise capabilities for agents that are neither registered nor intended for direct invocation.

5. Technical Reference

  • Target scope: Chat APIServicev1.0.0Chat APIInternal HTTP host for BookWorm's interactive multi-agent chat workflow, agent discovery, and session persistence. Ownerai-capabilities-teamDiagramRepositoryOpen docs within Chat SystemSystemv1.0.0Chat SystemInternal system that hosts BookWorm's conversational workflow and specialist AI agents for customer support and catalog-...Ownerai-capabilities-teamDiagramRepositoryOpen docs (including QA AgentAgentv1.0.0QA AgentRead-only customer support and store-policy specialist that answers operational, shipping, returns, account, and billing...PublishesAnalyzeText, AnonymizeTextOwnerai-capabilities-teamDiagramRepositoryOpen docs and explicitly registered A2A agents).
  • Interactive workflow endpoint: AG-UI mapped at /ag-ui. Executes the composed local workflow, including DecisionRouterExecutor, specialist handoffs, and the final response formatter.
  • Agent discovery endpoint: /agents exposes agent discovery metadata; discovery alone does not authorize invocation.
  • Per-agent A2A endpoints: Mapped only for agents that explicitly register an A2A server.
  • Supported A2A protocol bindings: JSON-RPC, HTTP JSON, and gRPC A2A surfaces mapped by the host.
  • Security enforcement: Per-agent HTTP A2A endpoints require configured authorization; direct A2A calls target the registered agent without implicitly executing DecisionRouterExecutor, specialist handoffs, or the final response formatter.