Repository navigation
Ingest An Article
Note
Status: implemented — shipped by PLAN-capture-article-ingestion.md (FRIDAY ladder feature 3, capture part 2 of 3).
Goal: Turn a web page or a local file into a searchable, chunked memory — one intact full-document note plus small, reading-order-linked chunks for retrieval.
Prereqs: A resolvable vault (--vault-path or $MEMORY_ROOT). No new dependency — fetching a URL uses stdlib urllib only.
/memory ingest is the explicit, human-invoked door into article ingestion — you name the URL or file yourself. It writes straight to permanent memory, the same trust level as memory_append: you named the source, so there's no staging step. (Contrast the automated ingest sweep, which fetches forwarded links on its own schedule and stages first — see Capture from your phone.)
-
Run it against a URL or a file:
python3 harness/skills/memory/scripts/ingest.py https://example.com/some-article --vault-path <path>
or a local file:
python3 harness/skills/memory/scripts/ingest.py ./notes/draft.md --vault-path <path>
-
Omit
--topicthe first time. Without a topic, the command extracts a title-based slug and stops without writing anything — a real confirmation step, not an auto-accept (ingest(),harness/skills/memory/scripts/ingest.py:222-260):suggested topic: the-quiet-discipline-of-paragraph-breaks title: The Quiet Discipline of Paragraph Breaks re-run with --topic the-quiet-discipline-of-paragraph-breaks to confirm (or pass a different --topic) -
Confirm with
--topic. Re-run with the suggested slug (or your own):python3 harness/skills/memory/scripts/ingest.py https://example.com/some-article --vault-path <path> --topic typography
This writes two things, always together, never one without the other: one full-document note (
kind: domain-reference, the complete extracted text, byte-for-byte reproducible) and a set of chunk notes (one perchunking.py'schunk_text()output), each linked to its immediate reading-order neighbors and back to the full document. -
HTML is tag-stripped; plain text passes through unmodified. A fetched web page's markup is reduced to plain text via a minimal parser (
extract_title_and_text(),ingest.py:196-209) — scripts and styles are dropped entirely; everything else becomes plain text. A local.mdor.txtfile is stored exactly as you wrote it. -
Every note is tagged and slug-prefixed by topic, but shares the flat
group: personalevery other kind of entry in this vault uses — same-topic ingests sort together by filename even though there's no dedicated per-topic folder.
-
IngestBasicsTests,FullDocumentNoteTests,ChunkNoteTests,TopicSuggestionTests,GroupCorrectnessTests, andHtmlExtractionTests(scripts/test_ingest.py) cover the full behavior — 17 tests, two local fixtures (scripts/fixtures/ingest/), no live-network dependency. -
test_raw_content_skips_fetch_and_preserves_provenanceproves theraw_content=/source_url=/source_fetched=parameters the automated sweep uses to re-invoke this same function at promotion time without re-fetching.
-
A slug collision.
ingest()refuses to write anything if any target slug already exists — checked before any file is touched, not discovered partway through (ingest.py:283-299). Pick a different--topic, or confirm the existing entry is really what you meant. -
A fetch fails (dead link, network error). Returns
success: falsewith the underlying error; nothing is written. No retry, no paywall handling here — that resilience is the automated sweep's job, not this command's.
- Capture from your phone — the automated, staged counterpart to this explicit door.
-
Memory MCP tools reference — field-level detail for the sibling
memory_capture/memory_search/memory_append/memory_forgettools. -
wiki/designs/agentm-capture.md— the full design.
🔧 How-to
- Install machine-wide (recommended)
- Your first install
- Your first Agent View dispatch
- Configure a new project
- Re-detect a configured project
- Update an installed harness
- Use auto-context in phases
- Audit the vault
- Find missing note links
- Use AgentMemory in any agent
- Drop a card in the inbox
- Tune auto-orchestration
- Run without a vault
- Choose a storage backend
- Back the vault with Google Drive
- Set up Obsidian on the vault
- Find your way around the vault
- Run the memory-root trims migration
- Run the root casing migration
- Run the projects migration
- Run the card backfill
- Run the maps and root notes migration
- Persist a morning report
- Enable on-device notifications
- Enable the daily email
- Ingest an article
- Capture from your phone
- Archive a finished project
- Tune the archive
- Read the morning note and the nightly scorecard
- Read the weekly field brief
- Review flagged memories
- Use the daily calendar