跳到主要内容
跳转到主要内容
API 文档

Task Agent

API 文档

按 OpenAPI JSON 查看公开接口的参数、认证与响应结构。

OpenAPI JSON

接口定义来自 Backplane OpenAPI 规范。下方按资源分组展示公开接口,展开可查看参数、请求体、响应状态和数据结构。开始调用前请阅读 快速开始,流式接入见 事件流

39 个公开接口。参数、响应和认证定义直接来自 OpenAPI JSON,英文接口说明保留源文档原文。

下载 OpenAPI JSON · 查看上游 OpenAPI JSON

快照日期: 2026-09-17 · 格式: Swagger / OpenAPI 2.0 · 基础地址: https://backend.hast.so/api/public/v1.

下载文件仅包含公开 Task Agent 接口及其引用的模型,可导入支持 Swagger 2.0 的 API 工具。上游规范还包含其他服务接口。

认证

所有请求都需要个人 API 密钥。使用 Authorization: Bearer hast_pk_... ,并在服务端保存密钥。

JSON
{
  "description": "Personal API key as `Bearer hast_pk_*` for `/api/public/v1`.",
  "in": "header",
  "name": "Authorization",
  "type": "apiKey"
}

Prompt

POST /api/public/v1/promptsSubmit a public Task Agent prompt

Creates a normal conversational Task Agent session when session_id is omitted, or appends a turn to an existing session. request_id is idempotent.

请求格式: application/json; 响应格式: application/json.

参数

request · body · 必填

