Skip to content

Architecture

ai-in-pm edited this page Mar 15, 2026 · 1 revision

Architecture

High-Level Design

NemoClawd uses a bridge-first architecture: the Node.js layer orchestrates all operations and calls into the Python layer when NeMo workflow execution is required. Results always flow back to Node as structured JSON.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   ClawdBot Runtime                  β”‚
β”‚              (Node.js / TypeScript)                 β”‚
β”‚                                                     β”‚
β”‚   Canvas UI ──► Orchestrator ──► NemoBridge (TS)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ JSON over stdio / HTTP
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              NemoClawd Python Bridge                β”‚
β”‚                (nemoclawd-bridge)                   β”‚
β”‚                                                     β”‚
β”‚         subprocess ──► nat CLI                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          NVIDIA NeMo Agent Toolkit                  β”‚
β”‚              (nat workflow engine)                  β”‚
β”‚                                                     β”‚
β”‚   Workflow YAML ──► Agent ──► Tools ──► Results    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Components

1. ClawdBot Runtime (apps/clawdbot-main/)

The Node.js/TypeScript production runtime. Handles:

  • Canvas UI rendering and branding
  • User interaction and session management
  • Outbound transcript mirroring
  • Orchestration of all AI operations

2. NemoBridge (src/nemo-bridge.ts)

The TypeScript bridge module. Responsible for:

  • Spawning the Python bridge subprocess
  • Serialising requests to JSON
  • Deserialising structured responses
  • Error handling and timeout management

3. NemoClawd Python Bridge (python_src/nemoclawd_bridge/)

A lightweight Python package that:

  • Receives JSON requests from NemoBridge
  • Invokes nat CLI commands
  • Returns structured JSON results to Node
  • Handles NeMo workflow lifecycle

4. NeMo Agent Toolkit (apps/NeMo-Agent-Toolkit-develop/)

NVIDIA's full NeMo Agent Toolkit. Provides:

  • nat CLI for workflow execution
  • Agent definitions and tool integrations
  • Evaluation and profiling infrastructure
  • HITL (Human-in-the-Loop) support

5. System-of-Record (system-of-record.json)

The identity anchor. Verified at launch by scripts/verify-system-of-record.mjs. Contains:

  • Runtime identity configuration
  • Build metadata
  • Capability declarations

Data Flow

Standard Request

User Input
  └─► ClawdBot Orchestrator
        └─► NemoBridge.execute(workflow, params)
              └─► Python Bridge (subprocess)
                    └─► nat run <workflow>.yml --params <json>
                          └─► NeMo Agent executes tools
                                └─► Structured JSON result
              ◄── JSON response
        ◄── Parsed result object
  ◄── Rendered response to user

Build Flow

pnpm run build:all
  β”œβ”€β–Ί tsc (TypeScript compilation)
  β”œβ”€β–Ί build-node.mjs (Node bundle)
  β”œβ”€β–Ί bootstrap-python.mjs (venv setup)
  β”œβ”€β–Ί build-python.mjs (wheel build)
  └─► collect-artifacts.mjs (output staging)

File Structure

NemoClawd/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts              # Entry point
β”‚   └── nemo-bridge.ts        # NemoBridge implementation
β”œβ”€β”€ python_src/
β”‚   └── nemoclawd_bridge/
β”‚       β”œβ”€β”€ __init__.py
β”‚       └── __main__.py       # Python bridge entry point
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ bootstrap-python.mjs  # Python venv setup
β”‚   β”œβ”€β”€ build-node.mjs        # Node bundle build
β”‚   β”œβ”€β”€ build-python.mjs      # Python wheel build
β”‚   β”œβ”€β”€ collect-artifacts.mjs # Artifact staging
β”‚   β”œβ”€β”€ run-clawdbot-with-nemo.mjs  # Launch script
β”‚   β”œβ”€β”€ smoke-test.mjs        # Integration smoke test
β”‚   └── verify-system-of-record.mjs # SoR validation
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ clawdbot-main/        # ClawdBot Node.js runtime
β”‚   └── NeMo-Agent-Toolkit-develop/  # NVIDIA NeMo Toolkit
β”œβ”€β”€ artifacts/                # Build outputs and logs
β”œβ”€β”€ workflows/                # NeMo workflow definitions
β”œβ”€β”€ system-of-record.json     # Identity anchor
β”œβ”€β”€ package.json              # Node workspace config
β”œβ”€β”€ pyproject.toml            # Python package config
β”œβ”€β”€ tsconfig.json             # TypeScript config
β”œβ”€β”€ Dockerfile                # Container build
└── docker-compose.yml        # Compose services

Clone this wiki locally