AI 构件 Beta
大模型提供方、提示词模板、知识资源与绑定、智能体、工具与连接器。
创建智能体配置。
POST /cognitive-infrastructure/cognitive-assets/agent-profile/
返回根据所提供数据创建的智能体配置。
认证: Bearer 令牌
请求体
要创建的智能体配置对象。
-
organization_idstring -
拥有此配置文件的组织(租户)的标识符。
-
slugstring 必填 -
唯一标识此配置文件的稳定语义键(例如 agent.support_router)。
-
namestring 必填 -
配置文件的可读名称,用于编辑器、日志和文档。
-
descriptionstring -
可选描述,说明该智能体的认知角色(例如“Support router AI”)。
-
llm_provider_slugstring -
默认用于推理、工具调用和消息生成的 LLM 提供方配置(LLMProviderModel)的标识符。可按节点覆盖。
-
default_prompt_template_idstring -
可选的 PromptTemplateModel 引用,用作系统提示词或行为框架。
-
cognitive_tool_idsarray<string> -
该智能体在推理过程中允许调用的 CognitiveToolModel 键列表。
-
memory_store_idsarray<string> -
该智能体可用的 MemoryStoreModel 标识符列表,可选,用于对话记忆、上下文检索或长期状态。
-
datasource_idsarray<string> -
该智能体在推理过程中可查询的 DatasourceModel 标识符列表,可选(只读或受治理的写入)。
-
behavior_policiesobject -
可选的结构化对象,用于定义行为规则,例如温度范围、护栏、安全模式、思维链可见性、语气、风格、最大推理深度、工具使用偏好和回退策略。
-
safety_rulesarray<object> -
在推理步骤之前或之后强制执行的安全约束列表,可选(例如 PII 脱敏、基于角色的输出过滤、合规检查)。
-
max_tool_calls_per_stepinteger -
该智能体在单个推理周期内可执行的工具调用次数上限,可选。
-
max_reasoning_stepsinteger -
出于安全和性能考虑,对迭代推理或工具使用循环次数的限制,可选。
-
audit_levelstring -
对该智能体认知操作应用的审计级别。
-
tagsarray<string> -
用于搜索、治理和分类的自由格式标签,可选。
-
is_systemboolean -
为 true 表示此配置文件由平台管理,而非由租户创建。
-
is_enabledboolean -
为 true 表示此智能体配置文件当前可用。
-
is_deprecatedboolean -
为 true 表示此配置文件已弃用,不应在新流程中使用。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有智能体配置。
PATCH /cognitive-infrastructure/cognitive-assets/agent-profile/
使用所提供的数据更新现有智能体配置。
认证: Bearer 令牌
请求体
要创建的智能体配置对象。
-
organization_idstring -
拥有此配置文件的组织(租户)的标识符。
-
slugstring 必填 -
唯一标识此配置文件的稳定语义键(例如 agent.support_router)。
-
namestring 必填 -
配置文件的可读名称,用于编辑器、日志和文档。
-
descriptionstring -
可选描述,说明该智能体的认知角色(例如“Support router AI”)。
-
llm_provider_slugstring -
默认用于推理、工具调用和消息生成的 LLM 提供方配置(LLMProviderModel)的标识符。可按节点覆盖。
-
default_prompt_template_idstring -
可选的 PromptTemplateModel 引用,用作系统提示词或行为框架。
-
cognitive_tool_idsarray<string> -
该智能体在推理过程中允许调用的 CognitiveToolModel 键列表。
-
memory_store_idsarray<string> -
该智能体可用的 MemoryStoreModel 标识符列表,可选,用于对话记忆、上下文检索或长期状态。
-
datasource_idsarray<string> -
该智能体在推理过程中可查询的 DatasourceModel 标识符列表,可选(只读或受治理的写入)。
-
behavior_policiesobject -
可选的结构化对象,用于定义行为规则,例如温度范围、护栏、安全模式、思维链可见性、语气、风格、最大推理深度、工具使用偏好和回退策略。
-
safety_rulesarray<object> -
在推理步骤之前或之后强制执行的安全约束列表,可选(例如 PII 脱敏、基于角色的输出过滤、合规检查)。
-
max_tool_calls_per_stepinteger -
该智能体在单个推理周期内可执行的工具调用次数上限,可选。
-
max_reasoning_stepsinteger -
出于安全和性能考虑,对迭代推理或工具使用循环次数的限制,可选。
-
audit_levelstring -
对该智能体认知操作应用的审计级别。
-
tagsarray<string> -
用于搜索、治理和分类的自由格式标签,可选。
-
is_systemboolean -
为 true 表示此配置文件由平台管理,而非由租户创建。
-
is_enabledboolean -
为 true 表示此智能体配置文件当前可用。
-
is_deprecatedboolean -
为 true 表示此配置文件已弃用,不应在新流程中使用。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除智能体配置。
DELETE /cognitive-infrastructure/cognitive-assets/agent-profile/
根据所提供的 ID 删除智能体配置。
认证: Bearer 令牌
请求体
要删除的智能体配置 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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 /cognitive-infrastructure/cognitive-assets/agent-profile/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的智能体配置信息。
认证: Bearer 令牌
参数
-
queryselectorenum 路径 必填 -
此查询可用的筛选条件
idorganization-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的智能体配置。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的智能体配置。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}创建认知工具。
POST /cognitive-infrastructure/cognitive-assets/cognitive-tool/
返回根据所提供数据创建的认知工具。
认证: Bearer 令牌
请求体
要创建的认知工具对象。
-
organization_idstring -
拥有此工具的组织(租户)的标识符。
-
project_idstring -
拥有此工具的项目 ID(租户作用域),可选。
-
slugstring 必填 -
唯一标识此工具的稳定语义键(例如 tool.openai_async_chat)。
-
namestring 必填 -
工具的可读名称,用于编辑器、提示词和文档。
-
descriptionstring -
对工具用途、副作用及预期使用领域的可读说明。
-
invocation_kindstring 必填 -
工具实现的能力类型:"http-endpoint"、"internal-function"、"sub-flow"、"vector-query"、"database-operation"、"identity-check" 等。
-
execution_modestring -
此工具的执行模式:"sync" 表示立即以内联方式将结果返回给调用方智能体;"async" 表示通过回调或恢复事件延迟完成;"stream" 表示在底层连接器或提供方支持时增量交付结果。
-
async_result_strategystring -
execution_mode 为 "async" 时采用的策略,可选,例如 "callback-ingress"、"resume-flow-instance" 或 "fire-and-forget"。
-
async_result_ingress_binding_slugstring -
可选的 IngressBindingModel 键引用,用于接收异步完成载荷。
-
connector_slugstring -
此工具与外部系统交互时使用的 ConnectorModel 引用,可选。
-
endpoint_keystring -
用于 HTTP 或 RPC 操作的 EndpointTemplateModel 引用,可选。
-
target_flow_slugstring -
工具执行带版本的子流程时使用的流程键,可选。
-
parameter_schemaobject -
类 JSON Schema 定义,描述调用该工具所需的类型化参数。
-
result_schemaobject -
类 JSON Schema 结构,描述规范化后的结果对象。
-
agent_result_projectionobject -
可选的映射规则,将后端原始响应转换为规范化的结果 schema。
-
requires_auth_contextboolean -
该工具是否需要已认证的身份上下文。
-
allowed_agent_profile_idsarray<string> -
允许调用此工具的 AgentProfileModel 标识符列表,可选。
-
allowed_operator_slugsarray<string> -
可以引用此工具的算子类型列表,可选。
-
safety_classificationstring -
此工具的安全级别:"read-only"、"idempotent-write"、"state-changing"、"sensitive" 或 "high-risk"。
-
safety_rulesarray<object> -
调用工具前校验的结构化约束或前置条件。
-
max_invocations_per_runinteger -
单次执行中智能体调用此工具次数的软限制。
-
timeout_msinteger -
工具执行的超时时间(毫秒)。
-
audit_levelstring -
对此工具应用的审计级别。
-
tagsarray<string> -
用于目录搜索和分组的标签,可选。
-
is_systemboolean -
表示此工具是否由平台管理。
-
is_enabledboolean -
表示此工具是否已启用。
-
is_deprecatedboolean -
表示此工具是否已弃用。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有认知工具。
PATCH /cognitive-infrastructure/cognitive-assets/cognitive-tool/
使用所提供的数据更新现有认知工具。
认证: Bearer 令牌
请求体
要创建的认知工具对象。
-
organization_idstring -
拥有此工具的组织(租户)的标识符。
-
project_idstring -
拥有此工具的项目 ID(租户作用域),可选。
-
slugstring 必填 -
唯一标识此工具的稳定语义键(例如 tool.openai_async_chat)。
-
namestring 必填 -
工具的可读名称,用于编辑器、提示词和文档。
-
descriptionstring -
对工具用途、副作用及预期使用领域的可读说明。
-
invocation_kindstring 必填 -
工具实现的能力类型:"http-endpoint"、"internal-function"、"sub-flow"、"vector-query"、"database-operation"、"identity-check" 等。
-
execution_modestring -
此工具的执行模式:"sync" 表示立即以内联方式将结果返回给调用方智能体;"async" 表示通过回调或恢复事件延迟完成;"stream" 表示在底层连接器或提供方支持时增量交付结果。
-
async_result_strategystring -
execution_mode 为 "async" 时采用的策略,可选,例如 "callback-ingress"、"resume-flow-instance" 或 "fire-and-forget"。
-
async_result_ingress_binding_slugstring -
可选的 IngressBindingModel 键引用,用于接收异步完成载荷。
-
connector_slugstring -
此工具与外部系统交互时使用的 ConnectorModel 引用,可选。
-
endpoint_keystring -
用于 HTTP 或 RPC 操作的 EndpointTemplateModel 引用,可选。
-
target_flow_slugstring -
工具执行带版本的子流程时使用的流程键,可选。
-
parameter_schemaobject -
类 JSON Schema 定义,描述调用该工具所需的类型化参数。
-
result_schemaobject -
类 JSON Schema 结构,描述规范化后的结果对象。
-
agent_result_projectionobject -
可选的映射规则,将后端原始响应转换为规范化的结果 schema。
-
requires_auth_contextboolean -
该工具是否需要已认证的身份上下文。
-
allowed_agent_profile_idsarray<string> -
允许调用此工具的 AgentProfileModel 标识符列表,可选。
-
allowed_operator_slugsarray<string> -
可以引用此工具的算子类型列表,可选。
-
safety_classificationstring -
此工具的安全级别:"read-only"、"idempotent-write"、"state-changing"、"sensitive" 或 "high-risk"。
-
safety_rulesarray<object> -
调用工具前校验的结构化约束或前置条件。
-
max_invocations_per_runinteger -
单次执行中智能体调用此工具次数的软限制。
-
timeout_msinteger -
工具执行的超时时间(毫秒)。
-
audit_levelstring -
对此工具应用的审计级别。
-
tagsarray<string> -
用于目录搜索和分组的标签,可选。
-
is_systemboolean -
表示此工具是否由平台管理。
-
is_enabledboolean -
表示此工具是否已启用。
-
is_deprecatedboolean -
表示此工具是否已弃用。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除认知工具。
DELETE /cognitive-infrastructure/cognitive-assets/cognitive-tool/
根据所提供的 ID 删除认知工具。
认证: Bearer 令牌
请求体
要删除的认知工具 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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 /cognitive-infrastructure/cognitive-assets/cognitive-tool/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的认知工具信息。
认证: Bearer 令牌
参数
-
queryselectorenum 路径 必填 -
此查询可用的筛选条件
idorganization-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的认知工具。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的认知工具。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}创建知识资源绑定。
POST /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/
创建并返回新的认知知识资源绑定。
认证: Bearer 令牌
请求体
要创建的知识资源绑定对象。
-
idstring -
绑定的唯一标识符。
-
organization_idstring 必填 -
拥有该绑定的租户。
-
resource_idstring 必填 -
所引用的认知知识资源的标识符。
-
target_typestring 必填 -
该资源所绑定的实体类型。
可选值projectworkflowworkflow-nodeagent-profileappconversationreportanomaly -
target_idstring 必填 -
目标实体的标识符。
-
rolestring 必填 -
资源在目标上下文中的语义用途。
可选值knowledgepolicyinstructionsdatasettemplatereference -
modestring 必填 -
Sommatic AI 在运行时使用该资源的方式。
可选值retrievalcontextbothinstructionroutingvalidation -
tagsarray<string> -
在绑定层级应用的上下文标签,可选。
-
metadataobject -
绑定的附加上下文。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有知识资源绑定。
PATCH /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/
更新现有认知知识资源绑定的数据。
认证: Bearer 令牌
请求体
要更新的知识资源绑定属性。
-
idstring -
绑定的唯一标识符。
-
organization_idstring 必填 -
拥有该绑定的租户。
-
resource_idstring 必填 -
所引用的认知知识资源的标识符。
-
target_typestring 必填 -
该资源所绑定的实体类型。
可选值projectworkflowworkflow-nodeagent-profileappconversationreportanomaly -
target_idstring 必填 -
目标实体的标识符。
-
rolestring 必填 -
资源在目标上下文中的语义用途。
可选值knowledgepolicyinstructionsdatasettemplatereference -
modestring 必填 -
Sommatic AI 在运行时使用该资源的方式。
可选值retrievalcontextbothinstructionroutingvalidation -
tagsarray<string> -
在绑定层级应用的上下文标签,可选。
-
metadataobject -
绑定的附加上下文。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除知识资源绑定。
DELETE /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/
根据所提供的 ID 删除知识资源绑定。
认证: Bearer 令牌
请求体
要删除的绑定 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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 /cognitive-infrastructure/cognitive-assets/knowledge-resource-binding/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的知识资源绑定信息。
认证: Bearer 令牌
参数
-
queryselectorstring 路径 必填 -
用于筛选的字段
idorganization-idresource-idtarget-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
target_typestring 查询 -
可选的目标类型参数,用于筛选绑定。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的条目。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的条目。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}创建知识资源。
POST /cognitive-infrastructure/cognitive-assets/knowledge-resource/
创建并返回新的认知知识资源。
认证: Bearer 令牌
请求体
要创建的知识资源对象。
-
idstring -
认知知识资源的唯一标识符。
-
organization_idstring 必填 -
拥有该资源的组织 ID(租户)。
-
project_idstring -
拥有该资源的项目 ID(租户作用域),可选。
-
namestring 必填 -
资源的可读名称。
-
slugstring 必填 -
稳定的语义键,用于在整个平台中引用该资源。
-
descriptionstring -
资源用途与预期用法的说明,可选。
-
resource_typestring 必填 -
认知资源的语义类型。
可选值textdocumentlisttaxonomypromptpolicymanualdatasetreference -
statusstring -
资源的生命周期状态。
可选值draftactivearchiveddeleted -
versionstring -
资源的语义版本或内部版本。
-
languagestring -
资源内容的主要语言。
-
tagsarray<string> -
用于筛选、导航和治理的标签,可选。
-
contentCognitiveKnowledgeResourceContent 必填 -
认知知识资源的规范内容载荷。支持自由文本、结构化 JSON 数据、文件引用和提示词块。
-
formatstring -
内容的主要表示格式。
可选值plain-textmarkdownjsonfile-referenceprompt-blocksurl -
textstring -
文本类资源使用的原始文本或 Markdown 文本内容。
-
structured_dataobject -
结构化 JSON 载荷,用于列表、分类体系、规则或轻量数据集。
-
file_refCognitiveKnowledgeResourceFileReference -
认知知识资源的文件引用元数据。
-
file_namestring -
原始文件名或显示文件名。
-
mime_typestring -
所链接文件的 MIME 类型。
-
storage_keystring -
内部存储键或 blob 标识符。
-
document_uristring -
指向已存储文件的 URI 或规范指针。
-
checksumstring -
用于校验文件完整性的校验和,可选。
-
size_bytesnumber -
文件大小(字节)。
-
-
prompt_blocksobject -
当 resource_type 为 prompt 时的结构化提示词分段。
-
systemstring -
instructionsstring -
examplesarray<object>
-
-
urlstring -
内容以链接形式表示时,指向外部或内部的 URL。
-
-
sourceCognitiveKnowledgeResourceSource -
可选的基础设施引用,表明资源实际存储的位置或同步来源。它不会取代语义资源模型。
-
datasource_idstring -
内容由外部数据源提供时的数据源标识符,可选。
-
external_idstring -
资源在外部源系统中的标识符。
-
sync_modestring -
资源与其物理来源之间的维护方式。
可选值manualsyncedimported
-
-
governanceCognitiveKnowledgeResourceGovernance -
认知知识资源的治理与生命周期元数据。
-
owner_user_idstring -
资源的负责用户。
-
owner_team_idstring -
资源的负责团队。
-
visibility_scopestring -
资源的可见范围。
可选值privateteamorganization -
review_statusstring -
资源的评审状态。
可选值draftreviewedapprovedrejected -
is_authoritativeboolean -
表示该资源是否应被视为权威来源。
-
effective_fromstring -
有效期开始时间戳,可选。
-
effective_tostring -
有效期结束时间戳,可选。
-
expires_atstring -
过期时间戳,可选。
-
-
capabilitiesCognitiveKnowledgeResourceCapabilities -
声明资源在运行时中的使用方式。
-
allowed_usage_modesarray<string> -
允许使用该资源的模式。
-
is_searchableboolean -
表示该资源是否已建立搜索索引。
-
is_bindableboolean -
表示该资源能否绑定到目标实体。
-
is_executable_referenceboolean -
表示该资源引用是否可执行。
-
is_version_lockedboolean -
表示该资源是否锁定到特定版本。
-
-
git_bindingobject -
该资源同步来源 Git 仓库的关联信息(参见 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 表示当前安装不再从 Git 同步该资源。
-
metadataobject -
用于 UI、索引或运维提示的附加任意元数据。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有知识资源。
PATCH /cognitive-infrastructure/cognitive-assets/knowledge-resource/
更新现有认知知识资源的数据。
认证: Bearer 令牌
请求体
要更新的知识资源属性。
-
idstring -
认知知识资源的唯一标识符。
-
organization_idstring 必填 -
拥有该资源的组织 ID(租户)。
-
project_idstring -
拥有该资源的项目 ID(租户作用域),可选。
-
namestring 必填 -
资源的可读名称。
-
slugstring 必填 -
稳定的语义键,用于在整个平台中引用该资源。
-
descriptionstring -
资源用途与预期用法的说明,可选。
-
resource_typestring 必填 -
认知资源的语义类型。
可选值textdocumentlisttaxonomypromptpolicymanualdatasetreference -
statusstring -
资源的生命周期状态。
可选值draftactivearchiveddeleted -
versionstring -
资源的语义版本或内部版本。
-
languagestring -
资源内容的主要语言。
-
tagsarray<string> -
用于筛选、导航和治理的标签,可选。
-
contentCognitiveKnowledgeResourceContent 必填 -
认知知识资源的规范内容载荷。支持自由文本、结构化 JSON 数据、文件引用和提示词块。
-
formatstring -
内容的主要表示格式。
可选值plain-textmarkdownjsonfile-referenceprompt-blocksurl -
textstring -
文本类资源使用的原始文本或 Markdown 文本内容。
-
structured_dataobject -
结构化 JSON 载荷,用于列表、分类体系、规则或轻量数据集。
-
file_refCognitiveKnowledgeResourceFileReference -
认知知识资源的文件引用元数据。
-
file_namestring -
原始文件名或显示文件名。
-
mime_typestring -
所链接文件的 MIME 类型。
-
storage_keystring -
内部存储键或 blob 标识符。
-
document_uristring -
指向已存储文件的 URI 或规范指针。
-
checksumstring -
用于校验文件完整性的校验和,可选。
-
size_bytesnumber -
文件大小(字节)。
-
-
prompt_blocksobject -
当 resource_type 为 prompt 时的结构化提示词分段。
-
systemstring -
instructionsstring -
examplesarray<object>
-
-
urlstring -
内容以链接形式表示时,指向外部或内部的 URL。
-
-
sourceCognitiveKnowledgeResourceSource -
可选的基础设施引用,表明资源实际存储的位置或同步来源。它不会取代语义资源模型。
-
datasource_idstring -
内容由外部数据源提供时的数据源标识符,可选。
-
external_idstring -
资源在外部源系统中的标识符。
-
sync_modestring -
资源与其物理来源之间的维护方式。
可选值manualsyncedimported
-
-
governanceCognitiveKnowledgeResourceGovernance -
认知知识资源的治理与生命周期元数据。
-
owner_user_idstring -
资源的负责用户。
-
owner_team_idstring -
资源的负责团队。
-
visibility_scopestring -
资源的可见范围。
可选值privateteamorganization -
review_statusstring -
资源的评审状态。
可选值draftreviewedapprovedrejected -
is_authoritativeboolean -
表示该资源是否应被视为权威来源。
-
effective_fromstring -
有效期开始时间戳,可选。
-
effective_tostring -
有效期结束时间戳,可选。
-
expires_atstring -
过期时间戳,可选。
-
-
capabilitiesCognitiveKnowledgeResourceCapabilities -
声明资源在运行时中的使用方式。
-
allowed_usage_modesarray<string> -
允许使用该资源的模式。
-
is_searchableboolean -
表示该资源是否已建立搜索索引。
-
is_bindableboolean -
表示该资源能否绑定到目标实体。
-
is_executable_referenceboolean -
表示该资源引用是否可执行。
-
is_version_lockedboolean -
表示该资源是否锁定到特定版本。
-
-
git_bindingobject -
该资源同步来源 Git 仓库的关联信息(参见 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 表示当前安装不再从 Git 同步该资源。
-
metadataobject -
用于 UI、索引或运维提示的附加任意元数据。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除知识资源。
DELETE /cognitive-infrastructure/cognitive-assets/knowledge-resource/
根据所提供的 ID 删除知识资源。
认证: Bearer 令牌
请求体
要删除的资源 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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
}将知识资源发布为新的不可变版本。
POST /cognitive-infrastructure/cognitive-assets/knowledge-resource/{id}/publish
将当前内容的快照保存为下一个版本(查询选择器 versions 可列出所有版本),并将资源标记为活跃。由编辑器的 Publish 操作和 Git 同步调用。
认证: Bearer 令牌
参数
-
idstring 路径 必填
请求体
-
descriptionstring -
gitobject -
从 Git 发布时的来源:
{ repository, branch, commit, path, key }。
响应
-
200已创建的版本快照。
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 /cognitive-infrastructure/cognitive-assets/knowledge-resource/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的知识资源信息。
认证: Bearer 令牌
参数
-
queryselectorstring 路径 必填 -
用于筛选的字段
idorganization-idslugall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的条目。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的条目。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}创建 LLM 提供商。
POST /cognitive-infrastructure/cognitive-assets/llm-provider/
返回根据所提供数据创建的 LLM 提供商。
认证: Bearer 令牌
请求体
要创建的 LLM 提供商对象。
-
organization_idstring -
拥有该流程定义的组织(租户)标识符。
-
project_idstring -
可选,拥有该 LLM 提供方配置的项目 ID(租户作用域)。
-
slugstring 必填 -
唯一标识该提供方配置的稳定语义键(例如 llm.openai.gpt4_1、llm.azure.gpt4o、llm.claude3_sonnet)。
-
namestring 必填 -
在编辑器和文档中使用的提供方配置可读名称。
-
descriptionstring -
可选,说明该提供方用途、模型特性或使用场景的描述。
-
transport_kindstring -
调用 LLM 所用的传输方式:http-api、grpc、internal-router、local-process。
-
provider_typeobject -
用于解析调用适配器的提供方类型标识符(例如 openai-chat、azure-openai-chat、anthropic-messages、mistral-chat)。
-
namestring -
titlestring
-
-
endpointstring -
可选,用于 HTTP/GRPC 方式调用 LLM 的 ConnectorModel 连接字符串或标识符。
-
api_keystring -
可选,当该提供方映射到连接器端点时使用的 EndpointTemplateModel 键。
-
deployment_namestring -
部署名称是在云服务提供商上部署的特定模型版本及配置的唯一标识符。
-
api_versionstring -
提供方要求的 API 版本(例如 Azure OpenAI 的 2024-06-01)。
-
default_parametersobject -
可选的静态默认参数,例如 max_tokens、temperature 或 top_p,在调用 LLM 且未显式覆盖时生效。
-
input_token_limitinteger -
该提供方允许的提示词最大 token 数。
-
output_token_limitinteger -
该提供方可返回的最大 token 数。
-
pricingobject -
可选的结构化定价信息,用于成本监控和优化。
-
input_cost_per_millionnumber -
每 100 万输入 token 的费用。
-
output_cost_per_millionnumber -
每 100 万输出 token 的费用。
-
currencystring -
货币代码(例如 USD)。
-
-
rate_limitsobject -
可选的每分钟请求数或每分钟 token 数限制,用于请求限流。
-
rpminteger -
tpminteger
-
-
safety_settingsobject -
可选的提供方级安全配置:内容过滤器、策略、屏蔽列表或审核模式。
-
modestring -
安全模式(例如 strict、balanced、minimal)。
-
categories_blockedarray<string> -
被屏蔽的内容类别列表。
-
-
routing_rulesarray<object> -
可选的规则集,定义认知引擎何时自动选择该提供方。
-
is_systemboolean -
为 true 表示该提供方配置由平台管理。
-
is_defaultboolean -
为 true 表示该提供方决定系统的默认 LLM。
-
is_enabledboolean -
为 true 表示该提供方当前可被选择或调用。
-
is_deprecatedboolean -
为 true 表示新的流程或智能体不应再使用该提供方。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有 LLM 提供商。
PATCH /cognitive-infrastructure/cognitive-assets/llm-provider/
使用所提供的数据更新现有 LLM 提供商。
认证: Bearer 令牌
请求体
要更新的 LLM 提供商对象。
-
organization_idstring -
拥有该流程定义的组织(租户)标识符。
-
project_idstring -
可选,拥有该 LLM 提供方配置的项目 ID(租户作用域)。
-
slugstring 必填 -
唯一标识该提供方配置的稳定语义键(例如 llm.openai.gpt4_1、llm.azure.gpt4o、llm.claude3_sonnet)。
-
namestring 必填 -
在编辑器和文档中使用的提供方配置可读名称。
-
descriptionstring -
可选,说明该提供方用途、模型特性或使用场景的描述。
-
transport_kindstring -
调用 LLM 所用的传输方式:http-api、grpc、internal-router、local-process。
-
provider_typeobject -
用于解析调用适配器的提供方类型标识符(例如 openai-chat、azure-openai-chat、anthropic-messages、mistral-chat)。
-
namestring -
titlestring
-
-
endpointstring -
可选,用于 HTTP/GRPC 方式调用 LLM 的 ConnectorModel 连接字符串或标识符。
-
api_keystring -
可选,当该提供方映射到连接器端点时使用的 EndpointTemplateModel 键。
-
deployment_namestring -
部署名称是在云服务提供商上部署的特定模型版本及配置的唯一标识符。
-
api_versionstring -
提供方要求的 API 版本(例如 Azure OpenAI 的 2024-06-01)。
-
default_parametersobject -
可选的静态默认参数,例如 max_tokens、temperature 或 top_p,在调用 LLM 且未显式覆盖时生效。
-
input_token_limitinteger -
该提供方允许的提示词最大 token 数。
-
output_token_limitinteger -
该提供方可返回的最大 token 数。
-
pricingobject -
可选的结构化定价信息,用于成本监控和优化。
-
input_cost_per_millionnumber -
每 100 万输入 token 的费用。
-
output_cost_per_millionnumber -
每 100 万输出 token 的费用。
-
currencystring -
货币代码(例如 USD)。
-
-
rate_limitsobject -
可选的每分钟请求数或每分钟 token 数限制,用于请求限流。
-
rpminteger -
tpminteger
-
-
safety_settingsobject -
可选的提供方级安全配置:内容过滤器、策略、屏蔽列表或审核模式。
-
modestring -
安全模式(例如 strict、balanced、minimal)。
-
categories_blockedarray<string> -
被屏蔽的内容类别列表。
-
-
routing_rulesarray<object> -
可选的规则集,定义认知引擎何时自动选择该提供方。
-
is_systemboolean -
为 true 表示该提供方配置由平台管理。
-
is_defaultboolean -
为 true 表示该提供方决定系统的默认 LLM。
-
is_enabledboolean -
为 true 表示该提供方当前可被选择或调用。
-
is_deprecatedboolean -
为 true 表示新的流程或智能体不应再使用该提供方。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除 LLM 提供商。
DELETE /cognitive-infrastructure/cognitive-assets/llm-provider/
根据所提供的 ID 删除 LLM 提供商。
认证: Bearer 令牌
请求体
要删除的 LLM 提供商 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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
}按查询选择器获取 LLM 提供商。
GET /cognitive-infrastructure/cognitive-assets/llm-provider/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的 LLM 提供商信息。
认证: Bearer 令牌
参数
-
queryselectorenum 路径 必填 -
此查询可用的筛选条件
idorganization-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的 LLM 提供商。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的 LLM 提供商。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}调用 LLM 提供商配置。
POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke
使用已配置的 LLM 提供商(按 ID)执行对话补全或类似操作。
认证: Bearer 令牌
请求体
调用参数,包括 model_id 和 input。
-
model_idstring 必填 -
大模型提供方配置的 ID。
-
operationstring -
操作类型(
chat、embedding),默认为chat。 -
inputobject 必填 -
输入载荷(消息等)。
响应
-
200成功。
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": {}
}创建提示词模板。
POST /cognitive-infrastructure/cognitive-assets/prompt-template/
返回根据所提供数据创建的提示词模板。
认证: Bearer 令牌
请求体
要创建的提示词模板对象。
-
organization_idstring -
拥有该提示词模板的组织(租户)标识符。
-
slugstring 必填 -
唯一标识该提示词模板的稳定语义键(例如 prompt.email_classification.v1)。
-
namestring 必填 -
在编辑器和文档中使用的模板可读名称。
-
descriptionstring -
可选,说明该提示词模板用途、范围和预期用法的描述。
-
llm_provider_idstring -
可选,引用 LlmProviderModel.id,指明该模板主要面向的提供方。
-
languagestring -
可选,模板内容的主要语言(例如 "en"、"es"、"pt-BR")。
-
formatstring -
渲染后提示词的格式,例如 "plain-text"、"markdown" 或 "json-instructions"。
-
system_instructionsstring -
系统级指令,定义助手的角色设定、约束和全局行为。
-
template_bodystring -
提示词模板主体,包含按所选语法编写的变量占位符(例如 {{variable_name}})。
-
variablesarray<CognitivePromptTemplateVariable> -
渲染时可注入该模板的带类型输入变量列表。
-
namestring 必填 -
在模板主体中引用的变量名(例如 "customer_name"、"email_body")。
-
typestring 必填 -
注入模板的值在运行时的预期类型。
可选值stringnumberbooleanarrayobject -
descriptionstring -
该变量含义的可读说明。
-
requiredboolean -
渲染模板时是否必须提供该变量。
-
default_valueany -
可选,未显式提供该变量时使用的默认值。
-
allowed_valuesarray<string> -
可选,变量受约束时允许取值的枚举。
-
-
output_fieldsarray<CognitivePromptTemplateOutputField> -
需要结构化输出时,提示词预期生成的带类型输出字段列表。
-
namestring 必填 -
结构化输出中的字段名(例如 "category"、"summary"、"sentiment")。
-
typestring 必填 -
渲染输出中该字段值的预期类型。
可选值stringnumberbooleanarrayobject -
descriptionstring -
该字段含义的可读说明。
-
requiredboolean -
模型是否应始终输出该字段。
-
-
style_guidelinesarray<string> -
可选,渲染和使用该模板时需遵循的风格或语气准则列表。
-
examplesarray<CognitivePromptTemplateExample> -
示例,将一组变量输入与预期的模型输出配对。
-
inputsobject -
渲染该示例所用的变量名到值的映射。
-
expected_outputstring -
给定输入时期望的模型响应。
-
notesstring -
可选,关于该示例边界情况、注意事项或设计理由的说明。
-
-
tagsarray<string> -
可选的自由格式标签列表,用于目录搜索、发现和治理。
-
is_systemboolean -
表示该模板是否为平台管理的系统级资产,而非用户创建。
-
is_deprecatedboolean -
表示该模板是否已弃用,不应在新流程中使用。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有提示词模板。
PATCH /cognitive-infrastructure/cognitive-assets/prompt-template/
使用所提供的数据更新现有提示词模板。
认证: Bearer 令牌
请求体
要创建的提示词模板对象。
-
organization_idstring -
拥有该提示词模板的组织(租户)标识符。
-
slugstring 必填 -
唯一标识该提示词模板的稳定语义键(例如 prompt.email_classification.v1)。
-
namestring 必填 -
在编辑器和文档中使用的模板可读名称。
-
descriptionstring -
可选,说明该提示词模板用途、范围和预期用法的描述。
-
llm_provider_idstring -
可选,引用 LlmProviderModel.id,指明该模板主要面向的提供方。
-
languagestring -
可选,模板内容的主要语言(例如 "en"、"es"、"pt-BR")。
-
formatstring -
渲染后提示词的格式,例如 "plain-text"、"markdown" 或 "json-instructions"。
-
system_instructionsstring -
系统级指令,定义助手的角色设定、约束和全局行为。
-
template_bodystring -
提示词模板主体,包含按所选语法编写的变量占位符(例如 {{variable_name}})。
-
variablesarray<CognitivePromptTemplateVariable> -
渲染时可注入该模板的带类型输入变量列表。
-
namestring 必填 -
在模板主体中引用的变量名(例如 "customer_name"、"email_body")。
-
typestring 必填 -
注入模板的值在运行时的预期类型。
可选值stringnumberbooleanarrayobject -
descriptionstring -
该变量含义的可读说明。
-
requiredboolean -
渲染模板时是否必须提供该变量。
-
default_valueany -
可选,未显式提供该变量时使用的默认值。
-
allowed_valuesarray<string> -
可选,变量受约束时允许取值的枚举。
-
-
output_fieldsarray<CognitivePromptTemplateOutputField> -
需要结构化输出时,提示词预期生成的带类型输出字段列表。
-
namestring 必填 -
结构化输出中的字段名(例如 "category"、"summary"、"sentiment")。
-
typestring 必填 -
渲染输出中该字段值的预期类型。
可选值stringnumberbooleanarrayobject -
descriptionstring -
该字段含义的可读说明。
-
requiredboolean -
模型是否应始终输出该字段。
-
-
style_guidelinesarray<string> -
可选,渲染和使用该模板时需遵循的风格或语气准则列表。
-
examplesarray<CognitivePromptTemplateExample> -
示例,将一组变量输入与预期的模型输出配对。
-
inputsobject -
渲染该示例所用的变量名到值的映射。
-
expected_outputstring -
给定输入时期望的模型响应。
-
notesstring -
可选,关于该示例边界情况、注意事项或设计理由的说明。
-
-
tagsarray<string> -
可选的自由格式标签列表,用于目录搜索、发现和治理。
-
is_systemboolean -
表示该模板是否为平台管理的系统级资产,而非用户创建。
-
is_deprecatedboolean -
表示该模板是否已弃用,不应在新流程中使用。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除提示词模板。
DELETE /cognitive-infrastructure/cognitive-assets/prompt-template/
根据所提供的 ID 删除提示词模板。
认证: Bearer 令牌
请求体
要删除的提示词模板 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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 /cognitive-infrastructure/cognitive-assets/prompt-template/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的提示词模板信息。
认证: Bearer 令牌
参数
-
queryselectorenum 路径 必填 -
此查询可用的筛选条件
idorganization-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的模板。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的模板。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}创建数据源。
POST /cognitive-infrastructure/connectors/external-datasource/
返回根据所提供数据创建的数据源。
认证: Bearer 令牌
请求体
要创建的 Datasource 对象。
-
organization_idstring 必填 -
该触发器关联的 OrganizationModel 标识符。
-
project_idstring -
拥有此数据源的项目 ID(租户作用域),可选。
-
slugstring 必填 -
唯一标识此数据源的稳定语义键(例如 ds.crm、ds.postgres.orders、ds.vector.support)。
-
namestring 必填 -
数据源的可读名称,用于编辑器和文档。
-
descriptionstring -
可选描述,说明此数据源所代表的数据集或系统。
-
datasource_kindstring 必填 -
数据源类型:"postgres"、"mysql"、"sqlserver"、"mongodb"、"s3"、"gcs"、"snowflake"、"bigquery"、"elasticsearch"、"vector-db"、"custom"。
-
connector_slugstring -
负责底层通信的 ConnectorModel 引用,可选(HTTP、驱动 API、RPC 代理、云 SDK)。
-
default_collectionstring -
此数据源交互的默认数据集、表、集合或存储桶。
-
collectionsarray<object> -
此数据源公开的逻辑数据集或集合列表,可选,每项可附带 schema 提示。
-
collection_keystring -
descriptionstring -
schemaobject
-
-
indexingobject -
此数据源的索引配置,视 datasource_kind 而定,包括主键、向量索引或搜索索引配置。
-
primary_keystring -
vector_indexobject -
search_indexobject
-
-
query_capabilitiesobject -
此数据源支持的能力,例如 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 表示此数据源在执行查询前需要解析身份上下文(租户/用户)。
-
allowed_agent_profile_idsarray<string> -
允许对此数据源执行查询的 AgentProfileModel 标识符列表,可选。
-
allowed_operator_slugsarray<string> -
允许引用此数据源的算子类型列表,可选(例如 datasource.query、ai.rag.retrieve)。
-
is_systemboolean -
为 true 表示此数据源由平台内部管理。
-
is_enabledboolean -
为 true 表示此数据源当前可用。
-
is_deprecatedboolean -
为 true 表示此数据源不应再用于新的流程或设计。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有数据源。
PATCH /cognitive-infrastructure/connectors/external-datasource/
使用所提供的数据更新现有数据源。
认证: Bearer 令牌
请求体
要创建的 Datasource 对象。
-
organization_idstring 必填 -
该触发器关联的 OrganizationModel 标识符。
-
project_idstring -
拥有此数据源的项目 ID(租户作用域),可选。
-
slugstring 必填 -
唯一标识此数据源的稳定语义键(例如 ds.crm、ds.postgres.orders、ds.vector.support)。
-
namestring 必填 -
数据源的可读名称,用于编辑器和文档。
-
descriptionstring -
可选描述,说明此数据源所代表的数据集或系统。
-
datasource_kindstring 必填 -
数据源类型:"postgres"、"mysql"、"sqlserver"、"mongodb"、"s3"、"gcs"、"snowflake"、"bigquery"、"elasticsearch"、"vector-db"、"custom"。
-
connector_slugstring -
负责底层通信的 ConnectorModel 引用,可选(HTTP、驱动 API、RPC 代理、云 SDK)。
-
default_collectionstring -
此数据源交互的默认数据集、表、集合或存储桶。
-
collectionsarray<object> -
此数据源公开的逻辑数据集或集合列表,可选,每项可附带 schema 提示。
-
collection_keystring -
descriptionstring -
schemaobject
-
-
indexingobject -
此数据源的索引配置,视 datasource_kind 而定,包括主键、向量索引或搜索索引配置。
-
primary_keystring -
vector_indexobject -
search_indexobject
-
-
query_capabilitiesobject -
此数据源支持的能力,例如 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 表示此数据源在执行查询前需要解析身份上下文(租户/用户)。
-
allowed_agent_profile_idsarray<string> -
允许对此数据源执行查询的 AgentProfileModel 标识符列表,可选。
-
allowed_operator_slugsarray<string> -
允许引用此数据源的算子类型列表,可选(例如 datasource.query、ai.rag.retrieve)。
-
is_systemboolean -
为 true 表示此数据源由平台内部管理。
-
is_enabledboolean -
为 true 表示此数据源当前可用。
-
is_deprecatedboolean -
为 true 表示此数据源不应再用于新的流程或设计。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除数据源。
DELETE /cognitive-infrastructure/connectors/external-datasource/
根据所提供的 ID 删除数据源。
认证: Bearer 令牌
请求体
要删除的数据源 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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 /cognitive-infrastructure/connectors/external-datasource/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的数据源信息。
认证: Bearer 令牌
参数
-
queryselectorenum 路径 必填 -
此查询可用的筛选条件
idorganization-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的数据源。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的数据源。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}创建记忆存储。
POST /cognitive-infrastructure/connectors/memory-store/
返回根据所提供数据创建的记忆存储。
认证: Bearer 令牌
请求体
要创建的记忆存储对象。
-
organization_idstring -
拥有此记忆存储的组织(租户)的标识符。
-
project_idstring -
拥有此记忆存储的项目 ID(租户作用域),可选。
-
slugstring 必填 -
唯一标识此记忆存储的稳定语义键(例如 mem.support_conversation、mem.global_facts、mem.vector_personalization)。
-
namestring 必填 -
记忆存储的可读名称,显示在编辑器和文档中。
-
descriptionstring -
可选描述,说明存储的记忆类型及适用场景。
-
memory_kindstring 必填 -
记忆后端类型:"kv-store"、"vector-memory"、"session-store"、"document-memory"、"hybrid"。
-
connector_slugstring -
负责底层访问的 ConnectorModel 引用,可选(Redis、DynamoDB、向量数据库、会话服务、自定义后端)。
-
backing_datasource_keystring -
当此记忆存储基于结构化数据源或向量数据源实现时的 DatasourceModel 键,可选。
-
default_namespacestring -
未显式提供命名空间时使用的默认命名空间、存储桶或逻辑集合。
-
partitioningobject -
定义记忆条目如何按租户、用户、流程或智能体进行分区与隔离。
-
strategystring -
分区策略:"by-tenant"、"by-subject"、"by-tenant-and-subject"、"by-flow"、"global"、"custom"。
-
keysarray<string> -
从身份或上下文派生的逻辑分区键列表,可选(例如 ["tenant_id", "subject_id", "flow_key"])。
-
-
schema_hintsobject -
可选的结构提示,描述此处所存记忆条目的典型形态,例如对话消息、事实、嵌入向量或会话快照。
-
entry_kindstring -
条目的高层类型:"message"、"fact"、"embedding"、"session"、"mixed"。
-
fieldsobject -
类 JSON Schema 结构,描述所存记录的通用字段,可选。
-
-
retention_policyobject -
记忆条目的保留与压缩策略,控制信息保存多久以及如何清理过旧或超量的数据。
-
policy_typestring -
保留模式:"ttl"、"sliding-window"、"max-entries-per-partition"、"manual"。
-
ttl_msinteger -
policy_type 为 "ttl" 或 "sliding-window" 时,条目的默认存活时间(毫秒)。
-
max_entries_per_partitioninteger -
每个分区允许的最大记忆条目数,超出后较早的条目将被压缩或删除。
-
-
default_ttl_msinteger -
写入时未覆盖的情况下条目的默认 TTL(毫秒),可选。可独立于 retention_policy 使用,实现简单的过期行为。
-
query_capabilitiesobject -
此记忆存储支持的能力:读取、写入、向量搜索、列出最近条目、截断会话等。
-
read_by_keyboolean -
upsertboolean -
deleteboolean -
list_recentboolean -
truncate_partitionboolean -
vector_searchboolean
-
-
auth_context_requiredboolean -
为 true 表示此记忆存储在执行读写操作前需要解析身份上下文(租户/用户)。
-
allowed_agent_profile_idsarray<string> -
允许使用此记忆存储的 AgentProfileModel 标识符列表,可选。
-
allowed_operator_slugsarray<string> -
允许引用此记忆存储的算子类型列表,可选(例如 ai.chat、ai.agent、ai.rag.retrieve)。
-
is_systemboolean -
为 true 表示此记忆存储由平台内部管理。
-
is_enabledboolean -
为 true 表示此记忆存储当前可用。
-
is_deprecatedboolean -
为 true 表示此记忆存储不应再用于新的流程或智能体。
响应
-
200成功。 -
500执行此操作时出错。
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
}更新现有记忆存储。
PATCH /cognitive-infrastructure/connectors/memory-store/
使用所提供的数据更新现有记忆存储。
认证: Bearer 令牌
请求体
要创建的记忆存储对象。
-
organization_idstring -
拥有此记忆存储的组织(租户)的标识符。
-
project_idstring -
拥有此记忆存储的项目 ID(租户作用域),可选。
-
slugstring 必填 -
唯一标识此记忆存储的稳定语义键(例如 mem.support_conversation、mem.global_facts、mem.vector_personalization)。
-
namestring 必填 -
记忆存储的可读名称,显示在编辑器和文档中。
-
descriptionstring -
可选描述,说明存储的记忆类型及适用场景。
-
memory_kindstring 必填 -
记忆后端类型:"kv-store"、"vector-memory"、"session-store"、"document-memory"、"hybrid"。
-
connector_slugstring -
负责底层访问的 ConnectorModel 引用,可选(Redis、DynamoDB、向量数据库、会话服务、自定义后端)。
-
backing_datasource_keystring -
当此记忆存储基于结构化数据源或向量数据源实现时的 DatasourceModel 键,可选。
-
default_namespacestring -
未显式提供命名空间时使用的默认命名空间、存储桶或逻辑集合。
-
partitioningobject -
定义记忆条目如何按租户、用户、流程或智能体进行分区与隔离。
-
strategystring -
分区策略:"by-tenant"、"by-subject"、"by-tenant-and-subject"、"by-flow"、"global"、"custom"。
-
keysarray<string> -
从身份或上下文派生的逻辑分区键列表,可选(例如 ["tenant_id", "subject_id", "flow_key"])。
-
-
schema_hintsobject -
可选的结构提示,描述此处所存记忆条目的典型形态,例如对话消息、事实、嵌入向量或会话快照。
-
entry_kindstring -
条目的高层类型:"message"、"fact"、"embedding"、"session"、"mixed"。
-
fieldsobject -
类 JSON Schema 结构,描述所存记录的通用字段,可选。
-
-
retention_policyobject -
记忆条目的保留与压缩策略,控制信息保存多久以及如何清理过旧或超量的数据。
-
policy_typestring -
保留模式:"ttl"、"sliding-window"、"max-entries-per-partition"、"manual"。
-
ttl_msinteger -
policy_type 为 "ttl" 或 "sliding-window" 时,条目的默认存活时间(毫秒)。
-
max_entries_per_partitioninteger -
每个分区允许的最大记忆条目数,超出后较早的条目将被压缩或删除。
-
-
default_ttl_msinteger -
写入时未覆盖的情况下条目的默认 TTL(毫秒),可选。可独立于 retention_policy 使用,实现简单的过期行为。
-
query_capabilitiesobject -
此记忆存储支持的能力:读取、写入、向量搜索、列出最近条目、截断会话等。
-
read_by_keyboolean -
upsertboolean -
deleteboolean -
list_recentboolean -
truncate_partitionboolean -
vector_searchboolean
-
-
auth_context_requiredboolean -
为 true 表示此记忆存储在执行读写操作前需要解析身份上下文(租户/用户)。
-
allowed_agent_profile_idsarray<string> -
允许使用此记忆存储的 AgentProfileModel 标识符列表,可选。
-
allowed_operator_slugsarray<string> -
允许引用此记忆存储的算子类型列表,可选(例如 ai.chat、ai.agent、ai.rag.retrieve)。
-
is_systemboolean -
为 true 表示此记忆存储由平台内部管理。
-
is_enabledboolean -
为 true 表示此记忆存储当前可用。
-
is_deprecatedboolean -
为 true 表示此记忆存储不应再用于新的流程或智能体。
响应
-
200成功。 -
500执行此操作时出错。
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
}按 id 删除记忆存储。
DELETE /cognitive-infrastructure/connectors/memory-store/
根据所提供的 ID 删除记忆存储。
认证: Bearer 令牌
请求体
要删除的记忆存储 ID
-
idstring
响应
-
200成功。 -
500执行此操作时出错。
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 /cognitive-infrastructure/connectors/memory-store/{queryselector}
返回与路由中指定的查询选择器和搜索条件匹配的记忆存储信息。
认证: Bearer 令牌
参数
-
queryselectorenum 路径 必填 -
此查询可用的筛选条件
idorganization-idall -
searchstring 查询 -
用于搜索实体的关键字。
-
include_statusstring 查询 -
可选的状态参数,用于包含指定状态的模板。
-
exclude_statusstring 查询 -
可选的状态参数,用于排除指定状态的模板。
-
pageinteger 查询 -
页码,从 1 开始(默认 1)。
-
pageSizeinteger 查询 -
每页记录数(默认 25)。
响应
-
200成功。 -
500执行此操作时出错。
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
}