Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/set-up-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The org key is used for chat and agent utility calls only. The following continu

- Embeddings
- The [evaluation](/agents/create-evaluation-suites) judge
- [AI writeback](/agents/ai-writeback) (configured separately via `AI_WRITEBACK_ANTHROPIC_API_KEY`)
- [AI writeback](/agents/ai-writeback)

Automatic [issue filing](/agents/issues) is paused while an org has any BYO provider key set, so agent turns never route through the instance provider for issue classification. Remove all BYO keys to re-enable automatic issue filing.

Expand Down
1 change: 0 additions & 1 deletion self-host/customize-deployment/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ The AI Analyst supports multiple providers. Provide credentials for the provider
| `ANTHROPIC_AVAILABLE_MODELS` | Comma-separated list of models available in the model picker (default=All supported models) |
| `ANTHROPIC_CUSTOM_HEADERS` | JSON object of extra HTTP headers to send with every Anthropic request |
| `ANTHROPIC_SUPPORTS_STREAMING` | Set to `false` if your Anthropic endpoint or gateway doesn't support streaming (SSE) completions — Lightdash will make non-streaming requests instead (default=true) |
| `AI_WRITEBACK_ANTHROPIC_API_KEY` | (Required for AI writeback) Dedicated Anthropic API key used by the AI writeback feature. Kept separate from `ANTHROPIC_API_KEY` so writeback and AI Analyst have independent spend caps and fail independently. |

#### Azure AI Configuration

Expand Down
6 changes: 3 additions & 3 deletions self-host/enterprise-features/ai-writeback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Add the following environment variables to your Lightdash deployment:
| Variable | Example | Purpose |
| --- | --- | --- |
| `E2B_AI_WRITEBACK_TEMPLATE_NAME` | `lightdash/lightdash-ai-writeback` | Lightdash's public E2B template for writeback — pulls our prebuilt sandbox image so you don't have to build one yourself. The `lightdash/` prefix points at our public team template; without it E2B looks in your own team and won't find the image. |
| `AI_WRITEBACK_ANTHROPIC_API_KEY` | `<your-anthropic-api-key>` | Dedicated [Anthropic](https://console.anthropic.com/) API key used by the writeback agent. Kept separate from `ANTHROPIC_API_KEY` so writeback and AI Analyst have independent spend caps and fail independently. |
| `ANTHROPIC_API_KEY` | `<your-anthropic-api-key>` | Your [Anthropic](https://console.anthropic.com/) API key. Claude is the model that drives the writeback agent. |

Restart the backend. Users with AI Analyst access on a project connected to a supported git host will see the agent offer to open a pull request when they ask for a change that belongs in the dbt repo.

Expand All @@ -54,7 +54,7 @@ Self-hosting AI writeback means you pay your sandbox provider and Anthropic dire
- **Your sandbox provider** bills for sandbox runtime. A typical writeback runs for 1–5 minutes while the agent inspects files, edits them, and runs `lightdash compile`.
- **Anthropic** bills per token. Each writeback sends the project's dbt catalog and the self-contained instruction generated from the user's request to Claude, plus any files the agent reads while making the change.

Both providers expose usage dashboards. We recommend setting spend limits on both — and using `AI_WRITEBACK_ANTHROPIC_API_KEY` rather than reusing `ANTHROPIC_API_KEY` — so writeback spend can be capped independently of AI Analyst.
Both providers expose usage dashboards. We recommend setting spend limits on both.

## Permissions

Expand All @@ -72,7 +72,7 @@ Check that `LIGHTDASH_LICENSE_KEY` is set and the project's dbt connection is Gi
Check your [sandbox provider's](/self-host/customize-deployment/sandboxes) credentials, and verify `E2B_AI_WRITEBACK_TEMPLATE_NAME` is set to `lightdash/lightdash-ai-writeback` (the `lightdash/` prefix is required to pull our public template — a bare name resolves to your own team). If you've overridden `E2B_AI_WRITEBACK_TEMPLATE_TAG`, double-check the tag exists.

**Writebacks fail mid-run with an Anthropic error.**
Check your Anthropic account usage limits and confirm `AI_WRITEBACK_ANTHROPIC_API_KEY` is valid. Long-running writebacks can hit rate limits on lower-tier Anthropic plans.
Check your Anthropic account usage limits and confirm `ANTHROPIC_API_KEY` is valid. Long-running writebacks can hit rate limits on lower-tier Anthropic plans.

**The agent surfaces a `GitHub App is not installed` or `GitLab App is not installed` error.**
Install the Lightdash GitHub App on the repository (from the project's dbt connection settings) or connect the Lightdash GitLab App for your organization, then ask the agent to try again.
Loading