Deciders

Create a decider

Creates a decider at version 1: a named question set and the backend that answers it, exactly one of agent_id and tool_id. Every question declares a finite answer space, validated here. The backend must be in the decider's project. An agent must carry no tool surface — no tool binding left active by active_tool_ids and no knowledge_config.write_memory_store_id — or the create is refused with 400 DECIDER_AGENT_NOT_TOOL_LESS. A tool must be http or pipeline and must not pin input or questions in its preset_parameters, or the create is refused with 400 DECIDER_TOOL_NOT_CALLABLE. A duplicate name in the project is 409 NAME_CONFLICT.

post/v1/projects/{project_id}/deciders

Request

  • Base URL: https://api.naturali.ai
  • URL: https://api.naturali.ai/v1/projects/{project_id}/deciders
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)

Request body

namestring required

Human-readable name, unique per project

descriptionstring nullable
agent_idstring

A tool-less agent that answers

tool_idstring

An http or pipeline tool that answers

version_labelstring

Optional tag for version 1, e.g. initial

Example request

{
  "name": "support-triage",
  "agent_id": "agent_V1StGXR8Z5jdHi6B",
  "tool_id": "tool_V1StGXR8Z5jdHi6B",
  "questions": [
    {
      "type": "choice",
      "name": "department",
      "instructions": "Which department should handle this complaint?",
      "choices": [
        {
          "value": "billing",
          "description": "Payments, invoices and refunds."
        },
        {
          "value": "technical",
          "description": "Problems using the product."
        }
      ]
    },
    {
      "type": "predicate",
      "name": "needs_human",
      "instructions": "Must a person read this before any automated reply?"
    }
  ],
  "version_label": "initial"
}

Response

Decider created

idstring
project_idstring
namestring
descriptionstring nullable
agent_idstring nullable

The tool-less agent that answers; null when a tool does

tool_idstring nullable

The http or pipeline tool that answers; null when an agent does

versioninteger

The question set's version. Bumped only by a write that changes questions.

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "dcd_V1StGXR8Z5jdHi6B",
  "project_id": "proj_V1StGXR8Z5jdHi6B",
  "name": "support-triage",
  "agent_id": "agent_V1StGXR8Z5jdHi6B",
  "tool_id": "tool_V1StGXR8Z5jdHi6B",
  "version": 1,
  "questions": [
    {
      "type": "choice",
      "name": "department",
      "instructions": "Which department should handle this complaint?",
      "choices": [
        {
          "value": "billing",
          "description": "Payments, invoices and refunds."
        },
        {
          "value": "technical",
          "description": "Problems using the product."
        }
      ]
    },
    {
      "type": "predicate",
      "name": "needs_human",
      "instructions": "Must a person read this before any automated reply?"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.