On this page
Sommatic Docs
Open portal

AI artifacts Beta

LLM providers, prompt templates, knowledge resources and bindings, agents, tools and connectors.

View as Markdown
Open in

Create a new agent profile.

POST /cognitive-infrastructure/cognitive-assets/agent-profile/

Returns the created agent profile with data provided.

Authentication: Bearer token

Request body

Agent profile object to be created.

organization_id string

Identifier of the organization (tenant) that owns this profile.

slug string Required

Stable semantic key uniquely identifying this profile (e.g. agent.support_router).

name string Required

Human-readable profile name used in editors, logs and documentation.

description string

Optional description that explains the cognitive role of this agent (e.g. "Support router AI").

llm_provider_slug string

Identifier of the LLM provider configuration (LLMProviderModel) used by default for reasoning, tool calls and message generation. Can be overridden per node.

default_prompt_template_id string

Optional reference to a PromptTemplateModel used as the system prompt or behavioral scaffold.

cognitive_tool_ids array<string>

List of CognitiveToolModel keys this agent is allowed to invoke during reasoning.

memory_store_ids array<string>

Optional list of MemoryStoreModel identifiers available to this agent for conversational memory, contextual retrieval or long-term state.

datasource_ids array<string>

Optional list of DatasourceModel identifiers the agent may query during reasoning (read-only or governed writes).

behavior_policies object

Optional structured object defining behavioral rules such as temperature bounds, guardrails, safety mode, chain-of-thought visibility, tone, style, max reasoning depth, tool-use preference and fallback strategy.

safety_rules array<object>

Optional list of safety constraints enforced before or after reasoning steps (e.g. PII masking, role-based output filtering, compliance checks).

max_tool_calls_per_step integer

Optional upper bound on how many tool invocations this agent may perform in a single reasoning cycle.

max_reasoning_steps integer

Optional limit on iterative reasoning or tool-use loops for safety and performance.

audit_level string

Level of auditing applied to this agent's cognitive operations.

tags array<string>

Optional free-form tags for search, governance and classification.

is_system boolean

True if this profile is managed by the platform rather than created by the tenant.

is_enabled boolean

True if this agent profile is currently available for use.

is_deprecated boolean

True if this profile is deprecated and should not be used for new flows.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "agent.support_router",
    "name": "Support Router Agent",
    "description": "Routes customer support messages by analyzing intent and invoking cognitive tools.",
    "llm_provider_slug": "llm.openai.gpt4o",
    "default_prompt_template_id": "prompt.support_routing.v1",
    "cognitive_tool_ids": [
      "tool.lookup_customer_profile",
      "tool.search_kb_vectors",
      "tool.create_support_ticket"
    ],
    "memory_store_ids": [
      "mem.support_conversation"
    ],
    "datasource_ids": [
      "ds.support_kb"
    ],
    "behavior_policies": {
      "temperature": {
        "min": 0,
        "max": 0.4
      },
      "reasoning_mode": "structured",
      "allow_chain_of_thought": false,
      "fallback_strategy": "reduce-tools-then-retry"
    },
    "safety_rules": [
      {
        "type": "pii-scan",
        "description": "Mask sensitive information"
      },
      {
        "type": "role-filter",
        "description": "Ensure routing suggestions match authorized categories"
      }
    ],
    "max_tool_calls_per_step": 3,
    "max_reasoning_steps": 5,
    "audit_level": "extended",
    "tags": [
      "support",
      "router",
      "agent"
    ],
    "is_system": false
  }
}

Update an existing agent profile.

PATCH /cognitive-infrastructure/cognitive-assets/agent-profile/

Updates the data of an existing agent profile with the data provided.

Authentication: Bearer token

Request body

Agent profile object to be created.

organization_id string

Identifier of the organization (tenant) that owns this profile.

slug string Required

Stable semantic key uniquely identifying this profile (e.g. agent.support_router).

name string Required

Human-readable profile name used in editors, logs and documentation.

description string

Optional description that explains the cognitive role of this agent (e.g. "Support router AI").

llm_provider_slug string

Identifier of the LLM provider configuration (LLMProviderModel) used by default for reasoning, tool calls and message generation. Can be overridden per node.

default_prompt_template_id string

Optional reference to a PromptTemplateModel used as the system prompt or behavioral scaffold.

cognitive_tool_ids array<string>

List of CognitiveToolModel keys this agent is allowed to invoke during reasoning.

memory_store_ids array<string>

Optional list of MemoryStoreModel identifiers available to this agent for conversational memory, contextual retrieval or long-term state.

datasource_ids array<string>

Optional list of DatasourceModel identifiers the agent may query during reasoning (read-only or governed writes).

behavior_policies object

Optional structured object defining behavioral rules such as temperature bounds, guardrails, safety mode, chain-of-thought visibility, tone, style, max reasoning depth, tool-use preference and fallback strategy.

safety_rules array<object>

Optional list of safety constraints enforced before or after reasoning steps (e.g. PII masking, role-based output filtering, compliance checks).

max_tool_calls_per_step integer

Optional upper bound on how many tool invocations this agent may perform in a single reasoning cycle.

max_reasoning_steps integer

Optional limit on iterative reasoning or tool-use loops for safety and performance.

audit_level string

Level of auditing applied to this agent's cognitive operations.

tags array<string>

Optional free-form tags for search, governance and classification.

is_system boolean

True if this profile is managed by the platform rather than created by the tenant.

is_enabled boolean

True if this agent profile is currently available for use.

is_deprecated boolean

True if this profile is deprecated and should not be used for new flows.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "agent.support_router",
    "name": "Support Router Agent",
    "description": "Routes customer support messages by analyzing intent and invoking cognitive tools.",
    "llm_provider_slug": "llm.openai.gpt4o",
    "default_prompt_template_id": "prompt.support_routing.v1",
    "cognitive_tool_ids": [
      "tool.lookup_customer_profile",
      "tool.search_kb_vectors",
      "tool.create_support_ticket"
    ],
    "memory_store_ids": [
      "mem.support_conversation"
    ],
    "datasource_ids": [
      "ds.support_kb"
    ],
    "behavior_policies": {
      "temperature": {
        "min": 0,
        "max": 0.4
      },
      "reasoning_mode": "structured",
      "allow_chain_of_thought": false,
      "fallback_strategy": "reduce-tools-then-retry"
    },
    "safety_rules": [
      {
        "type": "pii-scan",
        "description": "Mask sensitive information"
      },
      {
        "type": "role-filter",
        "description": "Ensure routing suggestions match authorized categories"
      }
    ],
    "max_tool_calls_per_step": 3,
    "max_reasoning_steps": 5,
    "audit_level": "extended",
    "tags": [
      "support",
      "router",
      "agent"
    ],
    "is_system": false
  }
}

Delete a agent profile by its id.

DELETE /cognitive-infrastructure/cognitive-assets/agent-profile/

Deletes a agent profile based on the provided ID.

Authentication: Bearer token

Request body

ID of the agent profile to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Agent profile successfully deleted",
  "result": null
}

Get an agent profile by query selector.

GET /cognitive-infrastructure/cognitive-assets/agent-profile/{queryselector}

Returns the agent profile information that matches the query selector an search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include agent profiles of a specific status.

exclude_status string query

Optional status parameter to exclude agent profiles of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "agent.support_router",
    "name": "Support Router Agent",
    "description": "Routes customer support messages by analyzing intent and invoking cognitive tools.",
    "llm_provider_slug": "llm.openai.gpt4o",
    "default_prompt_template_id": "prompt.support_routing.v1",
    "cognitive_tool_ids": [
      "tool.lookup_customer_profile",
      "tool.search_kb_vectors",
      "tool.create_support_ticket"
    ],
    "memory_store_ids": [
      "mem.support_conversation"
    ],
    "datasource_ids": [
      "ds.support_kb"
    ],
    "behavior_policies": {
      "temperature": {
        "min": 0,
        "max": 0.4
      },
      "reasoning_mode": "structured",
      "allow_chain_of_thought": false,
      "fallback_strategy": "reduce-tools-then-retry"
    },
    "safety_rules": [
      {
        "type": "pii-scan",
        "description": "Mask sensitive information"
      },
      {
        "type": "role-filter",
        "description": "Ensure routing suggestions match authorized categories"
      }
    ],
    "max_tool_calls_per_step": 3,
    "max_reasoning_steps": 5,
    "audit_level": "extended",
    "tags": [
      "support",
      "router",
      "agent"
    ],
    "is_system": false
  }
}

Create a new cognitive tool.

POST /cognitive-infrastructure/cognitive-assets/cognitive-tool/

Returns the created cognitive tool with data provided.

Authentication: Bearer token

Request body

Cognitive tool object to be created.

organization_id string

Identifier of the organization (tenant) that owns this tool.

project_id string

Optional project ID (tenant scope) that owns the tool.

slug string Required

Stable semantic key uniquely identifying this tool (e.g. tool.openai_async_chat).

name string Required

Human-readable tool name used in editors, prompts and documentation.

description string

Human-readable explanation of the tool’s purpose, side effects and intended usage domain.

invocation_kind string Required

Type of capability implemented by the tool: "http-endpoint", "internal-function", "sub-flow", "vector-query", "database-operation", "identity-check", etc.

execution_mode string

Execution mode for this tool: "sync" for immediate inline results returned to the calling agent, "async" for deferred completion handled via callbacks or resume events, or "stream" for incremental result delivery when supported by the underlying connector or provider.

async_result_strategy string

Optional strategy used when execution_mode is "async", such as "callback-ingress", "resume-flow-instance", or "fire-and-forget".

async_result_ingress_binding_slug string

Optional reference to an IngressBindingModel key used to receive asynchronous completion payloads.

connector_slug string

Optional reference to the ConnectorModel used when this tool interacts with an external system.

endpoint_key string

