Memory

Now-Anchoring

Ground the agent's reasoning in the current absolute time without requiring tool calls, so every reply is implicitly time-aware.

Problem

Without an explicit time anchor injected into the prompt, the agent either guesses the time from scattered clues, treats every turn as timeless, or has to call a tool to find out — turning a routine fact (the current time) into friction in every interaction. As a result, the agent's replies become temporally generic ('hi!') instead of grounded ('good evening — Friday already'), and any reasoning that depends on relative time ('this happened two days ago', 'this is due tomorrow') is either wrong or arbitrarily delayed by a tool call.

Solution

On every prompt assembly, compute a small block: ISO local time, ISO UTC, weekday, day-of-year, ISO week, season (hemisphere-aware), moon phase. Inject as a `## NOW` section near the top of the system prompt. Cost is microseconds; benefit is the model never being temporally adrift.

When to use

  • The agent's runtime spans more than a few minutes and absolute wall-clock time matters to its replies.
  • Users frequently use temporal language ('today', 'tonight', 'this week') and expect the agent to interpret it correctly.
  • Tool calls just to fetch current time would inflate latency or token cost.

Open the full interactive page

Diagram, neighbourhood map, code examples, related patterns and full provenance.

Related