智信-agent
  1. 数据库工作流运行
智信-agent
  • 文件分析
    • 文件解析接口
      POST
    • 文本分段测试接口
      POST
    • 二进制文件
      POST
    • 二进制文件【json】
      POST
  • 知识库管理
    • 知识库初始化
      POST
    • 知识库召回测试
      POST
    • 知识库查询
      POST
    • 知识库文件添加
      POST
  • 工作流
    • AI生成prompt
      POST
    • 工作流运行
      POST
    • 单节点运行
      POST
    • 工作流保存接口
      POST
    • 代码生成
      POST
    • 获取工作流
      GET
  • MCP管理
    • 建立MCP服务器
      POST
    • MCP服务器工具的添加
      POST
    • MCP服务器工具的删除
      POST
    • MCP服务器工具的修改
      POST
    • 修改服务器名称和描述
      POST
    • 关闭MCP服务器
      POST
    • 查看所有的工具
      POST
    • 查询当前活跃的mcp服务器信息
      GET
    • 使用指定工具
      POST
  • 数据库开发
    • 数据库内部接口
      • 接口整合
      • 自然语言及SQL执行
      • schma查询
      • 单表的字段描述查询
      • all
    • 数据库工作流运行
      • 数据库工作流保存
        POST
      • 数据库单节点运行
        POST
  • 未命名接口
    GET
  • mineru
    POST
  1. 数据库工作流运行

数据库工作流保存

开发中
开发环境
http://172.29.50.10:2333
开发环境
http://172.29.50.10:2333
POST
http://127.0.0.1:2333/zhixin_agent/workflows/draft
保存数据库的工作流

请求参数

Header 参数

Body 参数application/json

