Skip to content

Provide per-turn temporal context to agents #77

@lezama

Description

@lezama

Problem

Agents that handle user messages with relative dates can anchor phrases like "today", "tomorrow", "yesterday", "this week", or month names without a year to stale conversation history instead of the actual WordPress site/user date.

This is especially easy to hit in long-running chat sessions: an earlier turn may mention an old date, and a later turn that says "tomorrow" can be resolved relative to that old date unless the runtime provides fresh temporal context on every turn.

Requested behavior

OpenclaWP's Agenttic bridge should provide standard per-turn temporal context for agent runs, ideally as structured metadata rather than text appended to the user message.

Suggested fields:

  • current_date, e.g. YYYY-MM-DD
  • current_time, preferably ISO 8601
  • timezone, from the WordPress site or current user
  • locale, if available

This context should be refreshed on every turn, not only at session creation, so long-running sessions cannot drift or keep using an old date.

Why OpenclaWP

agents-api is the lower-level agent substrate and should not decide domain semantics. OpenclaWP is closer to the WordPress chat/runtime bridge, where site/user timezone and request context are available.

Domain agents can still decide how to use the metadata, but the bridge should make the correct temporal facts available by default.

Current workaround

Apps can prepend a textual per-turn temporal block to user messages and instruct the agent to prefer it over conversation history. That works, but it is app-specific and text-based. A structured runtime-provided context would be cleaner and less error-prone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions