From af32ab48b9c44f6e9d4fe862efd17d0ff3834510 Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:22:55 +0530 Subject: [PATCH] date and time --- apps/x/packages/core/src/agents/runtime.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/x/packages/core/src/agents/runtime.ts b/apps/x/packages/core/src/agents/runtime.ts index 6f871bb6..407ba182 100644 --- a/apps/x/packages/core/src/agents/runtime.ts +++ b/apps/x/packages/core/src/agents/runtime.ts @@ -696,10 +696,21 @@ export async function* streamAgent({ loopLogger.log('running llm turn'); // stream agent response and build message const messageBuilder = new StreamStepMessageBuilder(); + const now = new Date(); + const currentDateTime = now.toLocaleString('en-US', { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric', + hour: 'numeric', + minute: '2-digit', + timeZoneName: 'short' + }); + const instructionsWithDateTime = `Current date and time: ${currentDateTime}\n\n${agent.instructions}`; for await (const event of streamLlm( model, state.messages, - agent.instructions, + instructionsWithDateTime, tools, )) { // Only log significant events (not text-delta to reduce noise)