示例
{
    "app_id": "test_lidongmei2",
    "graph": {
        "nodes": [
            {
                "id": "1747731620549",
                "type": "custom",
                "data": {
                    "type": "start",
                    "title": "开始",
                    "desc": "",
                    "variables": [
                        {
                            "variable": "var1",
                            "label": "var1",
                            "type": "number",
                            "max_length": 48,
                            "required": true,
                            "options": []
                        },
                        {
                            "variable": "var2",
                            "label": "var2",
                            "type": "number",
                            "max_length": 48,
                            "required": true,
                            "options": []
                        }
                    ],
                    "selected": false
                },
                "position": {
                    "x": 80,
                    "y": 282
                },
                "targetPosition": "left",
                "sourcePosition": "right",
                "positionAbsolute": {
                    "x": 80,
                    "y": 282
                },
                "width": 244,
                "height": 116,
                "selected": false
            },
            {
                "id": "answer",
                "type": "custom",
                "data": {
                    "type": "answer",
                    "title": "直接回复",
                    "desc": "",
                    "variables": [],
                    "answer": "{{#1747731625668.result#}}",
                    "selected": false
                },
                "position": {
                    "x": 697,
                    "y": 277
                },
                "targetPosition": "left",
                "sourcePosition": "right",
                "positionAbsolute": {
                    "x": 697,
                    "y": 277
                },
                "width": 244,
                "height": 105,
                "selected": false
            },
            {
                "id": "1747731625668",
                "type": "custom",
                "data": {
                    "type": "sql",
                    "title": "数据库执行",
                    "desc": "",
                    "variables": [
                        {
                            "variable": "arg1",
                            "value_selector": [
                                "1747731620549",
                                "var1"
                            ]
                        },
                        {
                            "variable": "arg2",
                            "value_selector": [
                                "1747731620549",
                                "var2"
                            ]
                        }
                    ],
                    "database_config": {
                        "type": "mysql",
                        "url": "172.29.50.10",
                        "port": "3306",
                        "user": "root",
                        "password": "root",
                        "database": "DB_sql_test"
                    },
                    "query_config": {
                        "query": "SELECT {arg1} FROM feihe_man WHERE name = {arg2}",
                        "query_type": "sql"
                    },
                    "LLM_config": {
                        "LLM": "DeepSeek-R1-Distill-Llama-70B",
                        "temperature": 0.7,
                        "top_p": 1,
                        "frequency_penalty": 0,
                        "existence_penalty": 0,
                        "max_token": 512,
                        "think": false
                    },
                    "search_settting": {},
                    "algorithm": "Default",
                    "retry_config": {
                        "retry_enable": true,
                        "retry_num": 3
                    },
                    "selected": false
                },
                "position": {
                    "x": 384,
                    "y": 282
                },
                "targetPosition": "left",
                "sourcePosition": "right",
                "positionAbsolute": {
                    "x": 384,
                    "y": 282
                },
                "width": 244,
                "height": 54,
                "selected": true
            }
        ],
        "edges": [
            {
                "id": "1747731620549-source-1747731625668-target",
                "type": "custom",
                "source": "1747731620549",
                "sourceHandle": "source",
                "target": "1747731625668",
                "targetHandle": "target",
                "data": {
                    "sourceType": "start",
                    "targetType": "code",
                    "isInIteration": false,
                    "isInLoop": false
                },
                "zIndex": 0
            },
            {
                "id": "1747731625668-source-answer-target",
                "type": "custom",
                "source": "1747731625668",
                "target": "answer",
                "sourceHandle": "source",
                "targetHandle": "target",
                "data": {
                    "sourceType": "code",
                    "targetType": "answer",
                    "isInLoop": false
                },
                "zIndex": 0
            }
        ],
        "viewport": {
            "x": 117,
            "y": 108.5,
            "zoom": 1
        }
    },
    "features": {
        "opening_statement": "",
        "suggested_questions": [],
        "suggested_questions_after_answer": {
            "enabled": false
        },
        "text_to_speech": {
            "enabled": false,
            "voice": "",
            "language": ""
        },
        "speech_to_text": {
            "enabled": false
        },
        "retriever_resource": {
            "enabled": true
        },
        "sensitive_word_avoidance": {
            "enabled": false
        },
        "file_upload": {
            "image": {
                "enabled": false,
                "number_limits": 3,
                "transfer_methods": [
                    "local_file",
                    "remote_url"
                ]
            },
            "enabled": true,
            "allowed_file_types": [
                "image"
            ],
            "allowed_file_extensions": [],
            "allowed_file_upload_methods": [
                "remote_url",
                "local_file"
            ],
            "number_limits": 1,
            "fileUploadConfig": {
                "file_size_limit": 15,
                "batch_count_limit": 5,
                "image_file_size_limit": 10,
                "video_file_size_limit": 100,
                "audio_file_size_limit": 50,
                "workflow_file_upload_limit": 10
            }
        }
    },
    "user_id": "jxh",
    "hash": "bd248ffac4f475d572ce80f75677d0a48a56ded451e3b1df4e30dad952cea4b5",
    "environment_variables": [],
    "conversation_variables": []
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://127.0.0.1:2333/zhixin_agent/workflows/draft' \
--header 'Content-Type: application/json' \
--data-raw '{
    "app_id": "test_lidongmei2",
    "graph": {
        "nodes": [
            {
                "id": "1747731620549",
                "type": "custom",
                "data": {
                    "type": "start",
                    "title": "开始",
                    "desc": "",
                    "variables": [
                        {
                            "variable": "var1",
                            "label": "var1",
                            "type": "number",
                            "max_length": 48,
                            "required": true,
                            "options": []
                        },
                        {
                            "variable": "var2",
                            "label": "var2",
                            "type": "number",
                            "max_length": 48,
                            "required": true,
                            "options": []
                        }
                    ],
                    "selected": false
                },
                "position": {
                    "x": 80,
                    "y": 282
                },
                "targetPosition": "left",
                "sourcePosition": "right",
                "positionAbsolute": {
                    "x": 80,
                    "y": 282
                },
                "width": 244,
                "height": 116,
                "selected": false
            },
            {
                "id": "answer",
                "type": "custom",
                "data": {
                    "type": "answer",
                    "title": "直接回复",
                    "desc": "",
                    "variables": [],
                    "answer": "{{#1747731625668.result#}}",
                    "selected": false
                },
                "position": {
                    "x": 697,
                    "y": 277
                },
                "targetPosition": "left",
                "sourcePosition": "right",
                "positionAbsolute": {
                    "x": 697,
                    "y": 277
                },
                "width": 244,
                "height": 105,
                "selected": false
            },
            {
                "id": "1747731625668",
                "type": "custom",
                "data": {
                    "type": "sql",
                    "title": "数据库执行",
                    "desc": "",
                    "variables": [
                        {
                            "variable": "arg1",
                            "value_selector": [
                                "1747731620549",
                                "var1"
                            ]
                        },
                        {
                            "variable": "arg2",
                            "value_selector": [
                                "1747731620549",
                                "var2"
                            ]
                        }
                    ],
                    "database_config": {
                        "type": "mysql",
                        "url": "172.29.50.10",
                        "port": "3306",
                        "user": "root",
                        "password": "root",
                        "database": "DB_sql_test"
                    },
                    "query_config": {
                        "query": "SELECT {arg1} FROM feihe_man WHERE name = {arg2}",
                        "query_type": "sql"
                    },
                    "LLM_config": {
                        "LLM": "DeepSeek-R1-Distill-Llama-70B",
                        "temperature": 0.7,
                        "top_p": 1,
                        "frequency_penalty": 0,
                        "existence_penalty": 0,
                        "max_token": 512,
                        "think": false
                    },
                    "search_settting": {},
                    "algorithm": "Default",
                    "retry_config": {
                        "retry_enable": true,
                        "retry_num": 3
                    },
                    "selected": false
                },
                "position": {
                    "x": 384,
                    "y": 282
                },
                "targetPosition": "left",
                "sourcePosition": "right",
                "positionAbsolute": {
                    "x": 384,
                    "y": 282
                },
                "width": 244,
                "height": 54,
                "selected": true
            }
        ],
        "edges": [
            {
                "id": "1747731620549-source-1747731625668-target",
                "type": "custom",
                "source": "1747731620549",
                "sourceHandle": "source",
                "target": "1747731625668",
                "targetHandle": "target",
                "data": {
                    "sourceType": "start",
                    "targetType": "code",
                    "isInIteration": false,
                    "isInLoop": false
                },
                "zIndex": 0
            },
            {
                "id": "1747731625668-source-answer-target",
                "type": "custom",
                "source": "1747731625668",
                "target": "answer",
                "sourceHandle": "source",
                "targetHandle": "target",
                "data": {
                    "sourceType": "code",
                    "targetType": "answer",
                    "isInLoop": false
                },
                "zIndex": 0
            }
        ],
        "viewport": {
            "x": 117,
            "y": 108.5,
            "zoom": 1
        }
    },
    "features": {
        "opening_statement": "",
        "suggested_questions": [],
        "suggested_questions_after_answer": {
            "enabled": false
        },
        "text_to_speech": {
            "enabled": false,
            "voice": "",
            "language": ""
        },
        "speech_to_text": {
            "enabled": false
        },
        "retriever_resource": {
            "enabled": true
        },
        "sensitive_word_avoidance": {
            "enabled": false
        },
        "file_upload": {
            "image": {
                "enabled": false,
                "number_limits": 3,
                "transfer_methods": [
                    "local_file",
                    "remote_url"
                ]
            },
            "enabled": true,
            "allowed_file_types": [
                "image"
            ],
            "allowed_file_extensions": [],
            "allowed_file_upload_methods": [
                "remote_url",
                "local_file"
            ],
            "number_limits": 1,
            "fileUploadConfig": {
                "file_size_limit": 15,
                "batch_count_limit": 5,
                "image_file_size_limit": 10,
                "video_file_size_limit": 100,
                "audio_file_size_limit": 50,
                "workflow_file_upload_limit": 10
            }
        }
    },
    "user_id": "jxh",
    "hash": "bd248ffac4f475d572ce80f75677d0a48a56ded451e3b1df4e30dad952cea4b5",
    "environment_variables": [],
    "conversation_variables": []
}'

返回响应

🟢200成功
application/json
Body

示例
{
    "result": "success",
    "hash": "00dccaf199e4c0214b390fe5ed0676bffb5684139cf90ac30ac5754b5c424119",
    "updated_at": 1750875354,
    "workflow_id": "283680af-e53e-47fc-a7e2-7c919a27f31d"
}
修改于 2025-06-26 03:11:36
上一页
all
下一页
数据库单节点运行
Built with