Skip to main content
How-toDraft · not yet verified

Storing a Record

Write new content to memory with e_ingest: the content, its edge properties, its source type, and the lane it goes to.

When to Use​

Whenever there is something to keep that memory does not already hold. For content memory already holds that has moved on, see updating a record and evolving a fact.

Usage​

e_ingest {"content": "...", "properties": ["label:value", ...], "source_type": "...", "assign_lane": "...", "agent_profile": "..."}
ArgumentRequiredWhat it does
contentYesThe content, as a string: text, a document, or JSON as text. Empty content is refused
propertiesNoEdge properties as label:value strings. Labels starting with e_ are refused
source_typeNo; conversationalThe record's source type. In a closed lane it must be one the lane declares
assign_laneNo; the home laneThe lane to write to. It must be declared and writable by the agent profile
agent_profileNo; the engine's defaultThe agent profile the call runs as
is_conversationalNoMarks the record as conversation, so it gets a window vector with the turns before it
is_file_contentNoMarks the record as part of a file, for the same reason
adjusts, adjustment_labelNoLinks the new record to earlier ones; see evolving a fact

Before writing to a lane, an agent can ask what it may write there: e_system get_profile returns each writable lane, its source types and the labels each allows.

Response​

{"sr_id": "sr_7b22e4d1a90c3f5812ab94c6e0d3f7a1", "status": "accepted", "content_hash": "…", "ingested_at": "2026-10-30T15:02:11Z"}

The edge properties are on the record when the call returns. The extractor plugins and the embedding run afterwards, in the background. A refusal is {"error": "…"} and names what is allowed: a lane the agent profile can write, a source type the lane accepts, or a label the source type allows.

Example​

e_ingest {"content": "Acme's renewal is due on 1 March 2027. Sarah owns it.", "properties": ["org:Acme", "person:Sarah", "topic:renewal"]}

REST equivalent

curl -s -X POST "$EMEMORY_URL/api/v2/ingest" \
-H "Authorization: Bearer $EMEMORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"content": "Acme'"'"'s renewal is due on 1 March 2027. Sarah owns it.", "properties": ["org:Acme", "person:Sarah", "topic:renewal"]}'

The shipped agent instructions recommend one fact per record, written to stand alone; see source records.