---
title: "Author k6 scripts with Grafana Assistant | Grafana Labs"
description: "Welcome to the Grafana learning path that shows you how to use k6 Script Authoring mode in Grafana Assistant to generate, convert, improve, and validate k6 scripts for CI."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Author k6 scripts with Grafana Assistant

Welcome to the Grafana learning path that shows you how to use k6 Script Authoring mode in Grafana Assistant to go from prompt to review-ready k6 drafts faster. Instead of starting from a blank file, you can describe what you want to test and iterate from there.

This path uses the QuickPizza demo app at `https://quickpizza.grafana.com` as a shared target so you can run every milestone without your own staging stack. Generated output is still a draft. Wording and structure can vary, so you validate in the Cloud script editor, locally, or both before a script is CI-ready.

In this path, you’ll generate scripts from plain-language prompts, optionally use Discover and generate when your Grafana stack has service telemetry, convert curl or Postman artifacts, improve draft scripts, and apply a quality checklist before you run tests in CI.

The image below shows k6 Script Authoring mode in Grafana Assistant, including the workflow choices at the bottom of the panel.

## Here’s what to expect

When you complete this path, you should be able to do each of these activities.

- Use Grafana Assistant Script Authoring mode to generate k6 scripts from plain-language prompts against a known demo target
- Optionally discover endpoints from telemetry when a real service name and data exist in your stack
- Convert curl commands and Postman collections into draft k6 scripts quickly
- Analyze and improve existing scripts for checks, thresholds, and pacing
- Iterate on generated scripts with follow-up prompts
- Verify AI-generated scripts before using them in CI

## Before you begin

Before you start this path, confirm that you meet these requirements.

- A Grafana Cloud account. To create one, refer to [Grafana Cloud](/signup/cloud/connect-account).
- Access to Grafana Assistant on your stack. If you don’t see Assistant in the sidebar, contact your administrator.
- If you run tests only in Grafana Cloud k6 (for example **Create and Run** in the [script editor](/docs/grafana-cloud/testing/k6/author-run/script-editor/)), you do not need the k6 CLI or a local terminal for the Cloud-first steps in this path.
- If you use the optional local smoke steps (`k6 run`), install k6 on your machine. If you need setup steps, complete [Run your first k6 performance test](/docs/learning-paths/run-first-k6-test/) first or refer to [Install k6](/docs/k6/latest/set-up/install-k6/).
- Basic familiarity with k6 scripts and JavaScript.
- A code editor is useful for diffing and review; a terminal is only required when you choose local `k6 run` or CI-style CLI checks.

You do not need a private test environment. Milestones use QuickPizza unless you choose the telemetry-based Discover branch.

## Troubleshooting

If you get stuck, use the troubleshooting links in each milestone where the issue appears.

## More to explore

As you move through the path, you’ll see optional links to related k6 references for deeper details.
