Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dynamic Variables Plugin

Injects dynamic system information (date, time, OS, working directory) into the agent’s system prompt.

Details

IDnexus.system.dynvars
DependenciesNone

Configuration

Each variable is opt-in — defaults to false and must be explicitly enabled:

KeyTypeDefaultDescription
dateboolfalseInclude current date
timeboolfalseInclude current time
timezoneboolfalseInclude timezone
cwdboolfalseInclude current working directory
session_dirboolfalseInclude session directory path
osboolfalseInclude operating system

Events

This plugin does not subscribe to or emit any events. It registers a prompt section via the Prompt Registry during initialization.

System Prompt Output

The plugin appends a section like this to the system prompt:

## System Info
- Date: 2026-04-08
- Time: 10:30:00
- Timezone: America/New_York
- OS: darwin
- CWD: /Users/frank/projects/myapp
- Session: ~/.nexus/sessions/abc123

Example Configuration

# Empty config → no variables emitted (every flag defaults to false).
nexus.system.dynvars: {}

# Enable only the variables you want.
nexus.system.dynvars:
  date: true
  cwd: true