Skip to content

Remember a fact

POST
/api/v1/memory/remember
curl --request POST \
--url http://localhost:11044/api/v1/memory/remember \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "confidence": 1, "text": "example" }'

Persists one already-formed statement as an ACTIVE proposition in the caller’s context. If an ACTIVE proposition with the same text (modulo case and surrounding whitespace) already exists, returns that proposition instead of inserting a duplicate.

The fact, in text, stored verbatim after trimming with no LLM extraction; blank or over 2000 characters is a 400. confidence is optional, defaults to 0.9 and is clamped to 0–1; it is ignored when an ACTIVE fact with the same text, ignoring case and surrounding whitespace, already exists and is returned instead

Media typeapplication/json

One already-formed fact to store verbatim in the caller’s memory as an ACTIVE proposition, by POST /memory/remember

object
confidence

How sure the fact is, from 0 to 1, a value outside clamped to that range; absent or null means 0.9. Unused when the fact matches an existing one

number format: double
text
required

The statement to remember, trimmed; must not be blank, and at most 2,000 characters. When an ACTIVE proposition in the caller’s current context already has this text, ignoring case and surrounding whitespace, that one is returned and nothing is stored

string

Example generated

{
"confidence": 1,
"text": "example"
}

The fact stored, or the existing one it duplicates

Media typeapplication/json

The fact as remembered: the proposition just stored, or the existing one whose text it matched

object
id
required

The proposition’s id

string
text
required

The proposition’s text. For a duplicate, the EXISTING text, which may differ from the request in case and surrounding whitespace

string

Example generated

{
"id": "example",
"text": "example"
}

The text is blank or longer than the limit

Media typeapplication/json

A refused fact. Carries only the reason

object
error
required

Why the fact was refused: blank, or longer than the limit

string

Example generated

{
"error": "example"
}