Optional reference to an EndpointTemplateModel used for HTTP or RPC operations.

target_flow_slug string

Optional flow key used when the tool executes a versioned sub-flow.

parameter_schema object

JSON-schema-like definition describing the typed parameters required to invoke the tool.

result_schema object

JSON-schema-like structure describing the normalized result object.

agent_result_projection object

Optional mapping rules that transform raw backend responses into the normalized result schema.

requires_auth_context boolean

Whether this tool requires an authenticated identity context.

allowed_agent_profile_ids array<string>

Optional list of AgentProfileModel identifiers allowed to invoke this tool.

allowed_operator_slugs array<string>

Optional list of operator types that may reference this tool.

safety_classification string

Safety level of this tool: "read-only", "idempotent-write", "state-changing", "sensitive", or "high-risk".

safety_rules array<object>

Structured constraints or preconditions validated before tool invocation.

max_invocations_per_run integer

Soft limit on how many times an agent may call this tool in a single execution.

timeout_ms integer

Timeout in milliseconds for tool execution.

audit_level string

Level of auditing applied to this tool.

tags array<string>

Optional tags for catalog search and grouping.

is_system boolean

Indicates if this tool is managed by the platform.

is_enabled boolean

Indicates if this tool is enabled.

is_deprecated boolean

Indicates if this tool is deprecated.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>",
    "invocation_kind": "<invocation_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "tool.openai_async_chat",
    "name": "OpenAI Async Chat Completion",
    "description": "Enqueues a chat completion request against an OpenAI-compatible chat endpoint and returns results asynchronously via a configured ingress callback.\n",
    "invocation_kind": "http-endpoint",
    "execution_mode": "async",
    "async_result_strategy": "callback-ingress",
    "async_result_ingress_binding_slug": "ingress.cognitivetool.openai.chatCompletionResult",
    "connector_slug": "connector:http.openai",
    "endpoint_key": "postAsyncChatCompletions",
    "target_flow_slug": null,
    "parameter_schema": {
      "type": "object",
      "required": [
        "model",
        "messages"
      ],
      "properties": {
        "model": {
          "type": "string",
          "description": "OpenAI-compatible chat model identifier."
        },
        "messages": {
          "type": "array",
          "description": "Chat messages to send to the provider.",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            }
          }
        },
        "temperature": {
          "type": "number",
          "nullable": true
        },
        "max_tokens": {
          "type": "integer",
          "nullable": true
        },
        "somatic_metadata": {
          "type": "object",
          "nullable": true
        }
      }
    },
    "result_schema": {
      "type": "object",
      "properties": {
        "completion_text": {
          "type": "string"
        },
        "finish_reason": {
          "type": "string"
        },
        "usage": {
          "type": "object",
          "properties": {
            "prompt_tokens": {
              "type": "integer"
            },
            "completion_tokens": {
              "type": "integer"
            },
            "total_tokens": {
              "type": "integer"
            }
          }
        }
      }
    },
    "agent_result_projection": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "mapping": {
          "type": "object",
          "properties": {
            "completion_text": {
              "type": "string"
            },
            "finish_reason": {
              "type": "string"
            },
            "usage.prompt_tokens": {
              "type": "string"
            },
            "usage.completion_tokens": {
              "type": "string"
            },
            "usage.total_tokens": {
              "type": "string"
            }
          }
        }
      }
    },
    "requires_auth_context": true,
    "allowed_agent_profile_ids": [
      "agent_sommatic_default"
    ],
    "allowed_operator_slugs": [
      "ai.chat",
      "ai.agent"
    ],
    "safety_classification": "sensitive",
    "safety_rules": [
      {
        "type": "tenant-check",
        "description": "Ensure configuration is tenant-bound."
      },
      {
        "type": "content-policy",
        "description": "Apply content policies before exposing results."
      }
    ],
    "max_invocations_per_run": 50,
    "timeout_ms": 10000,
    "audit_level": "extended",
    "tags": [
      "openai",
      "llm",
      "async",
      "completion"
    ],
    "is_system": false
  }
}

Update an existing cognitive tool.

PATCH /cognitive-infrastructure/cognitive-assets/cognitive-tool/

Updates the data of an existing cognitive tool with the data provided.

Authentication: Bearer token

Request body

Cognitive tool object to be created.

organization_id string

Identifier of the organization (tenant) that owns this tool.

project_id string

Optional project ID (tenant scope) that owns the tool.

slug string Required

Stable semantic key uniquely identifying this tool (e.g. tool.openai_async_chat).

name string Required

Human-readable tool name used in editors, prompts and documentation.

description string

Human-readable explanation of the tool’s purpose, side effects and intended usage domain.

invocation_kind string Required

Type of capability implemented by the tool: "http-endpoint", "internal-function", "sub-flow", "vector-query", "database-operation", "identity-check", etc.

execution_mode string

Execution mode for this tool: "sync" for immediate inline results returned to the calling agent, "async" for deferred completion handled via callbacks or resume events, or "stream" for incremental result delivery when supported by the underlying connector or provider.

async_result_strategy string

Optional strategy used when execution_mode is "async", such as "callback-ingress", "resume-flow-instance", or "fire-and-forget".

async_result_ingress_binding_slug string

Optional reference to an IngressBindingModel key used to receive asynchronous completion payloads.

connector_slug string

Optional reference to the ConnectorModel used when this tool interacts with an external system.

endpoint_key string

Optional reference to an EndpointTemplateModel used for HTTP or RPC operations.

target_flow_slug string

Optional flow key used when the tool executes a versioned sub-flow.

parameter_schema object

JSON-schema-like definition describing the typed parameters required to invoke the tool.

result_schema object

JSON-schema-like structure describing the normalized result object.

agent_result_projection object

Optional mapping rules that transform raw backend responses into the normalized result schema.

requires_auth_context boolean

Whether this tool requires an authenticated identity context.

allowed_agent_profile_ids array<string>

Optional list of AgentProfileModel identifiers allowed to invoke this tool.

allowed_operator_slugs array<string>

Optional list of operator types that may reference this tool.

safety_classification string

Safety level of this tool: "read-only", "idempotent-write", "state-changing", "sensitive", or "high-risk".

safety_rules array<object>

Structured constraints or preconditions validated before tool invocation.

max_invocations_per_run integer

Soft limit on how many times an agent may call this tool in a single execution.

timeout_ms integer

Timeout in milliseconds for tool execution.

audit_level string

Level of auditing applied to this tool.

tags array<string>

Optional tags for catalog search and grouping.

is_system boolean

Indicates if this tool is managed by the platform.

is_enabled boolean

Indicates if this tool is enabled.

is_deprecated boolean

Indicates if this tool is deprecated.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>",
    "invocation_kind": "<invocation_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "tool.openai_async_chat",
    "name": "OpenAI Async Chat Completion",
    "description": "Enqueues a chat completion request against an OpenAI-compatible chat endpoint and returns results asynchronously via a configured ingress callback.\n",
    "invocation_kind": "http-endpoint",
    "execution_mode": "async",
    "async_result_strategy": "callback-ingress",
    "async_result_ingress_binding_slug": "ingress.cognitivetool.openai.chatCompletionResult",
    "connector_slug": "connector:http.openai",
    "endpoint_key": "postAsyncChatCompletions",
    "target_flow_slug": null,
    "parameter_schema": {
      "type": "object",
      "required": [
        "model",
        "messages"
      ],
      "properties": {
        "model": {
          "type": "string",
          "description": "OpenAI-compatible chat model identifier."
        },
        "messages": {
          "type": "array",
          "description": "Chat messages to send to the provider.",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            }
          }
        },
        "temperature": {
          "type": "number",
          "nullable": true
        },
        "max_tokens": {
          "type": "integer",
          "nullable": true
        },
        "somatic_metadata": {
          "type": "object",
          "nullable": true
        }
      }
    },
    "result_schema": {
      "type": "object",
      "properties": {
        "completion_text": {
          "type": "string"
        },
        "finish_reason": {
          "type": "string"
        },
        "usage": {
          "type": "object",
          "properties": {
            "prompt_tokens": {
              "type": "integer"
            },
            "completion_tokens": {
              "type": "integer"
            },
            "total_tokens": {
              "type": "integer"
            }
          }
        }
      }
    },
    "agent_result_projection": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "mapping": {
          "type": "object",
          "properties": {
            "completion_text": {
              "type": "string"
            },
            "finish_reason": {
              "type": "string"
            },
            "usage.prompt_tokens": {
              "type": "string"
            },
            "usage.completion_tokens": {
              "type": "string"
            },
            "usage.total_tokens": {
              "type": "string"
            }
          }
        }
      }
    },
    "requires_auth_context": true,
    "allowed_agent_profile_ids": [
      "agent_sommatic_default"
    ],
    "allowed_operator_slugs": [
      "ai.chat",
      "ai.agent"
    ],
    "safety_classification": "sensitive",
    "safety_rules": [
      {
        "type": "tenant-check",
        "description": "Ensure configuration is tenant-bound."
      },
      {
        "type": "content-policy",
        "description": "Apply content policies before exposing results."
      }
    ],
    "max_invocations_per_run": 50,
    "timeout_ms": 10000,
    "audit_level": "extended",
    "tags": [
      "openai",
      "llm",
      "async",
      "completion"
    ],
    "is_system": false
  }
}

Delete a cognitive tool by its id.

DELETE /cognitive-infrastructure/cognitive-assets/cognitive-tool/

Deletes a cognitive tool based on the provided ID.

Authentication: Bearer token

Request body

ID of the cognitive tool to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Cognitive tool successfully deleted",
  "result": null
}

Get a cognitive tool by query selector.

GET /cognitive-infrastructure/cognitive-assets/cognitive-tool/{queryselector}

Returns the cognitive tool information that matches the query selector an search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include cognitive tools of a specific status.

exclude_status string query

