Grafana Cloud

SDKs and APIs for developers

Grafana Assistant provides APIs and SDKs for integrating AI-powered assistance into your plugins, applications, and external systems.

Interactive documentation

For the best experience with live SDK examples:

  1. Open Grafana Assistant from the main navigation
  2. Click Integration hub
  3. Explore examples with:
    • Live code you can try immediately
    • Copy-to-clipboard code snippets

Integration options

Choose the integration approach that matches your needs:

TypeScript SDK for Grafana plugins

The @grafana/assistant package provides a lightweight TypeScript SDK for integrating Assistant into Grafana plugins and apps. Use this when building Grafana plugins or extending the Grafana UI.

Learn more about the TypeScript SDK

Go AI SDK for AI backends

The open source github.com/grafana/ai-sdk module provides Go building blocks for AI backends, including streaming text generation, tool calls, structured output, provider routing, and middleware. Use it when you are building a Go service or agent runtime rather than integrating with the Grafana Assistant UI.

Refer to the Go AI SDK repository for installation and API details.

Service account API access

Use Grafana service accounts when an external system needs to call Assistant APIs without a signed-in user.

Create a Grafana service account, grant it the Assistant permissions required for the API action, and generate a service account token. Send requests through the Assistant plugin resource path with Authorization: Bearer followed by SERVICE_ACCOUNT_TOKEN.

Service account requests are attributed separately from user requests. Their token usage counts toward the system-initiated token pool and any configured limit on it.

Feature-specific APIs, such as Assistant Watchers, use the same plugin resource path and permission model.

HTTP APIs for external systems

The Grafana Assistant HTTP APIs enable external systems to create conversations, fetch messages, stream chat events, and manage supported Assistant resources such as Watchers. Use this when integrating from outside Grafana or automating workflows.

Learn more about the HTTP APIs

Workflows in this hub

Browse the following workflows to choose an integration path and complete common tasks:

Next steps

Continue with these suggestions to explore and integrate: