AI artifacts Beta
LLM providers, prompt templates, knowledge resources and bindings, agents, tools and connectors.
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_idstring -
Identifier of the organization (tenant) that owns this profile.
-
slugstring Required -
Stable semantic key uniquely identifying this profile (e.g. agent.support_router).
-
namestring Required -
Human-readable profile name used in editors, logs and documentation.
-
descriptionstring -
Optional description that explains the cognitive role of this agent (e.g. "Support router AI").
-
llm_provider_slugstring -
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_idstring -
Optional reference to a PromptTemplateModel used as the system prompt or behavioral scaffold.
-
cognitive_tool_idsarray<string> -
List of CognitiveToolModel keys this agent is allowed to invoke during reasoning.
-
memory_store_idsarray<string> -
Optional list of MemoryStoreModel identifiers available to this agent for conversational memory, contextual retrieval or long-term state.
-
datasource_idsarray<string> -
Optional list of DatasourceModel identifiers the agent may query during reasoning (read-only or governed writes).
-
behavior_policiesobject -
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_rulesarray<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_stepinteger -
Optional upper bound on how many tool invocations this agent may perform in a single reasoning cycle.
-
max_reasoning_stepsinteger -
Optional limit on iterative reasoning or tool-use loops for safety and performance.
-
audit_levelstring -
Level of auditing applied to this agent's cognitive operations.
-
tagsarray<string> -
Optional free-form tags for search, governance and classification.
-
is_systemboolean -
True if this profile is managed by the platform rather than created by the tenant.
-
is_enabledboolean -
True if this agent profile is currently available for use.
-
is_deprecatedboolean -
True if this profile is deprecated and should not be used for new flows.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this profile.
-
slugstring Required -
Stable semantic key uniquely identifying this profile (e.g. agent.support_router).
-
namestring Required -
Human-readable profile name used in editors, logs and documentation.
-
descriptionstring -
Optional description that explains the cognitive role of this agent (e.g. "Support router AI").
-
llm_provider_slugstring -
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_idstring -
Optional reference to a PromptTemplateModel used as the system prompt or behavioral scaffold.
-
cognitive_tool_idsarray<string> -
List of CognitiveToolModel keys this agent is allowed to invoke during reasoning.
-
memory_store_idsarray<string> -
Optional list of MemoryStoreModel identifiers available to this agent for conversational memory, contextual retrieval or long-term state.
-
datasource_idsarray<string> -
Optional list of DatasourceModel identifiers the agent may query during reasoning (read-only or governed writes).
-
behavior_policiesobject -
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_rulesarray<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_stepinteger -
Optional upper bound on how many tool invocations this agent may perform in a single reasoning cycle.
-
max_reasoning_stepsinteger -
Optional limit on iterative reasoning or tool-use loops for safety and performance.
-
audit_levelstring -
Level of auditing applied to this agent's cognitive operations.
-
tagsarray<string> -
Optional free-form tags for search, governance and classification.
-
is_systemboolean -
True if this profile is managed by the platform rather than created by the tenant.
-
is_enabledboolean -
True if this agent profile is currently available for use.
-
is_deprecatedboolean -
True if this profile is deprecated and should not be used for new flows.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Agent profile successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include agent profiles of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude agent profiles of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/agent-profile/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this tool.
-
project_idstring -
Optional project ID (tenant scope) that owns the tool.
-
slugstring Required -
Stable semantic key uniquely identifying this tool (e.g. tool.openai_async_chat).
-
namestring Required -
Human-readable tool name used in editors, prompts and documentation.
-
descriptionstring -
Human-readable explanation of the tool’s purpose, side effects and intended usage domain.
-
invocation_kindstring Required -
Type of capability implemented by the tool: "http-endpoint", "internal-function", "sub-flow", "vector-query", "database-operation", "identity-check", etc.
-
execution_modestring -
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_strategystring -
Optional strategy used when execution_mode is "async", such as "callback-ingress", "resume-flow-instance", or "fire-and-forget".
-
async_result_ingress_binding_slugstring -
Optional reference to an IngressBindingModel key used to receive asynchronous completion payloads.
-
connector_slugstring -
Optional reference to the ConnectorModel used when this tool interacts with an external system.
-
endpoint_keystring -
Optional reference to an EndpointTemplateModel used for HTTP or RPC operations.
-
target_flow_slugstring -
Optional flow key used when the tool executes a versioned sub-flow.
-
parameter_schemaobject -
JSON-schema-like definition describing the typed parameters required to invoke the tool.
-
result_schemaobject -
JSON-schema-like structure describing the normalized result object.
-
agent_result_projectionobject -
Optional mapping rules that transform raw backend responses into the normalized result schema.
-
requires_auth_contextboolean -
Whether this tool requires an authenticated identity context.
-
allowed_agent_profile_idsarray<string> -
Optional list of AgentProfileModel identifiers allowed to invoke this tool.
-
allowed_operator_slugsarray<string> -
Optional list of operator types that may reference this tool.
-
safety_classificationstring -
Safety level of this tool: "read-only", "idempotent-write", "state-changing", "sensitive", or "high-risk".
-
safety_rulesarray<object> -
Structured constraints or preconditions validated before tool invocation.
-
max_invocations_per_runinteger -
Soft limit on how many times an agent may call this tool in a single execution.
-
timeout_msinteger -
Timeout in milliseconds for tool execution.
-
audit_levelstring -
Level of auditing applied to this tool.
-
tagsarray<string> -
Optional tags for catalog search and grouping.
-
is_systemboolean -
Indicates if this tool is managed by the platform.
-
is_enabledboolean -
Indicates if this tool is enabled.
-
is_deprecatedboolean -
Indicates if this tool is deprecated.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>",
"invocation_kind": "<invocation_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>",
"invocation_kind": "<invocation_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this tool.
-
project_idstring -
Optional project ID (tenant scope) that owns the tool.
-
slugstring Required -
Stable semantic key uniquely identifying this tool (e.g. tool.openai_async_chat).
-
namestring Required -
Human-readable tool name used in editors, prompts and documentation.
-
descriptionstring -
Human-readable explanation of the tool’s purpose, side effects and intended usage domain.
-
invocation_kindstring Required -
Type of capability implemented by the tool: "http-endpoint", "internal-function", "sub-flow", "vector-query", "database-operation", "identity-check", etc.
-
execution_modestring -
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_strategystring -
Optional strategy used when execution_mode is "async", such as "callback-ingress", "resume-flow-instance", or "fire-and-forget".
-
async_result_ingress_binding_slugstring -
Optional reference to an IngressBindingModel key used to receive asynchronous completion payloads.
-
connector_slugstring -
Optional reference to the ConnectorModel used when this tool interacts with an external system.
-
endpoint_keystring -
Optional reference to an EndpointTemplateModel used for HTTP or RPC operations.
-
target_flow_slugstring -
Optional flow key used when the tool executes a versioned sub-flow.
-
parameter_schemaobject -
JSON-schema-like definition describing the typed parameters required to invoke the tool.
-
result_schemaobject -
JSON-schema-like structure describing the normalized result object.
-
agent_result_projectionobject -
Optional mapping rules that transform raw backend responses into the normalized result schema.
-
requires_auth_contextboolean -
Whether this tool requires an authenticated identity context.
-
allowed_agent_profile_idsarray<string> -
Optional list of AgentProfileModel identifiers allowed to invoke this tool.
-
allowed_operator_slugsarray<string> -
Optional list of operator types that may reference this tool.
-
safety_classificationstring -
Safety level of this tool: "read-only", "idempotent-write", "state-changing", "sensitive", or "high-risk".
-
safety_rulesarray<object> -
Structured constraints or preconditions validated before tool invocation.
-
max_invocations_per_runinteger -
Soft limit on how many times an agent may call this tool in a single execution.
-
timeout_msinteger -
Timeout in milliseconds for tool execution.
-
audit_levelstring -
Level of auditing applied to this tool.
-
tagsarray<string> -
Optional tags for catalog search and grouping.
-
is_systemboolean -
Indicates if this tool is managed by the platform.
-
is_enabledboolean -
Indicates if this tool is enabled.
-
is_deprecatedboolean -
Indicates if this tool is deprecated.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>",
"invocation_kind": "<invocation_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>",
"invocation_kind": "<invocation_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Cognitive tool successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include cognitive tools of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude cognitive tools of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/cognitive-tool/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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.
-
idstring -
Unique identifier of the binding.
-
organization_idstring Required -
Tenant that owns the binding.
-
resource_idstring Required -
Referenced cognitive knowledge resource identifier.
-
target_typestring Required -
Entity type this resource is bound to.
Allowed valuesprojectworkflowworkflow-nodeagent-profileappconversationreportanomaly -
target_idstring Required -
Identifier of the target entity.
-
rolestring Required -
Semantic purpose of the resource within the target context.
Allowed valuesknowledgepolicyinstructionsdatasettemplatereference -
modestring Required -
How Sommatic AI should use the resource at runtime.
Allowed valuesretrievalcontextbothinstructionroutingvalidation -
tagsarray<string> -
Optional contextual tags applied at the binding level.
-
metadataobject -
Additional context for the binding.
Responses
-
200OK. -
500Something 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"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>",
"resource_id": "<resource_id>",
"target_type": "project",
"target_id": "<target_id>",
"role": "knowledge",
"mode": "retrieval"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>",
"resource_id": "<resource_id>",
"target_type": "project",
"target_id": "<target_id>",
"role": "knowledge",
"mode": "retrieval"
},
)
data = response.json(){
"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"
]
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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.
-
idstring -
Unique identifier of the binding.
-
organization_idstring Required -
Tenant that owns the binding.
-
resource_idstring Required -
Referenced cognitive knowledge resource identifier.
-
target_typestring Required -
Entity type this resource is bound to.
Allowed valuesprojectworkflowworkflow-nodeagent-profileappconversationreportanomaly -
target_idstring Required -
Identifier of the target entity.
-
rolestring Required -
Semantic purpose of the resource within the target context.
Allowed valuesknowledgepolicyinstructionsdatasettemplatereference -
modestring Required -
How Sommatic AI should use the resource at runtime.
Allowed valuesretrievalcontextbothinstructionroutingvalidation -
tagsarray<string> -
Optional contextual tags applied at the binding level.
-
metadataobject -
Additional context for the binding.
Responses
-
200OK. -
500Something 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"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>",
"resource_id": "<resource_id>",
"target_type": "project",
"target_id": "<target_id>",
"role": "knowledge",
"mode": "retrieval"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>",
"resource_id": "<resource_id>",
"target_type": "project",
"target_id": "<target_id>",
"role": "knowledge",
"mode": "retrieval"
},
)
data = response.json(){
"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"
]
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorstring path Required -
The field to filter by
idorganization-idresource-idtarget-idall -
searchstring query -
Keyword to search for entities.
-
target_typestring query -
Optional target type parameter to filter bindings.
-
include_statusstring query -
Optional status parameter to include items of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude items of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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"
]
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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.
-
idstring -
Unique identifier of the cognitive knowledge resource.
-
organization_idstring Required -
Organization ID (tenant) that owns the resource.
-
project_idstring -
Optional project ID (tenant scope) that owns the resource.
-
namestring Required -
Human-readable name of the resource.
-
slugstring Required -
Stable semantic key used to reference the resource across the platform.
-
descriptionstring -
Optional explanation of the resource purpose and intended usage.
-
resource_typestring Required -
Semantic type of the cognitive resource.
Allowed valuestextdocumentlisttaxonomypromptpolicymanualdatasetreference -
statusstring -
Lifecycle status of the resource.
Allowed valuesdraftactivearchiveddeleted -
versionstring -
Semantic or internal version of the resource.
-
languagestring -
Primary language of the resource content.
-
tagsarray<string> -
Optional tags for filtering, navigation and governance.
-
contentCognitiveKnowledgeResourceContent Required -
Canonical content payload of a cognitive knowledge resource. Supports free text, structured JSON data, file references and prompt blocks.
-
formatstring -
Primary representation format of the content.
Allowed valuesplain-textmarkdownjsonfile-referenceprompt-blocksurl -
textstring -
Raw or markdown text content used for text-like resources.
-
structured_dataobject -
Structured JSON payload for lists, taxonomies, rules or lightweight datasets.
-
file_refCognitiveKnowledgeResourceFileReference -
File reference metadata for a cognitive knowledge resource.
-
file_namestring -
Original or display file name.
-
mime_typestring -
MIME type of the linked file.
-
storage_keystring -
Internal storage key or blob identifier.
-
document_uristring -
URI or canonical pointer to the stored file.
-
checksumstring -
Optional checksum used for file integrity validation.
-
size_bytesnumber -
File size in bytes.
-
-
prompt_blocksobject -
Structured prompt sections when the resource_type is prompt.
-
systemstring -
instructionsstring -
examplesarray<object>
-
-
urlstring -
External or internal URL pointer when the content is represented as a link.
-
-
sourceCognitiveKnowledgeResourceSource -
Optional infrastructure reference indicating where the resource is physically stored or synchronized from. This does not replace the semantic resource model.
-
datasource_idstring -
Optional datasource identifier when the content is backed by an external datasource.
-
external_idstring -
Identifier of the resource in the external source system.
-
sync_modestring -
How the resource is maintained against its physical source.
Allowed valuesmanualsyncedimported
-
-
governanceCognitiveKnowledgeResourceGovernance -
Governance and lifecycle metadata for a cognitive knowledge resource.
-
owner_user_idstring -
User responsible for the resource.
-
owner_team_idstring -
Team responsible for the resource.
-
visibility_scopestring -
Visibility scope of the resource.
Allowed valuesprivateteamorganization -
review_statusstring -
Review state of the resource.
Allowed valuesdraftreviewedapprovedrejected -
is_authoritativeboolean -
Indicates whether this resource should be treated as an authoritative source.
-
effective_fromstring -
Optional validity start timestamp.
-
effective_tostring -
Optional validity end timestamp.
-
expires_atstring -
Optional expiration timestamp.
-
-
capabilitiesCognitiveKnowledgeResourceCapabilities -
Declares how the resource can be used within the runtime.
-
allowed_usage_modesarray<string> -
Modes in which the resource is permitted to be utilized.
-
is_searchableboolean -
Indicates if the resource is indexed for search.
-
is_bindableboolean -
Indicates if the resource can be bound to target entities.
-
is_executable_referenceboolean -
Indicates if the resource reference is executable.
-
is_version_lockedboolean -
Indicates if the resource is locked to a specific version.
-
-
git_bindingobject -
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.
-
metadataobject -
Additional arbitrary metadata for UI, indexing or operational hints.
Responses
-
200OK. -
500Something 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"
}
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"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"
}
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"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"
}
},
)
data = response.json(){
"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
}
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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.
-
idstring -
Unique identifier of the cognitive knowledge resource.
-
organization_idstring Required -
Organization ID (tenant) that owns the resource.
-
project_idstring -
Optional project ID (tenant scope) that owns the resource.
-
namestring Required -
Human-readable name of the resource.
-
slugstring Required -
Stable semantic key used to reference the resource across the platform.
-
descriptionstring -
Optional explanation of the resource purpose and intended usage.
-
resource_typestring Required -
Semantic type of the cognitive resource.
Allowed valuestextdocumentlisttaxonomypromptpolicymanualdatasetreference -
statusstring -
Lifecycle status of the resource.
Allowed valuesdraftactivearchiveddeleted -
versionstring -
Semantic or internal version of the resource.
-
languagestring -
Primary language of the resource content.
-
tagsarray<string> -
Optional tags for filtering, navigation and governance.
-
contentCognitiveKnowledgeResourceContent Required -
Canonical content payload of a cognitive knowledge resource. Supports free text, structured JSON data, file references and prompt blocks.
-
formatstring -
Primary representation format of the content.
Allowed valuesplain-textmarkdownjsonfile-referenceprompt-blocksurl -
textstring -
Raw or markdown text content used for text-like resources.
-
structured_dataobject -
Structured JSON payload for lists, taxonomies, rules or lightweight datasets.
-
file_refCognitiveKnowledgeResourceFileReference -
File reference metadata for a cognitive knowledge resource.
-
file_namestring -
Original or display file name.
-
mime_typestring -
MIME type of the linked file.
-
storage_keystring -
Internal storage key or blob identifier.
-
document_uristring -
URI or canonical pointer to the stored file.
-
checksumstring -
Optional checksum used for file integrity validation.
-
size_bytesnumber -
File size in bytes.
-
-
prompt_blocksobject -
Structured prompt sections when the resource_type is prompt.
-
systemstring -
instructionsstring -
examplesarray<object>
-
-
urlstring -
External or internal URL pointer when the content is represented as a link.
-
-
sourceCognitiveKnowledgeResourceSource -
Optional infrastructure reference indicating where the resource is physically stored or synchronized from. This does not replace the semantic resource model.
-
datasource_idstring -
Optional datasource identifier when the content is backed by an external datasource.
-
external_idstring -
Identifier of the resource in the external source system.
-
sync_modestring -
How the resource is maintained against its physical source.
Allowed valuesmanualsyncedimported
-
-
governanceCognitiveKnowledgeResourceGovernance -
Governance and lifecycle metadata for a cognitive knowledge resource.
-
owner_user_idstring -
User responsible for the resource.
-
owner_team_idstring -
Team responsible for the resource.
-
visibility_scopestring -
Visibility scope of the resource.
Allowed valuesprivateteamorganization -
review_statusstring -
Review state of the resource.
Allowed valuesdraftreviewedapprovedrejected -
is_authoritativeboolean -
Indicates whether this resource should be treated as an authoritative source.
-
effective_fromstring -
Optional validity start timestamp.
-
effective_tostring -
Optional validity end timestamp.
-
expires_atstring -
Optional expiration timestamp.
-
-
capabilitiesCognitiveKnowledgeResourceCapabilities -
Declares how the resource can be used within the runtime.
-
allowed_usage_modesarray<string> -
Modes in which the resource is permitted to be utilized.
-
is_searchableboolean -
Indicates if the resource is indexed for search.
-
is_bindableboolean -
Indicates if the resource can be bound to target entities.
-
is_executable_referenceboolean -
Indicates if the resource reference is executable.
-
is_version_lockedboolean -
Indicates if the resource is locked to a specific version.
-
-
git_bindingobject -
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.
-
metadataobject -
Additional arbitrary metadata for UI, indexing or operational hints.
Responses
-
200OK. -
500Something 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"
}
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"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"
}
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"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"
}
},
)
data = response.json(){
"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
}
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
idstring path Required
Request body
-
descriptionstring -
gitobject -
Origin when published from git: { repository, branch, commit, path, key }
Responses
-
200The 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": {}
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/<id>/publish', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"description": "<description>",
"git": {}
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/<id>/publish",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"description": "<description>",
"git": {}
},
)
data = response.json(){
"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
-
queryselectorstring path Required -
The field to filter by
idorganization-idslugall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include items of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude items of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/knowledge-resource/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this flow definition.
-
project_idstring -
Optional project ID (tenant scope) that owns the LLM provider configuration.
-
slugstring Required -
Stable semantic key uniquely identifying this provider configuration (e.g. llm.openai.gpt4_1, llm.azure.gpt4o, llm.claude3_sonnet).
-
namestring Required -
Human-readable name of the provider configuration used in editors and documentation.
-
descriptionstring -
Optional description explaining the provider’s purpose, model characteristics or usage scenarios.
-
transport_kindstring -
Transport method used to invoke the LLM - http-api, grpc, internal-router, local-process.
-
provider_typeobject -
Provider type identifier used to resolve the invocation adapter (e.g. openai-chat, azure-openai-chat, anthropic-messages, mistral-chat).
-
namestring -
titlestring
-
-
endpointstring -
Optional connection string or identifier for the ConnectorModel used for HTTP/GRPC LLM invocation.
-
api_keystring -
Optional EndpointTemplateModel key used when this provider maps to a connector endpoint.
-
deployment_namestring -
A deployment name is a unique identifier for a specific model version and configuration deployed on your cloud service provider.
-
api_versionstring -
API version required by the provider (e.g. 2024-06-01 for Azure OpenAI).
-
default_parametersobject -
Optional static default parameters such as max_tokens, temperature or top_p applied when the LLM is invoked without explicit overrides.
-
input_token_limitinteger -
Maximum number of tokens allowed in the prompt for this provider.
-
output_token_limitinteger -
Maximum number of tokens that can be returned by this provider.
-
pricingobject -
Optional structured pricing information used for cost monitoring and optimization.
-
input_cost_per_millionnumber -
Cost per 1M input tokens.
-
output_cost_per_millionnumber -
Cost per 1M output tokens.
-
currencystring -
Currency code (e.g. USD).
-
-
rate_limitsobject -
Optional request-per-minute or token-per-minute limits used to throttle requests.
-
rpminteger -
tpminteger
-
-
safety_settingsobject -
Optional provider-level safety configuration - content filters, policies, blocklists or moderation modes.
-
modestring -
Safety mode (e.g. strict, balanced, minimal).
-
categories_blockedarray<string> -
List of blocked content categories.
-
-
routing_rulesarray<object> -
Optional set of rules defining when this provider should be automatically selected by the cognitive engine.
-
is_systemboolean -
True if this provider configuration is managed by the platform.
-
is_defaultboolean -
True if this provider determines the default LLM for the system.
-
is_enabledboolean -
True if this provider can currently be selected or invoked.
-
is_deprecatedboolean -
True if this provider should no longer be used for new flows or agents.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this flow definition.
-
project_idstring -
Optional project ID (tenant scope) that owns the LLM provider configuration.
-
slugstring Required -
Stable semantic key uniquely identifying this provider configuration (e.g. llm.openai.gpt4_1, llm.azure.gpt4o, llm.claude3_sonnet).
-
namestring Required -
Human-readable name of the provider configuration used in editors and documentation.
-
descriptionstring -
Optional description explaining the provider’s purpose, model characteristics or usage scenarios.
-
transport_kindstring -
Transport method used to invoke the LLM - http-api, grpc, internal-router, local-process.
-
provider_typeobject -
Provider type identifier used to resolve the invocation adapter (e.g. openai-chat, azure-openai-chat, anthropic-messages, mistral-chat).
-
namestring -
titlestring
-
-
endpointstring -
Optional connection string or identifier for the ConnectorModel used for HTTP/GRPC LLM invocation.
-
api_keystring -
Optional EndpointTemplateModel key used when this provider maps to a connector endpoint.
-
deployment_namestring -
A deployment name is a unique identifier for a specific model version and configuration deployed on your cloud service provider.
-
api_versionstring -
API version required by the provider (e.g. 2024-06-01 for Azure OpenAI).
-
default_parametersobject -
Optional static default parameters such as max_tokens, temperature or top_p applied when the LLM is invoked without explicit overrides.
-
input_token_limitinteger -
Maximum number of tokens allowed in the prompt for this provider.
-
output_token_limitinteger -
Maximum number of tokens that can be returned by this provider.
-
pricingobject -
Optional structured pricing information used for cost monitoring and optimization.
-
input_cost_per_millionnumber -
Cost per 1M input tokens.
-
output_cost_per_millionnumber -
Cost per 1M output tokens.
-
currencystring -
Currency code (e.g. USD).
-
-
rate_limitsobject -
Optional request-per-minute or token-per-minute limits used to throttle requests.
-
rpminteger -
tpminteger
-
-
safety_settingsobject -
Optional provider-level safety configuration - content filters, policies, blocklists or moderation modes.
-
modestring -
Safety mode (e.g. strict, balanced, minimal).
-
categories_blockedarray<string> -
List of blocked content categories.
-
-
routing_rulesarray<object> -
Optional set of rules defining when this provider should be automatically selected by the cognitive engine.
-
is_systemboolean -
True if this provider configuration is managed by the platform.
-
is_defaultboolean -
True if this provider determines the default LLM for the system.
-
is_enabledboolean -
True if this provider can currently be selected or invoked.
-
is_deprecatedboolean -
True if this provider should no longer be used for new flows or agents.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "LLM Provider successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include LLM Providers of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude LLM Providers of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring Required -
The ID of the LLM Provider configuration.
-
operationstring -
Operation type (chat, embedding). Default is chat.
-
inputobject Required -
The input payload (messages, etc.).
Responses
-
200Success.
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": {}
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/invoke', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model_id": "<model_id>",
"input": {}
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/invoke",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"model_id": "<model_id>",
"input": {}
},
)
data = response.json(){
"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_idstring -
Identifier of the organization (tenant) that owns this prompt template.
-
slugstring Required -
Stable semantic key uniquely identifying this prompt template (e.g. prompt.email_classification.v1).
-
namestring Required -
Human-readable name for this template used in editors and documentation.
-
descriptionstring -
Optional description explaining the purpose, scope and intended usage of this prompt template.
-
llm_provider_idstring -
Optional reference to an LlmProviderModel.id indicating the primary provider this template was designed for.
-
languagestring -
Optional primary language of the template content (e.g. "en", "es", "pt-BR").
-
formatstring -
Format of the rendered prompt such as "plain-text", "markdown" or "json-instructions".
-
system_instructionsstring -
System-level instructions that define the assistant persona, constraints and global behavior.
-
template_bodystring -
Main prompt template body containing variable placeholders using a chosen syntax (e.g. {{variable_name}}).
-
variablesarray<CognitivePromptTemplateVariable> -
List of typed input variables that can be injected into this template at render time.
-
namestring Required -
Variable name as referenced in the template body (e.g. "customer_name", "email_body").
-
typestring Required -
Expected runtime type for the value injected into the template.
Allowed valuesstringnumberbooleanarrayobject -
descriptionstring -
Human-readable explanation of what this variable represents.
-
requiredboolean -
Whether this variable must be provided when rendering the template.
-
default_valueany -
Optional default used when the variable is not explicitly provided.
-
allowed_valuesarray<string> -
Optional enumeration of allowed values when the variable is constrained.
-
-
output_fieldsarray<CognitivePromptTemplateOutputField> -
List of typed output fields the prompt is expected to produce when structured output is required.
-
namestring Required -
Field name in the structured output (e.g. "category", "summary", "sentiment").
-
typestring Required -
Expected type of the field value in the rendered output.
Allowed valuesstringnumberbooleanarrayobject -
descriptionstring -
Human-readable explanation of what this field represents.
-
requiredboolean -
Whether the model is expected to always emit this field.
-
-
style_guidelinesarray<string> -
Optional list of style or tone guidelines to be respected when rendering and using this template.
-
examplesarray<CognitivePromptTemplateExample> -
Worked examples pairing a set of variable inputs with the expected model output.
-
inputsobject -
Map of variable name to value used to render this example.
-
expected_outputstring -
Desired model response for the given inputs.
-
notesstring -
Optional commentary about edge cases, gotchas, or rationale for the example.
-
-
tagsarray<string> -
Optional list of free-form tags for catalog search, discovery and governance.
-
is_systemboolean -
Indicates whether this template is a system-level asset managed by the platform rather than user-created.
-
is_deprecatedboolean -
Indicates whether this template is deprecated and should not be used in new flows.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this prompt template.
-
slugstring Required -
Stable semantic key uniquely identifying this prompt template (e.g. prompt.email_classification.v1).
-
namestring Required -
Human-readable name for this template used in editors and documentation.
-
descriptionstring -
Optional description explaining the purpose, scope and intended usage of this prompt template.
-
llm_provider_idstring -
Optional reference to an LlmProviderModel.id indicating the primary provider this template was designed for.
-
languagestring -
Optional primary language of the template content (e.g. "en", "es", "pt-BR").
-
formatstring -
Format of the rendered prompt such as "plain-text", "markdown" or "json-instructions".
-
system_instructionsstring -
System-level instructions that define the assistant persona, constraints and global behavior.
-
template_bodystring -
Main prompt template body containing variable placeholders using a chosen syntax (e.g. {{variable_name}}).
-
variablesarray<CognitivePromptTemplateVariable> -
List of typed input variables that can be injected into this template at render time.
-
namestring Required -
Variable name as referenced in the template body (e.g. "customer_name", "email_body").
-
typestring Required -
Expected runtime type for the value injected into the template.
Allowed valuesstringnumberbooleanarrayobject -
descriptionstring -
Human-readable explanation of what this variable represents.
-
requiredboolean -
Whether this variable must be provided when rendering the template.
-
default_valueany -
Optional default used when the variable is not explicitly provided.
-
allowed_valuesarray<string> -
Optional enumeration of allowed values when the variable is constrained.
-
-
output_fieldsarray<CognitivePromptTemplateOutputField> -
List of typed output fields the prompt is expected to produce when structured output is required.
-
namestring Required -
Field name in the structured output (e.g. "category", "summary", "sentiment").
-
typestring Required -
Expected type of the field value in the rendered output.
Allowed valuesstringnumberbooleanarrayobject -
descriptionstring -
Human-readable explanation of what this field represents.
-
requiredboolean -
Whether the model is expected to always emit this field.
-
-
style_guidelinesarray<string> -
Optional list of style or tone guidelines to be respected when rendering and using this template.
-
examplesarray<CognitivePromptTemplateExample> -
Worked examples pairing a set of variable inputs with the expected model output.
-
inputsobject -
Map of variable name to value used to render this example.
-
expected_outputstring -
Desired model response for the given inputs.
-
notesstring -
Optional commentary about edge cases, gotchas, or rationale for the example.
-
-
tagsarray<string> -
Optional list of free-form tags for catalog search, discovery and governance.
-
is_systemboolean -
Indicates whether this template is a system-level asset managed by the platform rather than user-created.
-
is_deprecatedboolean -
Indicates whether this template is deprecated and should not be used in new flows.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Prompt template successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include templates of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude templates of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/prompt-template/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring Required -
Identifier of the OrganizationModel this trigger is associated with.
-
project_idstring -
Optional project ID (tenant scope) that owns the datasource.
-
slugstring Required -
Stable semantic key uniquely identifying this datasource (e.g. ds.crm, ds.postgres.orders, ds.vector.support).
-
namestring Required -
Human-readable datasource name used in editors and documentation.
-
descriptionstring -
Optional description explaining the dataset or system represented by this datasource.
-
datasource_kindstring Required -
Type of datasource: "postgres", "mysql", "sqlserver", "mongodb", "s3", "gcs", "snowflake", "bigquery", "elasticsearch", "vector-db", "custom".
-
connector_slugstring -
Optional reference to the ConnectorModel that handles low-level communication (HTTP, driver API, RPC proxy, cloud SDK).
-
default_collectionstring -
Default dataset, table, collection or bucket that this datasource interacts with.
-
collectionsarray<object> -
Optional list of logical datasets or collections exposed by this datasource, each with optional schema hints.
-
collection_keystring -
descriptionstring -
schemaobject
-
-
indexingobject -
Indexing configuration for this datasource, including primary key, vector index, or search index configuration depending on datasource_kind.
-
primary_keystring -
vector_indexobject -
search_indexobject
-
-
query_capabilitiesobject -
Capabilities supported by this datasource, such as select, insert, update, delete, vector-search, hybrid-search, aggregation, blob-read, blob-write.
-
selectboolean -
insertboolean -
updateboolean -
deleteboolean -
vector_searchboolean -
hybrid_searchboolean -
blob_readboolean -
blob_writeboolean
-
-
auth_context_requiredboolean -
True if this datasource requires an identity context (tenant/user) to be resolved before queries can run.
-
allowed_agent_profile_idsarray<string> -
Optional list of AgentProfileModel identifiers allowed to perform queries against this datasource.
-
allowed_operator_slugsarray<string> -
Optional list of operator types allowed to reference this datasource (e.g. datasource.query, ai.rag.retrieve).
-
is_systemboolean -
True if this datasource is managed internally by the platform.
-
is_enabledboolean -
True if this datasource is currently available for use.
-
is_deprecatedboolean -
True if this datasource should not be used for new flows or designs.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>",
"slug": "<slug>",
"name": "<name>",
"datasource_kind": "<datasource_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>",
"slug": "<slug>",
"name": "<name>",
"datasource_kind": "<datasource_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring Required -
Identifier of the OrganizationModel this trigger is associated with.
-
project_idstring -
Optional project ID (tenant scope) that owns the datasource.
-
slugstring Required -
Stable semantic key uniquely identifying this datasource (e.g. ds.crm, ds.postgres.orders, ds.vector.support).
-
namestring Required -
Human-readable datasource name used in editors and documentation.
-
descriptionstring -
Optional description explaining the dataset or system represented by this datasource.
-
datasource_kindstring Required -
Type of datasource: "postgres", "mysql", "sqlserver", "mongodb", "s3", "gcs", "snowflake", "bigquery", "elasticsearch", "vector-db", "custom".
-
connector_slugstring -
Optional reference to the ConnectorModel that handles low-level communication (HTTP, driver API, RPC proxy, cloud SDK).
-
default_collectionstring -
Default dataset, table, collection or bucket that this datasource interacts with.
-
collectionsarray<object> -
Optional list of logical datasets or collections exposed by this datasource, each with optional schema hints.
-
collection_keystring -
descriptionstring -
schemaobject
-
-
indexingobject -
Indexing configuration for this datasource, including primary key, vector index, or search index configuration depending on datasource_kind.
-
primary_keystring -
vector_indexobject -
search_indexobject
-
-
query_capabilitiesobject -
Capabilities supported by this datasource, such as select, insert, update, delete, vector-search, hybrid-search, aggregation, blob-read, blob-write.
-
selectboolean -
insertboolean -
updateboolean -
deleteboolean -
vector_searchboolean -
hybrid_searchboolean -
blob_readboolean -
blob_writeboolean
-
-
auth_context_requiredboolean -
True if this datasource requires an identity context (tenant/user) to be resolved before queries can run.
-
allowed_agent_profile_idsarray<string> -
Optional list of AgentProfileModel identifiers allowed to perform queries against this datasource.
-
allowed_operator_slugsarray<string> -
Optional list of operator types allowed to reference this datasource (e.g. datasource.query, ai.rag.retrieve).
-
is_systemboolean -
True if this datasource is managed internally by the platform.
-
is_enabledboolean -
True if this datasource is currently available for use.
-
is_deprecatedboolean -
True if this datasource should not be used for new flows or designs.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>",
"slug": "<slug>",
"name": "<name>",
"datasource_kind": "<datasource_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>",
"slug": "<slug>",
"name": "<name>",
"datasource_kind": "<datasource_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Datasource successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include datasources of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude datasources of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/external-datasource/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this memory store.
-
project_idstring -
Optional project ID (tenant scope) that owns the memory store.
-
slugstring Required -
Stable semantic key uniquely identifying this memory store (e.g. mem.support_conversation, mem.global_facts, mem.vector_personalization).
-
namestring Required -
Human-readable name of the memory store shown in editors and documentation.
-
descriptionstring -
Optional description explaining what type of memory is stored and for which use cases.
-
memory_kindstring Required -
Type of memory backend: "kv-store", "vector-memory", "session-store", "document-memory", "hybrid".
-
connector_slugstring -
Optional reference to the ConnectorModel handling low-level access (Redis, DynamoDB, vector DB, session service, custom backend).
-
backing_datasource_keystring -
Optional DatasourceModel key when this memory store is implemented on top of a structured or vector datasource.
-
default_namespacestring -
Default namespace, bucket or logical collection used when no explicit namespace is provided.
-
partitioningobject -
Defines how memory entries are partitioned and isolated across tenants, users, flows or agents.
-
strategystring -
Partitioning strategy: "by-tenant", "by-subject", "by-tenant-and-subject", "by-flow", "global", "custom".
-
keysarray<string> -
Optional list of logical partition keys derived from identity or context (e.g. ["tenant_id", "subject_id", "flow_key"]).
-
-
schema_hintsobject -
Optional structural hints describing the typical shape of memory entries stored here, such as conversational messages, facts, embeddings or session snapshots.
-
entry_kindstring -
High-level type of entries: "message", "fact", "embedding", "session", "mixed".
-
fieldsobject -
Optional JSON-schema-like structure describing common fields of stored records.
-
-
retention_policyobject -
Retention and compaction strategy for memory entries, controlling how long information is preserved and how old or excess data is pruned.
-
policy_typestring -
Retention mode: "ttl", "sliding-window", "max-entries-per-partition", "manual".
-
ttl_msinteger -
Default time-to-live in milliseconds for entries when policy_type is "ttl" or "sliding-window".
-
max_entries_per_partitioninteger -
Maximum number of memory entries allowed per partition before older entries are compacted or removed.
-
-
default_ttl_msinteger -
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_capabilitiesobject -
Capabilities supported by this memory store: reading, writing, vector search, listing recent items, truncating sessions, etc.
-
read_by_keyboolean -
upsertboolean -
deleteboolean -
list_recentboolean -
truncate_partitionboolean -
vector_searchboolean
-
-
auth_context_requiredboolean -
True if this memory store requires an identity context (tenant/user) to be resolved before read/write operations.
-
allowed_agent_profile_idsarray<string> -
Optional list of AgentProfileModel identifiers allowed to use this memory store.
-
allowed_operator_slugsarray<string> -
Optional list of operator types allowed to reference this memory store (e.g. ai.chat, ai.agent, ai.rag.retrieve).
-
is_systemboolean -
True if this memory store is managed internally by the platform.
-
is_enabledboolean -
True if this memory store is currently available for use.
-
is_deprecatedboolean -
True if this memory store should not be used for new flows or agents.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>",
"memory_kind": "<memory_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>",
"memory_kind": "<memory_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring -
Identifier of the organization (tenant) that owns this memory store.
-
project_idstring -
Optional project ID (tenant scope) that owns the memory store.
-
slugstring Required -
Stable semantic key uniquely identifying this memory store (e.g. mem.support_conversation, mem.global_facts, mem.vector_personalization).
-
namestring Required -
Human-readable name of the memory store shown in editors and documentation.
-
descriptionstring -
Optional description explaining what type of memory is stored and for which use cases.
-
memory_kindstring Required -
Type of memory backend: "kv-store", "vector-memory", "session-store", "document-memory", "hybrid".
-
connector_slugstring -
Optional reference to the ConnectorModel handling low-level access (Redis, DynamoDB, vector DB, session service, custom backend).
-
backing_datasource_keystring -
Optional DatasourceModel key when this memory store is implemented on top of a structured or vector datasource.
-
default_namespacestring -
Default namespace, bucket or logical collection used when no explicit namespace is provided.
-
partitioningobject -
Defines how memory entries are partitioned and isolated across tenants, users, flows or agents.
-
strategystring -
Partitioning strategy: "by-tenant", "by-subject", "by-tenant-and-subject", "by-flow", "global", "custom".
-
keysarray<string> -
Optional list of logical partition keys derived from identity or context (e.g. ["tenant_id", "subject_id", "flow_key"]).
-
-
schema_hintsobject -
Optional structural hints describing the typical shape of memory entries stored here, such as conversational messages, facts, embeddings or session snapshots.
-
entry_kindstring -
High-level type of entries: "message", "fact", "embedding", "session", "mixed".
-
fieldsobject -
Optional JSON-schema-like structure describing common fields of stored records.
-
-
retention_policyobject -
Retention and compaction strategy for memory entries, controlling how long information is preserved and how old or excess data is pruned.
-
policy_typestring -
Retention mode: "ttl", "sliding-window", "max-entries-per-partition", "manual".
-
ttl_msinteger -
Default time-to-live in milliseconds for entries when policy_type is "ttl" or "sliding-window".
-
max_entries_per_partitioninteger -
Maximum number of memory entries allowed per partition before older entries are compacted or removed.
-
-
default_ttl_msinteger -
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_capabilitiesobject -
Capabilities supported by this memory store: reading, writing, vector search, listing recent items, truncating sessions, etc.
-
read_by_keyboolean -
upsertboolean -
deleteboolean -
list_recentboolean -
truncate_partitionboolean -
vector_searchboolean
-
-
auth_context_requiredboolean -
True if this memory store requires an identity context (tenant/user) to be resolved before read/write operations.
-
allowed_agent_profile_idsarray<string> -
Optional list of AgentProfileModel identifiers allowed to use this memory store.
-
allowed_operator_slugsarray<string> -
Optional list of operator types allowed to reference this memory store (e.g. ai.chat, ai.agent, ai.rag.retrieve).
-
is_systemboolean -
True if this memory store is managed internally by the platform.
-
is_enabledboolean -
True if this memory store is currently available for use.
-
is_deprecatedboolean -
True if this memory store should not be used for new flows or agents.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"slug": "<slug>",
"name": "<name>",
"memory_kind": "<memory_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"slug": "<slug>",
"name": "<name>",
"memory_kind": "<memory_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Memory store successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include templates of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude templates of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/cognitive-infrastructure/connectors/memory-store/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}