Optional status parameter to exclude cognitive tools of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "tool.openai_async_chat",
    "name": "OpenAI Async Chat Completion",
    "description": "Enqueues a chat completion request against an OpenAI-compatible chat endpoint and returns results asynchronously via a configured ingress callback.\n",
    "invocation_kind": "http-endpoint",
    "execution_mode": "async",
    "async_result_strategy": "callback-ingress",
    "async_result_ingress_binding_slug": "ingress.cognitivetool.openai.chatCompletionResult",
    "connector_slug": "connector:http.openai",
    "endpoint_key": "postAsyncChatCompletions",
    "target_flow_slug": null,
    "parameter_schema": {
      "type": "object",
      "required": [
        "model",
        "messages"
      ],
      "properties": {
        "model": {
          "type": "string",
          "description": "OpenAI-compatible chat model identifier."
        },
        "messages": {
          "type": "array",
          "description": "Chat messages to send to the provider.",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string"
              }
            }
          }
        },
        "temperature": {
          "type": "number",
          "nullable": true
        },
        "max_tokens": {
          "type": "integer",
          "nullable": true
        },
        "somatic_metadata": {
          "type": "object",
          "nullable": true
        }
      }
    },
    "result_schema": {
      "type": "object",
      "properties": {
        "completion_text": {
          "type": "string"
        },
        "finish_reason": {
          "type": "string"
        },
        "usage": {
          "type": "object",
          "properties": {
            "prompt_tokens": {
              "type": "integer"
            },
            "completion_tokens": {
              "type": "integer"
            },
            "total_tokens": {
              "type": "integer"
            }
          }
        }
      }
    },
    "agent_result_projection": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string"
        },
        "mapping": {
          "type": "object",
          "properties": {
            "completion_text": {
              "type": "string"
            },
            "finish_reason": {
              "type": "string"
            },
            "usage.prompt_tokens": {
              "type": "string"
            },
            "usage.completion_tokens": {
              "type": "string"
            },
            "usage.total_tokens": {
              "type": "string"
            }
          }
        }
      }
    },
    "requires_auth_context": true,
    "allowed_agent_profile_ids": [
      "agent_sommatic_default"
    ],
    "allowed_operator_slugs": [
      "ai.chat",
      "ai.agent"
    ],
    "safety_classification": "sensitive",
    "safety_rules": [
      {
        "type": "tenant-check",
        "description": "Ensure configuration is tenant-bound."
      },
      {
        "type": "content-policy",
        "description": "Apply content policies before exposing results."
      }
    ],
    "max_invocations_per_run": 50,
    "timeout_ms": 10000,
    "audit_level": "extended",
    "tags": [
      "openai",
      "llm",
      "async",
      "completion"
    ],
    "is_system": false
  }
}

Create a new knowledge resource binding.

POST /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/

Creates and returns the new cognitive knowledge resource binding.

Authentication: Bearer token

Request body

Knowledge Resource Binding object to be created.

id string

Unique identifier of the binding.

organization_id string Required

Tenant that owns the binding.

resource_id string Required

Referenced cognitive knowledge resource identifier.

target_type string Required

Entity type this resource is bound to.

Allowed values projectworkflowworkflow-nodeagent-profileappconversationreportanomaly
target_id string Required

Identifier of the target entity.

role string Required

Semantic purpose of the resource within the target context.

Allowed values knowledgepolicyinstructionsdatasettemplatereference
mode string Required

How Sommatic AI should use the resource at runtime.

Allowed values retrievalcontextbothinstructionroutingvalidation
tags array<string>

Optional contextual tags applied at the binding level.

metadata object

Additional context for the binding.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "resource_id": "<resource_id>",
    "target_type": "project",
    "target_id": "<target_id>",
    "role": "knowledge",
    "mode": "retrieval"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123",
    "resource_id": "ckr_12345",
    "target_type": "workflow-node",
    "target_id": "wnd_890",
    "role": "knowledge",
    "mode": "both",
    "tags": [
      "triage",
      "production"
    ]
  }
}

Update an existing knowledge resource binding.

PATCH /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/

Updates the data of an existing cognitive knowledge resource binding.

Authentication: Bearer token

Request body

Knowledge Resource Binding properties to update.

id string

Unique identifier of the binding.

organization_id string Required

Tenant that owns the binding.

resource_id string Required

Referenced cognitive knowledge resource identifier.

target_type string Required

Entity type this resource is bound to.

Allowed values projectworkflowworkflow-nodeagent-profileappconversationreportanomaly
target_id string Required

Identifier of the target entity.

role string Required

Semantic purpose of the resource within the target context.

Allowed values knowledgepolicyinstructionsdatasettemplatereference
mode string Required

How Sommatic AI should use the resource at runtime.

Allowed values retrievalcontextbothinstructionroutingvalidation
tags array<string>

Optional contextual tags applied at the binding level.

metadata object

Additional context for the binding.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "resource_id": "<resource_id>",
    "target_type": "project",
    "target_id": "<target_id>",
    "role": "knowledge",
    "mode": "retrieval"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123",
    "resource_id": "ckr_12345",
    "target_type": "workflow-node",
    "target_id": "wnd_890",
    "role": "knowledge",
    "mode": "both",
    "tags": [
      "triage",
      "production"
    ]
  }
}

Delete a knowledge resource binding by its id.

DELETE /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/

Deletes a knowledge resource binding based on the provided ID.

Authentication: Bearer token

Request body

ID of the binding to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Successfully deleted",
  "result": null
}

Get a knowledge resource binding by query selector.

GET /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/{queryselector}

Returns the knowledge resource binding information that matches the query selector and search specified in the route.

Authentication: Bearer token

Parameters

queryselector string path Required

The field to filter by

idorganization-idresource-idtarget-idall

search string query

Keyword to search for entities.

target_type string query

Optional target type parameter to filter bindings.

include_status string query

Optional status parameter to include items of a specific status.

exclude_status string query

Optional status parameter to exclude items of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123",
    "resource_id": "ckr_12345",
    "target_type": "workflow-node",
    "target_id": "wnd_890",
    "role": "knowledge",
    "mode": "both",
    "tags": [
      "triage",
      "production"
    ]
  }
}

Create a new knowledge resource.

POST /cognitive-infrastructure/cognitive-assets/knowledge-resource/

Creates and returns the new cognitive knowledge resource.

Authentication: Bearer token

Request body

Knowledge Resource object to be created.

id string

Unique identifier of the cognitive knowledge resource.

organization_id string Required

Organization ID (tenant) that owns the resource.

project_id string

Optional project ID (tenant scope) that owns the resource.

name string Required

Human-readable name of the resource.

slug string Required

Stable semantic key used to reference the resource across the platform.

description string

Optional explanation of the resource purpose and intended usage.

resource_type string Required

Semantic type of the cognitive resource.

Allowed values textdocumentlisttaxonomypromptpolicymanualdatasetreference
status string

Lifecycle status of the resource.

Allowed values draftactivearchiveddeleted
version string

Semantic or internal version of the resource.

language string

Primary language of the resource content.

tags array<string>

Optional tags for filtering, navigation and governance.

content CognitiveKnowledgeResourceContent Required

Canonical content payload of a cognitive knowledge resource. Supports free text, structured JSON data, file references and prompt blocks.

format string

Primary representation format of the content.

Allowed values plain-textmarkdownjsonfile-referenceprompt-blocksurl
text string

Raw or markdown text content used for text-like resources.

structured_data object

Structured JSON payload for lists, taxonomies, rules or lightweight datasets.

file_ref CognitiveKnowledgeResourceFileReference

File reference metadata for a cognitive knowledge resource.

file_name string

Original or display file name.

mime_type string

MIME type of the linked file.

storage_key string

Internal storage key or blob identifier.

document_uri string

URI or canonical pointer to the stored file.

checksum string

Optional checksum used for file integrity validation.

size_bytes number

File size in bytes.

prompt_blocks object

Structured prompt sections when the resource_type is prompt.

system string
instructions string
examples array<object>
url string

External or internal URL pointer when the content is represented as a link.

source CognitiveKnowledgeResourceSource

Optional infrastructure reference indicating where the resource is physically stored or synchronized from. This does not replace the semantic resource model.

datasource_id string

Optional datasource identifier when the content is backed by an external datasource.

external_id string

Identifier of the resource in the external source system.

sync_mode string

How the resource is maintained against its physical source.

Allowed values manualsyncedimported
governance CognitiveKnowledgeResourceGovernance

Governance and lifecycle metadata for a cognitive knowledge resource.

owner_user_id string

User responsible for the resource.

owner_team_id string

Team responsible for the resource.

visibility_scope string

Visibility scope of the resource.

Allowed values privateteamorganization
review_status string

Review state of the resource.

Allowed values draftreviewedapprovedrejected
is_authoritative boolean

Indicates whether this resource should be treated as an authoritative source.

effective_from string

Optional validity start timestamp.

effective_to string

Optional validity end timestamp.

expires_at string

Optional expiration timestamp.

capabilities CognitiveKnowledgeResourceCapabilities

Declares how the resource can be used within the runtime.

allowed_usage_modes array<string>

Modes in which the resource is permitted to be utilized.

is_searchable boolean

Indicates if the resource is indexed for search.

is_bindable boolean

Indicates if the resource can be bound to target entities.

is_executable_reference boolean

Indicates if the resource reference is executable.

is_version_locked boolean

Indicates if the resource is locked to a specific version.

git_binding object

Link with the Git repository this resource is synchronized from (see docs/concepts/git_sync.md): { repository_id, repository, branch, environment, package_path, resource_key, file_path, last_synced_commit, last_synced_at, deployed_commit, deployed_at, deployed_version, unlinked, unlinked_at }. unlinked = true means this installation stops syncing the resource from Git.

metadata object

