> For the complete documentation index, see [llms.txt](https://docs.riff.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.riff.ai/archive/features-legacy-databutton-web-app-builder/workspace-features/secrets.md).

# Secrets

What it is: Secrets securely stores sensitive information like API keys, database credentials, and tokens. Secrets are only accessible from the backend, never exposed to the frontend.

How to access: Click the Secrets tab in the workspace topbar, or the agent will prompt you when secrets are needed.

Key features:

* Secure storage: Encrypted and never exposed to frontend code
* Environment variables: Access secrets as os.environ.get("SECRET\_NAME")
* Environment control: Separate secrets for dev, prod, or both
* Easy updates: Update secret values without code changes

How to use:

1. When the agent needs a credential, it will prompt you
2. Enter the secret value when prompted
3. The agent automatically uses os.environ.get("SECRET\_NAME") in code
4. Update secrets anytime in the Secrets tab

Tips:

* Never hardcode API keys or credentials in your code
* Secrets are only available in the backend - frontend code cannot access them
* Use descriptive UPPERCASE\_SNAKE\_CASE names for secrets
* For integrations with OAuth, use the Integrations feature instead


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.riff.ai/archive/features-legacy-databutton-web-app-builder/workspace-features/secrets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
