Normandy.Components.DateTimeProvider (normandy v2.2.0)

View Source

Context provider that supplies today's UTC date to agents.

This provider can be registered with an agent to automatically include the current date in the system prompt. It reports the date, not the time: a value that changes on every call would invalidate the prompt cache from the system prompt onwards.

Example

# Create a provider instance
provider = %Normandy.Components.DateTimeProvider{}

# Register with an agent
agent = BaseAgent.register_context_provider(agent, "datetime", provider)

The provider will add a section to the system prompt like:

## Current Date
2026-09-30

Summary

Types

t()

@type t() :: %Normandy.Components.DateTimeProvider{}