Additional arbitrary metadata for UI, indexing or operational hints.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "name": "<name>",
    "slug": "<slug>",
    "resource_type": "text",
    "content": {
      "format": "markdown",
      "text": "## Escalation Manual\n1. Validate tenant.\n2. Identify affected workflow.\n3. Route to the correct operational queue.\n"
    }
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123",
    "name": "Claims Triage Knowledge Pack",
    "slug": "claims-triage-knowledge-pack",
    "description": "Centralized cognitive resource containing categories, policy notes and routing hints for intake triage.",
    "resource_type": "taxonomy",
    "status": "active",
    "version": "1.0.0",
    "language": "en",
    "tags": [
      "triage",
      "claims",
      "routing"
    ],
    "content": {
      "format": "json",
      "structured_data": {
        "categories": [
          {
            "name": "billing",
            "subcategories": [
              "refund",
              "dispute"
            ]
          },
          {
            "name": "technical",
            "subcategories": [
              "bug",
              "outage"
            ]
          }
        ],
        "routing_hints": {
          "billing": "finance.queue",
          "technical": "ops.queue"
        }
      }
    },
    "governance": {
      "visibility_scope": "organization",
      "review_status": "approved",
      "is_authoritative": true
    }
  }
}

Update an existing knowledge resource.

PATCH /cognitive-infrastructure/cognitive-assets/knowledge-resource/

Updates the data of an existing cognitive knowledge resource.

Authentication: Bearer token

Request body

Knowledge Resource properties to update.

id string

Unique identifier of the cognitive knowledge resource.

organization_id string Required

Organization ID (tenant) that owns the resource.

project_id string

Optional project ID (tenant scope) that owns the resource.

name string Required

Human-readable name of the resource.

slug string Required

Stable semantic key used to reference the resource across the platform.

description string

Optional explanation of the resource purpose and intended usage.

resource_type string Required

Semantic type of the cognitive resource.

Allowed values textdocumentlisttaxonomypromptpolicymanualdatasetreference
status string

Lifecycle status of the resource.

Allowed values draftactivearchiveddeleted
version string

Semantic or internal version of the resource.

language string

Primary language of the resource content.

tags array<string>

Optional tags for filtering, navigation and governance.

content CognitiveKnowledgeResourceContent Required

Canonical content payload of a cognitive knowledge resource. Supports free text, structured JSON data, file references and prompt blocks.

format string

Primary representation format of the content.

Allowed values plain-textmarkdownjsonfile-referenceprompt-blocksurl
text string

Raw or markdown text content used for text-like resources.

structured_data object

Structured JSON payload for lists, taxonomies, rules or lightweight datasets.

file_ref CognitiveKnowledgeResourceFileReference

File reference metadata for a cognitive knowledge resource.

file_name string

Original or display file name.

mime_type string

MIME type of the linked file.

storage_key string

Internal storage key or blob identifier.

document_uri string

URI or canonical pointer to the stored file.

checksum string

Optional checksum used for file integrity validation.

size_bytes number

File size in bytes.

prompt_blocks object

Structured prompt sections when the resource_type is prompt.

system string
instructions string
examples array<object>
url string

External or internal URL pointer when the content is represented as a link.

source CognitiveKnowledgeResourceSource

Optional infrastructure reference indicating where the resource is physically stored or synchronized from. This does not replace the semantic resource model.

datasource_id string

Optional datasource identifier when the content is backed by an external datasource.

external_id string

Identifier of the resource in the external source system.

sync_mode string

How the resource is maintained against its physical source.

Allowed values manualsyncedimported
governance CognitiveKnowledgeResourceGovernance

Governance and lifecycle metadata for a cognitive knowledge resource.

owner_user_id string

User responsible for the resource.

owner_team_id string

Team responsible for the resource.

visibility_scope string

Visibility scope of the resource.

Allowed values privateteamorganization
review_status string

Review state of the resource.

Allowed values draftreviewedapprovedrejected
is_authoritative boolean

Indicates whether this resource should be treated as an authoritative source.

effective_from string

Optional validity start timestamp.

effective_to string

Optional validity end timestamp.

expires_at string

Optional expiration timestamp.

capabilities CognitiveKnowledgeResourceCapabilities

Declares how the resource can be used within the runtime.

allowed_usage_modes array<string>

Modes in which the resource is permitted to be utilized.

is_searchable boolean

Indicates if the resource is indexed for search.

is_bindable boolean

Indicates if the resource can be bound to target entities.

is_executable_reference boolean

Indicates if the resource reference is executable.

is_version_locked boolean

Indicates if the resource is locked to a specific version.

git_binding object

Link with the Git repository this resource is synchronized from (see docs/concepts/git_sync.md): { repository_id, repository, branch, environment, package_path, resource_key, file_path, last_synced_commit, last_synced_at, deployed_commit, deployed_at, deployed_version, unlinked, unlinked_at }. unlinked = true means this installation stops syncing the resource from Git.

metadata object

Additional arbitrary metadata for UI, indexing or operational hints.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "name": "<name>",
    "slug": "<slug>",
    "resource_type": "text",
    "content": {
      "format": "markdown",
      "text": "## Escalation Manual\n1. Validate tenant.\n2. Identify affected workflow.\n3. Route to the correct operational queue.\n"
    }
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123",
    "name": "Claims Triage Knowledge Pack",
    "slug": "claims-triage-knowledge-pack",
    "description": "Centralized cognitive resource containing categories, policy notes and routing hints for intake triage.",
    "resource_type": "taxonomy",
    "status": "active",
    "version": "1.0.0",
    "language": "en",
    "tags": [
      "triage",
      "claims",
      "routing"
    ],
    "content": {
      "format": "json",
      "structured_data": {
        "categories": [
          {
            "name": "billing",
            "subcategories": [
              "refund",
              "dispute"
            ]
          },
          {
            "name": "technical",
            "subcategories": [
              "bug",
              "outage"
            ]
          }
        ],
        "routing_hints": {
          "billing": "finance.queue",
          "technical": "ops.queue"
        }
      }
    },
    "governance": {
      "visibility_scope": "organization",
      "review_status": "approved",
      "is_authoritative": true
    }
  }
}

Delete a knowledge resource by its id.

DELETE /cognitive-infrastructure/cognitive-assets/knowledge-resource/

Deletes a knowledge resource based on the provided ID.

Authentication: Bearer token

Request body

ID of the resource to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Successfully deleted",
  "result": null
}

Publish the knowledge resource as a new immutable version.

POST /cognitive-infrastructure/cognitive-assets/knowledge-resource/{id}/publish

Stores a snapshot of the current content as the next version (queryselector versions lists them) and marks the resource active. Used by the editor Publish action and by git sync.

Authentication: Bearer token

Parameters

id string path Required

Request body

description string
git object

Origin when published from git: { repository, branch, commit, path, key }

Responses

  • 200 The created version snapshot.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/<id>/publish \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "<description>",
    "git": {}
  }'
Response 200
{
  "organization_id": "org-62ea3930c4b08f6",
  "resource_id": "knowledge-resource-9c7ffffc0a24291",
  "version": "3",
  "name": "Taxonomía Jurídica",
  "content": {
    "format": "json",
    "structured_data": {}
  },
  "git": {
    "repository": "acme/support-solutions",
    "branch": "main",
    "commit": "4f2a…",
    "path": "juridica/knowledge/taxonomia-juridica.json",
    "key": "juridica.taxonomia-juridica"
  }
}

Get a knowledge resource by query selector.

GET /cognitive-infrastructure/cognitive-assets/knowledge-resource/{queryselector}

Returns the knowledge resource information that matches the query selector and search specified in the route.

Authentication: Bearer token

Parameters

queryselector string path Required

The field to filter by

idorganization-idslugall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include items of a specific status.

exclude_status string query

Optional status parameter to exclude items of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123",
    "name": "Claims Triage Knowledge Pack",
    "slug": "claims-triage-knowledge-pack",
    "description": "Centralized cognitive resource containing categories, policy notes and routing hints for intake triage.",
    "resource_type": "taxonomy",
    "status": "active",
    "version": "1.0.0",
    "language": "en",
    "tags": [
      "triage",
      "claims",
      "routing"
    ],
    "content": {
      "format": "json",
      "structured_data": {
        "categories": [
          {
            "name": "billing",
            "subcategories": [
              "refund",
              "dispute"
            ]
          },
          {
            "name": "technical",
            "subcategories": [
              "bug",
              "outage"
            ]
          }
        ],
        "routing_hints": {
          "billing": "finance.queue",
          "technical": "ops.queue"
        }
      }
    },
    "governance": {
      "visibility_scope": "organization",
      "review_status": "approved",
      "is_authoritative": true
    }
  }
}

Create a new LLM Provider.

POST /cognitive-infrastructure/cognitive-assets/llm-provider/

Returns the created LLM Provider with data provided.

Authentication: Bearer token

Request body

LLM Provider object to be created.

organization_id string

Identifier of the organization (tenant) that owns this flow definition.

project_id string

Optional project ID (tenant scope) that owns the LLM provider configuration.

slug string Required

Stable semantic key uniquely identifying this provider configuration (e.g. llm.openai.gpt4_1, llm.azure.gpt4o, llm.claude3_sonnet).

name string Required

Human-readable name of the provider configuration used in editors and documentation.

description string

Optional description explaining the provider’s purpose, model characteristics or usage scenarios.

transport_kind string

Transport method used to invoke the LLM - http-api, grpc, internal-router, local-process.

provider_type object

Provider type identifier used to resolve the invocation adapter (e.g. openai-chat, azure-openai-chat, anthropic-messages, mistral-chat).

name string
title string
endpoint string

Optional connection string or identifier for the ConnectorModel used for HTTP/GRPC LLM invocation.

api_key string

Optional EndpointTemplateModel key used when this provider maps to a connector endpoint.

deployment_name string

