- 通用说明
  - 公共Header说明
    - Authentication
    - Business Domain
- Agent Executor
  - Agent运行
    - post 运行agent
    - post 调试agent
  - Agent运行V2
    - post 运行agent
    - post 调试agent
    - post 恢复Agent执行
    - post 终止Agent执行
  - Agent缓存
    - post Agent缓存管理

API docs by Redocly

# agent-executor OpenAPI (1.0.0)

Download OpenAPI specification:

This is a agent-executor OpenAPI schema

## 公共Header说明

## Authentication

- 调用需要鉴权的API，必须将token放在HTTP header中："Authorization: Bearer ACCESS_TOKEN"

## Business Domain

- 业务域标识Header：`x-business-domain`，用于区分不同业务场景的请求

## Agent运行

## 运行agent

运行agent

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

id | string (id) agent id
| object (config) agent配置
required | object (input) agent输入
| object (options) Agent运行选项

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v1/agent/run

### Request samples

- Payload

Content type
application/json
`
{

- "id": "1830930776523276288",
- "config":
  {
  - "input":
    {
    - "fields":
      [
      - {
        - "name": "query",
        - "type": "string",
        - "desc": ""
        }
      ],
    - "augment":
      {
      - "enable": true,
      - "data_source":
        {
        - "kg":
          [
          - {
            - "kg_id": "string",
            - "fields":
              [
              - "string"
              ],
            - "field_properties":
              {
              - "regions":
                [
                - "※vid",
                - "regions"
                ],
              - "comments":
                [
                - "※vid",
                - "content",
                - "votes",
                - "comment_time"
                ]
              },
            - "output_fields":
              [
              - "string"
              ]
            }
          ]
        }
      },
    - "rewrite":
      {
      - "enable": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      },
    - "is_temp_zone_enabled": 0,
    - "temp_zone_config":
      {
      - "name": "临时区",
      - "tmp_file_use_type": "select_from_temp_zone",
      - "max_file_count": 50,
      - "single_chat_max_select_file_count": 5,
      - "single_file_size_limit": 100,
      - "single_file_size_limit_unit": "MB",
      - "support_data_type":
        [
        - "file"
        ],
      - "allowed_file_categories":
        [
        - "video"
        ],
      - "allowed_file_types":
        [
        - "mp4"
        ]
      }
    },
  - "system_prompt": "string",
  - "dolphin": "string",
  - "pre_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "post_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "is_dolphin_mode": 0,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "skills":
    {
    - "tools":
      [
      - {
        - "tool_id": "string",
        - "tool_box_id": "string",
        - "tool_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "input_desc": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "tool_timeout": 300,
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "result_process_strategies":
          [
          - {
            - "category":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              },
            - "strategy":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              }
            }
          ]
        }
      ],
    - "agents":
      [
      - {
        - "agent_key": "string",
        - "agent_version": "string",
        - "agent_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "datasource_config":
          {
          - "type": "inherit_main",
          - "specific_inherit": "docs_only"
          },
        - "llm_config":
          {
          - "type": "inherit_main"
          },
        - "agent_timeout": 1800,
        - "current_pms_check_status": "",
        - "current_is_exists_and_published": true
        }
      ],
    - "mcps":
      [
      - {
        - "mcp_server_id": "string"
        }
      ]
    },
  - "llms":
    [
    - {
      - "is_default": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      }
    ],
  - "is_data_flow_set_enabled": 0,
  - "opening_remark_config": "",
  - "preset_questions":
    [
    - {
      - "question": ""
      }
    ],
  - "output":
    {
    - "variables":
      {
      - "answer_var": "string",
      - "doc_retrieval_var": "string",
      - "graph_retrieval_var": "string",
      - "related_questions_var": "string",
      - "other_vars":
        [
        - "string"
        ]
      },
    - "default_format": "markdown"
    },
  - "built_in_can_edit_fields":
    {
    - "name": false,
    - "avatar": false,
    - "profile": false,
    - "input_config": false,
    - "system_prompt": false,
    - "data_source.kg": false,
    - "data_source.doc": false,
    - "data_source.metric": false,
    - "data_source.kn_entry": false,
    - "model": true,
    - "skills": false,
    - "opening_remark_config": false,
    - "preset_questions": false,
    - "skills.tools.tool_input": false,
    - "memory": false,
    - "related_question": false
    },
  - "memory":
    {
    - "is_enabled": false
    },
  - "related_question":
    {
    - "is_enabled": false
    },
  - "plan_mode":
    {
    - "is_enabled": false
    },
  - "metadata":
    {
    - "config_tpl_version": "v1",
    - "config_last_set_timestamp": 1700000000000000000
    },
  - "output_vars":
    [
    - "string"
    ],
  - "user_define": { },
  - "incremental_output": false
  },
- "input":
  {
  - "query": "你好"
  },
- "_options":
  {
  - "output_vars":
    [
    - "string"
    ],
  - "incremental_output": false,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "llm_config":
    {
    - "id": "string",
    - "name": "deepseek-v3",
    - "model_type": "llm",
    - "temperature": 2,
    - "top_p": 1,
    - "top_k": 0,
    - "frequency_penalty": -2,
    - "presence_penalty": -2,
    - "max_tokens": 500
    },
  - "tmp_files":
    [
    - {
      - "id": "string",
      - "type": "string",
      - "name": "string"
      }
    ]
  }

}`

