Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/testing/agentic-testing/create-and-manage-secrets.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/testing/agentic-testing/create-and-manage-secrets/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Create and manage secrets for Agentic testing
Use Secrets management in Agentic testing to store logins, API keys, tokens, and other sensitive values encrypted for your stack. Reference secrets as $SECRET_NAME in user journey steps so values are injected at run time and never saved as plain text in the test.
Secrets you create in Agentic testing are shared with k6 Cloud. Anyone with secret-management permissions on the stack can read, edit, or delete them from either Agentic testing > Settings or Performance testing > Settings.
Note
Secrets management is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
For encryption details, limits, and role-based access control, refer to Create and manage secrets in Performance testing.
Before you begin
To manage secrets for Agentic testing, you need:
- Access to Testing & synthetics > Agentic testing > Settings in your stack
- Permission to create, edit, or delete secrets on the stack
Refer to Role-based access control in the Performance testing secrets documentation for role requirements.
Only text-based secrets are supported. Secret names must be 253 characters or less, descriptions must be 253 characters or less, and secret values must be 24kB or less. Secrets can have a maximum of 10 labels, and label keys must be 63 characters or less.
Open Secrets management
- Sign in to your Grafana Cloud stack.
- On the main menu, click Testing & synthetics > Agentic testing > Settings.
- Click Secrets management.
The Secrets page lists secrets available to your agentic tests. If you have not created any yet, the page shows an empty state with + Create secret.
Create a secret
To create a new secret:
On the Secrets page, click + Create secret.
In the Create secret dialog box, fill in the following fields:
- Name: A unique name used to reference the secret in journey steps, for example
quickpizza-admin-password. You can’t change the name after you save the secret. - Description: A short description of what the secret is for.
- Value: The secret value returned when the secret is referenced at run time.
- Labels (optional): Key/value labels to organize secrets. Click + Add label to add one.
- Name: A unique name used to reference the secret in journey steps, for example
Click Save.
Use a secret in a browser test
After you create a secret, reference it in a user journey step with $SECRET_NAME, where SECRET_NAME matches the Name you entered when you created the secret.
For example, if you create a secret named quickpizza-admin-password, you can add a journey step such as Fill password with $quickpizza-admin-password.
Refer to Create browser tests from plain-language user journeys for the full workflow to create and run a test.
Edit or delete a secret
To edit or delete a secret, open Agentic testing > Settings > Secrets management, find the secret in the list, and use Edit or Delete.
To update a secret Value, click Reset in the edit dialog box, enter the new value, and click Save.
Warning
Deleting a secret is permanent and can’t be undone. Agentic tests that reference a deleted secret fail until you update the journey steps or create a new secret with the same name.
Next steps
- Create browser tests from plain-language user journeys
- Create and manage secrets in Performance testing
Was this page helpful?
Related resources from Grafana Labs


