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
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 50 | Orphans per page (1–200). |
cursor | string | — | The next_cursor from the previous page. Omit it for the first page. |
organization_id | string | — | 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
| Field | Description |
|---|---|
orphans | Each with key, description, node_type, enrichment_status, created_at, write_version, binary_degree (read live) and connected_now. |
total | Total orphans. |
enriched_orphans, unenriched_orphans | The split by enrichment status. |
next_cursor | Cursor for the next page, or null. |
connected_since_analysis | How many orphans on this page were connected after the analysis ran. |
analysis | Which 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: truemeans the graph changed since the analysis; recent changes may not be reflected yet.- An orphan you connect after the analysis shows
connected_now: trueand 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) withretry_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
| Orphan | Action |
|---|---|
| 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-duplicate | Delete 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.