pi-time-awareness

Give Pi a lightweight sense of time with low-noise anchors and exact time on demand.

Packages

Package details

extension

Install pi-time-awareness from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-time-awareness
Package
pi-time-awareness
Version
0.1.2
Published
Jun 15, 2026
Downloads
not available
Author
enderliquid
License
MIT
Types
extension
Size
12.3 KB
Dependencies
1 dependency · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Pi Time Awareness

English | 简体中文

In long sessions, Time is often the first thing to become blurry in context.

A model can read context, but it does not always understand time.

In a world where time is the fourth dimension, we need to give it just the right sense of time.

Install

npm package

pi install npm:pi-time-awareness

Git repository

pi install git:github.com/EnderLiquid/pi-time-awareness

What it does

pi-time-awareness gives your Agent awareness of the current time and the time span of the session it is in.

It gives the Agent two complementary time capabilities:

  • Low-frequency time anchors: from time to time, the plugin injects an extra time hint after a new user message. This message is hidden in the TUI, but it is written into the session history. That lets the Agent roughly infer the current time from the latest anchor, and sense the time span of the session through multiple anchors across the context. Time anchors are injected at least one hour apart to avoid adding too much context noise.

  • The time tool: the model can request the exact current time on demand, returned as a formatted display string display and a Unix millisecond timestamp unixMs.

At the same time, it removes Pi's built-in Current date: line from the system prompt, avoiding low-precision date noise that can become stale in long sessions.

Features

  • Low-frequency time injection that stays lightweight in context and friendly to caching

  • Persistent time anchors aligned with user messages, replacing Pi's coarse current-date hint with time awareness that is more precise and more dimensional

  • Throttling based on the latest time anchor on the current session branch, so rewinding the tree or switching branches still behaves correctly

Time formats

Examples:

  • Anchor message: Time anchor: Wed 2026-06-17 10:32:45 UTC+08:00

  • Tool result:

{
  "display": "Wed 2026-06-17 10:32:45 UTC+08:00",
  "unixMs": 1781663565000
}

The plugin follows the runtime's local timezone and always renders the offset in UTC±HH:mm form.

License

MIT License