Memory

hm_list_orphans

Find nodes that aren't connected to the rest of your graph

hm_list_orphans lists nodes that are disconnected from the main body of your graph, so you (or your agent) can connect them or delete them.

An orphan is a node with no binary edges, or a node in a small binary component that isn’t connected to the main one. Being part of a hyperedge alone doesn’t make a node connected. When a graph has no binary edges at all, every node is an orphan.

Parameters

ParameterTypeDefaultDescription
limitinteger50Orphans per page (1–200).
cursorstring—The next_cursor from the previous page. Omit it for the first page.
organization_idstring—Read an organization graph you belong to instead of your own.

Pages are ordered by creation time and key. offset is not accepted. Pass next_cursor back as cursor to read the next page; it is null on the last page.

Response

FieldDescription
orphansEach with key, description, node_type, enrichment_status, created_at, write_version, binary_degree (read live) and connected_now.
totalTotal orphans.
enriched_orphans, unenriched_orphansThe split by enrichment status.
next_cursorCursor for the next page, or null.
connected_since_analysisHow many orphans on this page were connected after the analysis ran.
analysisWhich background analysis the list comes from: observed_at_unix_ms, node_count, component_count, main_component_size, topology_changes_since and stale.

How the analysis works

Orphans come from a background component analysis of your graph, not a live scan, so the tool stays fast on large graphs.

  • analysis.stale: true means the graph changed since the analysis; recent changes may not be reflected yet.
  • An orphan you connect after the analysis shows connected_now: true and drops off the list at the next analysis, within about five minutes.
  • If no analysis has completed yet, the tool returns the retryable error analysis_pending (503) with retry_after_ms. Wait and call again.
  • A cursor from an older analysis is refused; start again from the first page.

What to do with orphans

OrphanAction
Carries real information (a person, decision, fact you want to keep)Connect it to its context with hm_add_relationships.
Empty, junk or a near-duplicateDelete it with hm_forget, or merge its content into the existing node with hm_update first.

Run this after every hm_ingest. The Graph health guide covers bulk clean-up.

Equivalents

curl "https://api.hypermemory.io/api/v1/memory/orphans?limit=50" \
  -H "Authorization: Bearer $HYPERMEMORY_API_KEY"