Default Variables
Time-based variables use the local time of the host machine running AnythingLLM.
| Variable | Description | Availability |
|---|---|---|
{date} | Current date | All versions |
{time} | Current time | All versions |
{datetime} | Current date and time | All versions |
{user.name} | User name | AnythingLLM Docker (Multi-user mode enabled) |
{user.bio} | User bio field | AnythingLLM Docker (Multi-user mode enabled) |
{os.name} | Operating system name | AnythingLLM Desktop |
{os.arch} | OS architecture | AnythingLLM Desktop |
Configuration & Usage
Custom Variables
- Navigation: Settings -> Tools -> System Prompt Variables
- Action: Click Add Variable to define static custom variables.
Implementation
- Insert variables using
{variable_name}syntax within any workspace System Prompt field. - Valid variables highlight in blue in the UI after editing. Invalid variables fail silently (do not expand, no error thrown).
Prompt Example
You are a helpful assistant.
Today is {date} and the current time is {time}.
The user's name is {user.name}, they work at {company_name} and this is what we know about them:
{user.bio}