### Response samples

- 200
- 400
- 500

Content type
application/json
`
{

- "answer": { },
- "status": "string",
- "ask":
  {
  - "session_id": "string",
  - "tool_name": "string",
  - "tool_args":
    [
    - {
      - "key": "string",
      - "value": "string",
      - "type": "string"
      }
    ]
  },
- "error":
  {
  - "description": "string",
  - "error_code": "string",
  - "error_details": "string",
  - "error_link": "string",
  - "solution": "string"
  }

}`

## 调试agent

调试agent

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

id | string (id) agent id
| object (config) agent配置
required | object (input) agent输入
| object (options) Agent运行选项

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v1/agent/debug

### Request samples

- Payload

Content type
application/json
`
{

- "id": "1830930776523276288",
- "config":
  {
  - "input":
    {
    - "fields":
      [
      - {
        - "name": "query",
        - "type": "string",
        - "desc": ""
        }
      ],
    - "augment":
      {
      - "enable": true,
      - "data_source":
        {
        - "kg":
          [
          - {
            - "kg_id": "string",
            - "fields":
              [
              - "string"
              ],
            - "field_properties":
              {
              - "regions":
                [
                - "※vid",
                - "regions"
                ],
              - "comments":
                [
                - "※vid",
                - "content",
                - "votes",
                - "comment_time"
                ]
              },
            - "output_fields":
              [
              - "string"
              ]
            }
          ]
        }
      },
    - "rewrite":
      {
      - "enable": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      },
    - "is_temp_zone_enabled": 0,
    - "temp_zone_config":
      {
      - "name": "临时区",
      - "tmp_file_use_type": "select_from_temp_zone",
      - "max_file_count": 50,
      - "single_chat_max_select_file_count": 5,
      - "single_file_size_limit": 100,
      - "single_file_size_limit_unit": "MB",
      - "support_data_type":
        [
        - "file"
        ],
      - "allowed_file_categories":
        [
        - "video"
        ],
      - "allowed_file_types":
        [
        - "mp4"
        ]
      }
    },
  - "system_prompt": "string",
  - "dolphin": "string",
  - "pre_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "post_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "is_dolphin_mode": 0,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "skills":
    {
    - "tools":
      [
      - {
        - "tool_id": "string",
        - "tool_box_id": "string",
        - "tool_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "input_desc": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "tool_timeout": 300,
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "result_process_strategies":
          [
          - {
            - "category":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              },
            - "strategy":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              }
            }
          ]
        }
      ],
    - "agents":
      [
      - {
        - "agent_key": "string",
        - "agent_version": "string",
        - "agent_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "datasource_config":
          {
          - "type": "inherit_main",
          - "specific_inherit": "docs_only"
          },
        - "llm_config":
          {
          - "type": "inherit_main"
          },
        - "agent_timeout": 1800,
        - "current_pms_check_status": "",
        - "current_is_exists_and_published": true
        }
      ],
    - "mcps":
      [
      - {
        - "mcp_server_id": "string"
        }
      ]
    },
  - "llms":
    [
    - {
      - "is_default": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      }
    ],
  - "is_data_flow_set_enabled": 0,
  - "opening_remark_config": "",
  - "preset_questions":
    [
    - {
      - "question": ""
      }
    ],
  - "output":
    {
    - "variables":
      {
      - "answer_var": "string",
      - "doc_retrieval_var": "string",
      - "graph_retrieval_var": "string",
      - "related_questions_var": "string",
      - "other_vars":
        [
        - "string"
        ]
      },
    - "default_format": "markdown"
    },
  - "built_in_can_edit_fields":
    {
    - "name": false,
    - "avatar": false,
    - "profile": false,
    - "input_config": false,
    - "system_prompt": false,
    - "data_source.kg": false,
    - "data_source.doc": false,
    - "data_source.metric": false,
    - "data_source.kn_entry": false,
    - "model": true,
    - "skills": false,
    - "opening_remark_config": false,
    - "preset_questions": false,
    - "skills.tools.tool_input": false,
    - "memory": false,
    - "related_question": false
    },
  - "memory":
    {
    - "is_enabled": false
    },
  - "related_question":
    {
    - "is_enabled": false
    },
  - "plan_mode":
    {
    - "is_enabled": false
    },
  - "metadata":
    {
    - "config_tpl_version": "v1",
    - "config_last_set_timestamp": 1700000000000000000
    },
  - "output_vars":
    [
    - "string"
    ],
  - "user_define": { },
  - "incremental_output": false
  },
- "input":
  {
  - "query": "你好"
  },
- "_options":
  {
  - "output_vars":
    [
    - "string"
    ],
  - "incremental_output": false,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "llm_config":
    {
    - "id": "string",
    - "name": "deepseek-v3",
    - "model_type": "llm",
    - "temperature": 2,
    - "top_p": 1,
    - "top_k": 0,
    - "frequency_penalty": -2,
    - "presence_penalty": -2,
    - "max_tokens": 500
    },
  - "tmp_files":
    [
    - {
      - "id": "string",
      - "type": "string",
      - "name": "string"
      }
    ]
  }

}`

### Response samples

- 200
- 400
- 500

Content type
application/json
`
{

- "answer": { },
- "status": "string",
- "ask":
  {
  - "session_id": "string",
  - "tool_name": "string",
  - "tool_args":
    [
    - {
      - "key": "string",
      - "value": "string",
      - "type": "string"
      }
    ]
  },
- "error":
  {
  - "description": "string",
  - "error_code": "string",
  - "error_details": "string",
  - "error_link": "string",
  - "solution": "string"
  }

}`

## Agent运行V2

## 运行agent

运行agent

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

agent_id | string (agent_id) agent id agent_config和agent_id 不能同时为空。agent_config优先级高于agent_id。
agent_version | string (agent_version) agent版本号,与agent_id配合使用 当agent_id提供时,此字段为required 当agent_config提供时,则忽略agent_version和agent_id
| object (config) data agent配置
required | object (agent_input_agent_input) agent输入
| object (agent_options_agent_options) Agent运行选项

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v2/agent/run

### Request samples

- Payload

Content type
application/json
`
{

- "agent_id": "1830930776523276288",
- "agent_version": "latest",
- "agent_config":
  {
  - "input":
    {
    - "fields":
      [
      - {
        - "name": "query",
        - "type": "string",
        - "desc": ""
        }
      ],
    - "augment":
      {
      - "enable": true,
      - "data_source":
        {
        - "kg":
          [
          - {
            - "kg_id": "string",
            - "fields":
              [
              - "string"
              ],
            - "field_properties":
              {
              - "regions":
                [
                - "※vid",
                - "regions"
                ],
              - "comments":
                [
                - "※vid",
                - "content",
                - "votes",
                - "comment_time"
                ]
              },
            - "output_fields":
              [
              - "string"
              ]
            }
          ]
        }
      },
    - "rewrite":
      {
      - "enable": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      },
    - "is_temp_zone_enabled": 0,
    - "temp_zone_config":
      {
      - "name": "临时区",
      - "tmp_file_use_type": "select_from_temp_zone",
      - "max_file_count": 50,
      - "single_chat_max_select_file_count": 5,
      - "single_file_size_limit": 100,
      - "single_file_size_limit_unit": "MB",
      - "support_data_type":
        [
        - "file"
        ],
      - "allowed_file_categories":
        [
        - "video"
        ],
      - "allowed_file_types":
        [
        - "mp4"
        ]
      }
    },
  - "system_prompt": "string",
  - "dolphin": "string",
  - "pre_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "post_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "is_dolphin_mode": 0,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "skills":
    {
    - "tools":
      [
      - {
        - "tool_id": "string",
        - "tool_box_id": "string",
        - "tool_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "input_desc": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "tool_timeout": 300,
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "result_process_strategies":
          [
          - {
            - "category":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              },
            - "strategy":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              }
            }
          ]
        }
      ],
    - "agents":
      [
      - {
        - "agent_key": "string",
        - "agent_version": "string",
        - "agent_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "datasource_config":
          {
          - "type": "inherit_main",
          - "specific_inherit": "docs_only"
          },
        - "llm_config":
          {
          - "type": "inherit_main"
          },
        - "agent_timeout": 1800,
        - "current_pms_check_status": "",
        - "current_is_exists_and_published": true
        }
      ],
    - "mcps":
      [
      - {
        - "mcp_server_id": "string"
        }
      ]
    },
  - "llms":
    [
    - {
      - "is_default": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      }
    ],
  - "is_data_flow_set_enabled": 0,
  - "opening_remark_config": "",
  - "preset_questions":
    [
    - {
      - "question": ""
      }
    ],
  - "output":
    {
    - "variables":
      {
      - "answer_var": "string",
      - "doc_retrieval_var": "string",
      - "graph_retrieval_var": "string",
      - "related_questions_var": "string",
      - "other_vars":
        [
        - "string"
        ]
      },
    - "default_format": "markdown"
    },
  - "built_in_can_edit_fields":
    {
    - "name": false,
    - "avatar": false,
    - "profile": false,
    - "input_config": false,
    - "system_prompt": false,
    - "data_source.kg": false,
    - "data_source.doc": false,
    - "data_source.metric": false,
    - "data_source.kn_entry": false,
    - "model": true,
    - "skills": false,
    - "opening_remark_config": false,
    - "preset_questions": false,
    - "skills.tools.tool_input": false,
    - "memory": false,
    - "related_question": false
    },
  - "memory":
    {
    - "is_enabled": false
    },
  - "related_question":
    {
    - "is_enabled": false
    },
  - "plan_mode":
    {
    - "is_enabled": false
    },
  - "metadata":
    {
    - "config_tpl_version": "v1",
    - "config_last_set_timestamp": 1700000000000000000
    }
  },
- "agent_input":
  {
  - "query": "string",
  - "history":
    [
    - {
      - "role": "string",
      - "content": "string"
      }
    ],
  - "tool":
    {
    - "handle":
      {
      - "frame_id": "frame_abc123",
      - "snapshot_id": "snap_xyz789",
      - "resume_token": "token_def456",
      - "interrupt_type": "tool_confirmation",
      - "current_block": 3,
      - "restart_block": false
      },
    - "data":
      {
      - "tool_name": "delete_database",
      - "tool_description": "删除指定的数据库",
      - "tool_args":
        [
        - {
          - "key": "database_name",
          - "value": "test_db",
          - "type": "string"
          }
        ],
      - "interrupt_config":
        {
        - "requires_confirmation": true,
        - "confirmation_message": "⚠️ 确认删除数据库 test_db？"
        }
      }
    },
  - "header": { }
  },
- "_options":
  {
  - "output_vars":
    [
    - "string"
    ],
  - "incremental_output": false,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "llm_config":
    {
    - "id": "string",
    - "name": "deepseek-v3",
    - "model_type": "llm",
    - "temperature": 2,
    - "top_p": 1,
    - "top_k": 0,
    - "frequency_penalty": -2,
    - "presence_penalty": -2,
    - "max_tokens": 500
    },
  - "tmp_files":
    [
    - {
      - "id": "string",
      - "type": "string",
      - "name": "string"
      }
    ],
  - "agent_run_id": "string",
  - "resume_info":
    {
    - "resume_handle":
      {
      - "frame_id": "frame_abc123",
      - "snapshot_id": "snap_xyz789",
      - "resume_token": "token_def456",
      - "interrupt_type": "tool_confirmation",
      - "current_block": 3,
      - "restart_block": false
      },
    - "action": "confirm",
    - "modified_args":
      [
      - {
        - "key": "database_name",
        - "value": "new_test_db"
        }
      ]
    },
  - "conversation_id": "string",
  - "is_need_progress": false,
  - "enable_dependency_cache": false
  }

}`