A deployment name is a unique identifier for a specific model version and configuration deployed on your cloud service provider.

api_version string

API version required by the provider (e.g. 2024-06-01 for Azure OpenAI).

default_parameters object

Optional static default parameters such as max_tokens, temperature or top_p applied when the LLM is invoked without explicit overrides.

input_token_limit integer

Maximum number of tokens allowed in the prompt for this provider.

output_token_limit integer

Maximum number of tokens that can be returned by this provider.

pricing object

Optional structured pricing information used for cost monitoring and optimization.

input_cost_per_million number

Cost per 1M input tokens.

output_cost_per_million number

Cost per 1M output tokens.

currency string

Currency code (e.g. USD).

rate_limits object

Optional request-per-minute or token-per-minute limits used to throttle requests.

rpm integer
tpm integer
safety_settings object

Optional provider-level safety configuration - content filters, policies, blocklists or moderation modes.

mode string

Safety mode (e.g. strict, balanced, minimal).

categories_blocked array<string>

List of blocked content categories.

routing_rules array<object>

Optional set of rules defining when this provider should be automatically selected by the cognitive engine.

is_system boolean

True if this provider configuration is managed by the platform.

is_default boolean

True if this provider determines the default LLM for the system.

is_enabled boolean

True if this provider can currently be selected or invoked.

is_deprecated boolean

True if this provider should no longer be used for new flows or agents.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "llm.openai.gpt4_1",
    "name": "OpenAI GPT-4.1 Standard",
    "description": "Standard OpenAI GPT-4.1 deployment used for reasoning-heavy tasks and agent planning.",
    "transport_kind": "http-api",
    "provider_type": {
      "name": "openai-chat",
      "title": "OpenAI Chat"
    },
    "endpoint": "https://api.openai.com/v1/chat/completions",
    "api_key": "chatCompletions",
    "api_version": "2024-06-01",
    "default_parameters": {
      "max_tokens": 2048,
      "temperature": 0.2,
      "top_p": 1
    },
    "input_token_limit": 128000,
    "output_token_limit": 4096,
    "pricing": {
      "input_cost_per_million": 5,
      "output_cost_per_million": 15,
      "currency": "USD"
    },
    "rate_limits": {
      "rpm": 200,
      "tpm": 200000
    },
    "safety_settings": {
      "mode": "balanced",
      "categories_blocked": [
        "violence",
        "hate"
      ]
    },
    "routing_rules": [
      {
        "condition": "task.type == 'planning'",
        "weight": 1
      }
    ],
    "is_system": false
  }
}

Update an existing LLM Provider.

PATCH /cognitive-infrastructure/cognitive-assets/llm-provider/

Updates the data of an existing LLM Provider with the data provided.

Authentication: Bearer token

Request body

LLM Provider object to be updated.

organization_id string

Identifier of the organization (tenant) that owns this flow definition.

project_id string

Optional project ID (tenant scope) that owns the LLM provider configuration.

slug string Required

Stable semantic key uniquely identifying this provider configuration (e.g. llm.openai.gpt4_1, llm.azure.gpt4o, llm.claude3_sonnet).

name string Required

Human-readable name of the provider configuration used in editors and documentation.

description string

Optional description explaining the provider’s purpose, model characteristics or usage scenarios.

transport_kind string

Transport method used to invoke the LLM - http-api, grpc, internal-router, local-process.

provider_type object

Provider type identifier used to resolve the invocation adapter (e.g. openai-chat, azure-openai-chat, anthropic-messages, mistral-chat).

name string
title string
endpoint string

Optional connection string or identifier for the ConnectorModel used for HTTP/GRPC LLM invocation.

api_key string

Optional EndpointTemplateModel key used when this provider maps to a connector endpoint.

deployment_name string

A deployment name is a unique identifier for a specific model version and configuration deployed on your cloud service provider.

api_version string

API version required by the provider (e.g. 2024-06-01 for Azure OpenAI).

default_parameters object

Optional static default parameters such as max_tokens, temperature or top_p applied when the LLM is invoked without explicit overrides.

input_token_limit integer

Maximum number of tokens allowed in the prompt for this provider.

output_token_limit integer

Maximum number of tokens that can be returned by this provider.

pricing object

Optional structured pricing information used for cost monitoring and optimization.

input_cost_per_million number

Cost per 1M input tokens.

output_cost_per_million number

Cost per 1M output tokens.

currency string

Currency code (e.g. USD).

rate_limits object

Optional request-per-minute or token-per-minute limits used to throttle requests.

rpm integer
tpm integer
safety_settings object

Optional provider-level safety configuration - content filters, policies, blocklists or moderation modes.

mode string

Safety mode (e.g. strict, balanced, minimal).

categories_blocked array<string>

List of blocked content categories.

routing_rules array<object>

Optional set of rules defining when this provider should be automatically selected by the cognitive engine.

is_system boolean

True if this provider configuration is managed by the platform.

is_default boolean

True if this provider determines the default LLM for the system.

is_enabled boolean

True if this provider can currently be selected or invoked.

is_deprecated boolean

True if this provider should no longer be used for new flows or agents.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "llm.openai.gpt4_1",
    "name": "OpenAI GPT-4.1 Standard",
    "description": "Standard OpenAI GPT-4.1 deployment used for reasoning-heavy tasks and agent planning.",
    "transport_kind": "http-api",
    "provider_type": {
      "name": "openai-chat",
      "title": "OpenAI Chat"
    },
    "endpoint": "https://api.openai.com/v1/chat/completions",
    "api_key": "chatCompletions",
    "api_version": "2024-06-01",
    "default_parameters": {
      "max_tokens": 2048,
      "temperature": 0.2,
      "top_p": 1
    },
    "input_token_limit": 128000,
    "output_token_limit": 4096,
    "pricing": {
      "input_cost_per_million": 5,
      "output_cost_per_million": 15,
      "currency": "USD"
    },
    "rate_limits": {
      "rpm": 200,
      "tpm": 200000
    },
    "safety_settings": {
      "mode": "balanced",
      "categories_blocked": [
        "violence",
        "hate"
      ]
    },
    "routing_rules": [
      {
        "condition": "task.type == 'planning'",
        "weight": 1
      }
    ],
    "is_system": false
  }
}

Delete an LLM Provider by its id.

DELETE /cognitive-infrastructure/cognitive-assets/llm-provider/

Deletes an LLM Provider based on the provided ID.

Authentication: Bearer token

Request body

ID of the LLM Provider to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "LLM Provider successfully deleted",
  "result": null
}

Get an LLM Provider by query selector.

GET /cognitive-infrastructure/cognitive-assets/llm-provider/{queryselector}

Returns the LLM Provider information that matches the query selector and search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include LLM Providers of a specific status.

exclude_status string query

Optional status parameter to exclude LLM Providers of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234",
    "slug": "llm.openai.gpt4_1",
    "name": "OpenAI GPT-4.1 Standard",
    "description": "Standard OpenAI GPT-4.1 deployment used for reasoning-heavy tasks and agent planning.",
    "transport_kind": "http-api",
    "provider_type": {
      "name": "openai-chat",
      "title": "OpenAI Chat"
    },
    "endpoint": "https://api.openai.com/v1/chat/completions",
    "api_key": "chatCompletions",
    "api_version": "2024-06-01",
    "default_parameters": {
      "max_tokens": 2048,
      "temperature": 0.2,
      "top_p": 1
    },
    "input_token_limit": 128000,
    "output_token_limit": 4096,
    "pricing": {
      "input_cost_per_million": 5,
      "output_cost_per_million": 15,
      "currency": "USD"
    },
    "rate_limits": {
      "rpm": 200,
      "tpm": 200000
    },
    "safety_settings": {
      "mode": "balanced",
      "categories_blocked": [
        "violence",
        "hate"
      ]
    },
    "routing_rules": [
      {
        "condition": "task.type == 'planning'",
        "weight": 1
      }
    ],
    "is_system": false
  }
}

Invoke an LLM Provider configuration.

POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke

Uses a configured LLM Provider (by ID) to execute a chat completion or comparable operation.

Authentication: Bearer token

Request body

Invocation parameters including model_id and input.

model_id string Required

The ID of the LLM Provider configuration.

operation string

Operation type (chat, embedding). Default is chat.

input object Required

The input payload (messages, etc.).

Responses

  • 200 Success.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/invoke \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "<model_id>",
    "input": {}
  }'
Response 200
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {}
}

Create a new prompt template.

POST /cognitive-infrastructure/cognitive-assets/prompt-template/

Returns the created prompt template with data provided.

Authentication: Bearer token

Request body

Prompt template object to be created.

organization_id string

Identifier of the organization (tenant) that owns this prompt template.

slug string Required

Stable semantic key uniquely identifying this prompt template (e.g. prompt.email_classification.v1).

name string Required

Human-readable name for this template used in editors and documentation.

description string

Optional description explaining the purpose, scope and intended usage of this prompt template.

llm_provider_id string

Optional reference to an LlmProviderModel.id indicating the primary provider this template was designed for.

language string

Optional primary language of the template content (e.g. "en", "es", "pt-BR").

format string

Format of the rendered prompt such as "plain-text", "markdown" or "json-instructions".

system_instructions string

System-level instructions that define the assistant persona, constraints and global behavior.

template_body string

Main prompt template body containing variable placeholders using a chosen syntax (e.g. {{variable_name}}).

variables array<CognitivePromptTemplateVariable>

List of typed input variables that can be injected into this template at render time.

name string Required

Variable name as referenced in the template body (e.g. "customer_name", "email_body").

type string Required

Expected runtime type for the value injected into the template.

Allowed values stringnumberbooleanarrayobject
description string

Human-readable explanation of what this variable represents.

required boolean

Whether this variable must be provided when rendering the template.

default_value any

Optional default used when the variable is not explicitly provided.

allowed_values array<string>

