- Langroid — framework multi-agent Python — chính thức gia nhập danh sách tích hợp Community của AG-UI, giao thức mở do CopilotKit phát triển để kết nối agent backend với frontend.
- Repo proof-of-concept langroid-ui demo chat UI React + WebSocket với streaming token, mock mode, session management.
TL;DR
Langroid, framework multi-agent Python (Prasad Chalasani & Somesh Jha), vừa được liệt kê chính thức ở tier Community của AG-UI — giao thức mở do CopilotKit phát triển nhằm chuẩn hoá cách agent backend kết nối tới ứng dụng người dùng. Một repo proof-of-concept tên langroid-ui đã public, demo chat UI React kết nối Langroid qua WebSocket, hỗ trợ streaming token theo thời gian thực, mock mode không cần API key, và markdown rendering. Đây là cộng đồng đóng góp (community dev Muhammad Asad Ishfaq được CopilotKit credit), bước đầu tiên đưa Langroid vào hệ sinh thái AG-UI vốn đang đạt ~120K lượt cài/tuần.
Có gì mới
Trong bảng tương thích chính thức của AG-UI, Langroid xuất hiện ở mục Community với trạng thái ✅ Supported, đứng cạnh các framework đang "in progress" như OpenAI Agent SDK và Cloudflare Agents. Repo github.com/langroid/langroid-ui chứa toàn bộ codebase: backend Python (~79%) và frontend TypeScript/React (~11%), license MIT, sẵn sàng để fork.
Điểm khác biệt so với các integration khác là Langroid integration không dùng SSE qua HTTP như reference của AG-UI, mà bám sát hệ thống callback native của Langroid rồi cầu nối qua WebSocket. Cách làm này giữ cho code Langroid backend gần như nguyên bản — không cần override method, không cần monkey-patch agent.
Vì sao điều này quan trọng
Trước đây, gắn frontend vào một Langroid app tự viết là "tự bơi": bạn phải tự xử lý streaming token, tự nối WebSocket, tự dedup tin nhắn khi reconnect. Giờ có template tham chiếu hoạt động end-to-end — bạn clone về, cắm Langroid agent của mình vào, và đã có một chat UI production-grade nhỏ gọn.
Ở góc nhìn rộng hơn, AG-UI đang trở thành lớp giao thức "agent ⇄ user" song song với MCP (context) và A2A (agent-to-agent). Langroid lọt vào danh sách này có nghĩa: cùng một frontend AG-UI, bạn có thể swap backend từ LangGraph sang CrewAI sang Langroid mà không phải viết lại UI layer. Đó là lời hứa interoperability mà cộng đồng agent đang chờ.
Sự thật kỹ thuật
- AG-UI protocol: event-based, ~16 loại event chuẩn cho toàn bộ vòng đời agent (run, message, tool call, state...).
- Transport-agnostic: chạy trên SSE, WebSocket, hoặc webhook. Loose event format matching để dễ tương thích.
- langroid-ui: Python 79.3%, TypeScript 11.1%, HTML 6.1%, Shell 2.9%. License MIT.
- Kiến trúc:
WebSocketCallbacksimplement callback interface native của Langroid, xử lý streaming + tool flow + giao tiếp WS thread-safe.StreamingChatAgentmở rộngChatAgentđể intercept token theo thời gian thực ở tầng LLM client. - Tính năng: streaming token, bidirectional WS, session management qua refresh, mock mode dùng
MockLMcủa Langroid, markdown rendering, dedup bằng SHA256 ở backend kết hợp dedup đồng bộ ở frontend, auto-focus ô input. - Tương thích Langroid: Python 3.11+, hỗ trợ OpenAI/Anthropic/Google/Cohere/Meta, vector stores (Qdrant, Chroma, LanceDB, Pinecone, PGVector, Weaviate), Redis caching, tools/function-calling kiểu Pydantic.
So sánh trong hệ sinh thái AG-UI
| Framework | Tier AG-UI | Trạng thái |
|---|---|---|
| LangGraph | Partnership | Origin partner |
| CrewAI | Partnership | Origin partner |
| Microsoft Agent Framework, Google ADK, AWS Strands, Mastra, Pydantic AI, Agno, LlamaIndex, AG2 | 1st Party | Supported, có docs |
| Langroid | Community | POC public, single-agent chat |
| OpenAI Agent SDK, Cloudflare Agents | — | In Progress |
Sự khác nhau giữa các tier nằm ở mức cam kết bảo trì: 1st Party được CopilotKit duy trì docs chính thức; Partnership là quan hệ ban đầu với LangGraph/CrewAI; Community như Langroid là đóng góp tự phát của cộng đồng.
Use cases
- Prototype Langroid app: clone
langroid-ui, cắm agent của bạn, có chat UI trong vài phút. - Internal tools: dashboard chat cho team dùng RAG bot Langroid backed by Qdrant/Chroma.
- Demo trước khách: stream markdown đẹp ra UI mà không cần build frontend riêng.
- Test không tốn token: bật mock mode, dùng
MockLMđể debug UX trước khi cắm OpenAI key. - Bước đệm tới khi Langroid hỗ trợ đầy đủ multi-agent qua AG-UI events.
Giới hạn & pricing
Bản POC hiện tại chỉ chạy được kịch bản single-agent, single-task chat. Các tính năng nâng cao của Langroid chưa hoạt động ổn định qua UI: hệ thống multi-agent, task delegation phân cấp, tool usage / function calling phức tạp. Tác giả ghi rõ trong README rằng để integration hoạt động với mọi Langroid app, cần thêm callback hooks trong core Langroid (issue langroid-callback-enhancement-proposal.md).
Cả AG-UI và Langroid đều là MIT — miễn phí hoàn toàn. Repo langroid-ui mới đạt 2 stars tại thời điểm công bố, dấu hiệu của giai đoạn rất sớm.
What's next
Hai việc cần theo dõi: (1) Langroid core merge các callback enhancement để mở khoá multi-agent + tool-calling qua AG-UI; (2) AG-UI tiếp tục ăn dần các framework Python — sau Langroid sẽ là OpenAI Agent SDK và Cloudflare Agents. Khi đầy đủ, bức tranh agent stack "MCP cho context — A2A cho agent-to-agent — AG-UI cho human-in-the-loop" sẽ thành mặc định mới của ngành.
Nguồn: ag-ui-protocol/ag-ui, langroid/langroid-ui, CopilotKit AG-UI, CopilotKit blog.
