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

Add Convex Agent integration

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

描述

## Summary

Proposing a community integration for [Convex Agents](https://docs.convex.dev/agents) - AI agents built on Convex with built-in persistence, streaming, and the Vercel AI SDK.

## Why Convex?

Convex provides:
- Built-in real-time sync and persistence
- Native streaming support in HTTP actions
- TypeScript-first with end-to-end type safety
- Convex Agents wrap Vercel AI SDK with threads, messages, and tool execution

## Implementation Approach

Server-side integration using Convex HTTP Actions:
- Receive AG-UI `RunAgentInput` via POST
- Execute Convex Agent internally
- Translate Vercel AI SDK `fullStream` parts to AG-UI events
- Return SSE response

## AG-UI Events Supported

| Vercel AI SDK Stream Part | AG-UI Event |
|---------------------------|-------------|
| `text-start` | `TEXT_MESSAGE_START` |
| `text-delta` | `TEXT_MESSAGE_CONTENT` |
| `text-end` | `TEXT_MESSAGE_END` |
| `tool-call` | `TOOL_CALL_START` + `TOOL_CALL_ARGS` + `TOOL_CALL_END` |
| `tool-result` | `TOOL_CALL_RESULT` |
| `start-step` / `finish-step` | `STEP_STARTED` / `STEP_FINISHED` |
| `error` | `RUN_ERROR` |

## Status

I have a working implementation ready to submit as a PR to `integrations/community/convex/typescript/`.

Happy to provide more details or adjust the approach based on feedback.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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