### Response samples

- 200
- 400
- 500

Content type
application/json
`
{

- "answer": { },
- "status": "string",
- "interrupt_info":
  {
  - "handle":
    {
    - "frame_id": "frame_abc123",
    - "snapshot_id": "snap_xyz789",
    - "resume_token": "token_def456",
    - "interrupt_type": "tool_confirmation",
    - "current_block": 3,
    - "restart_block": false
    },
  - "data":
    {
    - "tool_name": "delete_database",
    - "tool_description": "删除指定的数据库",
    - "tool_args":
      [
      - {
        - "key": "database_name",
        - "value": "test_db",
        - "type": "string"
        }
      ],
    - "interrupt_config":
      {
      - "requires_confirmation": true,
      - "confirmation_message": "⚠️ 确认删除数据库 test_db？"
      }
    }
  },
- "agent_run_id": "string",
- "error":
  {
  - "description": "string",
  - "error_code": "string",
  - "error_details": "string",
  - "error_link": "string",
  - "solution": "string"
  },
- "ttft": 0

}`

## 调试agent

调试agent

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

agent_id | string (agent_id) agent id agent_config和agent_id 不能同时为空。agent_config优先级高于agent_id。
agent_version | string (agent_version) agent版本号,与agent_id配合使用 当agent_id提供时,此字段为required 当agent_config提供时,则忽略agent_version和agent_id
| object (config) data agent配置
required | object (agent_input_agent_input) agent输入
| object (agent_options_agent_options) Agent运行选项

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v2/agent/debug

