v1

Create Fact

Write a fact directly: a subject, a relation and an object, with no memory behind it and no extraction.

It is not a write without a model. With a model key configured, the relation goes through the store's vocabulary (a model may be asked whether a new relation is one already known, and whether it holds one value at a time), and a current fact goes through the contradiction check: when open facts of the same subject could conflict with it, a model judges them and may close one, named in invalidated. The fact's words reach that model's provider and the calls are billed as any other. When one of those models gives no usable answer nothing is written: 503 model_unavailable, retry.

With no model key, no model is asked and no judge closes anything. A past fact closes the open fact it restates either way.

To end a fact yourself, with the date it stopped being true, use POST /v1/facts/{fact_id}/forget, which asks no model.

post/v1/facts

Request

  • Base URL: https://api.korely.ai
  • URL: https://api.korely.ai/v1/facts
  • Auth: HTTP bearer

Request body

subjectstring required
predicatestring required
objectstring required
user_idstring nullable

End user this fact is about. 1 to 255 characters, no '/', no control characters, and not '.' or '..': the id names a namespace that DELETE /v1/users/<user_id>/memories and DELETE /v1/agents/<agent_id> address as one URL path segment.

agent_idstring nullable

Agent namespace. 1 to 255 characters, no '/', no control characters, and not '.' or '..': the id names a namespace that DELETE /v1/users/<user_id>/memories and DELETE /v1/agents/<agent_id> address as one URL path segment.

run_idstring nullable
subject_typestring
object_is_literalboolean
confidencenumber
valid_fromstring nullable
tense'current' | 'past' | 'planned'

current | past | planned. A past fact closes the open fact it restates.

Response

Successful Response

idstring required
subjectstring required
predicatestring required
objectstring required
predicate_familystring nullable
valid_fromstring nullable
invalidatedstring[]
tensestring nullable
invalid_atstring nullable
observation_countinteger
user_idstring nullable
agent_idstring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.