JSON
{
  "description": "Public prompt request",
  "in": "body",
  "name": "request",
  "required": true,
  "schema": {
    "properties": {
      "dynamic_tools": {
        "items": {
          "additionalProperties": {},
          "type": "object"
        },
        "type": "array"
      },
      "files": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "model": {
        "example": "hast/auto",
        "type": "string"
      },
      "prompt": {
        "example": "Summarize the release notes.",
        "type": "string"
      },
      "reasoning_effort": {
        "example": "medium",
        "type": "string"
      },
      "request_id": {
        "example": "client-turn-1",
        "type": "string"
      },
      "secret_bindings": {
        "items": {
          "additionalProperties": {},
          "type": "object"
        },
        "type": "array"
      },
      "session_id": {
        "example": "sess_abc123",
        "type": "string"
      },
      "skill_ids": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "system_prompt": {
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

202 Accepted

JSON
{
  "properties": {
    "request_id": {
      "example": "client-turn-1",
      "type": "string"
    },
    "session_id": {
      "example": "sess_abc123",
      "type": "string"
    },
    "status": {
      "example": "dispatch_pending",
      "type": "string"
    }
  },
  "type": "object"
}

401 Unauthorized

JSON
{
  "properties": {
    "code": {
      "description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
      "example": 0,
      "type": "integer"
    },
    "message": {
      "description": "Message is a human-readable status or error description.",
      "example": "ok",
      "type": "string"
    }
  },
  "type": "object"
}

409 Conflict

JSON
{
  "properties": {
    "code": {
      "description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
      "example": 0,
      "type": "integer"
    },
    "message": {
      "description": "Message is a human-readable status or error description.",
      "example": "ok",
      "type": "string"
    }
  },
  "type": "object"
}

413 Request Entity Too Large

JSON
{
  "properties": {
    "code": {
      "description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
      "example": 0,
      "type": "integer"
    },
    "message": {
      "description": "Message is a human-readable status or error description.",
      "example": "ok",
      "type": "string"
    }
  },
  "type": "object"
}

会话与事件

GET /api/public/v1/sessionsList public Task Agent sessions

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

limit · query · 可选

JSON
{
  "description": "Page size (1-100, default 50)",
  "in": "query",
  "name": "limit",
  "type": "integer"
}

cursor · query · 可选

JSON
{
  "description": "Opaque cursor returned by the previous page",
  "in": "query",
  "name": "cursor",
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "type": "string"
    },
    "sessions": {
      "items": {
        "properties": {
          "event_cursor": {
            "type": "integer"
          },
          "mode": {
            "type": "string"
          },
          "runtime_provider": {
            "type": "string"
          },
          "session_id": {
            "example": "sess_abc123",
            "type": "string"
          },
          "status": {
            "example": "running",
            "type": "string"
          },
          "task_origin": {
            "example": "session",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
GET /api/public/v1/sessions/{id}Read a public Task Agent session

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Session ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "session": {
      "properties": {
        "event_cursor": {
          "type": "integer"
        },
        "mode": {
          "type": "string"
        },
        "runtime_provider": {
          "type": "string"
        },
        "session_id": {
          "example": "sess_abc123",
          "type": "string"
        },
        "status": {
          "example": "running",
          "type": "string"
        },
        "task_origin": {
          "example": "session",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
DELETE /api/public/v1/sessions/{id}Delete a public Task Agent session

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Session ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "task": {
      "properties": {
        "client_id": {
          "example": "client-main-user-123",
          "type": "string"
        },
        "config": {
          "additionalProperties": {},
          "type": "object"
        },
        "created_at": {
          "type": "string"
        },
        "event_cursor": {
          "example": 42,
          "type": "integer"
        },
        "id": {
          "example": "task-agent-123",
          "type": "string"
        },
        "mode": {
          "example": "agent_run",
          "type": "string"
        },
        "profile_id": {
          "example": "user_123",
          "type": "string"
        },
        "prompt": {
          "type": "string"
        },
        "runtime_provider": {
          "example": "cubesandbox",
          "type": "string"
        },
        "sandbox_id": {
          "example": "sandbox-main-user-123",
          "type": "string"
        },
        "sandbox_scope": {
          "example": "main",
          "type": "string"
        },
        "status": {
          "example": "needs_input",
          "type": "string"
        },
        "task_origin": {
          "example": "session",
          "type": "string"
        },
        "title": {
          "example": "Release validation",
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "workspace_object_prefix": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
POST /api/public/v1/sessions/{id}/cancelCancel a public Task Agent session

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Session ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "task": {
      "properties": {
        "client_id": {
          "example": "client-main-user-123",
          "type": "string"
        },
        "config": {
          "additionalProperties": {},
          "type": "object"
        },
        "created_at": {
          "type": "string"
        },
        "event_cursor": {
          "example": 42,
          "type": "integer"
        },
        "id": {
          "example": "task-agent-123",
          "type": "string"
        },
        "mode": {
          "example": "agent_run",
          "type": "string"
        },
        "profile_id": {
          "example": "user_123",
          "type": "string"
        },
        "prompt": {
          "type": "string"
        },
        "runtime_provider": {
          "example": "cubesandbox",
          "type": "string"
        },
        "sandbox_id": {
          "example": "sandbox-main-user-123",
          "type": "string"
        },
        "sandbox_scope": {
          "example": "main",
          "type": "string"
        },
        "status": {
          "example": "needs_input",
          "type": "string"
        },
        "task_origin": {
          "example": "session",
          "type": "string"
        },
        "title": {
          "example": "Release validation",
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        },
        "workspace_object_prefix": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
GET /api/public/v1/sessions/{id}/eventsList public Task Agent Event v2 events

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Session ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

after · query · 可选

JSON
{
  "description": "Return persisted events after this sequence",
  "in": "query",
  "name": "after",
  "type": "integer"
}

响应

200 OK

JSON
{
  "properties": {
    "events": {
      "items": {
        "discriminator": "type",
        "properties": {
          "created_at": {
            "example": "2026-08-16T12:00:00Z",
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "allOf": [
              {
                "properties": {
                  "attempt": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "attempts": {
                    "minimum": 1,
                    "type": "integer"
                  },
                  "channel": {
                    "enum": [
                      "stdout",
                      "stderr",
                      "progress"
                    ],
                    "type": "string"
                  },
                  "code": {
                    "type": "string"
                  },
                  "context_window": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "cost": {},
                  "delta": {
                    "type": "string"
                  },
                  "duration_ms": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "error": {
                    "type": "string"
                  },
                  "exit_code": {
                    "type": "integer"
                  },
                  "files": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "final_message_id": {
                    "type": "string"
                  },
                  "finish_reason": {
                    "type": "string"
                  },
                  "input": {},
                  "is_error": {
                    "type": "boolean"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "last": {
                    "properties": {
                      "cache_read_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "cache_write_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "input_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "output_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "reasoning_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "total_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "cache_read_tokens",
                      "cache_write_tokens",
                      "input_tokens",
                      "output_tokens",
                      "reasoning_tokens",
                      "total_tokens"
                    ],
                    "type": "object"
                  },
                  "message": {
                    "type": "string"
                  },
                  "message_id": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "model_source": {
                    "type": "string"
                  },
                  "modified_at": {
                    "format": "date-time",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "operation": {
                    "enum": [
                      "update",
                      "delete"
                    ],
                    "type": "string"
                  },
                  "options": {
                    "items": {},
                    "type": "array"
                  },
                  "output": {},
                  "parent_tool_call_id": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "plan_id": {
                    "type": "string"
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "reasoning_id": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "retryable": {
                    "type": "boolean"
                  },
                  "role": {
                    "enum": [
                      "user",
                      "assistant",
                      "system"
                    ],
                    "type": "string"
                  },
                  "scope": {
                    "type": "string"
                  },
                  "size_bytes": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "status": {
                    "enum": [
                      "starting",
                      "ready",
                      "failed",
                      "released",
                      "succeeded",
                      "interrupted"
                    ],
                    "type": "string"
                  },
                  "steps": {
                    "items": {
                      "properties": {
                        "status": {
                          "enum": [
                            "pending",
                            "in_progress",
                            "completed"
                          ],
                          "example": "in_progress",
                          "type": "string"
                        },
                        "step": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "status",
                        "step"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "text": {
                    "type": "string"
                  },
                  "tokens_after": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "tokens_before": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "tool_call_id": {
                    "type": "string"
                  },
                  "total": {
                    "properties": {
                      "cache_read_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "cache_write_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "input_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "output_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "reasoning_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      },
                      "total_tokens": {
                        "minimum": 0,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "cache_read_tokens",
                      "cache_write_tokens",
                      "input_tokens",
                      "output_tokens",
                      "reasoning_tokens",
                      "total_tokens"
                    ],
                    "type": "object"
                  },
                  "turn_type": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            ],
            "description": "Data is the HAST-owned payload union; Type selects its required shape as\ndefined in docs/reference/task-agent-event-v2.md."
          },
          "engine": {
            "enum": [
              "codex_cli",
              "pi_agent_cli"
            ],
            "example": "codex_cli",
            "type": "string"
          },
          "event_id": {
            "example": "evt_123",
            "type": "string"
          },
          "replayable": {
            "example": true,
            "type": "boolean"
          },
          "run_id": {
            "example": "run_123",
            "type": "string"
          },
          "schema_version": {
            "enum": [
              2
            ],
            "example": 2,
            "type": "integer"
          },
          "sequence": {
            "description": "Sequence is a positive durable order, or null for volatile events.",
            "example": 42,
            "minimum": 1,
            "type": "integer",
            "x-nullable": true
          },
          "session_id": {
            "example": "session_123",
            "type": "string"
          },
          "source": {
            "enum": [
              "runtime",
              "backplane",
              "workspace"
            ],
            "example": "runtime",
            "type": "string"
          },
          "task_id": {
            "example": "task_123",
            "type": "string"
          },
          "type": {
            "enum": [
              "runtime.status",
              "run.queued",
              "run.started",
              "run.retrying",
              "run.completed",
              "run.failed",
              "run.interrupted",
              "message.started",
              "message.delta",
              "message.completed",
              "reasoning.started",
              "reasoning.delta",
              "reasoning.completed",
              "tool.started",
              "tool.updated",
              "tool.completed",
              "plan.updated",
              "plan.completed",
              "usage.updated",
              "file.changed",
              "input.requested",
              "context.compacted",
              "warning",
              "error"
            ],
            "example": "message.completed",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "data",
          "engine",
          "event_id",
          "replayable",
          "schema_version",
          "sequence",
          "source",
          "task_id",
          "type"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "has_more": {
      "example": true,
      "type": "boolean"
    },
    "next_after": {
      "example": 42,
      "format": "int64",
      "type": "integer",
      "x-nullable": true
    }
  },
  "type": "object"
}
GET /api/public/v1/sessions/{id}/events/streamStream public Task Agent events

Event v2 SSE supports after and Last-Event-ID replay.

请求格式: 无指定请求正文格式; 响应格式: text/event-stream.

参数

id · path · 必填

JSON
{
  "description": "Session ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

after · query · 可选

JSON
{
  "description": "Return persisted events after this sequence",
  "in": "query",
  "name": "after",
  "type": "integer"
}

响应

200 SSE stream

JSON
{
  "type": "string"
}
POST /api/public/v1/sessions/{id}/interruptInterrupt a public Task Agent turn

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Session ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "request_id": {
      "example": "task-agent-turn-1710000000000000000",
      "type": "string"
    },
    "status": {
      "example": "queued",
      "type": "string"
    }
  },
  "type": "object"
}

202 Accepted

JSON
{
  "properties": {
    "request_id": {
      "example": "task-agent-turn-1710000000000000000",
      "type": "string"
    },
    "status": {
      "example": "queued",
      "type": "string"
    }
  },
  "type": "object"
}

技能

GET /api/public/v1/skillsList public Task Agent skills

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

规范未声明参数。

响应

200 OK

JSON
{
  "properties": {
    "skills": {
      "items": {
        "properties": {
          "capability_id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "directory_name": {
            "example": "e2e-summary",
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "entrypoint_path": {
            "example": "SKILL.md",
            "type": "string"
          },
          "files": {
            "items": {
              "properties": {
                "content": {
                  "type": "string"
                },
                "path": {
                  "example": "SKILL.md",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "hash": {
            "example": "sha256:abc123",
            "type": "string"
          },
          "skill_id": {
            "example": "e2e-summary",
            "type": "string"
          },
          "source": {
            "example": "user",
            "type": "string"
          },
          "status": {
            "example": "active",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
POST /api/public/v1/skillsCreate a public Task Agent skill

请求格式: application/json; 响应格式: application/json.

参数

request · body · 必填

JSON
{
  "description": "Skill request",
  "in": "body",
  "name": "request",
  "required": true,
  "schema": {
    "properties": {
      "description": {
        "type": "string"
      },
      "directory_name": {
        "example": "e2e-summary",
        "type": "string"
      },
      "display_name": {
        "example": "E2E Summary",
        "type": "string"
      },
      "enabled": {
        "type": "boolean"
      },
      "entrypoint_path": {
        "example": "SKILL.md",
        "type": "string"
      },
      "expected_checksum_sha256": {
        "type": "string"
      },
      "files": {
        "items": {
          "properties": {
            "content": {
              "type": "string"
            },
            "path": {
              "example": "SKILL.md",
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "skill_id": {
        "example": "e2e-summary",
        "type": "string"
      },
      "source_type": {
        "example": "upload",
        "type": "string"
      },
      "url": {
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "skill": {
      "properties": {
        "capability_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "directory_name": {
          "example": "e2e-summary",
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "entrypoint_path": {
          "example": "SKILL.md",
          "type": "string"
        },
        "files": {
          "items": {
            "properties": {
              "content": {
                "type": "string"
              },
              "path": {
                "example": "SKILL.md",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "hash": {
          "example": "sha256:abc123",
          "type": "string"
        },
        "skill_id": {
          "example": "e2e-summary",
          "type": "string"
        },
        "source": {
          "example": "user",
          "type": "string"
        },
        "status": {
          "example": "active",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
GET /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill

请求格式: application/json; 响应格式: application/json.

参数

skillID · path · 必填

JSON
{
  "description": "Skill ID",
  "in": "path",
  "name": "skillID",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Skill request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "description": {
        "type": "string"
      },
      "directory_name": {
        "example": "e2e-summary",
        "type": "string"
      },
      "display_name": {
        "example": "E2E Summary",
        "type": "string"
      },
      "enabled": {
        "type": "boolean"
      },
      "entrypoint_path": {
        "example": "SKILL.md",
        "type": "string"
      },
      "expected_checksum_sha256": {
        "type": "string"
      },
      "files": {
        "items": {
          "properties": {
            "content": {
              "type": "string"
            },
            "path": {
              "example": "SKILL.md",
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "skill_id": {
        "example": "e2e-summary",
        "type": "string"
      },
      "source_type": {
        "example": "upload",
        "type": "string"
      },
      "url": {
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "skill": {
      "properties": {
        "capability_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "directory_name": {
          "example": "e2e-summary",
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "entrypoint_path": {
          "example": "SKILL.md",
          "type": "string"
        },
        "files": {
          "items": {
            "properties": {
              "content": {
                "type": "string"
              },
              "path": {
                "example": "SKILL.md",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "hash": {
          "example": "sha256:abc123",
          "type": "string"
        },
        "skill_id": {
          "example": "e2e-summary",
          "type": "string"
        },
        "source": {
          "example": "user",
          "type": "string"
        },
        "status": {
          "example": "active",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
PUT /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill

请求格式: application/json; 响应格式: application/json.

参数

skillID · path · 必填

JSON
{
  "description": "Skill ID",
  "in": "path",
  "name": "skillID",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Skill request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "description": {
        "type": "string"
      },
      "directory_name": {
        "example": "e2e-summary",
        "type": "string"
      },
      "display_name": {
        "example": "E2E Summary",
        "type": "string"
      },
      "enabled": {
        "type": "boolean"
      },
      "entrypoint_path": {
        "example": "SKILL.md",
        "type": "string"
      },
      "expected_checksum_sha256": {
        "type": "string"
      },
      "files": {
        "items": {
          "properties": {
            "content": {
              "type": "string"
            },
            "path": {
              "example": "SKILL.md",
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "skill_id": {
        "example": "e2e-summary",
        "type": "string"
      },
      "source_type": {
        "example": "upload",
        "type": "string"
      },
      "url": {
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "skill": {
      "properties": {
        "capability_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "directory_name": {
          "example": "e2e-summary",
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "entrypoint_path": {
          "example": "SKILL.md",
          "type": "string"
        },
        "files": {
          "items": {
            "properties": {
              "content": {
                "type": "string"
              },
              "path": {
                "example": "SKILL.md",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "hash": {
          "example": "sha256:abc123",
          "type": "string"
        },
        "skill_id": {
          "example": "e2e-summary",
          "type": "string"
        },
        "source": {
          "example": "user",
          "type": "string"
        },
        "status": {
          "example": "active",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
PATCH /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill

请求格式: application/json; 响应格式: application/json.

参数

skillID · path · 必填

JSON
{
  "description": "Skill ID",
  "in": "path",
  "name": "skillID",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Skill request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "description": {
        "type": "string"
      },
      "directory_name": {
        "example": "e2e-summary",
        "type": "string"
      },
      "display_name": {
        "example": "E2E Summary",
        "type": "string"
      },
      "enabled": {
        "type": "boolean"
      },
      "entrypoint_path": {
        "example": "SKILL.md",
        "type": "string"
      },
      "expected_checksum_sha256": {
        "type": "string"
      },
      "files": {
        "items": {
          "properties": {
            "content": {
              "type": "string"
            },
            "path": {
              "example": "SKILL.md",
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "skill_id": {
        "example": "e2e-summary",
        "type": "string"
      },
      "source_type": {
        "example": "upload",
        "type": "string"
      },
      "url": {
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "skill": {
      "properties": {
        "capability_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "directory_name": {
          "example": "e2e-summary",
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "entrypoint_path": {
          "example": "SKILL.md",
          "type": "string"
        },
        "files": {
          "items": {
            "properties": {
              "content": {
                "type": "string"
              },
              "path": {
                "example": "SKILL.md",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "hash": {
          "example": "sha256:abc123",
          "type": "string"
        },
        "skill_id": {
          "example": "e2e-summary",
          "type": "string"
        },
        "source": {
          "example": "user",
          "type": "string"
        },
        "status": {
          "example": "active",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
DELETE /api/public/v1/skills/{skillID}Read, update, or delete a public Task Agent skill

请求格式: application/json; 响应格式: application/json.

参数

skillID · path · 必填

JSON
{
  "description": "Skill ID",
  "in": "path",
  "name": "skillID",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Skill request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "description": {
        "type": "string"
      },
      "directory_name": {
        "example": "e2e-summary",
        "type": "string"
      },
      "display_name": {
        "example": "E2E Summary",
        "type": "string"
      },
      "enabled": {
        "type": "boolean"
      },
      "entrypoint_path": {
        "example": "SKILL.md",
        "type": "string"
      },
      "expected_checksum_sha256": {
        "type": "string"
      },
      "files": {
        "items": {
          "properties": {
            "content": {
              "type": "string"
            },
            "path": {
              "example": "SKILL.md",
              "type": "string"
            }
          },
          "type": "object"
        },
        "type": "array"
      },
      "skill_id": {
        "example": "e2e-summary",
        "type": "string"
      },
      "source_type": {
        "example": "upload",
        "type": "string"
      },
      "url": {
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "skill": {
      "properties": {
        "capability_id": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "directory_name": {
          "example": "e2e-summary",
          "type": "string"
        },
        "display_name": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "entrypoint_path": {
          "example": "SKILL.md",
          "type": "string"
        },
        "files": {
          "items": {
            "properties": {
              "content": {
                "type": "string"
              },
              "path": {
                "example": "SKILL.md",
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": "array"
        },
        "hash": {
          "example": "sha256:abc123",
          "type": "string"
        },
        "skill_id": {
          "example": "e2e-summary",
          "type": "string"
        },
        "source": {
          "example": "user",
          "type": "string"
        },
        "status": {
          "example": "active",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

渠道

POST /api/public/v1/channels/{connection_id}/wechat-kf/accountsDiscover WeChat customer service accounts without saving credentials

Requires channels:write on a Profile key. Returns account names, IDs and management eligibility for an owned WeChat channel. Does not save the Secret or change bindings. Select an account with manage_privilege=true, then PATCH the WeChat setup with corp_secret and open_kfid.

请求格式: application/json; 响应格式: application/json.

参数

connection_id · path · 必填

JSON
{
  "type": "string",
  "description": "Owned WeChat channel connection ID",
  "name": "connection_id",
  "in": "path",
  "required": true
}

request · body · 必填

JSON
{
  "description": "Application Secret; never include in prompts or logs",
  "name": "request",
  "in": "body",
  "required": true,
  "schema": {
    "type": "object",
    "required": [
      "corp_secret"
    ],
    "properties": {
      "corp_secret": {
        "type": "string",
        "maxLength": 4096
      }
    }
  }
}

响应

200 OK

JSON
{
  "type": "object",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "manage_privilege": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "open_kfid": {
            "type": "string"
          }
        }
      }
    }
  }
}

400 wechat_credentials_invalid

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}

401 Missing or invalid API key

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}

403 Requires a Profile key with channels:write

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}

404 WeChat channel not found

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}

409 Channel account unavailable

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}

422 wechat_credentials_invalid, wechat_permission_denied, wechat_ip_not_allowed or wechat_accounts_unavailable

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}

502 wechat_accounts_unavailable

JSON
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "error": {
      "type": "string"
    }
  }
}
PATCH /api/public/v1/channels/{connection_id}/wechat-kfComplete WeChat customer service setup

请求格式: application/json; 响应格式: application/json.

参数

connection_id · path · 必填

JSON
{
  "type": "string",
  "description": "connection_id",
  "name": "connection_id",
  "in": "path",
  "required": true
}

request · body · 必填

JSON
{
  "description": "Complete WeChat customer service setup request",
  "name": "request",
  "in": "body",
  "required": true,
  "schema": {
    "type": "object",
    "required": [
      "corp_secret",
      "open_kfid"
    ],
    "properties": {
      "corp_secret": {
        "type": "string"
      },
      "open_kfid": {
        "type": "string"
      }
    }
  }
}

响应

200 OK

JSON
{
  "type": "object",
  "additionalProperties": true
}

记忆

GET /api/public/v1/memoriesList public Task Agent memories

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

规范未声明参数。

响应

200 OK

JSON
{
  "properties": {
    "memories": {
      "items": {
        "properties": {
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "additionalProperties": {},
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
POST /api/public/v1/memoriesCreate a public Task Agent memory

请求格式: application/json; 响应格式: application/json.

参数

request · body · 必填

JSON
{
  "description": "Memory request",
  "in": "body",
  "name": "request",
  "required": true,
  "schema": {
    "properties": {
      "content": {
        "example": "Prefer concise validation notes.",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "name": {
        "example": "project-preferences",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "memory": {
      "properties": {
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {},
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
GET /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory

请求格式: application/json; 响应格式: application/json.

参数

name · path · 必填

JSON
{
  "description": "Memory name",
  "in": "path",
  "name": "name",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Memory request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "content": {
        "example": "Prefer concise validation notes.",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "name": {
        "example": "project-preferences",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "memory": {
      "properties": {
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {},
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
PUT /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory

请求格式: application/json; 响应格式: application/json.

参数

name · path · 必填

JSON
{
  "description": "Memory name",
  "in": "path",
  "name": "name",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Memory request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "content": {
        "example": "Prefer concise validation notes.",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "name": {
        "example": "project-preferences",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "memory": {
      "properties": {
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {},
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
PATCH /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory

请求格式: application/json; 响应格式: application/json.

参数

name · path · 必填

JSON
{
  "description": "Memory name",
  "in": "path",
  "name": "name",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Memory request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "content": {
        "example": "Prefer concise validation notes.",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "name": {
        "example": "project-preferences",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "memory": {
      "properties": {
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {},
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
DELETE /api/public/v1/memories/{name}Read, update, or delete a public Task Agent memory

请求格式: application/json; 响应格式: application/json.

参数

name · path · 必填

JSON
{
  "description": "Memory name",
  "in": "path",
  "name": "name",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Memory request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "content": {
        "example": "Prefer concise validation notes.",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "name": {
        "example": "project-preferences",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "memory": {
      "properties": {
        "content": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "additionalProperties": {},
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

文件

GET /api/public/v1/filesList, download, or delete public workspace files

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

session_id · query · 可选

JSON
{
  "description": "Session ID",
  "in": "query",
  "name": "session_id",
  "type": "string"
}

path · query · 可选

JSON
{
  "description": "Workspace directory path",
  "in": "query",
  "name": "path",
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "has_more": {
      "type": "boolean"
    },
    "items": {
      "items": {
        "properties": {
          "file_id": {
            "example": "opaque-file-id",
            "type": "string"
          },
          "id": {
            "example": "opaque-file-id",
            "type": "string"
          },
          "name": {
            "example": "report.csv",
            "type": "string"
          },
          "path": {
            "example": "uploads/upload-id/report.csv",
            "type": "string"
          },
          "relative_path": {
            "example": "uploads/upload-id/report.csv",
            "type": "string"
          },
          "session_id": {
            "type": "string"
          },
          "size_bytes": {
            "example": 1024,
            "type": "integer"
          },
          "type": {
            "example": "file",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "next_cursor": {
      "type": "string"
    }
  },
  "type": "object"
}
POST /api/public/v1/filesUpload a public Task Agent file

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

file · formData · 必填

JSON
{
  "description": "File",
  "in": "formData",
  "name": "file",
  "required": true,
  "type": "file"
}

响应

201 Created

JSON
{
  "properties": {
    "file": {
      "properties": {
        "file_id": {
          "example": "opaque-file-id",
          "type": "string"
        },
        "id": {
          "example": "opaque-file-id",
          "type": "string"
        },
        "name": {
          "example": "report.csv",
          "type": "string"
        },
        "path": {
          "example": "uploads/upload-id/report.csv",
          "type": "string"
        },
        "relative_path": {
          "example": "uploads/upload-id/report.csv",
          "type": "string"
        },
        "session_id": {
          "type": "string"
        },
        "size_bytes": {
          "example": 1024,
          "type": "integer"
        },
        "type": {
          "example": "file",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
GET /api/public/v1/files.zipDownload a public workspace ZIP

请求格式: 无指定请求正文格式; 响应格式: application/zip.

参数

session_id · query · 可选

JSON
{
  "description": "Session ID",
  "in": "query",
  "name": "session_id",
  "type": "string"
}

响应

200 Workspace ZIP

JSON
{
  "type": "file"
}
GET /api/public/v1/files/{relativePath}Download or delete a public workspace file

请求格式: 无指定请求正文格式; 响应格式: application/octet-stream.

参数

relativePath · path · 必填

JSON
{
  "description": "Workspace relative path",
  "in": "path",
  "name": "relativePath",
  "required": true,
  "type": "string"
}

session_id · query · 可选

JSON
{
  "description": "Session ID",
  "in": "query",
  "name": "session_id",
  "type": "string"
}

file_id · query · 必填

JSON
{
  "description": "Opaque file ID",
  "in": "query",
  "name": "file_id",
  "required": true,
  "type": "string"
}

响应

200 Workspace file

JSON
{
  "type": "file"
}
DELETE /api/public/v1/files/{relativePath}Download or delete a public workspace file

请求格式: 无指定请求正文格式; 响应格式: application/octet-stream.

参数

relativePath · path · 必填

JSON
{
  "description": "Workspace relative path",
  "in": "path",
  "name": "relativePath",
  "required": true,
  "type": "string"
}

session_id · query · 可选

JSON
{
  "description": "Session ID",
  "in": "query",
  "name": "session_id",
  "type": "string"
}

file_id · query · 必填

JSON
{
  "description": "Opaque file ID",
  "in": "query",
  "name": "file_id",
  "required": true,
  "type": "string"
}

响应

200 Workspace file

JSON
{
  "type": "file"
}

连接器

GET /api/public/v1/connectors/accountsList public connector accounts

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

规范未声明参数。

响应

200 OK

JSON
{
  "properties": {
    "connector_accounts": {
      "items": {
        "additionalProperties": {},
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
GET /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account

请求格式: application/json; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Connector account ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Connector account request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "external_account_ref": {
        "example": "connected-account-id",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "provider": {
        "example": "github",
        "type": "string"
      },
      "status": {
        "example": "connected",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "connector_account": {
      "additionalProperties": {},
      "type": "object"
    }
  },
  "type": "object"
}
PUT /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account

请求格式: application/json; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Connector account ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Connector account request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "external_account_ref": {
        "example": "connected-account-id",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "provider": {
        "example": "github",
        "type": "string"
      },
      "status": {
        "example": "connected",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "connector_account": {
      "additionalProperties": {},
      "type": "object"
    }
  },
  "type": "object"
}
PATCH /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account

请求格式: application/json; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Connector account ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Connector account request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "external_account_ref": {
        "example": "connected-account-id",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "provider": {
        "example": "github",
        "type": "string"
      },
      "status": {
        "example": "connected",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "connector_account": {
      "additionalProperties": {},
      "type": "object"
    }
  },
  "type": "object"
}
DELETE /api/public/v1/connectors/accounts/{id}Read, update, or delete a public connector account

请求格式: application/json; 响应格式: application/json.

参数

id · path · 必填

JSON
{
  "description": "Connector account ID",
  "in": "path",
  "name": "id",
  "required": true,
  "type": "string"
}

request · body · 可选

JSON
{
  "description": "Connector account request",
  "in": "body",
  "name": "request",
  "schema": {
    "properties": {
      "external_account_ref": {
        "example": "connected-account-id",
        "type": "string"
      },
      "metadata": {
        "additionalProperties": {},
        "type": "object"
      },
      "provider": {
        "example": "github",
        "type": "string"
      },
      "status": {
        "example": "connected",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "connector_account": {
      "additionalProperties": {},
      "type": "object"
    }
  },
  "type": "object"
}
GET /api/public/v1/connectors/catalogList public connector catalog

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

规范未声明参数。

响应

200 OK

JSON
{
  "properties": {
    "agent_id": {
      "type": "string"
    },
    "connection_scope": {
      "type": "string"
    },
    "connectors": {
      "items": {
        "properties": {
          "account_label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "label": {
            "example": "GitHub",
            "type": "string"
          },
          "logo": {
            "type": "string"
          },
          "provider": {
            "example": "github",
            "type": "string"
          },
          "runtime_provider": {
            "example": "composio",
            "type": "string"
          },
          "start_url": {
            "type": "string"
          },
          "status": {
            "example": "connected",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "has_more": {
      "type": "boolean"
    },
    "limit": {
      "example": 20,
      "type": "integer"
    },
    "next_cursor": {
      "type": "string"
    },
    "profile_id": {
      "type": "string"
    },
    "search": {
      "example": "github",
      "type": "string"
    }
  },
  "type": "object"
}
GET /api/public/v1/connectors/statusList public connector status

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

规范未声明参数。

响应

200 OK

JSON
{
  "properties": {
    "agent_id": {
      "type": "string"
    },
    "connection_scope": {
      "type": "string"
    },
    "connectors": {
      "items": {
        "properties": {
          "account_label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "label": {
            "example": "GitHub",
            "type": "string"
          },
          "logo": {
            "type": "string"
          },
          "provider": {
            "example": "github",
            "type": "string"
          },
          "runtime_provider": {
            "example": "composio",
            "type": "string"
          },
          "start_url": {
            "type": "string"
          },
          "status": {
            "example": "connected",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "has_more": {
      "type": "boolean"
    },
    "limit": {
      "example": 20,
      "type": "integer"
    },
    "next_cursor": {
      "type": "string"
    },
    "profile_id": {
      "type": "string"
    },
    "search": {
      "example": "github",
      "type": "string"
    }
  },
  "type": "object"
}
POST /api/public/v1/connectors/{provider}/oauth/authorizeStart public connector OAuth authorization

请求格式: application/json; 响应格式: application/json.

参数

provider · path · 必填

JSON
{
  "description": "Connector provider",
  "in": "path",
  "name": "provider",
  "required": true,
  "type": "string"
}

响应

200 OK

JSON
{
  "properties": {
    "auth_url": {
      "type": "string"
    },
    "connected_account_id": {
      "type": "string"
    }
  },
  "type": "object"
}

密钥

GET /api/public/v1/secretsList User Secrets

Lists owned User Secret metadata. Secret values are write-only and are never returned.

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

规范未声明参数。

响应

200 OK

JSON
{
  "properties": {
    "secrets": {
      "items": {
        "properties": {
          "created_at": {
            "type": "string"
          },
          "id": {
            "example": "sec_123",
            "type": "string"
          },
          "name": {
            "example": "kubeconfig",
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
POST /api/public/v1/secretsCreate a User Secret

Creates a write-only User Secret. The response returns metadata only.

请求格式: application/json; 响应格式: application/json.

参数

request · body · 必填

JSON
{
  "description": "Secret request",
  "in": "body",
  "name": "request",
  "required": true,
  "schema": {
    "properties": {
      "name": {
        "example": "kubeconfig",
        "type": "string"
      },
      "value": {
        "example": "write-only",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

201 Created

JSON
{
  "properties": {
    "secret": {
      "properties": {
        "created_at": {
          "type": "string"
        },
        "id": {
          "example": "sec_123",
          "type": "string"
        },
        "name": {
          "example": "kubeconfig",
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
PATCH /api/public/v1/secrets/{secretID}Update a User Secret value

Replaces the write-only Secret value. The response returns metadata only.

请求格式: application/json; 响应格式: application/json.

参数

secretID · path · 必填

JSON
{
  "description": "Secret ID",
  "in": "path",
  "name": "secretID",
  "required": true,
  "type": "string"
}

request · body · 必填

JSON
{
  "description": "Secret request",
  "in": "body",
  "name": "request",
  "required": true,
  "schema": {
    "properties": {
      "value": {
        "example": "write-only",
        "type": "string"
      }
    },
    "type": "object"
  }
}

响应

200 OK

JSON
{
  "properties": {
    "secret": {
      "properties": {
        "created_at": {
          "type": "string"
        },
        "id": {
          "example": "sec_123",
          "type": "string"
        },
        "name": {
          "example": "kubeconfig",
          "type": "string"
        },
        "updated_at": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}

404 Not Found

JSON
{
  "properties": {
    "code": {
      "description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
      "example": 0,
      "type": "integer"
    },
    "message": {
      "description": "Message is a human-readable status or error description.",
      "example": "ok",
      "type": "string"
    }
  },
  "type": "object"
}
DELETE /api/public/v1/secrets/{secretID}Delete a User Secret

请求格式: 无指定请求正文格式; 响应格式: application/json.

参数

secretID · path · 必填

JSON
{
  "description": "Secret ID",
  "in": "path",
  "name": "secretID",
  "required": true,
  "type": "string"
}

响应

204 No Content

404 Not Found

JSON
{
  "properties": {
    "code": {
      "description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
      "example": 0,
      "type": "integer"
    },
    "message": {
      "description": "Message is a human-readable status or error description.",
      "example": "ok",
      "type": "string"
    }
  },
  "type": "object"
}

409 Conflict

JSON
{
  "properties": {
    "code": {
      "description": "Code is the business status code (0 = success; see pkg/utils/errors.go).",
      "example": 0,
      "type": "integer"
    },
    "message": {
      "description": "Message is a human-readable status or error description.",
      "example": "ok",
      "type": "string"
    }
  },
  "type": "object"
}

获取微信客服账号

创建微信客服渠道草稿并完成企业微信授权后,使用带 channels:write 的 Profile API key 调用 POST /api/public/v1/channels/{connection_id}/wechat-kf/accounts。写入权限包含读取;单 Agent 对话 key 无法使用此接口。

请求体(Secret 占位符只通过客户端安全参数替换,不要写入提示词或日志):

{"corp_secret":"<APPLICATION_SECRET>"}

成功返回 200

{"accounts":[{"open_kfid":"wk-example","name":"Customer support","manage_privilege":true}]}

按名称选择 manage_privilege: true 的账号。只有一个可管理账号时可以预选,多个时由用户选择;空列表也是有效结果。获取列表不会保存 Secret 或修改绑定。确认后向 PATCH /api/public/v1/channels/{connection_id}/wechat-kf 提交同一个 corp_secret 和选中的 open_kfid,后端会再次校验管理权限。

400/422 wechat_credentials_invalid:检查应用 Secret 和企业 ID;422 wechat_permission_denied:授权应用调用客服 API;422 wechat_ip_not_allowed:配置可信出口 IP;422/502 wechat_accounts_unavailable:稍后重试。401/403 检查 API key 和权限,404 检查渠道归属,409 检查渠道账号初始化。

认识 Hast了解 Hast AIP、Hast Agent、Hast GTM,以及 FDE 团队的交付方式。AIP 产品介绍了解 FDE 交付平台的定位,以及 Agent 工作台如何支持业务接入。创建第一个 Agent用一个不依赖外部服务的例子,完成配置、保存和调试。配置与管理 Agent设置职责、模型和能力,维护当前生效的配置。管理 Skills编写、导入和选择 Agent 使用的技能文件。添加知识库把网址或文件加入资料库,等待索引后供 Agent 检索。管理业务密钥保存凭证并绑定到 Agent,避免在配置示例中写入真实值。连接业务工具让 Agent 调用已有 HTTP 服务,并明确参数和认证方式。设置长期记忆决定 Agent 能读取哪些记忆,以及新记忆写到哪里。调试 Agent测试保存后的配置,检查连续对话和工具结果。导入、导出与复制复用配置,并在迁移后重新检查资源和凭证。HTTP 接入从服务端调用 Agent,继续对话、读取回复并停止生成。MCP 接入连接外部 Agent 客户端,通过同一把 Public API Key 使用 AIP 工具。Task Agent 产品介绍了解 Hast Agent 如何规划、执行并交付任务,持续使用文件、工具与业务背景。完成第一个任务从需求描述开始,确认计划并检查最终结果。规划、执行与管理对话调整计划,停止当前执行,并管理历史对话。上传、查看与下载文件为任务提供输入资料,并保存执行产物。连接应用与设置能力授权外部应用,并维护任务需要的长期上下文。创建定时任务配置周期、时区和任务要求,查看每次运行结果。Task Agent 常见问题按当前状态检查权限、连接、任务和文件。快速开始创建个人 API 密钥,提交第一条任务并读取执行事件。事件流连接 SSE,处理 HAST Event v2,并在断线后恢复读取。API 文档按 OpenAPI JSON 查看公开接口的参数、认证与响应结构。GTM 产品介绍从网站建立共享项目背景,衔接市场调研、可见度分析和营销内容工作。创建第一个 GTM 项目输入网站,等待初始化,并检查第一批分析结果。管理项目与网站资料切换项目、刷新网站上下文,维护项目名称。公司分析与项目文档检查产品、竞品和营销资料,作为内容任务的背景。SEO 与网站性能阅读 PageSpeed 结果,分别检查移动端和桌面端。AI 品牌提及查看买家问题,以及模型回答是否提到你的品牌。连接 Google Analytics授权账户、选择 GA 属性,并查看流量报告。生成与发布 X 草稿生成帖子,检查预览,再到 X 完成发布。生成文章草稿设定风格、语言和读者,审阅并复制 Markdown。使用 Growth Agent通过项目内对话读取资料或发起后台操作。运行状态与常见问题检查排队、依赖和结果,避免把未完成误当作无数据。套餐与用量查看当前身份的权益、使用情况和账单。