---
title: "回答 Agent 的交互请求"
method: POST
path: "/agent/prompts/{prompt_id}"
tags: ["Agent"]
---

# 回答 Agent 的交互请求

`POST /agent/prompts/{prompt_id}`

## Request

- Base URL: `/api/v1` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/v1/agent/prompts/{prompt_id}`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `X-API-Key`

回答 Agent 运行中发起的交互（ask_user 提问、工具审批，或由浏览器自动应答的页面读写）。
kind 须与交互一致，response 为该类型的回答 JSON（不接受未知字段）：
ask_user 为 {selected?, values?, text?, declined?}；
tool_approval 为 {approved: bool, modified_args?: object, reason?: string, allow_in_session?: bool}；
page_action 为 {declined?, error?, location?, snapshot?, applied?: [{ref, label?, summary?}],
stayed?, return_path?}。
返回 resumed=true 表示挂起的运行已请求恢复（自动化由调度器恢复），客户端需携带 resume_pending_id 重新接入该消息的事件流

## Path parameters

- `prompt_id` string, required

## Request body

- object

## Response `200`

{success: true, resumed: bool}

- object

## Other responses

- `400`: 回答不合法或交互已结束
- `404`: 交互不存在

## Changes

- **2026-10-14** `7909fe890afd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/agent/prompts/:prompt_id/post.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) - [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tencentblueking/apis/weknora-api/revisions/685d1f9fce30?raw)
