ae-kb
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseae-kb
ae-kb
AE CLI () knowledge base commands are invoked through:
ae-clibash
ae-cli kb +<command> [options]AE CLI()知识库命令通过以下方式调用:
ae-clibash
ae-cli kb +<command> [options]Global Rules
全局规则
- Use this skill for TE/AE knowledge base tasks: create, query, ask with LLM, list accessible knowledge bases, inspect indexes, grep pages, read pages, check status, upload sources, add URL sources, generate schema, compile, remove source files, and delete knowledge bases.
- Read operations can run directly after required inputs are known. Write operations require explicit user intent and normally keep the confirmation prompt unless the user asks to bypass it.
- Prefer before destructive or broad writes when the user has not already validated the target.
--dry-run - Do not invent knowledge base names, scopes, source display names, or JSON payloads. Ask the user or query known context when values are missing.
- JSON flags must be valid JSON strings, usually wrapped in single quotes in shell commands.
- Successful commands return JSON by default. Use only when a table is easier for a human to scan. Envelope may include optional
--format table._notice.host_compat - overrides the active AE host. It is available on every command and may be placed after the subcommand, e.g.
--host <url>.ae-cli kb +<command> --host <url> - CRITICAL — Host compat (do this first): After each run, check stderr and
ae-cli. If either is present, open the user reply with a short ⚠️ version warning and quote the_notice.host_compat/npm i -g(or update-cluster) lines verbatim, then present the business result. Soft tip;npx skills addcan still carry the notice.ok: true - For external-agent retrieval, prefer the deterministic flow ->
+index->+grep: inspect navigation, locate candidate pages, then open the exact page or line window. Use+readonly when the user wants an LLM-synthesized answer and accepts token consumption.+ask
- 本技能适用于TE/AE知识库相关任务:创建、查询、LLM问答、列出可访问知识库、查看索引、搜索页面、读取页面、检查状态、上传源、添加URL源、生成Schema、编译、移除源文件以及删除知识库。
- 读取操作在获取必要输入后可直接执行。写入操作需要明确的用户意图,通常保留确认提示,除非用户要求跳过。
- 当用户尚未验证目标时,在执行破坏性或大范围写入操作前优先使用。
--dry-run - 不得自行编造知识库名称、范围、源显示名称或JSON payload。当缺少必要值时,询问用户或查询已知上下文。
- JSON参数必须是有效的JSON字符串,在Shell命令中通常用单引号包裹。
- 成功执行的命令默认返回JSON格式结果。仅当表格更便于人工浏览时使用。返回结果可能包含可选的
--format table字段。_notice.host_compat - 可覆盖当前激活的AE主机地址。该参数适用于所有命令,可放在子命令之后,例如
--host <url>。ae-cli kb +<command> --host <url> - 关键注意事项——主机兼容性(优先处理):每次执行后,检查标准错误输出和
ae-cli字段。如果存在其中任意一项,在回复用户时先以简短的⚠️版本警告开头,并逐字引用_notice.host_compat/npm i -g(或update-cluster)的命令行,再展示业务执行结果。提示:即使npx skills add也可能包含该通知。ok: true - 对于外部Agent检索,优先使用确定性流程->
+index->+grep:先查看导航结构,定位候选页面,再打开具体页面或指定行范围。仅当用户需要LLM生成的综合答案且接受令牌消耗时,才使用+read。+ask
Commands
命令列表
| Command | Risk | Purpose |
|---|---|---|
| read | Query one or more knowledge bases with a natural-language question. |
| read | LLM-powered Q&A over knowledge bases. Consumes platform tokens. |
| read | List accessible knowledge bases filtered by buildStatus (default: compiled). |
| read | List accessible knowledge bases and their |
| read | Keyword-search knowledge base pages and return matched lines with context. |
| read | Read a full knowledge base page or a line window. |
| write | Create a new personal or company knowledge base. |
| write | Upload local files, a non-recursive directory, or HTTP(S) pages converted to markdown. |
| write | Upload a URL source directly with optional display name and parsing instruction. |
| write | Generate the compile schema for a knowledge base. |
| write | Compile a knowledge base in incremental or full mode. |
| read | Query the current status of a knowledge base. |
| write | Delete one source file from a knowledge base by display name. |
| write | Delete an entire knowledge base. |
| 命令 | 风险等级 | 用途 |
|---|---|---|
| 只读 | 用自然语言问题查询一个或多个知识库。 |
| 只读 | 基于LLM的知识库问答,会消耗平台令牌。 |
| 只读 | 列出符合buildStatus过滤条件的可访问知识库(默认:已编译)。 |
| 只读 | 列出可访问知识库及其 |
| 只读 | 按关键词搜索知识库页面,并返回带上下文的匹配行。 |
| 只读 | 读取完整的知识库页面或指定行范围。 |
| 写入 | 创建新的个人或企业知识库。 |
| 写入 | 上传本地文件、非递归目录,或抓取HTTP(S)页面并转换为Markdown格式后上传。 |
| 写入 | 直接上传URL源,可选择指定显示名称和解析指令。 |
| 写入 | 为知识库生成编译Schema。 |
| 写入 | 以增量或全量模式编译知识库。 |
| 只读 | 查询知识库的当前状态。 |
| 写入 | 按显示名称删除知识库中的单个源文件。 |
| 写入 | 删除整个知识库。 |
Common Workflows
常见工作流
Create a Knowledge Base
创建知识库
Use with name. is optional and defaults to ; valid scopes are and .
+new--scopecompanypersonalcompanybash
ae-cli kb +new \
--scope company \
--name engineering-handbook \
--description "Engineering handbook" \
--tags '["engineering","handbook"]'Optional fields:
- : scope, defaults to
--scope.company - : description, up to 200 characters.
--description - : JSON array, max 2 tags, each up to 15 characters.
--tags - : optional project ID to bind.
--project-id - : optional project display name.
--project-name
使用命令并指定名称。为可选参数,默认值为;可选值为和。
+new--scopecompanypersonalcompanybash
ae-cli kb +new \
--scope company \
--name engineering-handbook \
--description "Engineering handbook" \
--tags '["engineering","handbook"]'可选字段:
- :范围,默认值为
--scope。company - :描述,最多200字符。
--description - :JSON数组,最多2个标签,每个标签最多15字符。
--tags - :可选的绑定项目ID。
--project-id - :可选的项目显示名称。
--project-name
Upload Files or Directories
上传文件或目录
Use when sources are local files, local directories, or pages that should be fetched and converted to markdown before upload.
+addbash
ae-cli kb +add \
--name engineering-handbook \
--files '["./README.md","./docs","https://example.com/guide"]'Input rules:
- must be a JSON array of strings.
--files - Local directory reading is non-recursive.
- URL entries must start with or
http://.https:// - Supported extensions include markdown/text, office documents, PDFs, spreadsheets, presentations, and common images. Local files are uploaded as multipart file blobs; HTTP(S) pages are fetched and converted to markdown before upload.
- Duplicate filenames are automatically suffixed as ,
name-1.ext, etc.name-2.ext
当源为本地文件、本地目录或需要抓取并转换为Markdown的页面时,使用命令。
+addbash
ae-cli kb +add \
--name engineering-handbook \
--files '["./README.md","./docs","https://example.com/guide"]'输入规则:
- 必须是字符串类型的JSON数组。
--files - 本地目录读取为非递归模式。
- URL条目必须以或
http://开头。https:// - 支持的文件类型包括Markdown/文本、办公文档、PDF、电子表格、演示文稿和常见图片。本地文件以多部分文件Blob形式上传;HTTP(S)页面会被抓取并转换为Markdown后上传。
- 重复文件名会自动添加后缀,格式为、
name-1.ext等。name-2.ext
Add a URL Source
添加URL源
Use when adding one URL source and optionally passing a display name or parsing instruction.
+urlbash
ae-cli kb +url \
--name engineering-handbook \
--url https://example.com/guide \
--display-name guide \
--parse-instruction "Keep headings and code blocks"--urlhttp(s)当添加单个URL源并可选指定显示名称或解析指令时,使用命令。
+urlbash
ae-cli kb +url \
--name engineering-handbook \
--url https://example.com/guide \
--display-name guide \
--parse-instruction "Keep headings and code blocks"--urlhttp(s)Generate Schema and Compile
生成Schema并编译
Generate the schema first when the knowledge base needs a compile schema.
bash
ae-cli kb +schema --name engineering-handbookUse only to recover a stuck status. Use only when the user provides the model display name.
--forcegenerating--modelCompile after sources and schema are ready:
bash
ae-cli kb +compile --name engineering-handbook --mode incrementalValid compile modes are and ; default is .
incrementalfullincremental当知识库需要编译Schema时,先执行生成Schema的操作。
bash
ae-cli kb +schema --name engineering-handbook仅当恢复卡住的状态时使用。仅当用户提供模型显示名称时使用。
generating--force--model源文件和Schema准备完成后进行编译:
bash
ae-cli kb +compile --name engineering-handbook --mode incremental有效的编译模式为和;默认值为。
incrementalfullincrementalCheck Knowledge Base Status
检查知识库状态
Use to inspect the current status of a knowledge base.
+statusbash
ae-cli kb +status --name engineering-handbook使用命令查看知识库的当前状态。
+statusbash
ae-cli kb +status --name engineering-handbookQuery Knowledge
查询知识
Use with a natural-language question. Optionally scope to specific knowledge bases or tune result count and locale.
+querybash
ae-cli kb +query \
--query "How do we release a dashboard?" \
--sources '[{"scope":"company","name":"engineering-handbook"}]' \
--top-k 10 \
--locale zhWhen is provided, each entry requires:
--sources- : knowledge base scope such as
scopeorpersonal.company - : knowledge base name.
name
使用命令并传入自然语言问题。可选择限定特定知识库,或调整结果数量和区域设置。
+querybash
ae-cli kb +query \
--query "How do we release a dashboard?" \
--sources '[{"scope":"company","name":"engineering-handbook"}]' \
--top-k 10 \
--locale zh当提供参数时,每个条目需要包含:
--sources- :知识库范围,如
scope或personal。company - :知识库名称。
name
Ask Knowledge (LLM)
LLM知识库问答
Use when the user wants an LLM-synthesized answer. This endpoint calls a large language model and consumes platform tokens. Prefer -> -> when deterministic retrieval is enough.
+ask+index+grep+readbash
ae-cli kb +ask \
--question "How do we troubleshoot payment alerts?" \
--sources '[{"scope":"company","name":"engineering-handbook"}]' \
--model-id claude-sonnet-4-6 \
--max-turns 50 \
--locale zh- , alias
--question: required natural-language question (1-2000 characters).-q - : optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
--sources - : optional LLM model ID. Omit to use the platform default.
--model-id - : optional agent turn limit (1-100, server default 50).
--max-turns - : optional locale:
--locale,zh,en, orja.ko
当用户需要LLM生成的综合答案时,使用命令。该端点会调用大语言模型并消耗平台令牌。当确定性检索足够满足需求时,优先使用 -> -> 流程。
+ask+index+grep+readbash
ae-cli kb +ask \
--question "How do we troubleshoot payment alerts?" \
--sources '[{"scope":"company","name":"engineering-handbook"}]' \
--model-id claude-sonnet-4-6 \
--max-turns 50 \
--locale zh- ,别名
--question:必填的自然语言问题(1-2000字符)。-q - :可选的知识库引用JSON数组。省略该参数将搜索所有可访问的知识库。
--sources - :可选的LLM模型ID。省略该参数将使用平台默认模型。
--model-id - :可选的Agent轮次限制(1-100,服务器默认值为50)。
--max-turns - :可选的区域设置:
--locale、zh、en或ja。ko
List Accessible Knowledge Bases
列出可访问知识库
Use when you only need accessible knowledge base metadata without loading navigation maps. By default it returns knowledge bases with :
+listindex.mdbuildStatus: compiledbash
ae-cli kb +list
ae-cli kb +list --locale zh
ae-cli kb +list --build-status compiled当仅需获取可访问知识库的元数据而无需加载导航地图时,使用命令。默认返回的知识库:
index.md+listbuildStatus: compiledbash
ae-cli kb +list
ae-cli kb +list --locale zh
ae-cli kb +list --build-status compiledExplore Knowledge Base Pages
浏览知识库页面
Use the deterministic retrieval primitives when an agent needs to explore knowledge base content like a code repository. These endpoints do not call an LLM on the server side.
Start with or to discover accessible knowledge bases. Use when you also need navigation maps:
+list+index+indexbash
ae-cli kb +listbash
ae-cli kb +index \
--sources '[{"scope":"company","name":"engineering-handbook"}]'Then use to locate likely pages and line numbers:
+grepbash
ae-cli kb +grep \
--query "sandbox configuration" \
--sources '[{"scope":"company","name":"engineering-handbook"}]' \
--top-k 10Finally use to open the exact page, optionally with a line window:
+readbash
ae-cli kb +read \
--source '{"scope":"company","name":"engineering-handbook"}' \
--path "wiki/sandbox.md" \
--offset 1 \
--limit 200Retrieval rules:
- accepts optional
+list(default--build-status) andcompiled. Returns accessible knowledge base metadata including--locale, withoutbuildStatusnavigation maps.index.md - accepts optional
+indexand--sources; omit--localeto list all accessible knowledge bases.--sources - requires
+grep/--query; optional-q,--sources(1-50, default 10), and--top-k.--locale - requires
+readpointing to exactly one knowledge base and--sourcerelative to the knowledge base root; optional--path,--offset(1-10000), and--limit.--locale - Do not guess a ; get it from
--pathor+indexresults.+grep
当Agent需要像浏览代码仓库一样探索知识库内容时,使用确定性检索原生命令。这些端点不会在服务器端调用LLM。
先使用或发现可访问的知识库。当需要导航地图时使用:
+list+index+indexbash
ae-cli kb +listbash
ae-cli kb +index \
--sources '[{"scope":"company","name":"engineering-handbook"}]'然后使用定位目标页面和行号:
+grepbash
ae-cli kb +grep \
--query "sandbox configuration" \
--sources '[{"scope":"company","name":"engineering-handbook"}]' \
--top-k 10最后使用打开具体页面,可选指定行范围:
+readbash
ae-cli kb +read \
--source '{"scope":"company","name":"engineering-handbook"}' \
--path "wiki/sandbox.md" \
--offset 1 \
--limit 200检索规则:
- 接受可选的
+list(默认值--build-status)和compiled参数。返回包含--locale的可访问知识库元数据,但不包含buildStatus导航地图。index.md - 接受可选的
+index和--sources参数;省略--locale将列出所有可访问的知识库。--sources - 需要
+grep/--query参数;可选参数包括-q、--sources(1-50,默认值10)和--top-k。--locale - 需要
+read参数指向单个知识库,以及--source参数指定相对于知识库根目录的路径;可选参数包括--path、--offset(1-10000)和--limit。--locale - 不得猜测参数;需从
--path或+index的结果中获取。+grep
Remove One Source
移除单个源
Use only when the source display name is known exactly.
+rm-sourcebash
ae-cli kb +rm-source \
--name engineering-handbook \
--display-name kb-1780046712-guide.mdIf the user only gives a loose source name, do not guess. Ask for the exact uploaded display name.
仅当确切知道源显示名称时,使用命令。
+rm-sourcebash
ae-cli kb +rm-source \
--name engineering-handbook \
--display-name kb-1780046712-guide.md如果用户仅提供模糊的源名称,请勿猜测。询问用户获取确切的上传显示名称。
Delete a Knowledge Base
删除知识库
Use for deleting the entire knowledge base. Confirm the target name with the user if there is any ambiguity.
+removebash
ae-cli kb +remove --name engineering-handbook使用命令删除整个知识库。如果存在歧义,需与用户确认目标名称。
+removebash
ae-cli kb +remove --name engineering-handbookCommand Reference
命令参考
+query
+query+query
+querybash
ae-cli kb +query --query "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--top-k 10] [--locale zh|en|ja|ko]- , alias
--query: required natural-language question.-q - : optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
--sources - : optional max number of hits, 1-50, default 10.
--top-k - : optional locale:
--locale,zh,en, orja.ko
bash
ae-cli kb +query --query "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--top-k 10] [--locale zh|en|ja|ko]- ,别名
--query:必填的自然语言问题。-q - :可选的知识库引用JSON数组。省略该参数将搜索所有可访问的知识库。
--sources - :可选的最大结果数,范围1-50,默认值10。
--top-k - :可选的区域设置:
--locale、zh、en或ja。ko
+ask
+ask+ask
+askbash
ae-cli kb +ask --question "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--model-id claude-sonnet-4-6] [--max-turns 50] [--locale zh|en|ja|ko]- , alias
--question: required natural-language question (1-2000 characters).-q - : optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
--sources - : optional LLM model ID. Omit to use the platform default.
--model-id - : optional agent turn limit (1-100, server default 50).
--max-turns - : optional locale:
--locale,zh,en, orja.ko - Token cost: this command invokes an LLM on the server and consumes platform tokens. Prefer ->
+index->+grepfor token-free deterministic retrieval.+read
bash
ae-cli kb +ask --question "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--model-id claude-sonnet-4-6] [--max-turns 50] [--locale zh|en|ja|ko]- ,别名
--question:必填的自然语言问题(1-2000字符)。-q - :可选的知识库引用JSON数组。省略该参数将搜索所有可访问的知识库。
--sources - :可选的LLM模型ID。省略该参数将使用平台默认模型。
--model-id - :可选的Agent轮次限制(1-100,服务器默认值为50)。
--max-turns - :可选的区域设置:
--locale、zh、en或ja。ko - 令牌消耗:该命令会在服务器端调用LLM并消耗平台令牌。对于无需LLM的确定性检索,优先使用->
+index->+grep流程。+read
+list
+list+list
+listbash
ae-cli kb +list [--build-status compiled] [--locale zh|en|ja|ko]- : optional build status filter (default:
--build-status).compiled - : optional locale:
--locale,zh,en, orja.ko - Response items include .
buildStatus
bash
ae-cli kb +list [--build-status compiled] [--locale zh|en|ja|ko]- :可选的构建状态过滤器(默认值:
--build-status)。compiled - :可选的区域设置:
--locale、zh、en或ja。ko - 返回结果包含字段。
buildStatus
+index
+index+index
+indexbash
ae-cli kb +index [--sources '[{"scope":"company","name":"kb-name"}]'] [--locale zh|en|ja|ko]- : optional JSON array of knowledge base refs. Omit to list all accessible knowledge bases.
--sources - : optional locale:
--locale,zh,en, orja.ko
bash
ae-cli kb +index [--sources '[{"scope":"company","name":"kb-name"}]'] [--locale zh|en|ja|ko]- :可选的知识库引用JSON数组。省略该参数将列出所有可访问的知识库。
--sources - :可选的区域设置:
--locale、zh、en或ja。ko
+grep
+grep+grep
+grepbash
ae-cli kb +grep --query "<keywords>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--top-k 10] [--locale zh|en|ja|ko]- , alias
--query: required keywords to search across knowledge bases.-q - : optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
--sources - : optional max number of hits, 1-50, default 10.
--top-k - : optional locale:
--locale,zh,en, orja.ko
bash
ae-cli kb +grep --query "<keywords>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--top-k 10] [--locale zh|en|ja|ko]- ,别名
--query:必填的跨知识库搜索关键词。-q - :可选的知识库引用JSON数组。省略该参数将搜索所有可访问的知识库。
--sources - :可选的最大结果数,范围1-50,默认值10。
--top-k - :可选的区域设置:
--locale、zh、en或ja。ko
+read
+read+read
+readbash
ae-cli kb +read --source '{"scope":"company","name":"kb-name"}' --path "index.md" [--offset 1] [--limit 200] [--locale zh|en|ja|ko]- : required JSON object pointing to exactly one knowledge base.
--source - : required page path relative to the knowledge base root, such as
--pathorindex.md.wiki/concepts/data-model.md - : optional 1-based start line.
--offset - : optional max line count, 1-10000.
--limit - : optional locale:
--locale,zh,en, orja.ko
bash
ae-cli kb +read --source '{"scope":"company","name":"kb-name"}' --path "index.md" [--offset 1] [--limit 200] [--locale zh|en|ja|ko]- :必填的JSON对象,指向单个知识库。
--source - :必填的页面路径,相对于知识库根目录,例如
--path或index.md。wiki/concepts/data-model.md - :可选的起始行号(从1开始)。
--offset - :可选的最大行数,范围1-10000。
--limit - :可选的区域设置:
--locale、zh、en或ja。ko
+new
+new+new
+newbash
ae-cli kb +new --name "<name>" [--scope personal|company] [--description "..."] [--tags '["t1","t2"]'] [--project-id "..."] [--project-name "..."]bash
ae-cli kb +new --name "<name>" [--scope personal|company] [--description "..."] [--tags '["t1","t2"]'] [--project-id "..."] [--project-name "..."]+add
+add+add
+addbash
ae-cli kb +add --name "<name>" --files '["./a.md","./docs","https://example.com/page"]'bash
ae-cli kb +add --name "<name>" --files '["./a.md","./docs","https://example.com/page"]'+url
+url+url
+urlbash
ae-cli kb +url --name "<name>" --url "https://example.com/page" [--display-name "..."] [--parse-instruction "..."]bash
ae-cli kb +url --name "<name>" --url "https://example.com/page" [--display-name "..."] [--parse-instruction "..."]+schema
+schema+schema
+schemabash
ae-cli kb +schema --name "<name>" [--force] [--model "<model displayName>"]bash
ae-cli kb +schema --name "<name>" [--force] [--model "<model displayName>"]+compile
+compile+compile
+compilebash
ae-cli kb +compile --name "<name>" [--mode incremental|full]bash
ae-cli kb +compile --name "<name>" [--mode incremental|full]+status
+status+status
+statusbash
ae-cli kb +status --name "<name>"bash
ae-cli kb +status --name "<name>"+rm-source
+rm-source+rm-source
+rm-sourcebash
ae-cli kb +rm-source --name "<name>" --display-name "<uploaded source display name>"bash
ae-cli kb +rm-source --name "<name>" --display-name "<uploaded source display name>"+remove
+remove+remove
+removebash
ae-cli kb +remove --name "<name>"bash
ae-cli kb +remove --name "<name>"