Optional enumeration of allowed values when the variable is constrained.

output_fields array<CognitivePromptTemplateOutputField>

List of typed output fields the prompt is expected to produce when structured output is required.

name string Required

Field name in the structured output (e.g. "category", "summary", "sentiment").

type string Required

Expected type of the field value in the rendered output.

Allowed values stringnumberbooleanarrayobject
description string

Human-readable explanation of what this field represents.

required boolean

Whether the model is expected to always emit this field.

style_guidelines array<string>

Optional list of style or tone guidelines to be respected when rendering and using this template.

examples array<CognitivePromptTemplateExample>

Worked examples pairing a set of variable inputs with the expected model output.

inputs object

Map of variable name to value used to render this example.

expected_output string

Desired model response for the given inputs.

notes string

Optional commentary about edge cases, gotchas, or rationale for the example.

tags array<string>

Optional list of free-form tags for catalog search, discovery and governance.

is_system boolean

Indicates whether this template is a system-level asset managed by the platform rather than user-created.

is_deprecated boolean

Indicates whether this template is deprecated and should not be used in new flows.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "123e4567-e89b-12d3",
    "slug": "prompt.email_classification.v1",
    "name": "Email Classification Prompt v1",
    "description": "Classify incoming support emails into billing, technical or complaint categories and extract key fields for routing and analytics.\n",
    "llm_provider_id": "llm-provider-XXXXXXXXXXXXXXX",
    "language": "en",
    "format": "markdown",
    "system_instructions": "You are a classification assistant for an enterprise support team.\nYour job is to read incoming emails and assign them to the correct category.\n",
    "template_body": "Read the following email and respond in JSON only.\n\n### Email subject\n{{subject}}\n\n### Email body\n{{body}}\n\nClassify the email into one of: \"billing\", \"technical\", \"complaint\".\n",
    "variables": [
      {
        "name": "subject",
        "type": "string",
        "description": "Subject line of the incoming email.",
        "required": true,
        "default_value": null,
        "allowed_values": []
      },
      {
        "name": "body",
        "type": "string",
        "description": "Full body content of the incoming email.",
        "required": true,
        "default_value": null,
        "allowed_values": []
      }
    ],
    "output_fields": [
      {
        "name": "category",
        "type": "string",
        "description": "One of \"billing\", \"technical\", \"complaint\".",
        "required": true
      },
      {
        "name": "summary",
        "type": "string",
        "description": "Short natural-language summary of the email content.",
        "required": true
      },
      {
        "name": "sentiment",
        "type": "string",
        "description": "One of \"positive\", \"neutral\", \"negative\".",
        "required": true
      }
    ],
    "style_guidelines": [
      "Be concise and use neutral language.",
      "Never include explanatory text outside the JSON object."
    ],
    "examples": [
      {
        "inputs": {
          "subject": "Issue with my last invoice",
          "body": "Hi, I think I was overcharged on my last invoice."
        },
        "expected_output": "{\n  \"category\": \"billing\",\n  \"summary\": \"Customer suspects being overcharged on the latest invoice.\",\n  \"sentiment\": \"neutral\"\n}\n",
        "notes": "Canonical billing-complaint case used as smoke test."
      }
    ],
    "tags": [
      "classification",
      "support",
      "email"
    ],
    "is_system": false
  }
}

Update an existing prompt template.

PATCH /cognitive-infrastructure/cognitive-assets/prompt-template/

Updates the data of an existing prompt template with the data provided.

Authentication: Bearer token

Request body

Prompt template object to be created.

organization_id string

Identifier of the organization (tenant) that owns this prompt template.

slug string Required

Stable semantic key uniquely identifying this prompt template (e.g. prompt.email_classification.v1).

name string Required

Human-readable name for this template used in editors and documentation.

description string

Optional description explaining the purpose, scope and intended usage of this prompt template.

llm_provider_id string

Optional reference to an LlmProviderModel.id indicating the primary provider this template was designed for.

language string

Optional primary language of the template content (e.g. "en", "es", "pt-BR").

format string

Format of the rendered prompt such as "plain-text", "markdown" or "json-instructions".

system_instructions string

System-level instructions that define the assistant persona, constraints and global behavior.

template_body string

Main prompt template body containing variable placeholders using a chosen syntax (e.g. {{variable_name}}).

variables array<CognitivePromptTemplateVariable>

List of typed input variables that can be injected into this template at render time.

name string Required

Variable name as referenced in the template body (e.g. "customer_name", "email_body").

type string Required

Expected runtime type for the value injected into the template.

Allowed values stringnumberbooleanarrayobject
description string

Human-readable explanation of what this variable represents.

required boolean

Whether this variable must be provided when rendering the template.

default_value any

Optional default used when the variable is not explicitly provided.

allowed_values array<string>

Optional enumeration of allowed values when the variable is constrained.

output_fields array<CognitivePromptTemplateOutputField>

List of typed output fields the prompt is expected to produce when structured output is required.

name string Required

Field name in the structured output (e.g. "category", "summary", "sentiment").

type string Required

Expected type of the field value in the rendered output.

Allowed values stringnumberbooleanarrayobject
description string

Human-readable explanation of what this field represents.

required boolean

Whether the model is expected to always emit this field.

style_guidelines array<string>

Optional list of style or tone guidelines to be respected when rendering and using this template.

examples array<CognitivePromptTemplateExample>

Worked examples pairing a set of variable inputs with the expected model output.

inputs object

Map of variable name to value used to render this example.

expected_output string

Desired model response for the given inputs.

notes string

Optional commentary about edge cases, gotchas, or rationale for the example.

tags array<string>

Optional list of free-form tags for catalog search, discovery and governance.

is_system boolean

Indicates whether this template is a system-level asset managed by the platform rather than user-created.

is_deprecated boolean

Indicates whether this template is deprecated and should not be used in new flows.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "123e4567-e89b-12d3",
    "slug": "prompt.email_classification.v1",
    "name": "Email Classification Prompt v1",
    "description": "Classify incoming support emails into billing, technical or complaint categories and extract key fields for routing and analytics.\n",
    "llm_provider_id": "llm-provider-XXXXXXXXXXXXXXX",
    "language": "en",
    "format": "markdown",
    "system_instructions": "You are a classification assistant for an enterprise support team.\nYour job is to read incoming emails and assign them to the correct category.\n",
    "template_body": "Read the following email and respond in JSON only.\n\n### Email subject\n{{subject}}\n\n### Email body\n{{body}}\n\nClassify the email into one of: \"billing\", \"technical\", \"complaint\".\n",
    "variables": [
      {
        "name": "subject",
        "type": "string",
        "description": "Subject line of the incoming email.",
        "required": true,
        "default_value": null,
        "allowed_values": []
      },
      {
        "name": "body",
        "type": "string",
        "description": "Full body content of the incoming email.",
        "required": true,
        "default_value": null,
        "allowed_values": []
      }
    ],
    "output_fields": [
      {
        "name": "category",
        "type": "string",
        "description": "One of \"billing\", \"technical\", \"complaint\".",
        "required": true
      },
      {
        "name": "summary",
        "type": "string",
        "description": "Short natural-language summary of the email content.",
        "required": true
      },
      {
        "name": "sentiment",
        "type": "string",
        "description": "One of \"positive\", \"neutral\", \"negative\".",
        "required": true
      }
    ],
    "style_guidelines": [
      "Be concise and use neutral language.",
      "Never include explanatory text outside the JSON object."
    ],
    "examples": [
      {
        "inputs": {
          "subject": "Issue with my last invoice",
          "body": "Hi, I think I was overcharged on my last invoice."
        },
        "expected_output": "{\n  \"category\": \"billing\",\n  \"summary\": \"Customer suspects being overcharged on the latest invoice.\",\n  \"sentiment\": \"neutral\"\n}\n",
        "notes": "Canonical billing-complaint case used as smoke test."
      }
    ],
    "tags": [
      "classification",
      "support",
      "email"
    ],
    "is_system": false
  }
}

Delete a prompt template by its id.

DELETE /cognitive-infrastructure/cognitive-assets/prompt-template/

Deletes a prompt template based on the provided ID.

Authentication: Bearer token

Request body

ID of the prompt template to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Prompt template successfully deleted",
  "result": null
}

Get an prompt template by query selector.

GET /cognitive-infrastructure/cognitive-assets/prompt-template/{queryselector}

Returns the prompt template information that matches the query selector an search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include templates of a specific status.

exclude_status string query

Optional status parameter to exclude templates of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "123e4567-e89b-12d3",
    "slug": "prompt.email_classification.v1",
    "name": "Email Classification Prompt v1",
    "description": "Classify incoming support emails into billing, technical or complaint categories and extract key fields for routing and analytics.\n",
    "llm_provider_id": "llm-provider-XXXXXXXXXXXXXXX",
    "language": "en",
    "format": "markdown",
    "system_instructions": "You are a classification assistant for an enterprise support team.\nYour job is to read incoming emails and assign them to the correct category.\n",
    "template_body": "Read the following email and respond in JSON only.\n\n### Email subject\n{{subject}}\n\n### Email body\n{{body}}\n\nClassify the email into one of: \"billing\", \"technical\", \"complaint\".\n",
    "variables": [
      {
        "name": "subject",
        "type": "string",
        "description": "Subject line of the incoming email.",
        "required": true,
        "default_value": null,
        "allowed_values": []
      },
      {
        "name": "body",
        "type": "string",
        "description": "Full body content of the incoming email.",
        "required": true,
        "default_value": null,
        "allowed_values": []
      }
    ],
    "output_fields": [
      {
        "name": "category",
        "type": "string",
        "description": "One of \"billing\", \"technical\", \"complaint\".",
        "required": true
      },
      {
        "name": "summary",
        "type": "string",
        "description": "Short natural-language summary of the email content.",
        "required": true
      },
      {
        "name": "sentiment",
        "type": "string",
        "description": "One of \"positive\", \"neutral\", \"negative\".",
        "required": true
      }
    ],
    "style_guidelines": [
      "Be concise and use neutral language.",
      "Never include explanatory text outside the JSON object."
    ],
    "examples": [
      {
        "inputs": {
          "subject": "Issue with my last invoice",
          "body": "Hi, I think I was overcharged on my last invoice."
        },
        "expected_output": "{\n  \"category\": \"billing\",\n  \"summary\": \"Customer suspects being overcharged on the latest invoice.\",\n  \"sentiment\": \"neutral\"\n}\n",
        "notes": "Canonical billing-complaint case used as smoke test."
      }
    ],
    "tags": [
      "classification",
      "support",
      "email"
    ],
    "is_system": false
  }
}

