Skip to content

Commit 9650d3b

Browse files
carderneTrigger.dev RepoOps
authored andcommitted
docs: add Agent Vault coming soon page
Mono-RevId: 46e163a2e963ea5360dfe6a1fb3361fe13575187
1 parent bccdbe9 commit 9650d3b

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

‎docs/deploy-environment-variables.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ When creating an environment variable, you can mark it as a **Secret**. Secret v
4141
change this setting, you must delete the variable and create a new one.
4242
</Warning>
4343

44+
### Agent Vault
45+
46+
[Agent Vault](/vault) is coming soon. Vault secrets aren't injected into builds or task runs. Trigger.dev adds them only to outbound requests to hosts you register.
47+
4448
### Editing environment variables
4549

4650
You can edit an environment variable's values. You cannot edit the key name, you must delete and create a new one.

‎docs/docs.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@
298298
"pages": [
299299
"deployment/overview",
300300
"deploy-environment-variables",
301+
"vault",
301302
"github-actions",
302303
"deployment/trusted-publishing",
303304
"deployment/preview-branches",

‎docs/vault.mdx‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: "Agent Vault"
3+
description: "Authenticate outbound requests without exposing secrets to your builds or task code."
4+
---
5+
6+
import ComingSoon from "/snippets/coming-soon-generic.mdx";
7+
8+
<ComingSoon />
9+
10+
Agent Vault is a secure way to keep sensitive secrets out of task runs. Instead of inserting them as environment variables, they are inserted at request-time to configured destinations. This lets your tasks and agents reach configured services without having direct access to credentials.
11+
12+
## How it works
13+
14+
Your task runs get a dummy value in place of the real secret. When you make a request with that value to a configured host, Agent Vault proxies the request, adding the real credentials.
15+
16+
## Builds
17+
18+
Vault secrets are not available at build time. Top-level code in your task files runs during the build, so anything there that needs the secret to have a value will fail. Move that code inside `run`.
19+
20+
```ts
21+
import { task } from "@trigger.dev/sdk";
22+
import OpenAI from "openai";
23+
24+
// ❌ Throws during the build: OPENAI_API_KEY is undefined
25+
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
26+
27+
export const myTask = task({
28+
id: "my-task",
29+
run: async () => {
30+
// ✅ Works: the client is created when the task runs
31+
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
32+
},
33+
});
34+
```

0 commit comments

Comments
 (0)