ag-ui-protocol / ag-ui-protocol/ag-ui

SSE events not able to stream output to copilotkit

Offen
#374 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug Integration
Vorherrschende Sprache
Python
Sterne
15.9k
Forks
1.4k
Ø Merge
1 T. 17 Std.
Gemergte PRs (30 T.)
163

Beschreibung

Hi Recently i encountered this issue when i was doing a langgraph integration with copilotkit with

from ag_ui_langgraph import add_langgraph_fastapi_endpoint
from src.agent.graph import graph
app = FastAPI()

add_langgraph_fastapi_endpoint(
app=app,
agent=LangGraphAgent(
name="agent",
description="Describe your agent here, will be used for multi-agent orchestration",
graph=graph, # the graph object from your langgraph import
),
path="/agent", # the endpoint you'd like to serve your agent on
)

in this when server returns after MCP call the sse was not handled by encoder in ag-ui

def _encode_sse(self, event: BaseEvent) -> str:
"""
Encodes an event into an SSE string.
"""

return f"data: {event.model_dump_json(by_alias=True, exclude_none=True)}\n\n"

as it handles only json outputs, others its failing

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.