Create a new datasource.

POST /cognitive-infrastructure/connectors/external-datasource/

Returns the created Datasource with data provided.

Authentication: Bearer token

Request body

Datasource object to be created.

organization_id string Required

Identifier of the OrganizationModel this trigger is associated with.

project_id string

Optional project ID (tenant scope) that owns the datasource.

slug string Required

Stable semantic key uniquely identifying this datasource (e.g. ds.crm, ds.postgres.orders, ds.vector.support).

name string Required

Human-readable datasource name used in editors and documentation.

description string

Optional description explaining the dataset or system represented by this datasource.

datasource_kind string Required

Type of datasource: "postgres", "mysql", "sqlserver", "mongodb", "s3", "gcs", "snowflake", "bigquery", "elasticsearch", "vector-db", "custom".

connector_slug string

Optional reference to the ConnectorModel that handles low-level communication (HTTP, driver API, RPC proxy, cloud SDK).

default_collection string

Default dataset, table, collection or bucket that this datasource interacts with.

collections array<object>

Optional list of logical datasets or collections exposed by this datasource, each with optional schema hints.

collection_key string
description string
schema object
indexing object

Indexing configuration for this datasource, including primary key, vector index, or search index configuration depending on datasource_kind.

primary_key string
vector_index object
search_index object
query_capabilities object

Capabilities supported by this datasource, such as select, insert, update, delete, vector-search, hybrid-search, aggregation, blob-read, blob-write.

select boolean
insert boolean
update boolean
delete boolean
vector_search boolean
hybrid_search boolean
blob_read boolean
blob_write boolean
auth_context_required boolean

True if this datasource requires an identity context (tenant/user) to be resolved before queries can run.

allowed_agent_profile_ids array<string>

Optional list of AgentProfileModel identifiers allowed to perform queries against this datasource.

allowed_operator_slugs array<string>

Optional list of operator types allowed to reference this datasource (e.g. datasource.query, ai.rag.retrieve).

is_system boolean

True if this datasource is managed internally by the platform.

is_enabled boolean

True if this datasource is currently available for use.

is_deprecated boolean

True if this datasource should not be used for new flows or designs.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "slug": "<slug>",
    "name": "<name>",
    "datasource_kind": "<datasource_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org.1234567890",
    "slug": "ds.vector.support",
    "name": "Support Knowledge Base (Vector DB)",
    "description": "Vector database containing embeddings of support documents for semantic RAG retrieval.",
    "datasource_kind": "vector-db",
    "connector_slug": "connector:pinecone",
    "default_collection": "kb_support",
    "collections": [
      {
        "collection_key": "kb_support",
        "description": "Embedded support articles and troubleshooting guides.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "embedding": {
              "type": "array"
            },
            "metadata": {
              "type": "object"
            }
          }
        }
      }
    ],
    "indexing": {
      "vector_index": {
        "dimensions": 1536,
        "distance_metric": "cosine"
      }
    },
    "query_capabilities": {
      "select": false,
      "insert": true,
      "update": false,
      "delete": false,
      "vector_search": true,
      "hybrid_search": true,
      "blob_read": false,
      "blob_write": false
    },
    "auth_context_required": true,
    "allowed_agent_profile_ids": [
      "agent_support_router"
    ],
    "allowed_operator_slugs": [
      "ai.rag.retrieve",
      "datasource.query"
    ],
    "is_system": false
  }
}

Update an existing datasource.

PATCH /cognitive-infrastructure/connectors/external-datasource/

Updates the data of an existing Datasource with the data provided.

Authentication: Bearer token

Request body

Datasource object to be created.

organization_id string Required

Identifier of the OrganizationModel this trigger is associated with.

project_id string

Optional project ID (tenant scope) that owns the datasource.

slug string Required

Stable semantic key uniquely identifying this datasource (e.g. ds.crm, ds.postgres.orders, ds.vector.support).

name string Required

Human-readable datasource name used in editors and documentation.

description string

Optional description explaining the dataset or system represented by this datasource.

datasource_kind string Required

Type of datasource: "postgres", "mysql", "sqlserver", "mongodb", "s3", "gcs", "snowflake", "bigquery", "elasticsearch", "vector-db", "custom".

connector_slug string

Optional reference to the ConnectorModel that handles low-level communication (HTTP, driver API, RPC proxy, cloud SDK).

default_collection string

Default dataset, table, collection or bucket that this datasource interacts with.

collections array<object>

Optional list of logical datasets or collections exposed by this datasource, each with optional schema hints.

collection_key string
description string
schema object
indexing object

Indexing configuration for this datasource, including primary key, vector index, or search index configuration depending on datasource_kind.

primary_key string
vector_index object
search_index object
query_capabilities object

Capabilities supported by this datasource, such as select, insert, update, delete, vector-search, hybrid-search, aggregation, blob-read, blob-write.

select boolean
insert boolean
update boolean
delete boolean
vector_search boolean
hybrid_search boolean
blob_read boolean
blob_write boolean
auth_context_required boolean

True if this datasource requires an identity context (tenant/user) to be resolved before queries can run.

allowed_agent_profile_ids array<string>

Optional list of AgentProfileModel identifiers allowed to perform queries against this datasource.

allowed_operator_slugs array<string>

Optional list of operator types allowed to reference this datasource (e.g. datasource.query, ai.rag.retrieve).

is_system boolean

True if this datasource is managed internally by the platform.

is_enabled boolean

True if this datasource is currently available for use.

is_deprecated boolean

True if this datasource should not be used for new flows or designs.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "slug": "<slug>",
    "name": "<name>",
    "datasource_kind": "<datasource_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org.1234567890",
    "slug": "ds.vector.support",
    "name": "Support Knowledge Base (Vector DB)",
    "description": "Vector database containing embeddings of support documents for semantic RAG retrieval.",
    "datasource_kind": "vector-db",
    "connector_slug": "connector:pinecone",
    "default_collection": "kb_support",
    "collections": [
      {
        "collection_key": "kb_support",
        "description": "Embedded support articles and troubleshooting guides.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "embedding": {
              "type": "array"
            },
            "metadata": {
              "type": "object"
            }
          }
        }
      }
    ],
    "indexing": {
      "vector_index": {
        "dimensions": 1536,
        "distance_metric": "cosine"
      }
    },
    "query_capabilities": {
      "select": false,
      "insert": true,
      "update": false,
      "delete": false,
      "vector_search": true,
      "hybrid_search": true,
      "blob_read": false,
      "blob_write": false
    },
    "auth_context_required": true,
    "allowed_agent_profile_ids": [
      "agent_support_router"
    ],
    "allowed_operator_slugs": [
      "ai.rag.retrieve",
      "datasource.query"
    ],
    "is_system": false
  }
}

Delete a Datasource by its id.

DELETE /cognitive-infrastructure/connectors/external-datasource/

Deletes a Datasource based on the provided ID.

Authentication: Bearer token

Request body

ID of the Datasource to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Datasource successfully deleted",
  "result": null
}

Get an Datasource by query selector.

GET /cognitive-infrastructure/connectors/external-datasource/{queryselector}

Returns the Datasource information that matches the query selector an search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include datasources of a specific status.

exclude_status string query

Optional status parameter to exclude datasources of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org.1234567890",
    "slug": "ds.vector.support",
    "name": "Support Knowledge Base (Vector DB)",
    "description": "Vector database containing embeddings of support documents for semantic RAG retrieval.",
    "datasource_kind": "vector-db",
    "connector_slug": "connector:pinecone",
    "default_collection": "kb_support",
    "collections": [
      {
        "collection_key": "kb_support",
        "description": "Embedded support articles and troubleshooting guides.",
        "schema": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "embedding": {
              "type": "array"
            },
            "metadata": {
              "type": "object"
            }
          }
        }
      }
    ],
    "indexing": {
      "vector_index": {
        "dimensions": 1536,
        "distance_metric": "cosine"
      }
    },
    "query_capabilities": {
      "select": false,
      "insert": true,
      "update": false,
      "delete": false,
      "vector_search": true,
      "hybrid_search": true,
      "blob_read": false,
      "blob_write": false
    },
    "auth_context_required": true,
    "allowed_agent_profile_ids": [
      "agent_support_router"
    ],
    "allowed_operator_slugs": [
      "ai.rag.retrieve",
      "datasource.query"
    ],
    "is_system": false
  }
}

Create a new memory store.

POST /cognitive-infrastructure/connectors/memory-store/

Returns the created memory store with data provided.

Authentication: Bearer token

Request body

Memory store object to be created.

organization_id string

Identifier of the organization (tenant) that owns this memory store.

project_id string

Optional project ID (tenant scope) that owns the memory store.

slug string Required

Stable semantic key uniquely identifying this memory store (e.g. mem.support_conversation, mem.global_facts, mem.vector_personalization).

name string Required

Human-readable name of the memory store shown in editors and documentation.

description string

Optional description explaining what type of memory is stored and for which use cases.

memory_kind string Required

Type of memory backend: "kv-store", "vector-memory", "session-store", "document-memory", "hybrid".