### Request samples

- Payload

Content type
application/json
`
{

- "agent_id": "1830930776523276288",
- "agent_version": "latest",
- "agent_config":
  {
  - "input":
    {
    - "fields":
      [
      - {
        - "name": "query",
        - "type": "string",
        - "desc": ""
        }
      ],
    - "augment":
      {
      - "enable": true,
      - "data_source":
        {
        - "kg":
          [
          - {
            - "kg_id": "string",
            - "fields":
              [
              - "string"
              ],
            - "field_properties":
              {
              - "regions":
                [
                - "※vid",
                - "regions"
                ],
              - "comments":
                [
                - "※vid",
                - "content",
                - "votes",
                - "comment_time"
                ]
              },
            - "output_fields":
              [
              - "string"
              ]
            }
          ]
        }
      },
    - "rewrite":
      {
      - "enable": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      },
    - "is_temp_zone_enabled": 0,
    - "temp_zone_config":
      {
      - "name": "临时区",
      - "tmp_file_use_type": "select_from_temp_zone",
      - "max_file_count": 50,
      - "single_chat_max_select_file_count": 5,
      - "single_file_size_limit": 100,
      - "single_file_size_limit_unit": "MB",
      - "support_data_type":
        [
        - "file"
        ],
      - "allowed_file_categories":
        [
        - "video"
        ],
      - "allowed_file_types":
        [
        - "mp4"
        ]
      }
    },
  - "system_prompt": "string",
  - "dolphin": "string",
  - "pre_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "post_dolphin":
    [
    - {
      - "key": "string",
      - "name": "string",
      - "value": "string",
      - "enabled": true,
      - "edited": false
      }
    ],
  - "is_dolphin_mode": 0,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "skills":
    {
    - "tools":
      [
      - {
        - "tool_id": "string",
        - "tool_box_id": "string",
        - "tool_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "input_desc": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "tool_timeout": 300,
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "result_process_strategies":
          [
          - {
            - "category":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              },
            - "strategy":
              {
              - "id": "string",
              - "name": "string",
              - "description": "string"
              }
            }
          ]
        }
      ],
    - "agents":
      [
      - {
        - "agent_key": "string",
        - "agent_version": "string",
        - "agent_input":
          [
          - {
            - "enable": true,
            - "input_name": "string",
            - "input_type": "string",
            - "map_type": "fixedValue",
            - "map_value": null,
            - "children":
              [
              - { }
              ]
            }
          ],
        - "intervention": true,
        - "intervention_confirmation_message": "string",
        - "datasource_config":
          {
          - "type": "inherit_main",
          - "specific_inherit": "docs_only"
          },
        - "llm_config":
          {
          - "type": "inherit_main"
          },
        - "agent_timeout": 1800,
        - "current_pms_check_status": "",
        - "current_is_exists_and_published": true
        }
      ],
    - "mcps":
      [
      - {
        - "mcp_server_id": "string"
        }
      ]
    },
  - "llms":
    [
    - {
      - "is_default": true,
      - "llm_config":
        {
        - "id": "string",
        - "name": "deepseek-v3",
        - "model_type": "llm",
        - "temperature": 2,
        - "top_p": 1,
        - "top_k": 0,
        - "frequency_penalty": -2,
        - "presence_penalty": -2,
        - "max_tokens": 500
        }
      }
    ],
  - "is_data_flow_set_enabled": 0,
  - "opening_remark_config": "",
  - "preset_questions":
    [
    - {
      - "question": ""
      }
    ],
  - "output":
    {
    - "variables":
      {
      - "answer_var": "string",
      - "doc_retrieval_var": "string",
      - "graph_retrieval_var": "string",
      - "related_questions_var": "string",
      - "other_vars":
        [
        - "string"
        ]
      },
    - "default_format": "markdown"
    },
  - "built_in_can_edit_fields":
    {
    - "name": false,
    - "avatar": false,
    - "profile": false,
    - "input_config": false,
    - "system_prompt": false,
    - "data_source.kg": false,
    - "data_source.doc": false,
    - "data_source.metric": false,
    - "data_source.kn_entry": false,
    - "model": true,
    - "skills": false,
    - "opening_remark_config": false,
    - "preset_questions": false,
    - "skills.tools.tool_input": false,
    - "memory": false,
    - "related_question": false
    },
  - "memory":
    {
    - "is_enabled": false
    },
  - "related_question":
    {
    - "is_enabled": false
    },
  - "plan_mode":
    {
    - "is_enabled": false
    },
  - "metadata":
    {
    - "config_tpl_version": "v1",
    - "config_last_set_timestamp": 1700000000000000000
    }
  },
- "agent_input":
  {
  - "query": "string",
  - "history":
    [
    - {
      - "role": "string",
      - "content": "string"
      }
    ],
  - "tool":
    {
    - "handle":
      {
      - "frame_id": "frame_abc123",
      - "snapshot_id": "snap_xyz789",
      - "resume_token": "token_def456",
      - "interrupt_type": "tool_confirmation",
      - "current_block": 3,
      - "restart_block": false
      },
    - "data":
      {
      - "tool_name": "delete_database",
      - "tool_description": "删除指定的数据库",
      - "tool_args":
        [
        - {
          - "key": "database_name",
          - "value": "test_db",
          - "type": "string"
          }
        ],
      - "interrupt_config":
        {
        - "requires_confirmation": true,
        - "confirmation_message": "⚠️ 确认删除数据库 test_db？"
        }
      }
    },
  - "header": { }
  },
- "_options":
  {
  - "output_vars":
    [
    - "string"
    ],
  - "incremental_output": false,
  - "data_source":
    {
    - "kg":
      [
      - {
        - "kg_id": "string",
        - "fields":
          [
          - "string"
          ],
        - "field_properties":
          {
          - "regions":
            [
            - "※vid",
            - "regions"
            ],
          - "comments":
            [
            - "※vid",
            - "content",
            - "votes",
            - "comment_time"
            ]
          },
        - "output_fields":
          [
          - "string"
          ]
        }
      ],
    - "doc":
      [
      - {
        - "ds_id": 1,
        - "fields":
          [
          - {
            - "name": "dir2",
            - "path": "dir1/dir2",
            - "source": "gns://92EE2D87255142B78A6F1DFB6BBB836B/90B7F2F079824711886F317955008C5F",
            - "type": "file"
            }
          ],
        - "datasets":
          [
          - "string"
          ]
        }
      ],
    - "metric":
      [
      - {
        - "metric_model_id": "string"
        }
      ],
    - "kn_entry":
      [
      - {
        - "kn_entry_id": "string"
        }
      ],
    - "knowledge_network":
      [
      - {
        - "knowledge_network_id": "string",
        - "object_types":
          [
          - {
            - "object_type_id": "string"
            }
          ]
        }
      ],
    - "advanced_config":
      {
      - "kg":
        {
        - "text_match_entity_nums": 60,
        - "vector_match_entity_nums": 60,
        - "graph_rag_topk": 25,
        - "long_text_length": 256,
        - "reranker_sim_threshold": -5.5,
        - "retrieval_max_length": 20480
        },
      - "doc":
        {
        - "retrieval_slices_num": 150,
        - "max_slice_per_cite": 16,
        - "rerank_topk": 15,
        - "slice_head_num": 2,
        - "slice_tail_num": 0,
        - "documents_num": 8,
        - "document_threshold": -5.5,
        - "retrieval_max_length": 20480
        }
      }
    },
  - "llm_config":
    {
    - "id": "string",
    - "name": "deepseek-v3",
    - "model_type": "llm",
    - "temperature": 2,
    - "top_p": 1,
    - "top_k": 0,
    - "frequency_penalty": -2,
    - "presence_penalty": -2,
    - "max_tokens": 500
    },
  - "tmp_files":
    [
    - {
      - "id": "string",
      - "type": "string",
      - "name": "string"
      }
    ],
  - "agent_run_id": "string",
  - "resume_info":
    {
    - "resume_handle":
      {
      - "frame_id": "frame_abc123",
      - "snapshot_id": "snap_xyz789",
      - "resume_token": "token_def456",
      - "interrupt_type": "tool_confirmation",
      - "current_block": 3,
      - "restart_block": false
      },
    - "action": "confirm",
    - "modified_args":
      [
      - {
        - "key": "database_name",
        - "value": "new_test_db"
        }
      ]
    },
  - "conversation_id": "string",
  - "is_need_progress": false,
  - "enable_dependency_cache": false
  }

}`

