Knowledge
The workspace's knowledge graph: typed, sourced facts about the people who ask, the targets, the topics and the sources, learned from the routed chat and added by hand; the engineered context placed before every chat (preview it with `POST /knowledge/context`), suggestions from the workspace's trained link predictor, and exports to JSON-LD, N-Triples, GraphML and Cypher.
`PUT /knowledge/settings` turns it off or changes the token budget.
get /api /v1 /knowledge
Overview
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/knowledge" \
-H "Authorization: Bearer $OSR_API_KEY"delete /api /v1 /knowledge
Delete Personal
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/knowledge" \
-H "Authorization: Bearer $OSR_API_KEY"post /api /v1 /knowledge /context
Preview Context
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Request bodyContextIn
| Field | Type | Default | Description |
|---|---|---|---|
| budget_tokens | integer | null | ||
| text(required) | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/knowledge/context" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Prove that sqrt(2) is irrational." }'{
"text": "Prove that sqrt(2) is irrational."
}get /api /v1 /knowledge /export
Export
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| format | query | string | "jsonld" | |
| personal | query | boolean | true | |
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/knowledge/export?format=jsonld&personal=true" \
-H "Authorization: Bearer $OSR_API_KEY"get /api /v1 /knowledge /facts
List Facts
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| q | query | string | "" | |
| predicate | query | string | null | ||
| personal | query | boolean | null | ||
| limit | query | integer | 100 | |
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/knowledge/facts?q=&limit=100" \
-H "Authorization: Bearer $OSR_API_KEY"post /api /v1 /knowledge /facts
Add Fact
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Request bodyFactIn
| Field | Type | Default | Description |
|---|---|---|---|
| confidence | number | 1 | |
| object(required) | string | ||
| predicate(required) | string | ||
| subject | string | null |
Responses
| 201 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/knowledge/facts" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "object": "string", "predicate": "string" }'{
"object": "string",
"predicate": "string"
}delete /api /v1 /knowledge /facts
Delete Facts
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| subject | query | string | null | ||
| predicate | query | string | null | ||
| object | query | string | null | ||
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X DELETE "$OSR_URL/api/v1/knowledge/facts" \
-H "Authorization: Bearer $OSR_API_KEY"post /api /v1 /knowledge /forget
Forget
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Request bodyForgetIn
| Field | Type | Default | Description |
|---|---|---|---|
| phrase(required) | string |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/knowledge/forget" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "phrase": "string" }'{
"phrase": "string"
}put /api /v1 /knowledge /settings
Put Settings
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Request bodyKnowledgeSettingsIn
| Field | Type | Default | Description |
|---|---|---|---|
| budget_tokens | integer | null | ||
| enabled | boolean | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X PUT "$OSR_URL/api/v1/knowledge/settings" \
-H "Authorization: Bearer $OSR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "budget_tokens": 1, "enabled": false }'{
"budget_tokens": 1,
"enabled": false
}get /api /v1 /knowledge /suggest
Suggest
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| subject(required) | query | string | ||
| predicate(required) | query | string | ||
| k | query | integer | 5 | |
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s "$OSR_URL/api/v1/knowledge/suggest?k=5" \
-H "Authorization: Bearer $OSR_API_KEY"post /api /v1 /knowledge /train
Train
Requires an API key
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
| x-goog-api-key | header | string | null |
Responses
| 200 | Successful Response |
| 422 | Validation ErrorHTTPValidationError |
| 401 | Missing, invalid or revoked API key |
curl -s -X POST "$OSR_URL/api/v1/knowledge/train" \
-H "Authorization: Bearer $OSR_API_KEY"Something wrong or out of date on this page? Tell us - the page is named for you, so a one-line note is enough.
Conversations
What the routed chat remembers for the caller: conversations the platform keeps for `/v1/chat/completions` (`osr.conversation_id` continues one across desktop, browser and playground; the platform prepends the history and a rolling summary) and the long-term memory - facts the person stated about themselves, listed, edited, disabled or deleted here; `PUT /memory/settings` turns it off.
Releases
Release notes parsed from the changelog: every released version with its sections and highlights, the version this deployment runs, and what a signed-in person has not read yet (What's new).