Secrets
PreviewStorage, injection, redaction and rotation.
Secrets never enter model context, traces, artifacts or logs. The agent references a secret by name; the runtime resolves it at the transport layer.
Handling rules#
- 1Stored encrypted with envelope encryption and per-workspace keys.
- 2Referenced by name in tool definitions —
${secret:inventory_api_key}— never inlined. - 3Injected into the HTTP client, not into the environment where generated code could read it.
- 4Redacted from every output surface by pattern and by known-value matching.
- 5Rotated on schedule; OAuth credentials refresh automatically.
- 6Access is logged with the run, step and tool that used them.
defineTool({
name: class="tok-str">"inventory.lookup",
auth: { type: class="tok-str">"bearer", secret: class="tok-str">"inventory_api_key" }, // reference only
async execute(args, ctx) {
class="tok-com"> // ctx.http already carries the credential; the value is not readable here
return ctx.http.get(class="tok-str">"/v2/inventory", { query: args });
}
});Last updated 2026-09-16

