Skip to main content

Before you start

  • The tckg API address. The hosted one is https://tckg.factagora.com; or run it locally at localhost:8765.
  • curl and something to read JSON. There is no SDK yet; every example below pastes as is.
  • On the hosted deployment, add -H "Authorization: Bearer $TCKG_TOKEN" to every request below. Randy hands out one API key per app; the key decides which tenant your rows land in. A local server needs no key.
1

Write

space says whose memory this is: one user, one agent, or one worldview. Reads and searches are scoped by space.Each node and edge carries when it was said (asserted_at) and from when it holds (valid_from). You do not send when it was stored. The server stamps that. Sending it gets the row refused.
captured_at is the instant the server learned this. Keep it; the next step uses it.Send the same request again and you get accepted: 0 with three already_remembered warnings. Retries are safe.
2

Read, as of two dates

Every read must carry as_of. Without it you get a 400. A default of “now” would let a backtest quietly see the future.As of June 2024 there is nothing. We did not know this yet.
masked is the point. The answer is not “nothing”. The answer is “two things, hidden”.As of the instant it was stored, both are there.
Reading one block that was not there yet tells you which kind of nothing it is. not_yet means known now but not then. absent means never heard of.
3

Put old knowledge at its old time (backfill)

When you move data you already had, you can declare “we actually knew this since April 2024”. The declaration is never hidden: every certificate over this data carries a backfill entry.
Read as of 2024-06-01 again: c2 is visible, c1 is still masked. When the declared instant and the server’s instant differ, the declaration wins for masking. Both are kept.
4

Search

Candidates come from full-text search and, if you pass one, cosine over your embedding. They are then expanded along causal and temporal edges up to depth. Candidates and every hop use only what was known at as_of.
When a later block reverses c1 through a SUPERSEDES edge, c1 does not disappear. It comes back with superseded_by set to the successor’s id. To use embeddings, pass the query vector in embedding. It must come from the same model as the embedding you stored on the nodes.
5

Why

The evidence chain of one block: causes, effects, support and contradiction, what it replaced and what replaced it, in the order they were said.
Ask with as_of in June 2024 and c1 is not there: chain: [], reason: "not_yet".

Next

Concepts

What as_of, valid_at, space, and the certificate mean exactly.

Resolve

One value for one declared fact, chosen by a policy you declared.

Migrate from Supabase

If your graph already lives in your own tables.