curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/chat' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"action_types_to_execute": [
"string"
],
"execute_ready_actions": true,
"history": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"max_recursive_steps": 1,
"message": "Two-person tent, green — replacement for damaged pole set.",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"analysis": {
"categories": [
{
"category": null,
"domain": null,
"intent": null,
"matching_rules": null,
"score": null
}
],
"composite_symbol": [
1.5
],
"confidence": 7.5,
"domains": [
"string"
],
"escalation_triggered": true,
"horn_clauses_fired": [
"string"
],
"intents": [
"string"
],
"matching_rule_count": 1,
"safety_gate_triggered": true,
"supporting_seed_rules": [
{
"category": null,
"domain": null,
"id": null,
"intent": null,
"name": null,
"score": null
}
]
},
"completion": {
"action_results": [
{
"action_type": null,
"details": null,
"matched_entity_ids": null,
"status": null,
"summary": null,
"tool_name": null
}
],
"clarifying_question": "string",
"evidence": {
"kb_entities": [],
"kb_facts": [],
"kb_rules": [],
"seed_rules": []
},
"execution_receipt": {
"available_action_types": [],
"expires_at": "2026-08-31T14:22:05Z",
"receipt_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"generation": {
"fallback_reason": "string",
"mode": "string",
"model": "string",
"token_usage": {
"completion_tokens": null,
"prompt_tokens": null,
"total_tokens": null
}
},
"grounded": true,
"grounding": {
"advanced_reasoning": {
"enabled_features": null,
"explanation_summary": null,
"grounded_categories": null,
"grounded_domains": null,
"grounded_entities": null,
"grounded_intents": null,
"inferred_symbols": null,
"machine_confidence": null,
"machine_inputs": null,
"machine_output": null,
"machine_state_version": null,
"recommended_strategy": null,
"thought_count": null,
"uncertainty": null
},
"history_turns_used": 1,
"kb_entity_count": 1,
"kb_rule_count": 1,
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"seed_rule_count": 1,
"strategy": "string",
"strategy_reason": "string"
},
"needs_human_review": true,
"recursion_trace": [
{
"confidence": null,
"focus": null,
"output": null,
"stage": null,
"step": null
}
],
"reply": "string",
"suggested_actions": [
{
"action_type": null,
"can_auto_execute": null,
"execution_status": null,
"label": null,
"missing_inputs": null,
"reason": null,
"required_inputs": null,
"tool_name": null
}
],
"summary": "Two-person tent, green — replacement for damaged pole set.",
"tool_calls": [
{
"arguments": null,
"function": null,
"id": null,
"policy": null,
"status": null
}
],
"validation": {
"action_execution_eligible": true,
"action_execution_reason": "string",
"cited_rule_count": 1,
"grounded_entity_count": 1,
"grounding_status": "string",
"llm_backend_live": true,
"llm_provider": "string",
"proof_status": "string",
"validation_level": "string"
}
},
"guidelines": [
{
"category": "standard",
"directive": "string",
"polarity": "string",
"priority": "string"
}
],
"messages": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Analyze a customer message and return a grounded recursive completion.
Required scope: write
POST
/
api
/
v1
/
nsr
/
chat
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/chat' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"action_types_to_execute": [
"string"
],
"execute_ready_actions": true,
"history": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"max_recursive_steps": 1,
"message": "Two-person tent, green — replacement for damaged pole set.",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"analysis": {
"categories": [
{
"category": null,
"domain": null,
"intent": null,
"matching_rules": null,
"score": null
}
],
"composite_symbol": [
1.5
],
"confidence": 7.5,
"domains": [
"string"
],
"escalation_triggered": true,
"horn_clauses_fired": [
"string"
],
"intents": [
"string"
],
"matching_rule_count": 1,
"safety_gate_triggered": true,
"supporting_seed_rules": [
{
"category": null,
"domain": null,
"id": null,
"intent": null,
"name": null,
"score": null
}
]
},
"completion": {
"action_results": [
{
"action_type": null,
"details": null,
"matched_entity_ids": null,
"status": null,
"summary": null,
"tool_name": null
}
],
"clarifying_question": "string",
"evidence": {
"kb_entities": [],
"kb_facts": [],
"kb_rules": [],
"seed_rules": []
},
"execution_receipt": {
"available_action_types": [],
"expires_at": "2026-08-31T14:22:05Z",
"receipt_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"generation": {
"fallback_reason": "string",
"mode": "string",
"model": "string",
"token_usage": {
"completion_tokens": null,
"prompt_tokens": null,
"total_tokens": null
}
},
"grounded": true,
"grounding": {
"advanced_reasoning": {
"enabled_features": null,
"explanation_summary": null,
"grounded_categories": null,
"grounded_domains": null,
"grounded_entities": null,
"grounded_intents": null,
"inferred_symbols": null,
"machine_confidence": null,
"machine_inputs": null,
"machine_output": null,
"machine_state_version": null,
"recommended_strategy": null,
"thought_count": null,
"uncertainty": null
},
"history_turns_used": 1,
"kb_entity_count": 1,
"kb_rule_count": 1,
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"seed_rule_count": 1,
"strategy": "string",
"strategy_reason": "string"
},
"needs_human_review": true,
"recursion_trace": [
{
"confidence": null,
"focus": null,
"output": null,
"stage": null,
"step": null
}
],
"reply": "string",
"suggested_actions": [
{
"action_type": null,
"can_auto_execute": null,
"execution_status": null,
"label": null,
"missing_inputs": null,
"reason": null,
"required_inputs": null,
"tool_name": null
}
],
"summary": "Two-person tent, green — replacement for damaged pole set.",
"tool_calls": [
{
"arguments": null,
"function": null,
"id": null,
"policy": null,
"status": null
}
],
"validation": {
"action_execution_eligible": true,
"action_execution_reason": "string",
"cited_rule_count": 1,
"grounded_entity_count": 1,
"grounding_status": "string",
"llm_backend_live": true,
"llm_provider": "string",
"proof_status": "string",
"validation_level": "string"
}
},
"guidelines": [
{
"category": "standard",
"directive": "string",
"polarity": "string",
"priority": "string"
}
],
"messages": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Required scope:
write
Request body
ChatRequest
string[]
Optional action types to execute when action execution is enabled.
boolean
Execute ready chat actions against the org-scoped KB adapters. Defaults to true.
ChatMessage[]
Conversation history for contextual follow-ups.
integer
Recursive completion passes to run. Clamped to 1..=4, default 4.
string
required
The customer message to analyze and respond to.
string
Deprecated compatibility field. Org scope comes from auth/session.
string
Optional server-side session for conversation continuity and audit history.
Response
ChatResponse
SymbolicAnalysis
required
Show SymbolicAnalysis
Show SymbolicAnalysis
CategoryMatch[]
required
number (double)[]
required
The GSS composite symbol for this message (24-field vector).
number (double)
required
Overall confidence score.
string[]
required
Active domains.
boolean
required
Whether escalation was triggered.
string[]
required
Horn clauses that fired.
string[]
required
Active intents.
integer
required
Number of matching rules.
boolean
required
Whether a safety gate was triggered.
ChatCompletion
required
Show ChatCompletion
Show ChatCompletion
ActionExecutionResult[]
required
string
Optional clarifying question when confidence is limited.
GroundingEvidence
required
CompletionGeneration
required
boolean
required
Whether the reply is grounded in matched rules/context rather than pure guesswork.
GroundingSnapshot
required
boolean
required
Whether a human review or warm handoff is recommended.
RecursiveTraceStep[]
required
string
required
Final customer-facing reply.
SuggestedAction[]
required
string
required
Short summary of what the recursive model inferred.
ToolCall[]
required
Structured tool calls derived from org rules and detected context. Each tool call has a function name, arguments, and the policy justification.
Show ToolCall
Show ToolCall
object
required
Structured arguments extracted from the message and KB context.
string
required
Function name to invoke (e.g., ‘issue_refund’, ‘create_return’, ‘escalate’).
string
required
Unique ID for this tool call.
ToolCallPolicy
required
string
required
Whether this call is ready to execute or needs more context.
Guideline[]
required
ChatMessage[]
required
string
Optional session ID used to ground or persist this exchange.
Status codes
| Code | Meaning |
|---|---|
200 | Symbolic analysis plus grounded recursive completion |
400 | Invalid request |
401 | Unauthorized — missing or invalid credentials |
403 | Org mismatch with authenticated scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
503 | GSS seed not loaded |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/nsr/chat' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"action_types_to_execute": [
"string"
],
"execute_ready_actions": true,
"history": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"max_recursive_steps": 1,
"message": "Two-person tent, green — replacement for damaged pole set.",
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
{
"analysis": {
"categories": [
{
"category": null,
"domain": null,
"intent": null,
"matching_rules": null,
"score": null
}
],
"composite_symbol": [
1.5
],
"confidence": 7.5,
"domains": [
"string"
],
"escalation_triggered": true,
"horn_clauses_fired": [
"string"
],
"intents": [
"string"
],
"matching_rule_count": 1,
"safety_gate_triggered": true,
"supporting_seed_rules": [
{
"category": null,
"domain": null,
"id": null,
"intent": null,
"name": null,
"score": null
}
]
},
"completion": {
"action_results": [
{
"action_type": null,
"details": null,
"matched_entity_ids": null,
"status": null,
"summary": null,
"tool_name": null
}
],
"clarifying_question": "string",
"evidence": {
"kb_entities": [],
"kb_facts": [],
"kb_rules": [],
"seed_rules": []
},
"execution_receipt": {
"available_action_types": [],
"expires_at": "2026-08-31T14:22:05Z",
"receipt_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"generation": {
"fallback_reason": "string",
"mode": "string",
"model": "string",
"token_usage": {
"completion_tokens": null,
"prompt_tokens": null,
"total_tokens": null
}
},
"grounded": true,
"grounding": {
"advanced_reasoning": {
"enabled_features": null,
"explanation_summary": null,
"grounded_categories": null,
"grounded_domains": null,
"grounded_entities": null,
"grounded_intents": null,
"inferred_symbols": null,
"machine_confidence": null,
"machine_inputs": null,
"machine_output": null,
"machine_state_version": null,
"recommended_strategy": null,
"thought_count": null,
"uncertainty": null
},
"history_turns_used": 1,
"kb_entity_count": 1,
"kb_rule_count": 1,
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"seed_rule_count": 1,
"strategy": "string",
"strategy_reason": "string"
},
"needs_human_review": true,
"recursion_trace": [
{
"confidence": null,
"focus": null,
"output": null,
"stage": null,
"step": null
}
],
"reply": "string",
"suggested_actions": [
{
"action_type": null,
"can_auto_execute": null,
"execution_status": null,
"label": null,
"missing_inputs": null,
"reason": null,
"required_inputs": null,
"tool_name": null
}
],
"summary": "Two-person tent, green — replacement for damaged pole set.",
"tool_calls": [
{
"arguments": null,
"function": null,
"id": null,
"policy": null,
"status": null
}
],
"validation": {
"action_execution_eligible": true,
"action_execution_reason": "string",
"cited_rule_count": 1,
"grounded_entity_count": 1,
"grounding_status": "string",
"llm_backend_live": true,
"llm_provider": "string",
"proof_status": "string",
"validation_level": "string"
}
},
"guidelines": [
{
"category": "standard",
"directive": "string",
"polarity": "string",
"priority": "string"
}
],
"messages": [
{
"content": "Two-person tent, green — replacement for damaged pole set.",
"role": "string"
}
],
"session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Last modified on August 31, 2026