Memory

hm_ingest

Pull simple facts and relationships out of a block of text

hm_ingest takes a block of text and writes the facts it can read from it directly: sentences such as “the checkout service uses Redis”, “the platform team builds the API”, “billing depends on Stripe” or “Alice works on Phoenix” become nodes and the relationships between them. Text with no such sentences is stored as one fact node.

It is fast, deterministic and doesn’t call a language model.

Choosing the right tool

You haveUse
One fact, decision or preferencehm_store — you write the description and relationships yourself, and background enrichment adds the rest.
A document, transcript or long noteshm_upload_file — the document pipeline extracts entities and relationships with the extraction lens you choose.
Short text full of “X uses / builds / depends on / works on Y” statementshm_ingest

Parameters

ParameterTypeDescription
textstringRequired. Up to 50,000 characters.
contextstringA short label for where the text came from, e.g. "Architecture notes, 14 Oct".

Response

FieldDescription
nodes_created, nodes_updatedHow many nodes were created and updated.
node_keysEvery node key the ingest touched.
created_node_keys, keys_updatedWhich keys were new and which already existed.
edges_created, hyperedges_createdHow many relationships were written.

Small ingests (up to 25 entities) are written before the call returns. Larger ones are queued: the result has status: "accepted", a job_id, and planned counts instead of written ones.

Clean up after every ingest

Extracted entities often end up as orphans — nodes that aren’t connected to the rest of your graph. After every hm_ingest:

  1. Call hm_list_orphans.
  2. Connect the orphans worth keeping with hm_add_relationships.
  3. Delete the rest with hm_forget.

Don’t chain several ingests without cleaning up in between.

The HyperMemory plugins’ memory-writer agent does this clean-up for you.

Example

{
  "context": "Architecture notes, 14 October 2026",
  "text": "The checkout service uses Redis for session caching. The billing service depends on Stripe. The platform team builds the public API."
}

Equivalents

curl -X POST https://api.hypermemory.io/api/v1/memory/ingest \
  -H "Authorization: Bearer $HYPERMEMORY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"The checkout service uses Redis for session caching.","context":"Architecture notes"}'