### Response samples

- 200
- 400
- 500

Content type
application/json
`
{

- "answer": { },
- "status": "string",
- "interrupt_info":
  {
  - "handle":
    {
    - "frame_id": "frame_abc123",
    - "snapshot_id": "snap_xyz789",
    - "resume_token": "token_def456",
    - "interrupt_type": "tool_confirmation",
    - "current_block": 3,
    - "restart_block": false
    },
  - "data":
    {
    - "tool_name": "delete_database",
    - "tool_description": "删除指定的数据库",
    - "tool_args":
      [
      - {
        - "key": "database_name",
        - "value": "test_db",
        - "type": "string"
        }
      ],
    - "interrupt_config":
      {
      - "requires_confirmation": true,
      - "confirmation_message": "⚠️ 确认删除数据库 test_db？"
      }
    }
  },
- "agent_run_id": "string",
- "error":
  {
  - "description": "string",
  - "error_code": "string",
  - "error_details": "string",
  - "error_link": "string",
  - "solution": "string"
  },
- "ttft": 0

}`

## 恢复Agent执行

当Agent执行触发工具中断后，调用此接口恢复执行。 支持两种操作：

- confirm: 确认执行工具（可修改参数）
- skip: 跳过工具执行

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

agent_run_id required | string Agent运行ID（从中断响应获取）
required | object (resume_info) 恢复执行信息

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v2/agent/resume

