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

Add IBM watsonx orchestrate

Đang mở
#1,679 0 bình luận 0 reaction 1 người được giao Được @mxmzb nhận Xem trên GitHub
enhancement Integration
Ngôn ngữ chính
Python
Star
15.9k
Fork
1.4k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
163

Mô tả

Add AG-UI support for [IBM watsonx orchestrate](https://www.ibm.com/products/watsonx-orchestrate).

## What is watsonx orchestrate?

IBM watsonx orchestrate is an enterprise AI agent platform that lets teams build, deploy, and manage AI agents and automations. It exposes an OpenAI-compatible SSE endpoint for chat completions, making it a natural fit for the AG-UI protocol.

- Site: https://www.ibm.com/products/watsonx-orchestrate
- Docs: https://cloud.ibm.com/docs/watsonx-orchestrate

## Design

watsonx orchestrate exposes an OpenAI-compatible SSE endpoint at:
```
https://api.{region}.watson-orchestrate.cloud.ibm.com/instances/{instanceId}/v1/orchestrate/{agentId}/chat/completions
```

The adapter translates between this and AG-UI events:
- `choices[0].delta.content` → `TEXT_MESSAGE_START` / `TEXT_MESSAGE_CONTENT` / `TEXT_MESSAGE_END`
- `choices[0].delta.tool_calls` → `TOOL_CALL_START` / `TOOL_CALL_ARGS` / `TOOL_CALL_END`
- `threadId` → `X-IBM-THREAD-ID` header for conversation continuity
- Full run wrapped in `STEP_STARTED` / `STEP_FINISHED` lifecycle
- `MESSAGES_SNAPSHOT` emitted at run end with complete conversation history
- Raw SSE chunks forwarded as `RAW` events for debugging
- Tool results from input emitted as `TOOL_CALL_RESULT`

Unlike most integrations (trivial TS client + heavy Python adapter), watsonx is a cloud API — so the TypeScript client does the real work and the Python adapter is provided for pattern consistency.

## Getting started with the integration

The AG-UI repo has a step-by-step guide for adding new framework integrations:

- **Contributing guide:** [CONTRIBUTING.md](https://github.com/ag-ui-protocol/ag-ui/blob/main/CONTRIBUTING.md)
- **Integration walkthrough:** [Step-by-Step Guide to Adding an Integration PR](https://github.com/ag-ui-protocol/ag-ui/blob/main/CONTRIBUTING.md#step-by-step-guide-to-adding-an-integration-pr)
- **Reference implementations:** [`integrations/langgraph/`](https://github.com/ag-ui-protocol/ag-ui/tree/main/integrations/langgraph), [`integrations/mastra/`](https://github.com/ag-ui-protocol/ag-ui/tree/main/integrations/mastra), [`integrations/adk-middleware/`](https://github.com/ag-ui-protocol/ag-ui/tree/main/integrations/adk-middleware)
- **CODEOWNERS:** [.github/CODEOWNERS](https://github.com/ag-ui-protocol/ag-ui/blob/main/.github/CODEOWNERS)

High-level steps from the guide:
1. Add an integration folder under `integrations/watsonx/` with `typescript/` and `python/` packages
2. Register the integration in the Dojo (`apps/dojo/src/agents.ts`, `menu.ts`, `env.ts`)
3. Add Dojo prep + run scripts under `apps/dojo/scripts/`
4. Add e2e tests under `apps/dojo/e2e/tests/watsonxTests/`
5. Wire up CI in the test matrix
6. Community contributors become `CODEOWNERS` for the new integration and agree to maintain it for the community.

## Implementation PR

#1665

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.