MCPcopy Index your code
hub / github.com/Einsia/OpenChronicle

github.com/Einsia/OpenChronicle @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
493 symbols 1,407 edges 55 files 178 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OpenChronicle

OpenChronicle

Open-source, local-first memory for any tool-capable LLM agent.

Think OpenAI Chronicle - but open, model-agnostic, inspectable, and hackable.


  <img
    alt="Star History Chart"
    src="https://api.star-history.com/svg?repos=Einsia/OpenChronicle&type=Date"
  />

Status: v0.1.0 · macOS only · early alpha

OpenChronicle gives AI agents a local, inspectable memory built from real screen and app context.

It runs on your Mac, captures structured context from what you're doing, and turns it into persistent Markdown memory: what you're working on, what you've decided, which tools you use, and which people or projects matter.

Any agent that can call tools can use it. MCP clients work especially well today, but OpenChronicle is meant to be a general memory layer for tool-using agents - not something tied to one protocol, one model provider, or one app.


Why OpenChronicle

OpenAI Chronicle points to an important future: agents that remember your real working context.

OpenChronicle is our open alternative:

  • Local-first - memory stays on your machine
  • Model-agnostic - use Ollama, LM Studio, OpenAI, Anthropic, or any LiteLLM-compatible provider
  • Tool-friendly - usable by any tool-capable agent
  • Inspectable - Markdown on disk, SQLite locally
  • Open - MIT-licensed and built to be extended

Why AX-first

OpenChronicle currently prioritizes AX Tree / accessibility-tree context as its primary signal, with screenshots as a secondary signal over time.

We think this is the right tradeoff for an early memory system:

  • Lower cost - structured text is far cheaper to process than screenshot-heavy OCR / vision pipelines
  • Better intent capture - AX is often better for active app, focused element, edited text, URL, and interaction state
  • Smaller, cleaner memory - easier to deduplicate, normalize, index, and retain long-term
  • Better foundation - screenshots can later enrich visual context where AX falls short

AX-first for accurate, compact, low-cost memory; screenshot-assisted for richer multimodal context.


OpenChronicle vs OpenAI Chronicle

OpenAI Chronicle OpenChronicle
Source Closed MIT, open-source
Model choice OpenAI-centric Your choice
Who can use it Product-specific workflow Any tool-capable agent
Primary capture Screenshot / OCR-heavy AX Tree first, screenshot-assisted
Storage Local generated memories Markdown + SQLite on your machine
Extensibility Limited Hackable parsers, memory logic, integrations

How it works

flowchart LR
    W[mac-ax-watcher

events]
    S0["<b>S0</b> dispatcher

dedup · debounce

min-gap"]
    S1["<b>S1</b> parser

focused_element

visible_text · url"]
    BUF[(capture-buffer

/*.json)]
    TL["Timeline

normalizer

1-min · verbatim"]
    TB[(timeline_blocks)]
    SM["Session mgr

idle 5m · app-switch 3m

max 2h"]
    S2["<b>S2</b> reducer"]
    ED[(event-

YYYY-MM-DD.md)]
    CLF["Classifier

→ user- / project- / tool- /

topic- / person- / org-*.md"]
    STORE[("SQLite FTS5

+ Markdown")]

    W --> S0 --> S1 --> BUF --> TL --> TB --> S2 --> ED --> CLF --> STORE
    ED --> STORE
    BUF -. pre_capture_hook

(post-write · skipped on content-dedup) .-> SM
    SM -. flush 5m / on_end .-> S2
    TB -. grounding .-> CLF

The core idea is simple:

  1. capture context
  2. compress it into sessions
  3. extract durable facts
  4. store memory locally
  5. let agents query it through tools

What you get

  • Event-driven capture from macOS AX events
  • Session-aware memory writing instead of noisy per-snapshot logs
  • Human-readable Markdown memory
  • Local SQLite indexing
  • Structured memory files like user-, project-, tool-, topic-, person-, org-, and daily event-
  • Supersede-not-delete history
  • Local or cloud model support
  • Always-on agent-readable interface, with MCP as the best-supported path today

Install

Requires macOS 13+ and Xcode Command Line Tools (xcode-select --install).

git clone https://github.com/Einsia/OpenChronicle.git
cd openchronicle
bash install.sh

Run

openchronicle start
openchronicle start --foreground
openchronicle status
openchronicle pause
openchronicle resume
openchronicle stop

Useful inspection commands:

openchronicle capture-once
openchronicle timeline tick
openchronicle timeline list
openchronicle writer run
openchronicle rebuild-index

Connect an agent

OpenChronicle is designed for tool-calling agents.

Best-supported path today: MCP

The daemon hosts an MCP endpoint at:

http://127.0.0.1:8742/mcp

Supported integration paths include:

  • Claude Code
  • Claude Desktop
  • Codex
  • opencode
  • custom local agents
  • and more...

See docs/mcp.md for setup details.


Contributing

We especially want help in three areas:

1. Better context parsers

App-specific parsing and normalization for browsers, terminals, editors, Slack, Notion, Cursor, Linear, Figma, and more.

2. Better memory management

Session reduction, durable-fact extraction, compaction, supersede / merge logic, and retrieval quality.

3. More agent integrations

Support for more MCP clients, IDE agents, coding assistants, desktop agents, and local orchestration frameworks.

If you care about local-first agents, personal AI memory, or open context infrastructure, this project is for you.


Documentation


Development

uv sync --all-extras
uv run pytest
uv run ruff check

License

MIT.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Qianli Ren Qianli Ren 💻 🚧 Bowen Wang Bowen Wang 💻 🚧 CrazyCalvin CrazyCalvin 💻 Firefly Firefly 💻 校奥浆糊 校奥浆糊 💻 🚧 Houde Qian Houde Qian 💻 GiddensF97 GiddensF97 🎨
SiyiZhu1 SiyiZhu1 🎨

This project follows the all-contributors specification. Contributions of any kind welcome!

Core symbols most depended-on inside this repo

get
called by 29
src/openchronicle/logger.py
_init
called by 19
src/openchronicle/cli.py
run
called by 18
src/openchronicle/capture/scheduler.py
on_event
called by 15
src/openchronicle/session/manager.py
_as_dict
called by 12
src/openchronicle/config.py
model_for
called by 10
src/openchronicle/config.py
_build_dataclass
called by 9
src/openchronicle/config.py
root
called by 9
src/openchronicle/paths.py

Shape

Function 392
Method 58
Class 43

Languages

Python100%

Modules by API surface

src/openchronicle/cli.py46 symbols
src/openchronicle/store/fts.py24 symbols
src/openchronicle/capture/ax_capture.py22 symbols
tests/test_store.py20 symbols
src/openchronicle/capture/scheduler.py19 symbols
tests/test_cli_status.py18 symbols
src/openchronicle/writer/session_reducer.py18 symbols
src/openchronicle/config.py18 symbols
src/openchronicle/session/store.py17 symbols
src/openchronicle/mcp/server.py17 symbols
src/openchronicle/store/files.py16 symbols
tests/test_session_manager.py14 symbols

For agents

$ claude mcp add OpenChronicle \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact