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

Add IBM watsonx orchestrate

未关闭
#1,679 0 条评论 0 个 reaction 已指派 1 人 已被 @mxmzb 认领 在 GitHub 查看
enhancement Integration
主要语言
Python
星标
15.9k
派生
1.4k
平均合并
1 天 17 小时
30 天内合并 PR
163

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。