After trying a set of LLM-based and 'claw' personal doc management approaches, I've settled on a pragmatic and practical setup for ingesting documents and information into my OneDrive llm-wiki using an event-based approach. This post describes my current semi-matured setup.
Compared to other pure markdown/wiki systems, my personal documents (tax files, mail attachments, etc) are a first-class citizen. I also explicitly want on-file-change events to drive my ingestion. A cron heartbeat job scanning filepaths could work, but instead I built a small Rust daemon that keeps track of events and takes an opentelemetry-style approach to tracking events and their origins. More on this later. I called it 'eventic' or 'ev' and it's the core of my personal doc management.
My system is governed by two types of inputs:
- Any personal file (pdf, docx, etc) placed in the OneDrive
Home/Incomingfolder. - Any note placed in the
/rawdirectory of my Obsidian vault. This is done manually or via the Obsidian Web Clipper.
Both of these actions emit a system-level event picked up by eventic. From there:
- Eventic waits a short period and creates a batch of documents to ingest.
- It kicks off an OpenCode session with:
args: ["run", "--pure", "--dir", "~/Library/CloudStorage/OneDrive-Personal/Home", "/second-brain-ingest {batch_paths}"] - The
second-brain-ingestskill, alongside directory-levelAGENTS.mdfiles, has the required information to place the file and update my wiki. - The agent finally emits an
evnotification event which completes the flow.
For instance, ingesting Karpathy's llm-wiki:
The TUI view of my events. Based on events and rules, my OpenCode skill is triggered.
Reflections on the system
This works well for me. It is really useful to drag any file into my OneDrive folder and have it 1. placed in the correct location, 2. be referenceable in an Obsidian context, and 3. have my agents understand the full structure of my personal files in one sweep.
From a geek perspective, but not practically, I like seeing the observability chain of my system events all the way to an agent trigger. A personal critique is that eventic isn't much more than a local event bus and actor. SQLite event store with rules. That said, I'm in the works of creating a macOS menubar application from eventic and making 'agents' a more first-class citizen rather than just any CLI tool call. Much to do, things to explore, many tokens to spend. For now, this works great.
Deeper dive
Some notes in case folks want to replicate.
Folder structure
I follow this structure in OneDrive. Nested AGENTS.md files describe the folder structure. My skills give particular instructions on the wiki setup.
Home/
├── AGENTS.md # agent constitution, routing rules, naming, what not to touch
├── Incoming/ # ← watched by eventic
│
├── Work/
├── Admin/
│ ├── Identity/ # single source of truth
│ ├── Tax/{year}/
│ ├── Finance/
│ └── Housing/{city}/
├── Personal/
├── Projects/
├── Obsidian/MicroVault/
│ ├── raw/ # ← also watched by eventic
│ ├── Autosnippets/ # working notes, primary creation zone
│ ├── [many human-owned folders]/
│ └── 08 - Wiki/ # agent-owned
│ ├── sources/ # one page per ingested doc
│ ├── entities/ # people, orgs, properties, tools
│ ├── concepts/ # topics, frameworks, recurring themes
│ └── synthesis/ # cross-cutting patterns (rare)
├── Trash/{year}/ # soft-delete
└── .agents/
├── memory/context.md # persistent facts, updated after each session
└── logs/{year}/changelog.md # append-only action logFor .agents/: see Agent context system: a lightweight convention for persistent agent memory in repos.
Ingestion skill
OpenCode (Claude Code) is my main LLM interface. I use it with a skill living at .opencode/skills/second-brain-ingest/SKILL.md. It defines:
- Read the source (with some custom instructions, e.g. PDFs via
pymupdf). - Categorize: tax, finance, housing, career, health, hobby, etc., following my
AGENTS.mdstructure. - Route: move the file from
Incoming/to its correctHome/destination. - Create or update wiki pages in
08 - Wiki/: sources, entities, concepts. - Cross-link: connect to existing pages and vault notes via
[[wikilinks]]. - Log: append to
08 - Wiki/log.mdandHome/.agents/logs/{year}/changelog.md. - Emit:
ev emit wiki.added+ev emit notify.send.
This skill was inspired by this sample.
Eventic
For Eventic, I wrote (read: vibe-coded) a small Rust daemon that acts as the reactive layer between my filesystem and my agents.
It's a file watcher that stores everything in an append-only SQLite event log, matches rules against events, and spawns agents as processes. They do their work and emit events back via ev emit. Every emitted event carries a trace_id and parent_id, so the full causal chain is inspectable. I have bigger plans for this later, but I'm first using the system for a while to see what use-cases might pop up. In theory, each event could spawn follow-up events/agents, ...
For now:
file.saved ──┐
file.saved ──┤
file.saved ──┼──→ batch.created ──→ agent.started (opencode: second-brain-ingest)
│
├──→ agent.completed
│
└──→ wiki.added ──→ notify.send ──→ [notification]An example config:
store:
path: ~/.config/eventic/events.db
sources:
- name: home-incoming
mode: watch
paths:
- ~/OneDrive-Personal/Home/Incoming
debounce_ms: 500
rules:
- name: ingest-incoming
on:
type: file.saved
agent:
command: opencode
args: [...] # see above
timeout_s: 300
batch:
settle_s: 5 # how long we give a 'set of files' to change before we trigger
cooldown: 10sAt the end of its work, the skill emits back into the loop:
ev emit wiki.added \
--trace-id "$EV_TRACE_ID" \
--payload '{"pages": ...}'
ev emit notify.send \
--trace-id "$EV_TRACE_ID" \
--payload '{"title": "Ingested", "body": "..."}' # this emits a system notification
Comments
No comments yet.
Stored via Netlify Functions & Blobs. Do not include sensitive info.