System variables
The sys namespace carries what the runtime knows about a run. Four names are always there. Four more reach an agent only when a developer enables them here, so by default an agent sees nothing about the user or the agent server. See Namespaces for how an expression reads them.
Always present
sys.inputsis the inputs the agent was called with.sys.queryis the user's query.sys.secretreads a secret by name, assys.secret['name']; see Secret vault.sys.existsanswers whether a variable exists, assys.exists(scope, name); see Python expressions.
Enabled here
| Value | Meaning |
|---|---|
userEmail | Email of the user. |
userSession | A hashed value of the session ID of the user in the agent server. This can be used to store data that is specific to the current user session. |
serverIp | IP address of the agent server as seen by the cloud. This can be used in logging server specific activity. |
cookies | User cookies in the request. This can expose the raw session ID of the user and other such secret values. This needs to be used carefully. |
cookies needs care. The cookies carry the user's raw session ID, and an agent that writes them into its output, a variable or a call to an outside system has given that session away. Enable cookies only for an agent that needs them, and never let the value leave the agent server.
| Field | Type | Default | Description |
|---|---|---|---|
sysVariables | list of "userEmail" | "userSession" | "serverIp" | "cookies" | Which system variables agents can read from the 'sys' namespace. 'inputs' and 'query' are always available. |

