WenXiaoWendy/timeline-for-agent
About
An Agent chat history visualization tool focused on companionship in everyday life. It unobtrusively records chat content and displays it as timelines and statistical analysis views. Supports local deployment, automated screenshot delivery, and ongoing sharing.
Productivity & AutomationMeasured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
OriginalTimeline for Agent
Turn long-running conversations into a structured life timeline, then generate filterable dashboard views and screenshots on demand.
Important prerequisite: the upstream agent must already know when each message happened. If the conversation has no explicit timestamps, the generated time data will be unreliable. If you want a ready-to-use WeChat bridge that already solves this part, see cyberboss.
Timeline for Agent is built for this kind of workflow:
- an agent accumulates knowledge about a user's routines, work, body state, and daily rhythm across long conversations
- those observations need a structured output instead of staying buried inside chat history
- when the user wants to inspect a day, week, month, category, or detail slice, the agent should be able to return a clean dashboard or screenshot immediately
Preview
Main dashboard view:

Filtered analytics example:

More examples are available under examples/:
timeline-dashboard-timeline-view.pngtimeline-dashboard-analytics-view.pngtimeline-dashboard-events-view.pngscreenshot-combos/week-main-default.pngscreenshot-combos/week-analytics-default.pngscreenshot-combos/month-2026-04-work-coding-analytics.pngscreenshot-combos/week-rest-sleep-events.pngscreenshot-combos/day-2026-04-05-timeline.pngscreenshot-combos/month-2026-04-analytics.png
User Guide
Two common ways to use it
- Let an agent keep writing timeline data during conversation, then ask for screenshots only when needed.
- Keep a local dashboard running all the time so you can inspect the data directly without asking the agent to capture a screenshot.
If you want a dashboard that stays open locally
If you want the dashboard available at any time, run one of these commands:
timeline-for-agent dev
timeline-for-agent serve
Difference:
timeline-for-agent devBest for development or frequent data edits. It watches source and data files, rebuilds, and hot reloads.timeline-for-agent serveBest for stable viewing. It serves the built static site without watching files.
Common flow:
timeline-for-agent build
timeline-for-agent serve --port 4317
If you mostly want to inspect data, prefer serve. If you are changing data and code while observing the result, prefer dev.
Installation and startup
Requirements:
- Node.js
>= 22 - dependencies installed with
npm install - Chrome / Chromium / Edge if you want screenshots, or any browser discoverable by
playwright-core
Fastest start:
npm install
npm run timeline-dev
The default local address is http://127.0.0.1:4317.
If you prefer not to use npm scripts:
node ./bin/timeline-for-agent.js dev
Where the data lives
The default state directory is ~/.timeline-for-agent/timeline/.
Important files:
timeline-state.jsonsingle authoritative state snapshottimeline-taxonomy.jsoncategories, subcategories, and event nodestimeline-facts.jsonreal timeline event datasite/static dashboard output frombuildshots/default output directory forscreenshot
Timezone configuration:
timeline-state.json,timeline-taxonomy.json, andtimeline-facts.jsonall carry atimezonefield- day/week/month grouping, trend aggregation, tooltip times, and mobile timeline positioning should all follow that
timezone - if you deploy outside UTC+8, or want the same event data interpreted in another timezone, check and update
timeline-state.jsonfirst - if you are still using the separated-file layout, keep the
timezonevalues intimeline-taxonomy.jsonandtimeline-facts.jsonaligned
The CLI reads .env from these two locations first:
- the current working directory
~/.timeline-for-agent/.env
Useful environment variables:
TIMELINE_FOR_AGENT_LOCALETIMELINE_FOR_AGENT_STATE_DIRTIMELINE_FOR_AGENT_DIRTIMELINE_FOR_AGENT_PORTTIMELINE_FOR_AGENT_CHROME_PATHTIMELINE_FOR_AGENT_TAXONOMY_FILETIMELINE_FOR_AGENT_FACTS_FILETIMELINE_FOR_AGENT_SITE_DIR
Language switching:
TIMELINE_FOR_AGENT_LOCALE=en npm run timeline-serve
TIMELINE_FOR_AGENT_LOCALE=zh-CN npm run timeline-serve
The same variable also applies to:
TIMELINE_FOR_AGENT_LOCALE=en npm run timeline-dev
TIMELINE_FOR_AGENT_LOCALE=zh-CN npm run timeline-build
TIMELINE_FOR_AGENT_LOCALE=en npm run timeline-screenshot -- --selector main
Where the current demo data comes from
- if real
factsexist, the dashboard uses them directly - if real
factsare empty, it falls back to locale-specific demo data- English: demo-facts.json
- Chinese: demo-facts.zh-CN.json
- if
TIMELINE_FOR_AGENT_LOCALEis not set, the default locale is English
Where the category labels come from
- categories come from
timeline-taxonomy.json - if no custom taxonomy exists yet, the project creates and uses the built-in default taxonomy
- writing can also introduce new
eventNodeproposals, which are added to taxonomy and recorded for review
What users usually run
timeline-for-agent buildbuild the static dashboard intosite/timeline-for-agent serve [--port 4317]start the static dashboard servertimeline-for-agent dev [--port 4317]watch source and data files, then rebuild and hot reloadtimeline-for-agent screenshotbuild, start a temporary local server, and capture a screenshot
Agent Guide
Command entrypoints
timeline-for-agent help
timeline-for-agent categories
timeline-for-agent proposals
timeline-for-agent read --help
timeline-for-agent write --help
timeline-for-agent read --date 2026-04-06
timeline-for-agent write --date 2026-04-06 --stdin
timeline-for-agent build
timeline-for-agent serve
timeline-for-agent dev
timeline-for-agent screenshot --help
timeline-for-agent screenshot
If the repo is not installed globally, replace those with:
node ./bin/timeline-for-agent.js <command>
Basic rules
- prefer the existing CLI before reading source code
- read source only when a command fails, the user explicitly asks for an implementation change, or a new capability is needed
- avoid editing raw JSON files directly unless the user explicitly wants manual data work
Read and write workflow
- if category / subcategory / eventNode choice is unclear, run
timeline-for-agent categoriesfirst - if the task is adding new content and the date, location, and intent are already clear, you can go straight to
timeline-for-agent write - if the task is modifying, removing, replacing, or auditing existing content, run
timeline-for-agent read --date YYYY-MM-DDfirst readreturns controlled day-level events only, not the full raw facts or taxonomy- after confirming which events need to change, run
timeline-for-agent write - if you need to inspect newly introduced event node proposals, run
timeline-for-agent proposals
Write constraints
- every event must stay within the target
date - every event must include
startAtandendAt - every event must satisfy one of these:
- provide
eventNodeId - provide
subcategoryId, preferably together withcategoryId
- provide
- if usable category information is missing, the write fails instead of silently dropping the event
- if sleep crosses
00:00, split it into two events:- the early-morning segment belongs to that day's opening hours
- the late-night segment belongs to that day's closing hours
- do not create one event that runs from late night directly into the next morning
Screenshots
screenshotrunsbuild, starts a temporary server, and captures the page- the default output directory is
~/.timeline-for-agent/timeline/shots/ - if browser discovery fails, set
TIMELINE_FOR_AGENT_CHROME_PATH - if the user wants distribution over time for a category or detail, prefer
--selector analytics - use
--selector eventsonly when the user explicitly wants the event card list
Examples:
timeline-for-agent screenshot --selector main
timeline-for-agent screenshot --selector timeline
timeline-for-agent screenshot --range day --date 2026-04-05 --selector timeline
timeline-for-agent screenshot --range month --month 2026-04 --selector analytics
timeline-for-agent screenshot --range week --category Work --detail Coding --selector analytics
timeline-for-agent screenshot --range week --category Work --detail Coding --selector events
Further docs:
- shared agent constraints: agent-instructions.md
- future MCP tool descriptions: mcp-tool-descriptions.md
License
This project is designed for local-first personal deployment. Timeline data usually contains highly private information about routines, health, and long-term behavior patterns. I do not want that data flow repackaged into a closed SaaS layer that hides both code and data paths from the user.
Because of that, the project is released under AGPL-3.0-only. If you modify it, extend it, and provide it to users over a network, you must provide the full corresponding source code under AGPL terms.
Explore related projects
Loading…