v2.5.9

March 10, 2026

Present datetime context in any format with datetime_format

A new datetime_format parameter on Agent and Team lets you control exactly how the current datetime is presented in the agent's context using any valid strftime format string. This removes the need to manually inject formatted timestamps through instructions and ensures consistent datetime representation across different locales, regions, and output requirements.

Details:

  • Pass any strftimecompatible format string (e.g., "%Y-%m-%dT%H:%M:%S" for ISO-8601, "%Y-%m-%d" for date-only, or locale-specific patterns)
  • Applies wherever datetime context is injected, including add_datetime_to_context=True
  • Defaults to existing behavior when not set; no migration required

See cookbook.