AI product Open source

Grafana AI SDK

An Apache-2.0-licensed open-source Go SDK from Grafana for building AI-powered backends and agents. It provides GenerateText and StreamText APIs for calling language models, returning complete or streamed responses, executing Go functions as tools, generating schema-validated structured output, and running multi-step tool workflows, with approval for consequential tool actions. The SDK supports Anthropic, Amazon Bedrock, OpenAI, OpenAI-compatible APIs, and Grafana's hosted endpoint, along with retries, configurable timeouts, fallbacks, logging, Prometheus metrics, and Agent Observability. It follows the design of Vercel's AI SDK and is wire-compatible with its TypeScript React frontend hooks, including useChat, useCompletion, and useObject, allowing Go backends to stream Server-Sent Events directly to an existing React frontend without a protocol adapter.

View repository Visit site Mentioned in 2 videos ↓

What Grafana AI SDK is used for

2 uses taken from transcripts — each links to the moment in the video.

  • A Grafana Go library offering an interaction model similar to Vercel's TypeScript AI SDK. It supports streaming events to React hooks, multi-step typed Go tools, structured-output validation, provider adapters, retries, metrics, logging, and fallbacks.

  • Grafana's open-source Go SDK for building AI-powered backends and agents. It supports streaming model output, tool calling, schema-validated structured output, multiple model providers, agent loops, retries, timeouts, logging, and Prometheus metrics.

Videos mentioning Grafana AI SDK

2 in the library.