Task Agent
API 文档
按 OpenAPI JSON 查看公开接口的参数、认证与响应结构。
OpenAPI JSON
接口定义来自 产品内 Task Agent API 文档 链接的 Backplane 规范。下方按资源分组展示公开接口,展开可查看参数、请求体、响应状态和数据结构。开始调用前请阅读 快速开始,流式接入见 事件流。
37 个公开接口。参数、响应和认证定义直接来自 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_... ,并在服务端保存密钥。
{
"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 · 必填
{
"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
{
"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
{
"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
{
"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
{
"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 · 可选
{
"description": "Page size (1-100, default 50)",
"in": "query",
"name": "limit",
"type": "integer"
}cursor · query · 可选
{
"description": "Opaque cursor returned by the previous page",
"in": "query",
"name": "cursor",
"type": "string"
}响应
200 OK
{
"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 · 必填
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}响应
200 OK
{
"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 · 必填
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}响应
200 OK
{
"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 · 必填
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}响应
200 OK
{
"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 · 必填
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}after · query · 可选
{
"description": "Return persisted events after this sequence",
"in": "query",
"name": "after",
"type": "integer"
}响应
200 OK
{
"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 · 必填
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}after · query · 可选
{
"description": "Return persisted events after this sequence",
"in": "query",
"name": "after",
"type": "integer"
}响应
200 SSE stream
{
"type": "string"
}POST /api/public/v1/sessions/{id}/interruptInterrupt a public Task Agent turn
请求格式: 无指定请求正文格式; 响应格式: application/json.
参数
id · path · 必填
{
"description": "Session ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}响应
200 OK
{
"properties": {
"request_id": {
"example": "task-agent-turn-1710000000000000000",
"type": "string"
},
"status": {
"example": "queued",
"type": "string"
}
},
"type": "object"
}202 Accepted
{
"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
{
"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 · 必填
{
"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
{
"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 · 必填
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Skill ID",
"in": "path",
"name": "skillID",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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/memoriesList public Task Agent memories
请求格式: 无指定请求正文格式; 响应格式: application/json.
参数
规范未声明参数。
响应
200 OK
{
"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 · 必填
{
"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
{
"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 · 必填
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Memory name",
"in": "path",
"name": "name",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 可选
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}path · query · 可选
{
"description": "Workspace directory path",
"in": "query",
"name": "path",
"type": "string"
}响应
200 OK
{
"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 · 必填
{
"description": "File",
"in": "formData",
"name": "file",
"required": true,
"type": "file"
}响应
201 Created
{
"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 · 可选
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}响应
200 Workspace ZIP
{
"type": "file"
}GET /api/public/v1/files/{relativePath}Download or delete a public workspace file
请求格式: 无指定请求正文格式; 响应格式: application/octet-stream.
参数
relativePath · path · 必填
{
"description": "Workspace relative path",
"in": "path",
"name": "relativePath",
"required": true,
"type": "string"
}session_id · query · 可选
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}file_id · query · 必填
{
"description": "Opaque file ID",
"in": "query",
"name": "file_id",
"required": true,
"type": "string"
}响应
200 Workspace file
{
"type": "file"
}DELETE /api/public/v1/files/{relativePath}Download or delete a public workspace file
请求格式: 无指定请求正文格式; 响应格式: application/octet-stream.
参数
relativePath · path · 必填
{
"description": "Workspace relative path",
"in": "path",
"name": "relativePath",
"required": true,
"type": "string"
}session_id · query · 可选
{
"description": "Session ID",
"in": "query",
"name": "session_id",
"type": "string"
}file_id · query · 必填
{
"description": "Opaque file ID",
"in": "query",
"name": "file_id",
"required": true,
"type": "string"
}响应
200 Workspace file
{
"type": "file"
}连接器
GET /api/public/v1/connectors/accountsList public connector accounts
请求格式: 无指定请求正文格式; 响应格式: application/json.
参数
规范未声明参数。
响应
200 OK
{
"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 · 必填
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"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 · 必填
{
"description": "Connector account ID",
"in": "path",
"name": "id",
"required": true,
"type": "string"
}request · body · 可选
{
"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
{
"properties": {
"connector_account": {
"additionalProperties": {},
"type": "object"
}
},
"type": "object"
}GET /api/public/v1/connectors/catalogList public connector catalog
请求格式: 无指定请求正文格式; 响应格式: application/json.
参数
规范未声明参数。
响应
200 OK
{
"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
{
"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 · 必填
{
"description": "Connector provider",
"in": "path",
"name": "provider",
"required": true,
"type": "string"
}响应
200 OK
{
"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
{
"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 · 必填
{
"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
{
"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 · 必填
{
"description": "Secret ID",
"in": "path",
"name": "secretID",
"required": true,
"type": "string"
}request · body · 必填
{
"description": "Secret request",
"in": "body",
"name": "request",
"required": true,
"schema": {
"properties": {
"value": {
"example": "write-only",
"type": "string"
}
},
"type": "object"
}
}响应
200 OK
{
"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
{
"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 · 必填
{
"description": "Secret ID",
"in": "path",
"name": "secretID",
"required": true,
"type": "string"
}响应
204 No Content
404 Not Found
{
"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
{
"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"
}