connector_slug string

Optional reference to the ConnectorModel handling low-level access (Redis, DynamoDB, vector DB, session service, custom backend).

backing_datasource_key string

Optional DatasourceModel key when this memory store is implemented on top of a structured or vector datasource.

default_namespace string

Default namespace, bucket or logical collection used when no explicit namespace is provided.

partitioning object

Defines how memory entries are partitioned and isolated across tenants, users, flows or agents.

strategy string

Partitioning strategy: "by-tenant", "by-subject", "by-tenant-and-subject", "by-flow", "global", "custom".

keys array<string>

Optional list of logical partition keys derived from identity or context (e.g. ["tenant_id", "subject_id", "flow_key"]).

schema_hints object

Optional structural hints describing the typical shape of memory entries stored here, such as conversational messages, facts, embeddings or session snapshots.

entry_kind string

High-level type of entries: "message", "fact", "embedding", "session", "mixed".

fields object

Optional JSON-schema-like structure describing common fields of stored records.

retention_policy object

Retention and compaction strategy for memory entries, controlling how long information is preserved and how old or excess data is pruned.

policy_type string

Retention mode: "ttl", "sliding-window", "max-entries-per-partition", "manual".

ttl_ms integer

Default time-to-live in milliseconds for entries when policy_type is "ttl" or "sliding-window".

max_entries_per_partition integer

Maximum number of memory entries allowed per partition before older entries are compacted or removed.

default_ttl_ms integer

Optional default TTL in milliseconds for entries when not overridden at write time. Can be used independently of retention_policy for simple expiry behavior.

query_capabilities object

Capabilities supported by this memory store: reading, writing, vector search, listing recent items, truncating sessions, etc.

read_by_key boolean
upsert boolean
delete boolean
list_recent boolean
truncate_partition boolean
vector_search boolean
auth_context_required boolean

True if this memory store requires an identity context (tenant/user) to be resolved before read/write operations.

allowed_agent_profile_ids array<string>

Optional list of AgentProfileModel identifiers allowed to use this memory store.

allowed_operator_slugs array<string>

Optional list of operator types allowed to reference this memory store (e.g. ai.chat, ai.agent, ai.rag.retrieve).

is_system boolean

True if this memory store is managed internally by the platform.

is_enabled boolean

True if this memory store is currently available for use.

is_deprecated boolean

True if this memory store should not be used for new flows or agents.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>",
    "memory_kind": "<memory_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123e4567e89d12d3",
    "slug": "mem.support_conversation",
    "name": "Support Conversations Memory",
    "description": "Long-lived conversational memory for support agents, storing chat history and key facts per customer across multiple tickets and flows.\n",
    "memory_kind": "hybrid",
    "connector_slug": "connector:redis_cluster",
    "backing_datasource_key": null,
    "default_namespace": "support_conversations",
    "partitioning": {
      "strategy": "by-tenant-and-subject",
      "keys": [
        "tenant_id",
        "subject_id"
      ]
    },
    "schema_hints": {
      "entry_kind": "message",
      "fields": {
        "type": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        }
      }
    },
    "retention_policy": {
      "policy_type": "sliding-window",
      "ttl_ms": 2592000000,
      "max_entries_per_partition": 500
    },
    "default_ttl_ms": 2592000000,
    "query_capabilities": {
      "read_by_key": true,
      "upsert": true,
      "delete": true,
      "list_recent": true,
      "truncate_partition": true,
      "vector_search": false
    },
    "auth_context_required": true,
    "allowed_agent_profile_ids": [
      "agent_support_router",
      "agent_support_assistant"
    ],
    "allowed_operator_slugs": [
      "ai.chat",
      "ai.agent"
    ],
    "is_system": false
  }
}

Update an existing memory store.

PATCH /cognitive-infrastructure/connectors/memory-store/

Updates the data of an existing memory store with the data provided.

Authentication: Bearer token

Request body

Memory store object to be created.

organization_id string

Identifier of the organization (tenant) that owns this memory store.

project_id string

Optional project ID (tenant scope) that owns the memory store.

slug string Required

Stable semantic key uniquely identifying this memory store (e.g. mem.support_conversation, mem.global_facts, mem.vector_personalization).

name string Required

Human-readable name of the memory store shown in editors and documentation.

description string

Optional description explaining what type of memory is stored and for which use cases.

memory_kind string Required

Type of memory backend: "kv-store", "vector-memory", "session-store", "document-memory", "hybrid".

connector_slug string

Optional reference to the ConnectorModel handling low-level access (Redis, DynamoDB, vector DB, session service, custom backend).

backing_datasource_key string

Optional DatasourceModel key when this memory store is implemented on top of a structured or vector datasource.

default_namespace string

Default namespace, bucket or logical collection used when no explicit namespace is provided.

partitioning object

Defines how memory entries are partitioned and isolated across tenants, users, flows or agents.

strategy string

Partitioning strategy: "by-tenant", "by-subject", "by-tenant-and-subject", "by-flow", "global", "custom".

keys array<string>

Optional list of logical partition keys derived from identity or context (e.g. ["tenant_id", "subject_id", "flow_key"]).

schema_hints object

Optional structural hints describing the typical shape of memory entries stored here, such as conversational messages, facts, embeddings or session snapshots.

entry_kind string

High-level type of entries: "message", "fact", "embedding", "session", "mixed".

fields object

Optional JSON-schema-like structure describing common fields of stored records.

retention_policy object

Retention and compaction strategy for memory entries, controlling how long information is preserved and how old or excess data is pruned.

policy_type string

Retention mode: "ttl", "sliding-window", "max-entries-per-partition", "manual".

ttl_ms integer

Default time-to-live in milliseconds for entries when policy_type is "ttl" or "sliding-window".

max_entries_per_partition integer

Maximum number of memory entries allowed per partition before older entries are compacted or removed.

default_ttl_ms integer

Optional default TTL in milliseconds for entries when not overridden at write time. Can be used independently of retention_policy for simple expiry behavior.

query_capabilities object

Capabilities supported by this memory store: reading, writing, vector search, listing recent items, truncating sessions, etc.

read_by_key boolean
upsert boolean
delete boolean
list_recent boolean
truncate_partition boolean
vector_search boolean
auth_context_required boolean

True if this memory store requires an identity context (tenant/user) to be resolved before read/write operations.

allowed_agent_profile_ids array<string>

Optional list of AgentProfileModel identifiers allowed to use this memory store.

allowed_operator_slugs array<string>

Optional list of operator types allowed to reference this memory store (e.g. ai.chat, ai.agent, ai.rag.retrieve).

is_system boolean

True if this memory store is managed internally by the platform.

is_enabled boolean

True if this memory store is currently available for use.

is_deprecated boolean

True if this memory store should not be used for new flows or agents.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "<slug>",
    "name": "<name>",
    "memory_kind": "<memory_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123e4567e89d12d3",
    "slug": "mem.support_conversation",
    "name": "Support Conversations Memory",
    "description": "Long-lived conversational memory for support agents, storing chat history and key facts per customer across multiple tickets and flows.\n",
    "memory_kind": "hybrid",
    "connector_slug": "connector:redis_cluster",
    "backing_datasource_key": null,
    "default_namespace": "support_conversations",
    "partitioning": {
      "strategy": "by-tenant-and-subject",
      "keys": [
        "tenant_id",
        "subject_id"
      ]
    },
    "schema_hints": {
      "entry_kind": "message",
      "fields": {
        "type": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        }
      }
    },
    "retention_policy": {
      "policy_type": "sliding-window",
      "ttl_ms": 2592000000,
      "max_entries_per_partition": 500
    },
    "default_ttl_ms": 2592000000,
    "query_capabilities": {
      "read_by_key": true,
      "upsert": true,
      "delete": true,
      "list_recent": true,
      "truncate_partition": true,
      "vector_search": false
    },
    "auth_context_required": true,
    "allowed_agent_profile_ids": [
      "agent_support_router",
      "agent_support_assistant"
    ],
    "allowed_operator_slugs": [
      "ai.chat",
      "ai.agent"
    ],
    "is_system": false
  }
}

Delete a memory store by its id.

DELETE /cognitive-infrastructure/connectors/memory-store/

Deletes a memory store based on the provided ID.

Authentication: Bearer token

Request body

ID of the memory store to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Memory store successfully deleted",
  "result": null
}

Get an memory store by query selector.

GET /cognitive-infrastructure/connectors/memory-store/{queryselector}

Returns the memory store information that matches the query selector an search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include templates of a specific status.

exclude_status string query

Optional status parameter to exclude templates of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org-123e4567e89d12d3",
    "slug": "mem.support_conversation",
    "name": "Support Conversations Memory",
    "description": "Long-lived conversational memory for support agents, storing chat history and key facts per customer across multiple tickets and flows.\n",
    "memory_kind": "hybrid",
    "connector_slug": "connector:redis_cluster",
    "backing_datasource_key": null,
    "default_namespace": "support_conversations",
    "partitioning": {
      "strategy": "by-tenant-and-subject",
      "keys": [
        "tenant_id",
        "subject_id"
      ]
    },
    "schema_hints": {
      "entry_kind": "message",
      "fields": {
        "type": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        }
      }
    },
    "retention_policy": {
      "policy_type": "sliding-window",
      "ttl_ms": 2592000000,
      "max_entries_per_partition": 500
    },
    "default_ttl_ms": 2592000000,
    "query_capabilities": {
      "read_by_key": true,
      "upsert": true,
      "delete": true,
      "list_recent": true,
      "truncate_partition": true,
      "vector_search": false
    },
    "auth_context_required": true,
    "allowed_agent_profile_ids": [
      "agent_support_router",
      "agent_support_assistant"
    ],
    "allowed_operator_slugs": [
      "ai.chat",
      "ai.agent"
    ],
    "is_system": false
  }
}

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs