variable_save
Saves a variable for AI agents when the user asks to keep a value: an access, a token, an address or an environment setting. A secret (secret) is stored encrypted and is never returned in responses. If a variable with the same level, scope, path and key exists, the passed fields are replaced. Levels company, project and repository require memory:moderate; user and token are the user's own. With path the value is the file /run/agent/vars// on the agent VM, without path it is the environment variable key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Environment variable or file name. | |
| desc | No | Why and how it is used; shown to agents. | |
| jobs | No | Kinds of work that need the variable; empty - all. | |
| path | No | File directory without a leading /. | |
| type | No | Defaults to string. | |
| level | Yes | Scope: company, project, repository; user - the user's own; token - the token of this connection. | |
| title | No | Title: what it is. | |
| value | Yes | Value: number - a number, json - valid JSON, binary - base64. | |
| secret | No | true - a secret: stored encrypted, the value is not shown. | |
| projectID | No | Project ID, for level = project. | |
| allCompanies | No | For level = user: true - in all of the user's companies; by default only in this one. | |
| repositoryID | No | Repository ID, for level = repository. |