Bindu icon indicating copy to clipboard operation
Bindu copied to clipboard

Feature - add AG-UI bridge

Open Shivansh-Khunger opened this issue 10 months ago β€’ 1 comments

πŸš€ Describe your changes clearly

This pull request introduces the initial implementation of the Bindu AG-UI Bridge service, which translates AG-UI protocol events to Bindu A2A JSON-RPC calls and streams results back to the frontend using Server-Sent Events (SSE). The changes include project setup, configuration, API route handlers, event definitions, and utilities for communication with the Bindu agent.

Core Bridge Implementation:

  • Added a Bun + Hono-based service entry point in src/index.ts, including middleware setup, root endpoint, and route mounting for /health and /agui/* APIs.
  • Implemented the main AG-UI run handler in src/handlers/run.ts, which processes run requests, communicates with Bindu, polls for task state, and streams AG-UI events via SSE.
  • Created a Bindu JSON-RPC client in src/clients/bindu.ts to send messages, poll tasks, and check agent health, with error handling and request timeouts.

Event System and Utilities:

  • Defined AG-UI event types and Bindu task states in src/events/types.ts, and implemented an event builder for consistent event formatting in src/events/builder.ts. [1] [2]
  • Added SSE response utilities for formatting and streaming events in src/events/sse.ts.

Project Setup and Documentation:

  • Added package.json with Bun, TypeScript, and Hono dependencies, and a .gitignore for node_modules. [1] [2]
  • Provided a comprehensive README.md with overview, quick start, API documentation, configuration, event mapping, and project structure.
  • Implemented environment-based configuration with sensible defaults in src/config.ts.

βœ… Checklist clearly

  • [X] I've tested my changes thoroughly.
  • [X] I've followed the project's style and linting rules.
  • [ ] I've updated documentation (if required).

πŸ“Œ Related issue clearly

Link related issues, if applicable: #123

Shivansh-Khunger avatar Jan 08 '26 01:01 Shivansh-Khunger

Hi @Shivansh-Khunger, let’s discuss this on Discord first and align on the approach.

Paraschamoli avatar Feb 04 '26 04:02 Paraschamoli