@imbrace/cli 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/ai-agent/create.d.ts +1 -0
- package/dist/commands/ai-agent/create.js +5 -0
- package/dist/commands/document-ai/create.d.ts +18 -0
- package/dist/commands/document-ai/create.js +76 -0
- package/dist/commands/document-ai/delete.d.ts +13 -0
- package/dist/commands/document-ai/delete.js +41 -0
- package/dist/commands/document-ai/get.d.ts +12 -0
- package/dist/commands/document-ai/get.js +45 -0
- package/dist/commands/document-ai/list.d.ts +11 -0
- package/dist/commands/document-ai/list.js +42 -0
- package/dist/commands/document-ai/process.d.ts +21 -0
- package/dist/commands/document-ai/process.js +58 -0
- package/dist/commands/document-ai/suggest-schema.d.ts +12 -0
- package/dist/commands/document-ai/suggest-schema.js +37 -0
- package/dist/commands/document-ai/update.d.ts +20 -0
- package/dist/commands/document-ai/update.js +76 -0
- package/dist/commands/guardrail/create.d.ts +19 -0
- package/dist/commands/guardrail/create.js +69 -0
- package/dist/commands/guardrail/delete.d.ts +13 -0
- package/dist/commands/guardrail/delete.js +41 -0
- package/dist/commands/guardrail/get.d.ts +12 -0
- package/dist/commands/guardrail/get.js +42 -0
- package/dist/commands/guardrail/list.d.ts +9 -0
- package/dist/commands/guardrail/list.js +40 -0
- package/dist/commands/guardrail/update.d.ts +20 -0
- package/dist/commands/guardrail/update.js +49 -0
- package/dist/commands/orchestrator/create.d.ts +18 -0
- package/dist/commands/orchestrator/create.js +68 -0
- package/dist/commands/orchestrator/delete.d.ts +13 -0
- package/dist/commands/orchestrator/delete.js +41 -0
- package/dist/commands/orchestrator/get.d.ts +12 -0
- package/dist/commands/orchestrator/get.js +52 -0
- package/dist/commands/orchestrator/list.d.ts +9 -0
- package/dist/commands/orchestrator/list.js +41 -0
- package/dist/lib/ai-agent.d.ts +8 -0
- package/dist/lib/ai-agent.js +61 -4
- package/llms.txt +55 -0
- package/package.json +10 -1
package/llms.txt
CHANGED
|
@@ -182,6 +182,61 @@ The route mirrors the frontend `createCustomUseCase` payload (see `new-frontend/
|
|
|
182
182
|
|
|
183
183
|
If the user describes an agent in Vietnamese, translate the full payload to English before calling `imbrace ai-agent create`.
|
|
184
184
|
|
|
185
|
+
### Agent types
|
|
186
|
+
|
|
187
|
+
`imbrace ai-agent create` defaults to `agent_type: "agent"`. Override with `--agent-type` (options: `agent | assistant | conversational | workflow`). For `document_ai`, use the dedicated topic below.
|
|
188
|
+
|
|
189
|
+
## Orchestrator Commands
|
|
190
|
+
|
|
191
|
+
An Orchestrator is an AI Agent stored with `agent_type: "team_lead"` that delegates work to `sub_agents` / `team_leads`. Mirrors the "Orchestrator" choice in the UI's Create dialog.
|
|
192
|
+
|
|
193
|
+
- `imbrace orchestrator list --json` — Filters AI Agents where `agent_type=team_lead` (client-side; SDK has no server filter).
|
|
194
|
+
- `imbrace orchestrator get <id> --json` — Fetches the use case + underlying assistant; sub_agents are stored on the assistant.
|
|
195
|
+
- `imbrace orchestrator create -n "Name" -i "Routing instructions" --sub-agents id1,id2 [--team-leads id3] [--model] [--provider-id] [--temperature] --json`
|
|
196
|
+
- `imbrace orchestrator delete <id> --yes --json`
|
|
197
|
+
|
|
198
|
+
**Implementation notes** (the platform has 2 quirks the CLI works around for you — useful to know if you debug):
|
|
199
|
+
- Orchestrator-ness is encoded as `agent_type: "team_lead"` (NOT a separate `is_orchestrator` boolean). The webapp does the same conversion.
|
|
200
|
+
- `sub_agents` / `team_leads` must be **assistant IDs (UUIDs)**, not use-case IDs (`uc_*`). CLI auto-resolves any `uc_*` you pass via `client.agent.get()` lookup.
|
|
201
|
+
- `createUseCase` ignores both fields above on the assistant payload, so the CLI does a 2-step: create → `chatAi.updateAiAgent` PUT to apply them.
|
|
202
|
+
|
|
203
|
+
## Guardrail Commands
|
|
204
|
+
|
|
205
|
+
A Guardrail is a content-safety / compliance layer attached to AI Agents via `--guardrail-id`. Mirrors the "Guard Rail" choice in the UI's Create dialog.
|
|
206
|
+
|
|
207
|
+
- `imbrace guardrail list --json`
|
|
208
|
+
- `imbrace guardrail get <id> --json`
|
|
209
|
+
- `imbrace guardrail create -n "Name" -i "Block PII" [--model nim-nemo|model-armor] [--guardrail-provider-id <uuid>] [--unsafe-categories "violence,hate"] [--custom-unsafe-patterns "regex1,regex2"] [--competitor-keywords "X,Y"] --json`
|
|
210
|
+
- `imbrace guardrail update <id> -n -i --model [partial] --json` — PUT (full replace; name/model/instructions required).
|
|
211
|
+
- `imbrace guardrail delete <id> --yes --json`
|
|
212
|
+
|
|
213
|
+
**Implementation notes** (CLI handles these for you — useful when reading raw SDK output):
|
|
214
|
+
- Default model is `nim-nemo` (NVIDIA NIM Nemo). `model-armor` (Google) is the other built-in option; for any other model, pass `--guardrail-provider-id` referencing a custom guardrail provider.
|
|
215
|
+
- Backend requires `org_id` — CLI auto-fetches it via `client.account.getAccount()`. Override with `--org-id` if needed.
|
|
216
|
+
- `model-armor` ignores `instructions`, `custom_unsafe_patterns`, and `competitor_keywords`. CLI strips them automatically when `--model model-armor`.
|
|
217
|
+
- ID field returned by backend is `guardrails_config_id`, not `_id`. CLI normalizes both internally so `--id-only` and `get <id>` work as expected.
|
|
218
|
+
|
|
219
|
+
## Document AI Commands
|
|
220
|
+
|
|
221
|
+
A Document AI agent extracts structured JSON from unstructured documents (PDFs, images, scanned forms). Each agent has a **schema** defining fields to extract, **instructions** guiding the LLM, and a **model + provider**. Backend stores them as AI Agents with `agent_type: "document_ai"`.
|
|
222
|
+
|
|
223
|
+
- `imbrace document-ai list [--search <q>] [--all] --json` — List Document AI agents. `--all` includes regular agents (default: `documentAiOnly`).
|
|
224
|
+
- `imbrace document-ai get <agentId> --json` — Show details + extraction schema.
|
|
225
|
+
- `imbrace document-ai create -n "X" -i "instructions" --model gpt-4o --schema '<json>' [--provider-id <uuid>] [--description] [--workflow-name] --json` — Create. Schema can also be loaded from a file via `--schema-file ./schema.json`.
|
|
226
|
+
- `imbrace document-ai update <agentId> [--name|--instructions|--model|--provider-id|--schema|--schema-file|--description|--workflow-name] --json` — Partial update.
|
|
227
|
+
- `imbrace document-ai delete <agentId> --yes --json`
|
|
228
|
+
- `imbrace document-ai process --url <url> --org-id <orgId> [--agent-id <id>] [--model] [--instructions] [--board-id] [--language] [--additional-instructions] [--chunk-size] [--max-concurrent] [--max-retries] [--no-enhanced-processing] --json` — Run extraction on a PDF/image URL. Either `--agent-id` or `--model` is required.
|
|
229
|
+
- `imbrace document-ai suggest-schema --url <url> --org-id <orgId> [--model] --json` — Ask the LLM to inspect a sample document and propose a schema.
|
|
230
|
+
|
|
231
|
+
Schema example:
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"invoice_number": { "type": "string", "description": "Invoice ID" },
|
|
235
|
+
"total_amount": { "type": "number" },
|
|
236
|
+
"due_date": { "type": "string", "format": "date" }
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
185
240
|
## Workflow Commands
|
|
186
241
|
|
|
187
242
|
A workflow (powered by Activepieces) is a chain of nodes: a trigger fires, then actions run in sequence. Use it for automation — e.g. "when Slack message arrives → ask AI → reply to thread".
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imbrace/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tool for interacting with the Imbrace CRM platform from the terminal",
|
|
6
6
|
"repository": {
|
|
@@ -53,6 +53,15 @@
|
|
|
53
53
|
"ai-agent": {
|
|
54
54
|
"description": "Manage AI agents — run `imbrace ai-agent --help` to see all commands"
|
|
55
55
|
},
|
|
56
|
+
"document-ai": {
|
|
57
|
+
"description": "Manage Document AI agents (extract structured JSON from PDFs/images) — run `imbrace document-ai --help`"
|
|
58
|
+
},
|
|
59
|
+
"orchestrator": {
|
|
60
|
+
"description": "Manage Orchestrator agents (coordinate sub-agents toward a shared goal) — run `imbrace orchestrator --help`"
|
|
61
|
+
},
|
|
62
|
+
"guardrail": {
|
|
63
|
+
"description": "Manage Guardrails (safety rules + compliance constraints) — run `imbrace guardrail --help`"
|
|
64
|
+
},
|
|
56
65
|
"workflow": {
|
|
57
66
|
"description": "Manage workflows (Activepieces) — run `imbrace workflow --help` to see all commands"
|
|
58
67
|
},
|