Trajex banner
wutongyuonce wutongyuonce

Trajex

Development community

Description

数万行散落的 Claude Code、Codex 与 Pi JSONL 会话,索引至同一个 SQLite 中:
Agent 可通过 CLI 实现毫秒级查询,用户可通过 App 直观浏览|Past Claude Code, Codex, Pi sessions -- queryable by your agent, browsable by you

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

中文 · English


Trajex

面向 Agent 的通用本地会话记忆平台

stars version license

将来自不同 provider —— Codex、Claude Code、Pi 的 JSONL 历史解析为同一套 canonical record 并持久化至 SQLite,通过 FTS5 全文索引实现毫秒级历史检索。

  • 采用 CodeAct 智能体设计范式,提供可编程 JS Query API,让 Agent 将 “编写可执行代码” 作为核心行动方式
  • 配套 Electron + Vue 桌面端,将同一份索引转化为可读的会话时间线,用户可通过 App 直观浏览

Acknowledgements

Trajex 源自 [tommy0103/obelisk](https://github.com/tommy0103/obelisk),基于上游 `07f975d`(2026-07-22)快照发展而来。Trajex 在此基础上对索引核心进行了改写与精简,修复了一些 bug,并优化了桌面应用,包括白天/黑夜主题切换、Codex-like 的纵向进度条和本地文件链接预览。

Pi 会话支持的实现骨架来自上游 [PR #4](https://github.com/tommy0103/obelisk/pull/4);当前会话身份、tombstone 以及 compaction / retained tail 等设计语义来自上游 [PR #23](https://github.com/tommy0103/obelisk/pull/23)。未来 Trajex 可能会在不破坏现有功能与兼容性的前提下,同步 [obelisk](https://github.com/tommy0103/obelisk) 的后续改动。感谢 obelisk 的开发者为 Agent 基础设施和智能体工程实践所作出的贡献。

同一个索引的两面

Trajex 有两面,它们共享同一个 SQLite 索引:

**Agent 侧** — `trajex` CLI 负责本地运行时;另有一个独立的 Agent skill 教会 coding agents 如何搜索和查询自己的会话历史。Agent 会编写 JS 查询,在本地运行,并用自然语言回答。

**App 侧** — Electron 桌面 app,供人浏览 sessions、管理 memories,以及查看使用统计。

两者都读取同一个 `~/.trajex/trajex.sqlite` 数据库。索引器会读取 `~/.claude/projects` 中的 Claude Code transcripts、`~/.codex/sessions` 和 `~/.codex/archived_sessions` 中的 Codex transcripts,以及 `~/.pi/agent/sessions` 中的 Pi se