| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991 |
- {
- "openapi": "3.0.3",
- "info": {
- "title": "默认模块",
- "description": "",
- "version": "1.0.0"
- },
- "servers": [
- {
- "url": "/",
- "description": "默认服务器"
- }
- ],
- "tags": [
- {
- "name": "Agent",
- "description": "智能体相关接口"
- }
- ],
- "paths": {
- "/api/agent/doEditAgent": {
- "post": {
- "summary": "智能体编辑",
- "description": "",
- "tags": ["Agent"],
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "认证令牌",
- "required": false,
- "schema": {
- "type": "string",
- "default": "bpm_client_1473687766939209728",
- "example": "bpm_client_1473687766939209728"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "成功响应",
- "content": {
- "application/json": {
- "example": {
- "isSuccess": true,
- "code": 1,
- "result": "20d31522-66e7-463e-81d7-7fb7fd5864f7",
- "isAuthorized": true
- },
- "schema": {
- "type": "object",
- "properties": {
- "isSuccess": {
- "type": "boolean"
- },
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "result": {
- "type": "string",
- "format": "uuid"
- },
- "isAuthorized": {
- "type": "boolean"
- }
- },
- "required": ["isSuccess", "code", "result", "isAuthorized"]
- }
- }
- }
- }
- }
- }
- },
- "/api/agent/doSaveAgentVariables": {
- "post": {
- "summary": "保存智能体变量",
- "description": "",
- "tags": ["Agent"],
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "认证令牌",
- "required": false,
- "schema": {
- "type": "string",
- "default": "bpm_client_1473687766939209728",
- "example": "bpm_client_1473687766939209728"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appAgentId": {
- "type": "string",
- "format": "uuid"
- },
- "conversation_variables": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "env_variables": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": ["string", "number", "boolean", "object", "array"]
- }
- },
- "required": ["name", "value", "type"]
- }
- }
- },
- "required": ["appAgentId", "conversation_variables", "env_variables"]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "成功响应",
- "content": {
- "application/json": {
- "example": {
- "isSuccess": true,
- "code": 1,
- "isAuthorized": true
- },
- "schema": {
- "type": "object",
- "properties": {
- "isSuccess": {
- "type": "boolean"
- },
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "result": {
- "type": "string"
- },
- "isAuthorized": {
- "type": "boolean"
- }
- },
- "required": ["isSuccess", "code", "result", "isAuthorized"]
- }
- }
- }
- }
- }
- }
- },
- "/api/agent/getAgentInfo": {
- "post": {
- "summary": "获取智能体信息",
- "description": "",
- "tags": ["Agent"],
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "认证令牌",
- "required": false,
- "schema": {
- "type": "string",
- "default": "bpm_client_1473687766939209728",
- "example": "bpm_client_1473687766939209728"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- }
- },
- "required": ["id"]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "成功响应",
- "content": {
- "application/json": {
- "example": {
- "isSuccess": true,
- "code": 1,
- "result": {
- "conversation_variables": [],
- "edges": [],
- "env_variables": [
- {
- "is_require": false,
- "name": "api_address",
- "type": "string",
- "value": "http://shalu-componenttesting-admin-dev.shalu.com"
- }
- ],
- "id": "b3a4aabb-a6b8-47f3-8a32-f45930f7d7b8",
- "name": "测试智能体",
- "nodes": [
- {
- "appAgentId": "b3a4aabb-a6b8-47f3-8a32-f45930f7d7b8",
- "creationTime": "2026-01-28 10:24:45",
- "creatorUserId": "7F8A2BFE-402D-4499-9BB8-2EF7FFC7B993",
- "data": {
- "outputs": [
- {
- "name": "body",
- "describe": "响应内容",
- "type": "string"
- },
- {
- "name": "status_code",
- "describe": "响应状态码",
- "type": "number"
- },
- {
- "name": "headers",
- "describe": "响应头列表 JSON",
- "type": "object"
- }
- ],
- "output_can_alter": false,
- "variables": [],
- "method": "post",
- "ssl_verify": false,
- "isInIteration": false,
- "default_value": [],
- "body": {
- "data": [
- {
- "type": "text",
- "value": "{\"name\":\"测试智能体\",\"profilePhoto\":\"1111\",\"remark\":\"描述\",\"viewPort\":{\"x\":10,\"y\":\"10\",\"zoom\":1}}",
- "key": ""
- }
- ],
- "type": "json"
- },
- "params": [],
- "title": "HTTP 请求",
- "type": "http-request",
- "error_strategy": "none",
- "retry_config": {
- "max_retries": 3,
- "retry_enabled": false,
- "retry_interval": 100
- },
- "url": "http://shalu-componenttesting-admin-dev.shalu.com/api/agent/doEditAgent",
- "authorization": {
- "type": "none",
- "config": {
- "api_key": "",
- "header": "",
- "type": ""
- }
- },
- "timeout_config": {
- "max_write_timeout": 0,
- "max_read_timeout": 0,
- "max_connect_timeout": 0
- },
- "heads": [
- {
- "name": "Authorization",
- "value": "bpm_client_1473108597171818496"
- }
- ],
- "selected": true,
- "desc": "",
- "isInLoop": false
- },
- "height": 40,
- "id": "492048da-6f33-4a36-adc5-cff4b973b053",
- "isDeleted": false,
- "position": {
- "x": 20,
- "y": 30
- },
- "selected": true,
- "type": "custom",
- "updateTime": "2026-01-28 11:00:09",
- "width": 20,
- "zIndex": 1
- }
- ],
- "profilePhoto": "1111",
- "viewPort": {
- "x": 10,
- "y": 10,
- "zoom": 1
- }
- },
- "isAuthorized": true
- },
- "schema": {
- "type": "object",
- "properties": {
- "isSuccess": {
- "type": "boolean"
- },
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "result": {
- "type": "object",
- "properties": {
- "conversation_variables": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "edges": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "env_variables": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "is_require": {
- "type": "boolean"
- },
- "name": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": ["string", "number", "boolean", "object", "array"]
- },
- "value": {
- "type": "string"
- }
- },
- "required": ["name", "type", "value"]
- }
- },
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "name": {
- "type": "string"
- },
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/AgentNode"
- }
- },
- "profilePhoto": {
- "type": "string"
- },
- "viewPort": {
- "type": "object",
- "properties": {
- "x": {
- "type": "integer"
- },
- "y": {
- "type": "integer"
- },
- "zoom": {
- "type": "integer"
- }
- },
- "required": ["x", "y", "zoom"]
- }
- },
- "required": ["id", "name", "nodes", "profilePhoto", "viewPort"]
- },
- "isAuthorized": {
- "type": "boolean"
- }
- },
- "required": ["isSuccess", "code", "result", "isAuthorized"]
- }
- }
- }
- }
- }
- }
- },
- "/api/agent/doNewAgentNode": {
- "post": {
- "summary": "智能体添加节点",
- "description": "",
- "tags": ["Agent"],
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "认证令牌",
- "required": false,
- "schema": {
- "type": "string",
- "default": "bpm_client_1473687766939209728",
- "example": "bpm_client_1473687766939209728"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "appAgentId": {
- "type": "string",
- "format": "uuid"
- },
- "position": {
- "type": "object",
- "properties": {
- "x": {
- "type": "integer"
- },
- "y": {
- "type": "integer"
- }
- },
- "required": ["x", "y"]
- },
- "width": {
- "type": "integer"
- },
- "height": {
- "type": "integer"
- },
- "selected": {
- "type": "boolean"
- },
- "nodeType": {
- "type": "string",
- "enum": ["custom", "start", "end", "condition", "task", "http-request"]
- },
- "zIndex": {
- "type": "integer"
- },
- "parentId": {
- "type": "string",
- "format": "uuid"
- }
- },
- "required": [
- "appAgentId",
- "parentId",
- "position",
- "width",
- "height",
- "selected",
- "nodeType",
- "zIndex"
- ]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "成功响应",
- "content": {
- "application/json": {
- "example": {
- "isSuccess": true,
- "code": 1,
- "isAuthorized": true
- },
- "schema": {
- "type": "object",
- "properties": {
- "isSuccess": {
- "type": "boolean"
- },
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "isAuthorized": {
- "type": "boolean"
- }
- },
- "required": ["isSuccess", "code", "isAuthorized"]
- }
- }
- }
- }
- }
- }
- },
- "/api/agent/doUpdateAgentNode": {
- "post": {
- "summary": "更新智能体节点",
- "description": "",
- "tags": ["Agent"],
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "认证令牌",
- "required": false,
- "schema": {
- "type": "string",
- "default": "bpm_client_1473687766939209728",
- "example": "bpm_client_1473687766939209728"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "appAgentId": {
- "type": "string",
- "format": "uuid"
- },
- "parentId": {
- "type": "string",
- "format": "uuid"
- },
- "position": {
- "type": "object",
- "properties": {
- "x": {
- "type": "integer"
- },
- "y": {
- "type": "integer"
- }
- },
- "required": ["x", "y"]
- },
- "width": {
- "type": "integer"
- },
- "height": {
- "type": "integer"
- },
- "selected": {
- "type": "boolean"
- },
- "nodeType": {
- "type": "string",
- "enum": ["custom", "start", "end", "condition", "task", "http-request"]
- },
- "zIndex": {
- "type": "integer"
- },
- "data": {
- "type": "object"
- }
- },
- "required": [
- "id",
- "appAgentId",
- "parentId",
- "position",
- "width",
- "height",
- "selected",
- "nodeType",
- "zIndex",
- "data"
- ]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "成功响应",
- "content": {
- "application/json": {
- "example": {
- "isSuccess": true,
- "code": 1,
- "isAuthorized": true
- },
- "schema": {
- "type": "object",
- "properties": {
- "isSuccess": {
- "type": "boolean"
- },
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "isAuthorized": {
- "type": "boolean"
- }
- },
- "required": ["isSuccess", "code", "isAuthorized"]
- }
- }
- }
- }
- }
- }
- },
- "/api/agent/doTestNodeRunner": {
- "post": {
- "summary": "测试运行智能体节点",
- "description": "",
- "tags": ["Agent"],
- "parameters": [
- {
- "name": "Authorization",
- "in": "header",
- "description": "认证令牌",
- "required": false,
- "schema": {
- "type": "string",
- "default": "bpm_client_1473687766939209728",
- "example": "bpm_client_1473687766939209728"
- }
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "appAgentId": {
- "type": "string",
- "format": "uuid"
- }
- },
- "required": ["id", "appAgentId"]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "成功响应",
- "content": {
- "application/json": {
- "example": {
- "isSuccess": true,
- "code": 1,
- "isAuthorized": true
- },
- "schema": {
- "type": "object",
- "properties": {
- "isSuccess": {
- "type": "boolean"
- },
- "code": {
- "type": "integer",
- "format": "int32"
- },
- "isAuthorized": {
- "type": "boolean"
- }
- },
- "required": ["isSuccess", "code", "isAuthorized"]
- }
- }
- }
- }
- }
- }
- }
- },
- "components": {
- "schemas": {
- "AgentNode": {
- "type": "object",
- "properties": {
- "appAgentId": {
- "type": "string",
- "format": "uuid"
- },
- "creationTime": {
- "type": "string",
- "format": "date-time"
- },
- "creatorUserId": {
- "type": "string",
- "format": "uuid"
- },
- "data": {
- "$ref": "#/components/schemas/NodeData"
- },
- "height": {
- "type": "integer"
- },
- "id": {
- "type": "string",
- "format": "uuid"
- },
- "isDeleted": {
- "type": "boolean"
- },
- "position": {
- "type": "object",
- "properties": {
- "x": {
- "type": "integer"
- },
- "y": {
- "type": "integer"
- }
- },
- "required": ["x", "y"]
- },
- "selected": {
- "type": "boolean"
- },
- "type": {
- "type": "string",
- "enum": ["custom", "start", "end", "condition", "task", "http-request"]
- },
- "updateTime": {
- "type": "string",
- "format": "date-time"
- },
- "width": {
- "type": "integer"
- },
- "zIndex": {
- "type": "integer"
- }
- },
- "required": [
- "appAgentId",
- "creationTime",
- "creatorUserId",
- "data",
- "id",
- "position",
- "type"
- ]
- },
- "NodeData": {
- "type": "object",
- "properties": {
- "outputs": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "describe": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": ["string", "number", "boolean", "object", "array"]
- }
- },
- "required": ["name", "describe", "type"]
- }
- },
- "output_can_alter": {
- "type": "boolean"
- },
- "variables": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "method": {
- "type": "string",
- "enum": ["get", "post", "put", "delete", "patch", "head", "options"]
- },
- "ssl_verify": {
- "type": "boolean"
- },
- "isInIteration": {
- "type": "boolean"
- },
- "default_value": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "body": {
- "$ref": "#/components/schemas/RequestBody"
- },
- "params": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string",
- "enum": ["http-request", "condition", "task"]
- },
- "error_strategy": {
- "type": "string",
- "enum": ["none", "retry", "abort", "continue"]
- },
- "retry_config": {
- "type": "object",
- "properties": {
- "max_retries": {
- "type": "integer",
- "minimum": 0,
- "maximum": 10
- },
- "retry_enabled": {
- "type": "boolean"
- },
- "retry_interval": {
- "type": "integer",
- "minimum": 0,
- "maximum": 5000
- }
- },
- "required": ["max_retries", "retry_enabled", "retry_interval"]
- },
- "url": {
- "type": "string",
- "format": "uri"
- },
- "authorization": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["none", "bearer", "basic", "api-key"]
- },
- "config": {
- "type": "object",
- "properties": {
- "api_key": {
- "type": "string"
- },
- "header": {
- "type": "string"
- },
- "type": {
- "type": "string"
- }
- }
- }
- },
- "required": ["type", "config"]
- },
- "timeout_config": {
- "type": "object",
- "properties": {
- "max_write_timeout": {
- "type": "integer",
- "minimum": 0
- },
- "max_read_timeout": {
- "type": "integer",
- "minimum": 0
- },
- "max_connect_timeout": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": ["max_write_timeout", "max_read_timeout", "max_connect_timeout"]
- },
- "heads": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/HttpHeader"
- }
- },
- "selected": {
- "type": "boolean"
- },
- "desc": {
- "type": "string"
- },
- "isInLoop": {
- "type": "boolean"
- }
- },
- "required": ["outputs", "method", "title", "type", "url"]
- },
- "RequestBody": {
- "type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/RequestDataItem"
- }
- },
- "type": {
- "type": "string",
- "enum": ["json", "form-data", "x-www-form-urlencoded", "raw", "binary"]
- }
- },
- "required": ["data", "type"]
- },
- "RequestDataItem": {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "enum": ["text", "file", "json"]
- },
- "value": {
- "type": "string"
- },
- "key": {
- "type": "string"
- }
- },
- "required": ["type", "value"]
- },
- "HttpHeader": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "value": {
- "type": "string"
- }
- },
- "required": ["name", "value"]
- }
- },
- "securitySchemes": {
- "ApiKeyAuth": {
- "type": "apiKey",
- "in": "header",
- "name": "Authorization"
- }
- }
- },
- "security": [
- {
- "ApiKeyAuth": []
- }
- ]
- }
|