Skip to content

提示词资产 API

管理项目级提示词模板和上下文片段,用于增强 AI Agent 的任务执行。

列出提示词资产

http
GET /api/v1/projects/{project_id}/prompt-assets
Authorization: Bearer <token>

创建提示词资产

http
POST /api/v1/projects/{project_id}/prompt-assets
Content-Type: application/json

{
  "name": "编码规范",
  "type": "context",
  "content": "本项目使用 Python 3.12,遵循 PEP 8 风格...",
  "auto_include": true
}
字段类型说明
namestring资产名称
typestringcontextinstructiontemplate
contentstring提示词内容
auto_includeboolean是否自动包含在所有任务提示词中

更新提示词资产

http
PUT /api/v1/prompt-assets/{asset_id}
Content-Type: application/json

{
  "content": "更新后的内容..."
}

删除提示词资产

http
DELETE /api/v1/prompt-assets/{asset_id}

Forgexa — AI 软件工厂