node-red-contrib-ibmbob 0.1.5

Node-RED node to call IBM Bob Shell (bob) in headless mode and return the answer plus usage stats (cost / duration / tool calls).

npm install node-red-contrib-ibmbob

node-red-contrib-ibmbob

A Node-RED node that calls IBM Bob Shell (bob, 2.0+) in headless mode and returns the answer plus usage stats (cost / duration / tool calls).

Node-RED のフローから IBM Bob Shellbob)を呼び出し、回答と使用量 stats(コスト・所要時間・ツール呼び出し数)を返すノードです。

msg.payload (a prompt) → run bob run --format jsonmsg.payload = the answer, msg.stats = usage. msg.payload(プロンプト)→ bob run --format json を実行 → msg.payload に回答、msg.stats に使用量。


English

Requirements

  • bob (IBM Bob Shell 2.0+) installed on the machine running Node-RED, on PATH.
  • Authentication via an API key (BOB_API_KEY), set in the node's API Key credential.
  • If the key is of type general, also set Team ID (not needed for an Inference-scoped key).

Install

Use Node-RED's Manage palette and search for node-red-contrib-ibmbob, or:

cd ~/.node-red
npm install node-red-contrib-ibmbob

Usage

  • Input: msg.payload (string) — the prompt sent to Bob.
  • Output:
    • msg.payload — the final answer (last_message)
    • msg.stats{ duration_ms, session_costs, tool_calls, ... }
    • msg.bob — the full raw JSON from bob

A minimal flow: inject (set payload to a prompt) → ibmbobdebug.

Options

Option Description
API Key BOB_API_KEY (required, stored as an encrypted credential)
Team ID required only for a general-type key
Mode agent (default) / ask
Timeout (ms) default 120000. LLM calls can be slow — give it room
Max turns / Max cost guardrails (--max-turns / --max-cost)
Disable MCP adds --disable-mcp to skip MCP init for speed

Notes

  • The node runs bob via child_process.execFile and closes stdin immediatelybob run blocks waiting on stdin otherwise. If you build a similar integration yourself, remember to end stdin.
  • LLM calls are asynchronous; the node uses the Node-RED send/done pattern and an execFile timeout.
  • Read-only by default. Enabling write-capable tools requires the corresponding Bob-side setting; keep it conservative in automation.

日本語

要件

  • Node-RED を動かすマシンに bob(IBM Bob Shell 2.0+) がインストール済みで PATH が通っていること。
  • 認証は API キーBOB_API_KEY)。ノードの API Key(credentials)に設定します。
  • キー種別が general の場合は Team ID も設定(Inference スコープのキーなら不要)。

インストール

Node-RED の パレット管理(Manage palette)node-red-contrib-ibmbob を検索、または:

cd ~/.node-red
npm install node-red-contrib-ibmbob

使い方

  • 入力: msg.payload(文字列)= Bob に渡すプロンプト
  • 出力:
    • msg.payload — 最終回答(last_message
    • msg.stats{ duration_ms, session_costs, tool_calls, ... }
    • msg.bobbob の生 JSON 全体

最小フロー: injectpayload にプロンプト)→ ibmbobdebug

オプション

項目 説明
API Key BOB_API_KEY(必須・暗号化 credential 保存)
Team ID general キーのときのみ必要
Mode agent(既定)/ ask
Timeout(ms) 既定 120000。LLM 呼び出しは長引くので余裕を
Max turns / Max cost 暴走・課金の予防線(--max-turns / --max-cost
Disable MCP --disable-mcp を付けて MCP 初期化を飛ばし高速化

補足

  • ノードは child_process.execFilebob を実行し、stdin を即クローズします(bob run は stdin が開いたままだと入力待ちでハングするため)。同様の連携を自作する場合も stdin を閉じるのを忘れずに。
  • LLM 呼び出しは非同期のため、Node-RED の send/done 作法と execFile の timeout で実装しています。
  • 既定は read-only 寄り。書き込み系ツールを使わせる場合は Bob 側の設定が必要ですが、自動化では控えめに倒すのが安全です。

License

MIT © 2026 Shoichiro Sakaigawa

Status

v0.1.0 — initial release (stdio / execFile). Verified end-to-end on a live Node-RED instance. If IBM Bob exposes a public HTTP API, an HTTP transport may be added later.

Node Info

Version: 0.1.5
Updated 4 days ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

630 in the last week

Nodes

  • ibmbob

Keywords

  • node-red
  • ibm
  • bob
  • bobshell
  • ai
  • llm
  • agent
  • assistant

Maintainers