volcengine-knowledge-search Volcengine Documentation Retrieval
Search official documentation with
and retrieve body text with
. The CLI handles requests, response parsing, body-text cleaning, and pagination; this skill handles scenario selection, query rewriting, secondary searches, and source citations.
CLI Invocation Conventions
Before running
, follow the caller identification rules in
(
Caller Identification Rules). Every invocation must carry the following in the process environment:
- .
- : Determined by the Agent based on the actual current host environment; do not use a fixed default.
- : Use the from the frontmatter of the skill currently performing the operation. When this skill performs documentation retrieval or body-text reading, the value is
volcengine-knowledge-search
; referencing the CLI invocation rules does not change the skill to which the operation belongs.
This requirement applies to
checks, the initial search, rewritten searches, body-text retrieval, paginated continuation, and retries. Each tool invocation may start a new shell, so all three variables must be passed again rather than relying on a previous
. In the following examples, the Agent must replace
and
<current-volcengine-skill>
based on the current environment and skill metadata; they must not be passed literally. These variables are used only to identify the invocation source and do not alter the convention that public documentation commands require no login.
Preparation
On first use, confirm that the local machine has both subcommands:
bash
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs search --help
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs fetch --help
If
is not installed or the subcommands are unavailable, load the
skill, install the latest version according to its “Install or upgrade the ve CLI” section, and then check the capabilities again. Documentation commands access public services and
require no login, AK/SK, profile, or region configuration; use them directly after installation without running the resource-management identity initialization process.
Decision Flow
- The user provides a specific article link: Directly it and read the body text relevant to the question.
- The user asks a question: Complete the product name and specific area of interest, then . Do not apply a product filter to the initial search. Determine relevance from the title, snippet, and product code.
- The results are too broad or irrelevant: Rewrite the query. Use a value for a secondary search only after the target product has been confirmed in the results. Never use a code from an irrelevant match as a filter.
- Complete steps, constraints, exact billing rules, or a full-text summary are required: Run on the URLs of relevant results and continue reading as needed. When the user requests the full text, keep reading until there is no continuation prompt or .
search: Search Documentation
bash
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs search "对象存储 TOS 如何计费" --limit 3 --output text
The search text is a
positional argument; enclose the complete question in quotation marks. Use
to obtain directly readable Markdown: each result includes the title, clean URL,
, and body-text snippet. The CLI outputs JSON by default; explicitly use
when programmatic processing is required. Results are placed in the
array, with the fields
,
,
, and
.
| Parameter | Purpose |
|---|
| Number of documents to return; must be a positive integer. Generally, start with 3. |
| Restricts results to a product. Use a code confirmed from relevant results; repeat this option for multiple products. |
| Maximum number of Unicode characters in each snippet; must be a positive integer. Use it to control context size. |
Query Rewriting
Semantic retrieval should closely match the documentation's wording. Expand colloquial terms, abbreviations, or marketing names into a full product name + capability description + specific question. For example, rewrite “How much does Coding Plan cost?” as “How is the Volcengine Ark Coding Plan AI programming subscription package priced?” If the initial search misses the target, try the full name, a synonymous description, or a functional description.
bash
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs search "火山方舟 Coding Plan AI 编程订阅套餐如何计费" --limit 3 --output text
First run a broad search. After confirming that the
value of a relevant result is
, run a product-specific search:
bash
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs search "跨区域复制如何配置" --limit 5 --snippet-length 300 --output text
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs search "对象存储 TOS 跨区域复制如何配置" --limit 3 --service-code tos --output text
For multiple product codes, use
--service-code <code-a> --service-code <code-b>
, passing each code separately.
fetch: Retrieve Body Text
Both
https://www.volcengine.com/docs/...
and
https://docs.volcengine.com/docs/...
are supported. The CLI removes the query string and fragment from the URL. In text output mode, the title, clean URL, current page body text, and continuation prompt are returned in that order.
bash
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs fetch "https://www.volcengine.com/docs/6349/162514?lang=zh" --output text
| Parameter | Purpose |
|---|
| Starts at the Nth Unicode character; the index begins at 0. |
| Maximum number of Unicode characters returned for the current page; must be a positive integer. The default is 5000. |
At the end of a long document, the CLI indicates the next page's
. Continue reading with the
same URL and returned index to avoid omissions or duplicates. The following example first retrieves 300 characters. If the continuation prompt says
, retrieve the next page:
bash
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs fetch "https://www.volcengine.com/docs/6349/162514" --max-length 300 --output text
VE_CALLER_TYPE=ai_agent VE_CALLER_NAME="<agent-id>" VE_SKILL_NAME="<current-volcengine-skill>" \
ve docs fetch "https://www.volcengine.com/docs/6349/162514" --start-index 300 --max-length 300 --output text
For programmatic pagination, use
and read
,
,
,
,
, and
. When
, continue reading with
. At the end, this field is
.
Navigation Pages and Empty Body Text
/docs/{product-id}/{document-id}
is a specific article path.
- is a product documentation navigation page and has no body text for a single article. When this type of link is detected, use with the product name and the user's area of interest, locate a specific article in the results, then it. Explain the link type to the user.
- means that no body text was retrieved; do not fabricate content based on it. Check whether the link is a navigation page, an expired address, or an incorrect URL, and then use to locate an alternative document.
Results and Error Handling
- Answer based on evidence: Conceptual questions sufficiently supported by a snippet can be answered directly. Retrieve the body text first when exact rules or complete steps are needed. Do not describe a partially read page as having been read in full.
- Cite sources: Use the clean URL returned by the CLI in the format . Prefer displaying at most 3 of the most relevant sources, and ensure that every conclusion corresponds to content that has been read.
- Control output: Use and for , and use and for . The CLI does not provide the temporary-file preview mechanism used by older scripts; continuation depends on pagination parameters.
- Normal empty result: If the exit code is 0 and is empty, rewrite the query or relax the product filter. This does not indicate a service failure.
- Argument error: Correct the arguments according to the corresponding subcommand's . Counts and lengths must be positive, and the starting index must be non-negative.
- Request failure: When the exit code is non-zero, read stderr and distinguish network issues from upstream business errors. Temporary failures such as timeouts or may be retried once or twice. If the failure persists, explain the cause and do not treat it as an empty result. Failed public documentation requests do not require cloud account credentials.