
Pi History Ingest
Mine ~/.pi/agent/sessions JSONL into an Obsidian wiki so past Pi coding work becomes searchable, linked knowledge.
Overview
Pi-history-ingest is an agent skill most often used in Operate (also Build agent-tooling, Grow content) that ingests Pi session JSONL into an Obsidian wiki with manifest-aware append ingest.
Install
npx skills add https://github.com/ar9av/obsidian-wiki --skill pi-history-ingestWhat is this skill?
- Follows Pi JSONL session trees along the active branch to extract durable insights
- Resolves Obsidian vault and PI_HISTORY_PATH via Config Resolution Protocol
- Append mode skips files already listed in .manifest.json for incremental ingest
- Triggers on phrases like process my Pi history, ingest ~/.pi, or Pi conversation logs
- Routable via wiki-history-ingest router (/wiki-history-ingest pi)
- Default Pi history path ~/.pi/agent/sessions
- Append mode respects per-file .manifest.json entries
Adoption & trust: 1 installs on skills.sh; 1.8k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Pi agent sessions hold useful decisions and snippets but stay trapped in ~/.pi with no linked wiki you can search later.
Who is it for?
Builders who use Pi daily and maintain an Obsidian vault for project memory and session retrospectives.
Skip if: Teams without Pi session folders or anyone who does not use Obsidian as a wiki target.
When should I use this skill?
User wants to mine Pi sessions, import ~/.pi/agent/sessions, extract insights, or mentions Pi agent history or conversation logs.
What do I get? / Deliverables
Durable Obsidian notes and an updated .manifest.json reflecting which Pi session files were processed.
- Updated wiki pages distilled from active session branches
- Updated .manifest.json tracking ingested source files
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Operate iterate because the primary job is turning finished agent sessions into durable notes you reuse while shipping and fixing products. Iterate fits session mining and append-only ingestion that updates the vault manifest without redoing entire histories.
Where it fits
Append new Pi session files after a week of fixes and link extracted patterns into the vault index.
Import prior Pi debugging threads when documenting how your agent workflow evolved.
Turn recurring Pi session themes into evergreen wiki articles for future launches.
How it compares
Use instead of manual copy-paste from chat logs when you want structured session-tree mining into a manifest-driven vault.
Common Questions / FAQ
Who is pi-history-ingest for?
It is for Pi users who want their ~/.pi/agent/sessions distilled into an Obsidian wiki with incremental ingest.
When should I use pi-history-ingest?
Use it in Operate when iterating on personal knowledge, in Build when documenting agent tooling choices, or when you say process my Pi history or add my Pi sessions to the wiki.
Is pi-history-ingest safe to install?
Sessions may contain secrets or private code; review the Security Audits panel on this page and scrub sensitive paths before sharing the vault.
SKILL.md
READMESKILL.md - Pi History Ingest
# Pi History Ingest — Session Mining You are extracting knowledge from the user's Pi coding agent sessions and distilling it into the Obsidian wiki. Pi sessions are stored as structured JSONL with a tree layout — your job is to follow the active branch, extract durable knowledge, and compile it. This skill can be invoked directly or via the `wiki-history-ingest` router (`/wiki-history-ingest pi`). ## Before You Start 1. **Resolve config** — follow the Config Resolution Protocol in `llm-wiki/SKILL.md` (walk up CWD for `.env` → `~/.obsidian-wiki/config` → prompt setup). This gives `OBSIDIAN_VAULT_PATH` and `PI_HISTORY_PATH` (defaults to `~/.pi/agent/sessions`) 2. Read `.manifest.json` at the vault root to check what has already been ingested 3. Read `index.md` at the vault root to understand what the wiki already contains ## Ingest Modes ### Append Mode (default) Check `.manifest.json` for each source file. Only process: - Files not in the manifest (new sessions) - Files whose modification time is newer than `ingested_at` in the manifest Use this mode for regular syncs. ### Full Mode Process everything regardless of manifest. Use after `wiki-rebuild` or if the user explicitly asks for a full re-ingest. ## Pi Data Layout Pi stores sessions under `~/.pi/agent/sessions/` (or the path set by `PI_CODING_AGENT_SESSION_DIR`). ``` ~/.pi/agent/sessions/ ├── --<cwd-path>--/ # Working directory with / replaced by - │ └── <timestamp>_<uuid>.jsonl # Session JSONL file └── ... ``` The session filename contains an ISO timestamp and UUID. The parent directory encodes the working directory where the session was created. ### Session JSONL Format Each `.jsonl` file is a sequence of JSON objects. The first line is always a `session` header; subsequent lines are tree entries with `id` and `parentId`. Key entry types: | `type` | Purpose | Ingest? | |---|---|---| | `session` | Header with `cwd`, `version`, `id`, `timestamp` | Metadata only | | `message` | Conversation turn (`user`, `assistant`, `toolResult`, `bashExecution`, etc.) | **Primary source** | | `session_info` | Display name set via `/name` | For session title | | `compaction` | Context compaction summary | **High signal** | | `branch_summary` | Summary when switching branches via `/tree` | **High signal** | | `model_change` | Model switch event | Skip | | `thinking_level_change` | Thinking level change | Skip | | `custom` | Extension state (not in LLM context) | Skip | | `custom_message` | Extension-injected message | Context only | | `label` | User bookmark/label | Skip | ### Message roles inside `message` entries - `user` — user input; `content` is string or `(TextContent \| ImageContent)[]` - `assistant` — assistant response; `content` is `(TextContent \| ThinkingContent \| ToolCall)[]` - `toolResult` — tool execution result; `content` is `(TextContent \| ImageContent)[]` - `bashExecution` — bash command + output; `command`, `output`, `exitCode` - `branchSummary` — branch switch summary; `summary` string - `compactionSummary` — compaction summary; `summary` string ### Key data sources ranked by value 1. **`message` entries (`user` + `assistant`)** — full conversation transcripts; rich but noisy 2. **`compaction` entries** — pre-synthesized summaries of older context; gold 3. **`branch_summary` entries** — summaries of abandoned branches; good signal 4. **`bashExecution` entries** — concrete commands run; useful f