最重要的端点。一条 prompt 进,流式 events 出,最后一个Documentation Index
Fetch the complete documentation index at: https://docs.inplain.app/llms.txt
Use this file to discover all available pages before exploring further.
doc event 带完整 source。
Request
| Field | Type | 含义 |
|---|---|---|
prompt | string | 必填,自然语言指令 |
kind | ”deck” | “doc” | “sheet” | 当前 tab 类型;不传由 router 判断 |
current | string | 当前 source(若是 edit 操作) |
workspace | array | 跨文档引用上下文(@ref 用) |
history | array | 最近 N 轮对话(让”再短点”等指令有上下文) |
mode | ”brief” | “feature” | brief=8-12 页、feature=18-28 页长文 |
Response
Content-Type: application/x-ndjson — 一行一个 event:
| Event | 含义 |
|---|---|
phase | 状态切换 |
intent | router 判断的 action + target |
reasoning | 边写边给的过程文字(可选展示) |
delta | 中间 partial JSON(给 progressive UI) |
patch | 编辑模式产出 JSON Patch 操作 |
doc | 最终完整 source + parsed doc |
error | { code, message },流终止 |
Demo 端点(公开,限流)
POST /api/agent/demo — 同样 schema 但:
- 无需 auth
- 5 / 24h / IP 限流
- 仅 generate(不接 current/edit)
- prompt 上限 200 字