### Request samples

- Payload

Content type
application/json
`
{

- "agent_run_id": "agent-session-12345",
- "resume_info":
  {
  - "resume_handle":
    {
    - "frame_id": "frame_abc123",
    - "snapshot_id": "snap_xyz789",
    - "resume_token": "token_def456",
    - "interrupt_type": "tool_confirmation",
    - "current_block": 3,
    - "restart_block": false
    },
  - "action": "confirm",
  - "modified_args":
    [
    - {
      - "key": "database_name",
      - "value": "new_test_db"
      }
    ]
  }

}`

### Response samples

- 400
- 404
- 500

Content type
application/json
`
{

- "description": "string",
- "error_code": "string",
- "error_details": "string",
- "error_link": "string",
- "solution": "string"

}`

## 终止Agent执行

立即终止正在运行的Agent

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

agent_run_id required | string Agent运行ID

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v2/agent/terminate

### Request samples

- Payload

Content type
application/json
`
{

- "agent_run_id": "agent-session-12345"

}`

### Response samples

- 404
- 500

Content type
application/json
`
{

- "description": "string",
- "error_code": "string",
- "error_details": "string",
- "error_link": "string",
- "solution": "string"

}`

## Agent缓存

## Agent缓存管理

- Agent缓存管理
  - 缓存的key的构成：
    - agent_id
    - agent_version
    - agent_config_version_flag
    - 即：[prefix]:{agent_id}:{agent_version}:{agent_config_version_flag}
  - 缓存的value存储的信息目前有：
    - tools_info_dict
    - skill_agent_info_dict
    - llm_config_dict

