Grafana Labs' AI SDK vs OG Vercel's AI SDK
Updated August 19, 2026
Published August 19, 2026

Go is one of the fastest backend languages. It is great for infrastructure, microservices, and database work. One thing it has lacked is a mature agentic-framework ecosystem. Compared with Python or TypeScript, Go is still behind.
This is a raw language-and-SDK benchmark. It measures request handling, agent-loop work, SSE encoding, CPU use, and memory use. It does not measure LLM quality, model latency, token quality, or provider performance. Every backend talks to the same OpenAI chat completion stub.
Some Go agentic frameworks include:
Although OpenAI has its official Go SDK, it is a client library covering the available APIs. It does not provide full agent-loop control like its
Agents SDK in Python and JavaScript.
When I develop AI applications, I usually prefer the prebuilt frontend and backend combination that lets me ship quickly: one language, one monolith, and fewer moving parts. Vercel AI SDK is one of the few frameworks that fits that model.
It is also worth mentioning CopilotKit and
AG-UI, but they are better understood as pieces of a protocol stack. I will cover them in another article.
Vercel AI SDK helps you ship quickly. With a TypeScript backend, I can use
Bun to push performance further. The orchestration layer can use the SDK while history, memory, and tool execution live in services written in a faster language.
The bottleneck is still often the orchestration layer, especially when it streams tokens to the frontend. For an internal chatbot with a few users, or on serverless infrastructure, CPU and memory use may not matter much. At larger production scale with a guaranteed SLA, TypeScript can become the limiting layer.
Then came GO AI, a Go library that uses interfaces and methods similar to
AI SDK. I looked at it shortly after it was announced. It shares the SDK's ideas, but its Go port currently supports
backend streaming from the LLM provider wrapper rather than a plug-and-play helper such as
createUIMessageStreamResponse() for streaming SSE chunks to the frontend. That was still true when I checked in August 2026. If that support arrives, I will gladly try it again.
Then came Grafana AI SDK, which claims to speak fluent
@ai-sdk/react: a Go backend can communicate with the familiar useChat() hook.
It is a faithful port with broad feature support from the original SDK, and its community has been active since launch.
I previously compared Go and Bun for LLM streaming. That made me curious about the cost of this new Go port.
Results in brief
Grafana AI SDK is substantially faster and smaller than
Vercel AI SDK running on
Bun in every SDK-to-SDK test here. With an OpenAI chat completion stub, it handled about
2x to 3.8x the requests per second and used about 1/10 of the memory.
Both implementations provide the same AI SDK-compatible UI-message stream. This comparison is about the cost of producing that stream from Go and from Bun.
How I measured it
Every backend implements the same POST /chat contract and talks to the same OpenAI chat completion stub. The stub controls prefill time, token delay, and the number of tokens per SSE event. The variable under test is the server and framework.
k6 and all backends ran on the same Linux VM with
4 CPU cores and 16 GiB memory. The backend was pinned to its own CPU set with taskset. OpenAI chat completion stub and k6 used the remaining cores. Warm-up traffic was discarded. Each run used
10 concurrent streams.
The test used Go 1.24.7 and Bun 1.3.11. These figures compare the backends in this article, not results from a different machine.
ttft is the time from writing the request to the first frame carrying text or a tool call. ttfa is the time to the first answer text. Their difference is the tool cost. itl is the per-token gap between content-bearing frames.
Backends
| backend | stack | purpose |
|---|---|---|
go-http-grafana-aisdk | net/http, | Go implementation of the AI SDK UI protocol |
bun-hono-aisdk | original SDK comparison |
Streaming without tool calls
The cleanest comparison is a single paragraph response with one token per stub SSE event and no artificial model delay. Grafana AI SDK served
263.1 req/s. Bun + Vercel AI SDK served
98.2 req/s. Grafana had a 27.15 ms median TTFT, compared with Bun's 93.38 ms.
For a long, 744-token response, Grafana AI SDK reached
53.7 req/s and 39,977 tokens/s. Bun + Vercel AI SDK reached
20.5 req/s and 15,226 tokens/s.
Both SDK backends must convert provider chunks into the structured SSE response consumed by useChat(). That work includes parsing the provider stream, tracking message and tool-call state, and encoding UI-message events. The AI SDK stream protocol describes that response format. This compatibility layer is part of the compute cost measured here.
Tool-loop results
The agent cases stream tool calls, execute the stubbed tool, and then stream the final answer. ttfa makes that boundary explicit.
{
"orderId": "9281"
}{
"eligible": true
}| scenario | Grafana AI SDK | Bun + Vercel AI SDK | Grafana advantage |
|---|---|---|---|
| One tool | 268.8 req/s | 71.1 req/s | 3.8x |
| Three parallel tools | 121.5 req/s | 34.7 req/s | 3.5x |
| Three turns, two tools each | 195.8 req/s | 52.6 req/s | 3.7x |
Grafana AI SDK's median tool cost was
8.73 ms for one tool, 21.98 ms for three parallel tools, and 12.91 ms in the multi-turn case. Bun + Vercel AI SDK spent
59.63 ms, 124.85 ms, and 81.96 ms respectively. Both implementations use the same stub and tool behavior, so that difference is framework work around the tool loop.
Effect of event batching
When the stub emits more tokens in each event, each SDK does less per-frame work. Grafana AI SDK stays ahead of Bun +
Vercel AI SDK at every event size.
At 16 tokens per stub event, Grafana AI SDK handled
527.8 req/s, 392,680 tokens/s, and a 15.90 ms median TTFT. Bun + Vercel AI SDK handled
185.1 req/s, 137,688 tokens/s, and 47.62 ms TTFT. This is a high-throughput synthetic case, but it isolates the serialization and event-processing path well.
Memory and response format
Grafana AI SDK used
18 to 25 MB RSS in the fast no-tool runs, and 19 to 21 MB in the fast tool-loop runs. Bun + Vercel AI SDK used
160 to 190 MB and 172 to 190 MB respectively. On the realistic 50-stream test, the stub's 200 ms prefill and 20 ms token delay dominate the user-visible result, but Grafana still used 40 to 42 MB RSS versus 216 to 224 MB for Bun AI SDK.
For the long one-token stream, Grafana AI SDK sent
60.6 bytes/token and Bun + Vercel AI SDK sent
56.6. The two formats are close because both carry the AI SDK UI-message protocol, not just text deltas.
Selected results
| backend | req/s | TTFT p50 | p95 total | RSS |
|---|---|---|---|---|
| Grafana AI SDK | 263.1 | 27.15 ms | 63.0 ms | 19 MB |
| Bun + Vercel AI SDK | 98.2 | 93.38 ms | 170.2 ms | 160 MB |
The realistic-timing tab uses one short response at 50 concurrent streams, with 200 ms prefill and 20 ms per token. It is the test closest to a normal model. Grafana AI SDK reaches a
204.85 ms median TTFT, compared with 260.52 ms for Bun + Vercel AI SDK, while using
40 MB rather than 216 MB RSS.
Conclusion
If you want AI SDK UI compatibility from a Go backend, Grafana AI SDK is the clear choice in this comparison. It keeps integration with
useChat() from @ai-sdk/react seamless, while beating Vercel AI SDK on Bun in throughput, latency, and memory use.
For a real model with normal token timing, the framework differences shrink in the user's first-token experience. They still matter for capacity, tail latency under load, and memory footprint. That is where Grafana AI SDK earns its place.