Context & facts
Get profile
Everything Korely currently knows about one end user, in a single call, their active typed facts, self-owned facts first, also grouped by predicate family. Deterministic, no model call.
/v1/profile
SDK: korely.get_profile(...). Where
Get facts is a flat, filterable
list across all your end users, a profile is always per end user:
user_id is required. You get the active facts the user owns sorted
first, plus a by_family grouping ready to render. It is a pure
filter-and-sort, no embeddings, no LLM.
Authentication
HTTP header, required: Authorization: Bearer kor_live_.... The key must carry the memories:read scope.
Query parameters
user_id is required, a profile is built for exactly one end user. The rest are optional.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
user_id | string | Required | , | The end user to build the profile for. Length 1-255 characters. |
agent_id | string | Optional | , | Filter to one agent namespace. |
as_of | string | Optional | , | ISO date or datetime, return the profile as it was on that date. A bare date (2026-06-01) means midnight; naive values are coerced to UTC. |
Example request
curl -G https://api.korely.ai/v1/profile \ -H "Authorization: Bearer kor_live_..." \ --data-urlencode "user_id=customer-giulia-4812"Response
200 OK. The end user's active facts, self-owned first, then by
valid_from descending, plus the same facts grouped by predicate
family.
{ "user_id": "customer-giulia-4812", "as_of": null, "facts": [ { "id": "fct_a1", "subject": "customer-giulia-4812", "subject_type": "self", "predicate": "lives_in", "predicate_raw": "lives in", "object": "Berlin", "object_is_literal": true, "predicate_family": "location", "confidence": 0.95, "user_id": "customer-giulia-4812", "agent_id": "support-bot", "valid_from": "2026-04-10T00:00:00+00:00", "invalid_at": null, "invalidated_by": null, "source_memory_id": "mem_8f2c1a", "created_at": "2026-04-10T08:00:00+00:00" } ], "by_family": { "location": [ { "id": "fct_a1", "subject": "customer-giulia-4812", "subject_type": "self", "predicate": "lives_in", "predicate_raw": "lives in", "object": "Berlin", "object_is_literal": true, "predicate_family": "location", "confidence": 0.95, "user_id": "customer-giulia-4812", "agent_id": "support-bot", "valid_from": "2026-04-10T00:00:00+00:00", "invalid_at": null, "invalidated_by": null, "source_memory_id": "mem_8f2c1a", "created_at": "2026-04-10T08:00:00+00:00" } ] }, "total": 1, "truncated": false}| Field | Type | Description |
|---|---|---|
user_id | string | Echo of the end user the profile was built for. |
as_of | string · null | Echo of the as_of query string, raw and un-normalized, or null if you didn't send one. |
facts | array<object> | A flat list of the serialized active facts (same shape as Get facts), sorted self/own-subject first, then valid_from descending within each bucket. |
facts[].id | string | The fact id, e.g. fct_a1. |
facts[].subject | string | The subject of the triple. |
facts[].subject_type | string | The inferred subject type, e.g. self for facts the end user owns, person, org. |
facts[].predicate | string | The normalized predicate, e.g. lives_in. |
facts[].predicate_raw | string | The predicate as it appeared in the source text, e.g. lives in. |
facts[].object | string | The object of the triple. |
facts[].object_is_literal | boolean | true when the object is a literal value rather than an entity. |
facts[].predicate_family | string | The family the predicate belongs to, e.g. location. |
facts[].confidence | number | Extraction confidence, 0-1. |
facts[].user_id / facts[].agent_id | string · null | The scope the fact belongs to (null if unscoped). |
facts[].valid_from | string | ISO 8601, when the fact became true (bi-temporal valid time). |
facts[].invalid_at | string · null | ISO 8601, when the fact was superseded, or null. Always null here, since only active facts are returned. |
facts[].invalidated_by | string · null | The id of the fact that superseded this one, or null. |
facts[].source_memory_id | string | The memory this fact was extracted from. |
facts[].created_at | string | ISO 8601, when the fact row was written. |
by_family | object<string, array<object>> | The same facts grouped by predicate_family. The key is other when a fact's family is null. |
total | integer | Total active facts for this end user. May exceed the number returned in facts because the profile is capped, see truncated. |
truncated | boolean | true when total exceeds the number of returned facts, i.e. the 200-fact profile cap was hit. |
Errors
| Status | Code | Cause |
|---|---|---|
401 | invalid_key | Missing or invalid Authorization header. Detail: Invalid or missing API key; response carries WWW-Authenticate: Bearer. |
403 | forbidden | The API key lacks the memories:read scope. Detail: API key missing required scope(s): memories:read. |
422 | invalid_request | user_id is missing or empty (it is required, length 1-255). A non-ISO as_of is also rejected here. Detail: as_of must be an ISO date (2026-06-01) or datetime. |
429 | rate_limit_exceeded | Per-tier minute / hour / day request limit exceeded. Detail: Rate limit exceeded (...). Retry shortly.; response carries Retry-After and X-RateLimit-* headers. |
429 | quota_exceeded | Monthly query quota exhausted. Structured detail: {"code":"quota_exceeded","message":"Monthly query limit reached (...). Upgrade for more."}. |
Notes
- Deterministic. No model or LLM call, a pure filter and sort. The same request returns the same profile every time.
- Per end user.
user_idis required. That's the difference from the flat Get facts list, a profile is always built for one end user. - Capped at 200. The profile returns at most 200 facts. When the end user has more,
truncatedistrueandtotalreports the real count. For larger pulls use Get facts withlimit/offset. - Self-owned first. Facts the end user owns are sorted to the front, those whose
subject_typeisself, or whose subject equals theuser_id(case-insensitive, trimmed). Within each bucket, ordering is stable onvalid_fromdescending. - Grouped for you.
by_familybuckets the same facts bypredicate_family, falling back to the keyotherwhen a fact's family isnull. - Active facts only. Only non-invalidated facts are returned, there is no
include_invalidatedoption on this endpoint. - Echoed as_of. The
as_ofin the response echoes the raw query string; retrieval internally uses the normalized datetime.
Related
- Get facts, the flat, filterable list of typed facts, with
as_oftime travel. - Get context, the assembled recall block, facts and memories in one call.
- SDK reference, the
get_profilemethod and its arguments.