Skip to main content

Function: createCurrentDateTimeTool()

createCurrentDateTimeTool(): ITool<{ timezone?: string; }, { currentTime: string; isoTimestamp: string; timezoneUsed: string; }>

Defined in: packages/agentos/src/core/tools/builtins/currentDateTime.ts:23

Builds the optional runtime date tool; hosts register it through their tools list.

Returns​

ITool<{ timezone?: string; }, { currentTime: string; isoTimestamp: string; timezoneUsed: string; }>

A new getCurrentDateTime tool (id system-current-time-tool-v1.1).

Example​

import { AgentOS, createCurrentDateTimeTool } from '@framers/agentos';

const runtime = await AgentOS.create({ tools: [createCurrentDateTimeTool()] });