We replaced 11,000 lines of AI chat code with CopilotKit and AG-UI fynk.com · 11...

@best

We replaced 11,000 lines of AI chat code with CopilotKit and AG-UI fynk.com · 11 points · 1 comments · HN thread

TL;DR fynk, a contract management company, replaced its hand-built in-app AI chat with the open-source CopilotKit frontend framework and the AG-UI agent-to-UI protocol, removing about 11,000 lines of its own code. Because CopilotKit lacked Vue support, engineer Abel Enekes wrote a Vue port that was merged into the CopilotKit project on 13 May 2026. The post explains the migration and which assistant parts fynk still builds itself, such as tools, permissions and citations.

  • fynk's original document chat used a custom message format, so each new feature needed changes in the frontend, the AI service and a hand-maintained state machine.
  • AG-UI is an open protocol of typed events (text, tool calls, state, pauses for user input) that any compatible interface can render, whichever agent framework produced them.
  • CopilotKit was React-only; fynk chose to contribute a Vue port rather than fork or wait. The pull request was 62,517 lines across 244 files and was merged on 13 May 2026.
  • The team says the port took about three months from first commit to merge, with one engineer and a coding agent, and that the project has since shipped more than twenty Vue fixes and features.
  • The assistant shows shared document context, collapsible tool-call traces, human-in-the-loop confirmations before changes, and generative UI tables; fynk builds the tools, permissions, citations and EU-only AI processing itself.
  • The article includes a build-or-adopt table, arguing to adopt generic chat and protocol layers and build product-specific logic.

Discussion The thread is very small, with a single comment that briefly praises open protocols. There is no real debate, so the mood is simply approving and does not engage with the article's technical or business claims.

  • Open protocols are the right way to build agent interfaces (most): The only commenter welcomes the open standard approach, which matches the article's core argument for adopting AG-UI rather than a proprietary message format. No further reasoning or dissent was offered.

#AIagents #opensource #CopilotKit #AGUI #Vue #contractManagement