##### header Parameters

x-account-id required | string 用户ID/应用账号ID 当 x-account-type 为 app 时，x-account-id 为应用账号ID 当 x-account-type 为 user 时，x-account-id 为用户ID
x-account-type required | string 账号类型 user-普通用户 app-应用账号

##### Request Body schema: application/json
required

agent_id required | string (agent_id) agent id agent_config和agent_id 不能同时为空。agent_config优先级高于agent_id。
agent_version required | string (agent_version) agent版本号,与agent_id配合使用 当agent_id提供时,此字段为required 当agent_config提供时,则忽略agent_version和agent_id
action required | string (操作类型) Enum: "upsert" "get_info" upsert: 更新或创建新的此Agent缓存 逻辑： 如果agent_id对应的缓存存在(redis中)，则更新并返回缓存信息 更新逻辑： 获取新的缓存数据，并更新redis中的缓存（恢复有效期ttl） 返回更新后的缓存信息 如果agent_id对应的缓存不存在，则创建缓存并返回缓存信息 创建逻辑： 获取新的缓存数据，并创建redis中的缓存（设置有效期ttl） 返回创建后的缓存信息 get_info: 获取此Agent缓存信息 逻辑： 如果agent_id对应的缓存存在(redis中)，则返回缓存信息 如果agent_id对应的缓存不存在，则返回null

### Responses

host: DIP服务器IP, port: 默认端口443

https://{host}:{port}/api/agent-executor/v1/agent/cache/manage

### Request samples

- Payload

Content type
application/json
`
{

- "agent_id": "xxx",
- "agent_version": "latest",
- "action": "upsert"

}`

### Response samples

- 200
- 400
- 500

Content type
application/json
`
{

- "cache_id": "agent_id:v0:1234567890",
- "ttl": 600,
- "created_at": "2024-10-21T10:30:00Z",
- "cache_data": { }

}`