Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/iii-hq/sdk/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

Before installing the III SDK, ensure you have the following prerequisites for your chosen language:

Node.js Requirements

  • Node.js: Version 20 or higher
  • Package Manager: npm, pnpm, or yarn
  • TypeScript (optional): Version 5.9+ for TypeScript projects
The III SDK for Node.js is published as an ES module with TypeScript types included. It works seamlessly with both JavaScript and TypeScript projects.

Verify Your Installation

node --version  # Should be v20.0.0 or higher
npm --version   # Any recent version works

III Engine Setup

The III SDK requires a running III Engine instance to function. Make sure the engine is running before starting your application.
The III Engine should be running and accessible via WebSocket. By default, the engine runs on:
ws://localhost:49134
You can verify the engine is running by checking if the WebSocket endpoint is accessible:
# Using websocat (install with: cargo install websocat)
websocat ws://localhost:49134

# Or using wscat (install with: npm install -g wscat)
wscat -c ws://localhost:49134
Refer to the III Engine documentation for installation and setup instructions.

Installing the SDK

Using npm

npm install iii-sdk

Using pnpm

pnpm add iii-sdk

Using yarn

yarn add iii-sdk

Package Information

  • Package Name: iii-sdk
  • Current Version: 0.4.1
  • Registry: npm
  • License: Apache-2.0

Available Exports

The Node.js SDK provides multiple entry points:
import { III, getContext } from 'iii-sdk'

TypeScript Configuration

The SDK includes TypeScript definitions. Ensure your tsconfig.json is configured for ES modules:
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "esModuleInterop": true
  }
}

Dependencies

The SDK includes the following key dependencies:
  • ws - WebSocket client
  • @opentelemetry/* - OpenTelemetry packages for observability
All dependencies are automatically installed when you install the SDK.

Environment Configuration

Setting the Engine URL

You can configure the III Engine URL using environment variables:
export III_BRIDGE_URL=ws://localhost:49134
# or in your .env file
III_BRIDGE_URL=ws://localhost:49134
Then in your code:
import { III } from 'iii-sdk'

const iii = new III(process.env.III_BRIDGE_URL ?? 'ws://localhost:49134')

Verifying Installation

Create a simple test to verify your installation:
import { III } from 'iii-sdk'

const iii = new III('ws://localhost:49134')

iii.registerFunction({ id: 'test.ping' }, () => {
  return { status_code: 200, body: { message: 'pong' } }
})

const result = await iii.call('test.ping', {})
console.log('✅ Installation successful:', result)

Troubleshooting

This usually means the III Engine is not running or not accessible.Solutions:
  • Verify the engine is running: Check the engine process is active
  • Check the URL: Ensure you’re using the correct WebSocket URL
  • Check firewall: Ensure port 49134 is not blocked
  • Check network: If using Docker, ensure proper network configuration
This can happen with ES module configuration.Solutions:
  • Ensure your package.json includes "type": "module"
  • Use .mjs file extension for ES modules
  • Check your Node.js version is 20+
This can happen with virtual environment or Python path issues.Solutions:
  • Activate your virtual environment
  • Verify installation: pip show iii-sdk
  • Reinstall: pip install --force-reinstall iii-sdk
  • Check Python version: python --version should be 3.10+
This can happen with Rust version or dependency issues.Solutions:
  • Update Rust: rustup update
  • Check Rust version: rustc --version should be 1.85+
  • Clean build: cargo clean && cargo build
  • Update dependencies: cargo update
Issues with telemetry exports or configuration.Solutions:
  • Verify OpenTelemetry collector is running (if using one)
  • Check OTLP endpoint configuration
  • Disable telemetry temporarily to isolate the issue
  • Check environment variables for OTEL configuration

Next Steps

Quickstart Guide

Build your first application with the III SDK

API Reference

Explore the complete API documentation

Examples

Browse complete example applications

Telemetry Setup

Configure OpenTelemetry for observability

Build docs developers (and LLMs) love