Skip to content

feat: AG-UI protocol surface (HTTP+SSE inbound) for driving Forge agents from AG-UI-aware frontends #84

@initializ-mk

Description

@initializ-mk

Summary

Add an AG-UI protocol surface to Forge agents: an inbound HTTP endpoint that accepts an AG-UI RunAgentInput and streams the agent run back as AG-UI events over Server-Sent Events. This lets any AG-UI-aware frontend (CopilotKit, the AG-UI Dojo, custom React UIs) drive a Forge agent with no bespoke wiring.

AG-UI is a protocol surface, not agent behavior. It is the sibling of the existing A2A server — an HTTP handler on the same mux — not a skill (no SKILL.md) and not a channel adapter (channels are outbound-only; AG-UI is inbound).

In scope (v1: streaming chat)

  • Lifecycle events: RUN_STARTED, RUN_FINISHED, RUN_ERROR
  • Text message events: TEXT_MESSAGE_START, TEXT_MESSAGE_CONTENT, TEXT_MESSAGE_END (whole-turn content — see limitation in §3)
  • Backend tool-call events: TOOL_CALL_START, TOOL_CALL_ARGS, TOOL_CALL_END, TOOL_CALL_RESULT — i.e. the agent's own (backend-executed) tool calls, surfaced to the UI for visibility

Out of scope (explicitly do not implement in this round)

  • Frontend tool calls / human-in-the-loop (the tools array in RunAgentInput as client-executed actions)
  • Shared state (STATE_SNAPSHOT, STATE_DELTA)
  • Token-level streaming of TEXT_MESSAGE_CONTENT (requires provider stream threading — see §3)
  • WebSocket transport (SSE only)
  • Any change to forge-core

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions