Chuyển đến nội dung

Lệnh CLI

Data Board

Board là một pipeline CRM — khách hàng tiềm năng, giao dịch, nhiệm vụ, hoặc bất kỳ dữ liệu có cấu trúc nào.

Danh sách Board

Terminal window
imbrace data-board list [--json]

Tạo Board

Terminal window
imbrace data-board create [--name <name>] [--json]

Nếu không có --json, lệnh sẽ tương tác yêu cầu nhập các cặp key-value tự do sau khi nhập tên.

Tạo Trường

Terminal window
imbrace data-board create-field <boardId> --name <fieldName> --type <fieldType> [--json]

Các loại trường hợp lệ (16): ShortText, LongText, Number, Date, Email, Phone, Currency, SingleSelection, MultipleSelection, Checkbox, Assignee, MultipleAssignee, Link, Notes, Origin, Priority.

Tạo Mục

Terminal window
imbrace data-board create-item <boardId> --fields '<json>' [--json]

--fields là một mảng JSON các đối tượng { board_field_id, value }:

Terminal window
imbrace data-board create-item <boardId> --fields '[
{"board_field_id": "<fieldId>", "value": "Acme Corp"},
{"board_field_id": "<fieldId>", "value": "50000"}
]' --json

Danh sách Mục

Terminal window
imbrace data-board list-items --board-id <boardId> [--limit 20] [--skip 0] [--q <search>] [--json]

Cập nhật Mục

Terminal window
imbrace data-board update-item <boardId> <itemId> --data '<json>' [--json]

--data là một mảng JSON các đối tượng { key, value }.

Xóa Mục

Terminal window
imbrace data-board delete-item <boardId> <itemId> [--yes] [--json]

Xuất ra CSV

Terminal window
imbrace data-board export-csv --board-id <boardId> [--out ./board.csv]

Nếu không có --out, xuất CSV ra stdout.


AI Agent

AI agent là một trợ lý đã được cấu hình (LLM + prompt + hành vi). Việc tạo một agent sẽ đồng thời cấp phát trợ lý, kênh web và mẫu use-case.

Khám phá

Terminal window
imbrace ai-agent list [--json]
imbrace ai-agent list-providers [--json]
imbrace ai-agent list-models --provider-id <providerId> [--json]
imbrace ai-agent list-folders [--search <query>] [--json]
imbrace ai-agent list-files --folder-id <folderId> [--json]

Lấy / Xóa

Terminal window
imbrace ai-agent get <agentId> [--json]
imbrace ai-agent delete <agentId> [--yes] [--json]

Cờ Tạo / Cập nhật

createupdate chấp nhận cùng các cờ. update giữ nguyên các trường không thay đổi thông qua PUT-merge.

CờÁnh xạ tớiGhi chú
Danh tính
--name / -nname + titleBắt buộc khi tạo
--description / -ddescription + short_descriptionHiển thị dưới tiêu đề trong UI
--instructions / -iinstructionsSystem prompt
Mô hình
--modelmodel_idMặc định Default (nhà cung cấp hệ thống)
--provider-idprovider_idUUID, mặc định system
--modemodestandard / advanced
--temperaturetemperature0.0–2.0, mặc định 0.1
Cài đặt Hành vi
--personalitypersonality_role
--core-taskcore_task
--tonetone_and_style
--response-lengthresponse_lengthshort / medium / long
--banned-wordsbanned_wordsBộ lọc đầu ra phân cách bằng dấu phẩy
--categorycategorySupport / Sales / Marketing / Team / Other
--guardrail-idguardrail_idĐính kèm một guardrail
--preload-informationpreload_informationThông tin tĩnh trong ngữ cảnh
Hỗ trợ Kiến thức
--folder-idsfolder_idsID thư mục KH phân cách bằng dấu phẩy
--default-folder-iddefault_folder_id
--knowledge-hubsknowledge_hubsID KH phân cách bằng dấu phẩy
--board-idsboard_idsID data board phân cách bằng dấu phẩy
--file-idsfile_idsID tệp phân cách bằng dấu phẩy
Công tắc thời gian chạy (hỗ trợ --no-X)
--show-thinkingshow_thinking_processMặc định false
--streamingstreamingMặc định true
--use-memoryuse_memoryMặc định true
Đầu ra
--yes / -yBỏ qua xác nhận khi xóa
--jsonĐầu ra máy có thể đọc được
--id-onlyChỉ in ID agent mới

Ví dụ tạo đầy đủ

Terminal window
imbrace ai-agent create \
--name "Customer Support Specialist" \
--description "Senior AI customer support agent" \
--instructions "You are a senior customer support specialist..." \
--personality "Friendly and professional" \
--core-task "Answer product inquiries, help track orders" \
--tone "Polite, professional, warm" \
--response-length "medium" \
--banned-words "stupid, idiot" \
--category "Support" \
--provider-id "e2629292-7e9f-4d55-ba18-6827747eab33" \
--model "gpt-4o-mini" \
--temperature 0.3 \
--folder-ids "69bb82faa2cc764639bc6bdb" \
--board-ids "brd_e5450d76-84d4-4c34-8b13-3d0f1873b53b" \
--json

Loại Agent

Nền tảng lưu trữ 4 loại agent riêng biệt dưới agent_type. CLI hiển thị chúng thông qua các chủ đề chuyên biệt hoặc cờ --agent-type:

Lựa chọn tạo trong UILệnh CLIagent_type của backend
AI AGENTimbrace ai-agent createagent (mặc định)
ORCHESTRATORimbrace orchestrator createteam_lead
DOCUMENT AIimbrace document-ai createdocument_ai
GUARD RAILimbrace guardrail create(không phải agent — tài nguyên riêng)

Cờ --agent-type trên ai-agent create chấp nhận agent, assistant, conversational, hoặc workflow. Đối với Document AI, sử dụng chủ đề document-ai chuyên biệt. Đối với Orchestrator, sử dụng chủ đề orchestrator.


Document AI

Document AI agent trích xuất JSON có cấu trúc từ các tài liệu phi cấu trúc (PDF, hình ảnh, biểu mẫu được quét). Mỗi agent có một schema xác định các trường cần trích xuất, instructions hướng dẫn LLM, và một model + provider. Được lưu dưới dạng AI Agents với agent_type: "document_ai".

CRUD

Terminal window
imbrace document-ai list [--search <q>] [--all] [--json]
imbrace document-ai get <agentId> [--json]
imbrace document-ai create -n "<name>" -i "<instructions>" --model <id> \
(--schema '<json>' | --schema-file <path>) \
[--provider-id <uuid>] [--description <text>] [--workflow-name <name>] \
[--json] [--id-only]
imbrace document-ai update <agentId> [--name | --instructions | --model | --provider-id | --schema | --schema-file | --description | --workflow-name] [--json]
imbrace document-ai delete <agentId> [--yes] [--json]

list mặc định lọc với documentAiOnly: true. Thêm --all để bao gồm cả agent thông thường.

Xử lý tài liệu

Terminal window
imbrace document-ai process \
--url <pdf-or-image-url> \
--org-id <orgId> \
[--agent-id <id>] [--model <id>] [--instructions <text>] \
[--board-id <boardId>] [--language <lang>] \
[--additional-instructions <text>] \
[--chunk-size <n>] [--max-concurrent <n>] [--max-retries <n>] \
[--no-enhanced-processing] [--json]

Bắt buộc một trong hai: --agent-id (sử dụng model + instructions đã lưu của agent) hoặc --model (ghi đè).

Đề xuất schema

Terminal window
imbrace document-ai suggest-schema --url <url> --org-id <orgId> [--model <id>] [--json]

Yêu cầu LLM kiểm tra một tài liệu mẫu và đề xuất schema trích xuất.

Ví dụ Schema

{
"invoice_number": { "type": "string", "description": "Mã hóa đơn" },
"total_amount": { "type": "number" },
"due_date": { "type": "string", "format": "date" }
}

Orchestrator

Orchestrator là một AI Agent được lưu với agent_type: "team_lead" có nhiệm vụ phân công công việc cho sub_agents / team_leads. Phản ánh lựa chọn ORCHESTRATOR trong hộp thoại Tạo của UI.

Terminal window
imbrace orchestrator list [--json]
imbrace orchestrator get <id> [--json]
imbrace orchestrator create -n "<name>" -i "<routing instructions>" \
--sub-agents <id1>,<id2> [--team-leads <id3>,<id4>] \
[--description <text>] [--model <id>] [--provider-id <uuid>] [--temperature <0-2>] \
[--json] [--id-only]
imbrace orchestrator delete <id> [--yes] [--json]

Đặc thù backend (được xử lý tự động)

CLI xử lý ba hành vi đặc thù của nền tảng để người gọi không cần biết đến — nhưng hữu ích khi gỡ lỗi phản hồi SDK thô:

  1. agent_type: "team_lead" là dấu hiệu của orchestrator — không có boolean is_orchestrator riêng. Ứng dụng web cũng thực hiện chuyển đổi tương tự.
  2. sub_agents / team_leads phải là ID trợ lý (UUID), không phải ID use-case (uc_*). CLI tự động phân giải mọi uc_* bạn truyền qua tra cứu client.agent.get().
  3. createUseCase âm thầm loại bỏ cả hai trường trên khi được đặt trên payload trợ lý. CLI thực hiện 2 bước: tạo → chatAi.updateAiAgent PUT để áp dụng chúng.

get lấy trợ lý cơ bản để sub_agents / team_leads hiển thị chính xác (chúng nằm trên trợ lý, không phải use case).


Guard Rail

Guard Rail là một lớp an toàn nội dung / tuân thủ được đính kèm vào AI Agents thông qua --guardrail-id trên ai-agent create. Phản ánh lựa chọn GUARD RAIL trong hộp thoại Tạo của UI.

Terminal window
imbrace guardrail list [--json]
imbrace guardrail get <id> [--json]
imbrace guardrail create -n "<name>" -i "<rules>" \
[--model nim-nemo|model-armor] \
[--guardrail-provider-id <uuid>] [--org-id <orgId>] \
[--description <text>] \
[--unsafe-categories "violence,hate,sexual"] \
[--custom-unsafe-patterns "regex1,regex2"] \
[--competitor-keywords "X,Y"] \
[--json] [--id-only]
imbrace guardrail update <id> -n -i --model [partial flags] [--json]
imbrace guardrail delete <id> [--yes] [--json]

Đặc thù backend (được xử lý tự động)

  1. org_id là bắt buộc nhưng kiểu SDK đánh dấu nó là tùy chọn. CLI tự động lấy nó qua client.account.getAccount() nếu bạn không truyền --org-id.
  2. model không phải tên LLM thông thường — nó là model guardrail:
    • nim-nemo (NVIDIA NIM Nemo) — mặc định của CLI
    • model-armor (Google)
    • hoặc bất kỳ model guardrail-provider tùy chỉnh nào khi kết hợp với --guardrail-provider-id
  3. model-armor bỏ qua instructions, custom_unsafe_patterns, và competitor_keywords. CLI tự động loại bỏ chúng.
  4. Backend trả về guardrails_config_id, không phải _id. CLI chuẩn hóa điều này để --id-onlyget <id> hoạt động như mong đợi.

Workflow

Workflow là một chuỗi các node: một trigger kích hoạt, sau đó các hành động chạy tuần tự.

Các loại Node

LoạiVai tròHỗ trợ CLI
PIECE_TRIGGERKhi nào flow chạynode add --type trigger
PIECECái gì chạy sau đónode add --type action
EMPTYGiữ chỗ trước khi trigger được đặtChỉ đọc
ROUTERCông tắc đa điều kiệnnode add-raw
LOOP_ON_ITEMSLặp qua một mảngnode add-raw
CODEJavaScript nội tuyếnnode add-raw

CRUD Flow

Terminal window
imbrace workflow list [--folder-id <id|NULL>] [--json]
imbrace workflow get <id> [--json]
imbrace workflow create --name "<name>" [--folder-id <id>] [--json] [--id-only]
imbrace workflow move <flowId> --folder-id <id|NULL> [--json]
imbrace workflow delete <id> [--yes] [--json]

Quản lý Node

Terminal window
imbrace workflow node list <flowId> [--json]
imbrace workflow node add <flowId> \
--type trigger --piece <pieceName> \
--trigger-name <triggerId> [--input '<json>'] [--json]
imbrace workflow node add <flowId> \
--type action --piece <pieceName> \
--action-name <actionId> \
[--after <parentStep>] [--input '<json>'] [--json]
imbrace workflow node update <flowId> <nodeName> \
[--input '<json>'] [--display-name <name>] [--json]
imbrace workflow node delete <flowId> <nodeName> [--yes] [--json]
imbrace workflow node add-raw <flowId> (--op-file <path> | --op '<json>' | --stdin) [--json]

Khám phá Piece

Terminal window
imbrace workflow piece list [--search <query>] [--json]
imbrace workflow piece detail <pieceName> [--only actions|triggers] [--json]

Kết nối

Terminal window
imbrace workflow conn list [--json]
imbrace workflow conn get <connId> [--json]
imbrace workflow conn create \
--piece <pieceName> \
--type SECRET_TEXT|OAUTH2|CLOUD_OAUTH2|BASIC_AUTH|CUSTOM_AUTH \
--value "<token-or-json>" \
[--display-name <name>] [--external-id <id>] [--json] [--id-only]
imbrace workflow conn delete <connId> [--yes] [--json]

Thư mục (Danh mục)

Terminal window
imbrace workflow folder list [--json]
imbrace workflow folder get <folderId> [--json]
imbrace workflow folder create --name "<name>" [--json] [--id-only]
imbrace workflow folder update <folderId> --name "<newName>" [--json]
imbrace workflow folder delete <folderId> [--yes] [--json]

Nền tảng tự động tạo 4 thư mục hệ thống:

Danh mục UITên Thư mục API
Channel WorkflowChannel Workflow
Board AutomationBoard Automation
AI Agent SkillsAI Agent Capabilities
OthersOthers

MCP Servers

Terminal window
imbrace workflow mcp list [--json]
imbrace workflow mcp get <mcpId> [--json]
imbrace workflow mcp create --name "<name>" [--json] [--id-only]
imbrace workflow mcp delete <mcpId> [--yes] [--json]
imbrace workflow mcp rotate-token <mcpId> [--yes] [--json]

Vòng đời & Lượt chạy

Terminal window
imbrace workflow publish <flowId> [--json]
imbrace workflow enable <flowId> [--json]
imbrace workflow disable <flowId> [--json]
imbrace workflow run <flowId> [--payload '<json>'] [--sync] [--json]
imbrace workflow runs [--limit 10] [--json]
imbrace workflow run-detail <runId> [--json]

Cú pháp Biến

Biểu thứcÝ nghĩa
{{trigger.body.X}}Trường X từ payload webhook
{{trigger.X}}Trường trigger cấp cao nhất
{{step_1.output.Y}}Trường đầu ra Y từ step_1
{{connections.<id>.access_token}}Trường kết nối

Tiện ích

In Tài liệu Tham khảo LLM

Terminal window
imbrace docs [--path] [--json]

In tệp llms.txt đã được đóng gói — một tài liệu tham khảo lệnh hoàn chỉnh được thiết kế để đưa vào ngữ cảnh của tác nhân lập trình (Claude, Cursor, v.v.).

CờHành vi
(không có)In toàn bộ tài liệu tham khảo ra stdout
--pathChỉ in đường dẫn tuyệt đối đến llms.txt
--jsonXuất { path, content } dưới dạng JSON
Terminal window
imbrace docs > /tmp/imbrace-llms.txt # lưu cho tác nhân AI

Các vấn đề đã biết

  1. Loại trường Dropdown — Backend từ chối. Sử dụng SingleSelection để thay thế.
  2. Provider ID so với _id — Sử dụng UUID provider_id, không phải MongoDB _id.
  3. Nội dung chỉ bằng tiếng Anh — Nội dung AI agent phải bằng tiếng Anh.
  4. workflow run --sync hết thời gian — Có thể hết thời gian ở ~60s. Sử dụng workflow runs + run-detail để thay thế.
  5. Bật trước khi xuất bảnworkflow enable yêu cầu workflow publish trước.
  6. Trường prompt của AI Connector — Phải là { prompt: { prompt: "text" } }.
  7. Khóa flow — Nếu một flow đang mở trong trình duyệt, các cập nhật CLI có thể bị từ chối.
  8. --no-use-memory khi tạo — Có thể không giữ được. Cập nhật sau khi tạo.
  9. Model nhà cung cấp hệ thống — Chỉ có Default. Các tên khác làm dropdown UI trống.