Skip to content

Repository files navigation

Timesight

Timesight

Hermes Bot Mode TypeScript MIT public

Zero-shot forecasting for the signals that move a business: sales, prices, traffic, and energy.

Paste a series — or use a built-in sample — and get a quantile forecast (p10 / p50 / p90) in milliseconds. No training step. No fine-tune.

Inspired by Google TimesFM. Timesight is a local engine (damped Holt–Winters + residual quantile bands), not Google’s hosted weights.

Timesight studio

What it does

Surface What you get
Sales 182 days of daily flagship SKU revenue — weekend peaks, a promo every four weeks
Prices 182 days of BTC-USD — drift and clustered vol, almost no weekly season
Traffic 21 days hourly edge requests — office-hour ramps, a launch bump
Energy 21 days hourly grid load (MW) — evening peaks, Sunday troughs
Custom Paste your own CSV; frequency is detected (hourly vs daily)

Controls on every series:

  • Horizon — hourly: 24h / 48h / 3d / 7d. Daily: 7 / 14 / 30 / 90 days
  • Forward — forecast past the last observation
  • Backtest — hide the tail, score MAPE against real holdout
  • Scenarios (samples only) — promo lift, demand shock, outage
  • Write brief — optional Grok read of peak, trough, and the band

Quick start

npm install
cp .env.example .env   # optional; only needed for briefing
npm run dev

Open the app, then:

  1. Click Energy (default) or another domain.
  2. Change the horizon. The forecast recomputes instantly.
  3. Switch to Backtest to see holdout MAPE.
  4. Paste series → drop a CSV → Use series.

Need a file to try? docs/examples/dummy-sales.csv is 56 days of dummy shop sales with weekend peaks and a promo spike.

CSV format

Two columns: timestamp, then value. Header optional. Comma, semicolon, or tab.

date,value
2026-06-28,839
2026-06-29,1085
2026-06-30,1142
  • At least 8 numeric rows (max 2,000; extras are trimmed from the front).
  • Dates: ISO (2026-06-28 or 2026-06-28T18:00:00Z) or unix seconds/ms.
  • Median step < 3 hours → treated as hourly (season 24). Otherwise daily (season 7).
  • Duplicate timestamps keep the last value.

Full notes: docs/csv.md.

How the engine works

forecastSeries() in src/lib/forecast/engine.ts:

  1. Sort, require ≥ 8 points, keep the last 512 as context.
  2. Pick a seasonal period (24 hourly / 7 daily) and drop it if lag-m autocorrelation < 0.22 (prices usually have none).
  3. Grid-search damped Holt–Winters (additive and multiplicative when values are positive). Damping φ = 0.9.
  4. Project the horizon. Bands are ± 1.2816 σ √h (≈ 10th/90th normal quantiles), widening with the step.
  5. Sales / traffic / energy are clipped at zero. Prices may go wherever the series goes.

Forward MAPE is one-step in-sample error on the fit. Backtest MAPE is zero-shot vs a hidden tail (min(horizon, 25% of the series, 90)).

Deep dive: docs/forecast-engine.md.

Briefing (optional)

Write brief is user-initiated. It sends compact forecast stats to grok-4.5 via the xAI API and asks for JSON: a headline, three bullets, one risk.

Set XAI_API_KEY in the server environment. No key → the button returns a friendly unavailable state. The key never goes to the browser.

Stack

  • React 19 + TanStack Start / Router
  • Tailwind v4
  • Recharts
  • Radix + a small shadcn-style kit
  • Zod, Zustand available (studio state is local React)

Layout and tokens live in src/styles.css and src/components/studio/studio.tsx.

Architecture: docs/architecture.md.

Scripts

Command Purpose
npm run dev Dev server (host 0.0.0.0, port 8080)
npm run build Production client + SSR + Nitro
npm run preview Serve the production build (port 8081)
npm run typecheck tsc --noEmit
npm run lint ESLint
npm test Workspace script tests

What this is not

Timesight is not a port of TimesFM (200M-parameter decoder-only FM). It is a zero-shot workbench with the same job: one engine, many domains, quantile forecasts, no per-series training.

License

MIT. See LICENSE.


Hermes Bot Mode

This desk is a named Hermes Bot — own model slot, memory, skills, routines, and @mentions.

# once
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

# this repo
./scripts/install-hermes-bot.sh
hermes -p timesight chat

In Hermes Desktop the Bot lands under Bots. Type @timesight from any chat; group it with the rest of the k3ss roster (markets, desks).

File Role
AGENTS.md Project harness Hermes loads at session start
.hermes/SOUL.md Bot personality
.hermes/bot.yaml Roster, skills, groups
.hermes/skills/timesight/SKILL.md Portable skill

Docs: Bot Mode · Context files · Skills

About

Zero-shot forecasting studio for sales, prices, traffic, and energy.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages