Python
# Read once at start and again when valid_for_s runs out; the last profile stays in use when Niadra is down
profile = niadra.profile()
if profile and "turns" in profile.features:
...// Read once at start and again when valid_for_s runs out; the last profile stays in use when Niadra is down
const profile = await niadra.profile();
if (profile?.features.includes("turns")) {
// ...
}curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/sdk/profileconst options = {method: 'GET'};
fetch('https://{space}.{region}.api.niadra.com/v1/sdk/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/sdk/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/sdk/profile"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/sdk/profile")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/sdk/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"features": [
"turns"
],
"valid_for_s": 123,
"claim_contract": {
"languages": [
"pt"
],
"version": "<string>",
"categories": [
{
"actions": {
"default": "block",
"contexts": {},
"replace_with": "<string>"
},
"detect": {
"classes": [
"money"
],
"document_sections": [
"<string>"
],
"patterns": [
"article_citation"
],
"roles": {},
"terms": [
"<string>"
]
},
"evidence": {
"anchor": {
"coverage": "fact",
"min_match": 0.9
},
"tool": "<string>",
"tool_any": [
"<string>"
],
"value": {
"fresh_for": "claim",
"gap_terms": {},
"must_state_gaps": false,
"same_role": false,
"type": "<string>",
"value": "<string>"
}
},
"id": "<string>",
"agents": [
"<string>"
],
"natures": {
"computed": "check",
"model": "block",
"quoted": "verbatim"
}
}
],
"internal_text": {
"redact": "<string>",
"shingle_hashes_ref": "<string>",
"n": 8
},
"negative_corpus_version": "<string>",
"outputs": {
"immutable": [
"<string>"
],
"mutable": [
"<string>"
]
}
},
"recording": {
"content_mode": "stored",
"required_pins": [
"prompts"
]
},
"tool_bindings": [
{
"tool": "<string>",
"args": [
{
"attr": "<string>",
"param": "<string>",
"negation": {
"param": "<string>"
},
"ops": [
"in"
],
"transform": "lower"
}
],
"capabilities": {
"dry_run_param": "<string>",
"mask_output": false,
"overfetch": false,
"relax_flag": "<string>"
},
"results": [
{
"namespace": "<string>",
"type": "<string>",
"fields": {},
"id": "id",
"path": "$"
}
]
}
],
"types": [
{}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Typed state
SDK profile
What the SDK keeps in its local cache: the features on, the source’s tool bindings, the summarized type registry, the claim contract and how turns are recorded. With an ETag.
GET
/
v1
/
sdk
/
profile
Python
# Read once at start and again when valid_for_s runs out; the last profile stays in use when Niadra is down
profile = niadra.profile()
if profile and "turns" in profile.features:
...// Read once at start and again when valid_for_s runs out; the last profile stays in use when Niadra is down
const profile = await niadra.profile();
if (profile?.features.includes("turns")) {
// ...
}curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/sdk/profileconst options = {method: 'GET'};
fetch('https://{space}.{region}.api.niadra.com/v1/sdk/profile', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/sdk/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/sdk/profile"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/sdk/profile")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/sdk/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"features": [
"turns"
],
"valid_for_s": 123,
"claim_contract": {
"languages": [
"pt"
],
"version": "<string>",
"categories": [
{
"actions": {
"default": "block",
"contexts": {},
"replace_with": "<string>"
},
"detect": {
"classes": [
"money"
],
"document_sections": [
"<string>"
],
"patterns": [
"article_citation"
],
"roles": {},
"terms": [
"<string>"
]
},
"evidence": {
"anchor": {
"coverage": "fact",
"min_match": 0.9
},
"tool": "<string>",
"tool_any": [
"<string>"
],
"value": {
"fresh_for": "claim",
"gap_terms": {},
"must_state_gaps": false,
"same_role": false,
"type": "<string>",
"value": "<string>"
}
},
"id": "<string>",
"agents": [
"<string>"
],
"natures": {
"computed": "check",
"model": "block",
"quoted": "verbatim"
}
}
],
"internal_text": {
"redact": "<string>",
"shingle_hashes_ref": "<string>",
"n": 8
},
"negative_corpus_version": "<string>",
"outputs": {
"immutable": [
"<string>"
],
"mutable": [
"<string>"
]
}
},
"recording": {
"content_mode": "stored",
"required_pins": [
"prompts"
]
},
"tool_bindings": [
{
"tool": "<string>",
"args": [
{
"attr": "<string>",
"param": "<string>",
"negation": {
"param": "<string>"
},
"ops": [
"in"
],
"transform": "lower"
}
],
"capabilities": {
"dry_run_param": "<string>",
"mask_output": false,
"overfetch": false,
"relax_flag": "<string>"
},
"results": [
{
"namespace": "<string>",
"type": "<string>",
"fields": {},
"id": "id",
"path": "$"
}
]
}
],
"types": [
{}
]
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Response
Successful Response
What the SDK keeps in its local cache: the features on, the source's tool bindings, the summarized type registry, the claim contract and turn recording.
The agent features of a space: every one is on by default, so a space works with no
configuration; the space's features document lists fewer to turn some off, and
GET /v1/sdk/profile announces what is on.
Available options:
turns, state, agent_state, signals, claims, coordination, measurement, notifications, legal_holds 
