Skip to main content
DELETE
Delete Agent Variable

Overview

Removes one variable from one of the agent’s environments. If the variable was saved with is_secret, the stored secret is deleted with it. The request succeeds even when no variable with that key exists. Calls that run as this environment and still reference {{env.KEY}} fail until the variable is set again with Set Agent Variable. Requires an admin, owner, operator, or prompter role.

Headers

string
required
Your API key for authentication.

Path Parameters

string
required
The agent’s unique identifier.
string
required
One of dev, staging, production. Any other value returns 400 INVALID_ENV.
string
required
The variable key to remove, matched exactly after trimming surrounding whitespace.

Response

boolean
Always true on success, whether or not a variable with that key existed.
null | array
null on success, or a list of error objects if the request failed.

Docs for agents: llms.txt