HTTP & Web Nodes

Applies to: ChengOS v0.2.0+ | Last verified: 2026-09-25 | Source: crates/cheng-nodes/src/nodes/builtin/tools

Reaching outside the system. tools/http is the raw request; tools/web sits one level higher with operations for fetching, extracting readable article text, crawling, and downloading — prefer it when you want content rather than a response body. tools/fetch_repository pulls skill sources, tools/ssh runs a remote command, and tools/mail covers send and read. Both tools/http and tools/web offer a manual mode where the workflow supplies every parameter and an LLM mode where the model fills them in. The browser node lives behind an optional build feature and is not part of a default build.

HTTP Tool — tools/http

Send HTTP requests to specified URL, supports manual mode and LLM mode

Inputs

FieldTypeRequiredDefaultDescription
credential_idstring—nullHTTP authentication credential ID (optional, for Bearer Token or Basic Auth). Control: credential-select
modeenum—manualExecution mode: Manual=user fills all parameters, Llm=LLM auto-fills parameters. Control: select. Options: manual (手动模式:用户在前端填写所有参数), llm (LLM 模式:LLM 通过 ReAct 调用时填充参数)
urlstring—nullTarget URL (filled by LLM in LLM mode, or by user in manual mode)
methodenum—GETHTTP method. Control: select. Options: GET, POST, PUT, DELETE, PATCH
headersobject—nullCustom request headers (optional)
bodystring—nullRequest body (JSON string or form data). Control: code-editor
timeout_secondsinteger—30Timeout in seconds. Control: number
body_artifactobject—nullArtifact reference used as the request body (preferred over inline body for large uploads)
body_artifact_uristring—nullartifact:// URI used as the request body
request_profileenum—generalStatic profile: general (default) or discovery (read-only HTTPS GET inspection). Options: general (General-purpose HTTP (backward compatible).), discovery (Read-only discovery: HTTPS GET only, no credentials/headers/body.)

Outputs

FieldTypeDescription
modestringExecution mode
timeout_secondsintegerTimeout in seconds
status_codeintegerHTTP response status code
bodystringDeprecated bounded inline response text; large/binary responses use body_artifact
body_artifactobjectArtifact holding the complete response body when large or binary
body_previewstringBounded, LLM-facing preview of the response body
body_bytesintegerObserved/declared total response body size in bytes (may be unknown for chunked responses)
retained_bytesintegerBytes actually retained/stored; distinguishes stored size from the remote total when truncated
locationstringNormalized, validated redirect target for a 3xx response (automatic redirects stay disabled)
body_mime_typestringResponse body MIME type
body_sha256stringResponse body content hash
download_filenamestringSuggested filename for the response payload
body_truncatedbooleanWhether the inline body/preview was truncated relative to the full response
headersobjectResponse headers
elapsed_msintegerRequest elapsed time in milliseconds
credential_usedbooleanWhether credential authentication was used

Web Tool — tools/web

Comprehensive web suite: HTTP requests, page reading, metadata, extraction, articles, downloads, crawling, and search

Inputs

FieldTypeRequiredDefaultDescription
modeenum—manualExecution mode — mirrors the concept used by tools/http. Options: manual (Manual mode: the user/workflow supplies every parameter.), llm (LLM mode: the agent may fill selected fields during tool use.)
operationenum—fetchThe nine supported web operations. Options: request, check, fetch, metadata, extract, article, download, crawl, search
credential_idstring—nullCredential Id
urlstring—nullUrl
methodenum—GETHTTP methods supported by request / check. Options: GET, HEAD, POST, PUT, PATCH, DELETE
headersobject—nullHeaders
bodystring—nullBody
querystring—nullQuery
selectorstring—nullSelector
extract_modeenum—textExtraction mode for the extract operation. Options: text, html, markdown, attr, json
attribute_namestring—nullAttribute Name
output_formatenum—markdownOutput format for fetch and per-page crawl conversion. Options: raw_html, text, markdown
include_headersboolean—falseInclude Headers
header_filterarray—nullHeader Filter
save_pathstring—nullSave Path
allowed_mime_typesarray—nullAllowed Mime Types
overwriteboolean—falseOverwrite
max_download_bytesinteger—52428800Independent size cap for download (downloads are typically larger than in-context response bodies, so they get their own limit).
max_response_bytesinteger—1048576Max Response Bytes
page_character_limitinteger—20000Page Character Limit
max_total_bytesinteger—200000Max Total Bytes
max_total_tokensinteger—50000Max Total Tokens
max_depthinteger—2Max Depth
max_pagesinteger—20Max Pages
same_origin_onlyboolean—trueSame Origin Only
allowed_domainsarray—nullAllowed Domains
respect_robotsboolean—trueRespect Robots
crawl_delay_msinteger—500Crawl Delay Ms
concurrencyinteger—2Concurrency
search_providerenum—tavilySearch provider. Tavily requires credential_id; SearXNG uses search_base_url. Control: select. Options: tavily, searxng
search_base_urlstring—nullStatic base URL for self-hosted search providers (e.g. SearXNG). Treated as operator configuration, never an LLM-controlled arbitrary endpoint.
max_resultsinteger—5Max Results
search_pageinteger—1Search Page
search_include_contentboolean—falseSearch Include Content
timeout_secondsinteger—30Timeout Seconds

Outputs

FieldTypeDescription
modestringMode
operationstringOperation
urlstringUrl
final_urlstringFinal Url
status_codeintegerStatus Code
content_typestringContent Type
elapsed_msintegerElapsed Ms
body_truncatedbooleanBody Truncated
result_truncatedbooleanResult Truncated
spa_detectedbooleanSpa Detected
warningsarray<string>Warnings
credential_usedbooleanCredential Used
resultanyOperation-specific payload (see the per-operation result structs).

Fetch Skill Source — tools/fetch_repository

Fetch a remote skill source (git repo, single HTTP URL, or pasted content) into a persistent workspace skill package and return its package_path.

Inputs

FieldTypeRequiredDefaultDescription
source_typestring—repositoryrepository | url | pasted_text | skill_md
source_locationstring—""Repository clone URL, HTTPS document URL, or short identifier for pasted content (used only as a label when source_type is pasted_text / skill_md).
source_contentstring—nullInline file content. Required for pasted_text / skill_md, ignored for repository / url.
branchstring—nullGit branch (optional, repository only)
harvest_modestring—skill_packageskill_package (default) | source_tree — how much of a cloned repository to select.
llm_inline_max_bytesinteger—50000Deprecated and ignored. Output is always artifact-backed with a bounded llm_preview; this value no longer changes the result.
allow_insecure_schemesboolean—falsePermit http/ssh/git URLs (default: https only)
legacy_inline_filesboolean—falseDeprecated compatibility: also emit full files[].content inline (under a strict total byte cap). Off by default — normal execution returns file artifacts plus a bounded llm_preview.
sandbox_rootstring—nullEngine-injected sandbox root (same authority as file_ops_hub). Not LLM-callable — the workflow engine injects this via apply_effective_sandbox_root so fetch_repository writes into the same root that file_ops_hub reads from.

Outputs

FieldTypeDescription
successbooleanSuccess
package_pathstringWorkspace-relative package directory shared with file_ops_hub and validate_skill_spec, for example skills/example-skill.
filesarray<object>Deprecated compatibility: full file payloads inline. Empty unless legacy_inline_files is set (and under a strict byte cap). Prefer files_manifest / repository_artifact.
files_manifestarray<object>Per-file artifact metadata (path, size, mime, artifact ref). Downstream nodes resolve each artifact to recover the complete file content.
existing_filesarray<string>Existing workspace-relative files when the target package already exists. This informational branch does not create new artifacts or read file contents.
repository_artifactobjectThe complete fetched source as a single JSON bundle artifact ({ files: [{ path, content }] }), for whole-repository consumers.
manifest_artifactobjectOptional artifact holding the full manifest when it is large.
llm_previewstringBounded, LLM-facing preview: source URL, commit, per-file sizes, and small excerpts within a budget. Never the full file contents.
total_filesintegerTotal number of harvested files.
total_bytesintegerTotal bytes across all harvested files.
warningsarray<string>Structured warnings for omitted files (binary, oversized, excluded, secret) and global truncation (caps reached). Never contains file contents.
llm_textstringDeprecated: legacy text rendering. Now mirrors llm_preview (bounded).
source_snapshot_artifactobjectTrusted, complete source snapshot artifact (every accepted regular file, byte-for-byte). This is the ONLY reference the Agent forwards to tools/write_skill_package; it never reconstructs source bytes itself.
source_manifestarray<object>Complete (or inline-bounded) manifest of the source snapshot: path, kind, size, SHA-256, and text-readability per file.
source_manifest_artifactobjectFull manifest as a JSON artifact when it is too large to inline.
source_file_countintegerNumber of files in the source snapshot.
source_total_bytesintegerTotal bytes across the source snapshot.
source_scan_truncatedbooleanTrue only if the snapshot could not be fully represented. When true, activation must be refused — a partial tree is never a self-contained Skill.
commit_hashstringCommit Hash
source_urlstringSource Url
errorstringError

SSH Executor — tools/ssh

Execute commands on the SSH host configured on this node. The host, port, and credential are static canvas configuration; when used as an LLM tool, provide only the command (and optional working_dir). Built-in approval gate risk-classifies commands and surfaces rejection reasons (rejected/skipped/timed_out/policy_denied) so agents can replan correctly.

Inputs

FieldTypeRequiredDefaultDescription
hoststring✅—Remote host (hostname or IP)
portinteger—22Remote SSH port. Control: number
credential_idstring—nullSSH credential — private key or password (resolved via CredentialRepository). Control: credential-select
commandstring—""Command to execute on the remote host. Control: code-editor
working_dirstring—nullOptional cwd before executing the command
timeout_msinteger—30000Per-command execution timeout in milliseconds. Control: number
strict_host_key_checkingboolean—trueTOFU: first-connect host key prompts user approval; subsequent connects use the trusted key. Disable only for ad-hoc testing. Control: switch
read_only_modeboolean—falseHard policy: when enabled, any non-readonly command is denied without going through approval. Control: switch
approval_required_at_or_aboveenum—mediumRisk threshold for triggering the approval gate (medium by default). Control: select. Options: low, medium, high, critical
approval_timeout_secsinteger—300Seconds to wait for the user's decision before timing out (default 300). Control: number

Outputs

FieldTypeDescription
successbooleanTrue iff the command executed and returned 0
exit_codeintegerRemote process exit code
stdoutstringCaptured stdout
stderrstringCaptured stderr
duration_msintegerWall-clock execution time
hoststringTarget host echoed back for traceability
commandstringCommand echoed back for traceability
risk_levelstringClassified risk for this command
rejection_typestringDistinguishes execute / approval / policy outcomes
reasonstringReason text from user or policy
approval_request_idstringUUID matching the approval bus event
observationstringAgent-facing observation text with [APPROVAL_*] prefixes

Mail Tool — tools/mail

Operate real emails via IMAP/SMTP protocols: send, read, search, move, mark, reply, forward and more

Inputs

FieldTypeRequiredDefaultDescription
imap_credential_idstring—nullIMAP credential for receiving operations (read, search, move, delete etc. - ListEmails/SearchEmails/GetEmail/MoveEmail etc.). Control: credential-select
smtp_credential_idstring—nullSMTP credential for sending operations (SendEmail/ReplyEmail/ForwardEmail). Control: credential-select
operationenum——Email operation type to execute. Control: select. Options: send_email (发送邮件(需 SMTP 配置)), list_emails (获取邮件列表(需 IMAP 配置)), search_emails (搜索邮件(需 IMAP 配置)), get_email (获取邮件详情及正文(需 IMAP 配置)), move_email (移动邮件到指定文件夹), copy_email (复制邮件到指定文件夹), delete_email (删除邮件), mark_as_read (标记邮件为已读), mark_as_unread (标记邮件为未读), list_folders (列出所有邮件文件夹), reply_email (回复邮件(需 IMAP + SMTP 配置)), forward_email (转发邮件(需 IMAP + SMTP 配置))
display_namestring——Sender display name (e.g. John Doe), leave empty to show only email address
folderstring—INBOXMail folder name (default INBOX, sent usually Sent or [Gmail]/Sent Mail)
pageinteger—1Page number starting from 1 (default 1, newest emails on page 1)
page_sizeinteger—20Number of emails per page (default 20, max 50)
tostring——Recipient email address, multiple addresses separated by commas
ccstring——CC email address, multiple addresses separated by commas
bccstring——BCC email address, multiple addresses separated by commas
subjectstring——Email subject
bodystring——Email body content
formatenum——Body format: text (plain text), html (HTML), both (send both, recommended). Options: text (纯文本), html (HTML 格式), both (同时发送纯文本和 HTML(推荐,兼容性最好))
querystring——IMAP search query (FROM, SUBJECT, UNSEEN, SINCE, etc.)
email_idstring——Email unique identifier (obtained from id field in ListEmails/SearchEmails results)
target_folderstring——Target folder name for moving or copying emails (e.g. Archive, Trash, [Gmail]/All Mail)
attachmentsarray<object>——Attachments to send (artifact refs preferred; small inline text allowed)
include_attachmentsboolean—falseGetEmail: download and persist attachment bodies as artifacts

Outputs

FieldTypeDescription
successbooleanWhether operation succeeded
messagestringOperation result description
emailsarray<object>Email list
foldersarray<string>Mail folder name list
pageintegerCurrent page number
countintegerNumber of emails returned this time
total_countintegerTotal email count in folder (only provided by ListEmails)

Next steps