Registry / ai-ml / runtimeuse

runtimeuse

JSON →
library0.15.1jsnpmunverified

A TypeScript runtime package for executing AI agents inside sandboxes. Version 0.15.1 (active development) provides a WebSocket-based server that handles agent lifecycle: receives invocations, runs handler, manages artifact uploads, and returns structured results. Built with strong TypeScript types. Key differentiators: designed for sandbox environments, supports OpenAI and Claude built-in handlers, integrates with a Python client for external orchestration. Ships types, ESM and CJS compatible.

npm install runtimeuse
INSTALL
IMPORT
SIG · RUNTIMEUSE
R
runtimeuse
ai-mljavascriptv0.15.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RuntimeUseServer
import { RuntimeUseServer } from 'runtimeuse'
const RuntimeUseServer = require('runtimeuse').RuntimeUseServer
ESM import is preferred; CJS require works but destructure is needed.
openaiHandler
import { openaiHandler } from 'runtimeuse'
import openaiHandler from 'runtimeuse'
openaiHandler is a named export, not default.
AgentHandler
import type { AgentHandler } from 'runtimeuse'
import { AgentHandler } from 'runtimeuse'
AgentHandler is a type; use type import for runtime safety.

Shows minimal setup: import server and handler, create instance, start listening.

import { RuntimeUseServer, openaiHandler } from 'runtimeuse'; const server = new RuntimeUseServer({ handler: openaiHandler, port: 8080 }); await server.startListening(); console.log('Runtime server listening on port 8080');
Debug
Known issues
breakingThe default export was removed in v0.14.0. Use named exports.
fix
Replace import RuntimeUseServer from 'runtimeuse' with import { RuntimeUseServer } from 'runtimeuse'.
affects: >=0.14.0
deprecatedThe --agent flag in CLI uses 'openai' by default; 'claude' may require external CLI installation.
fix
Ensure claude CLI is installed in sandbox if using Claude handler.
affects: >=0.15.0
gotchaEnvironment variable OPENAI_API_KEY must be set for openaiHandler to work.
fix
Set OPENAI_API_KEY in sandbox environment before starting runtime.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: RuntimeUseServer is not a constructor
Using default import instead of named import after v0.14.0 breaking change.
fix
Use import { RuntimeUseServer } from 'runtimeuse' instead of import RuntimeUseServer from 'runtimeuse'.
Error: No agent handler specified
Missing 'handler' option in RuntimeUseServer constructor.
fix
Provide a handler: import { openaiHandler } from 'runtimeuse' and pass { handler: openaiHandler }.
Module not found: Can't resolve '@openai/agents'
Missing optional dependency for OpenAI handler.
fix
Install @openai/agents package or use a different handler.
Upgrade
Version history
0.15.1latest on npm
Audit
Dependencies
@openai/agentsoptionalDefault agent handler: openaiHandler
@anthropic-ai/claude-agent-sdkoptionalOptional agent handler: claudeHandler
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
runtimeuse — npm install runtimeuse · libregistry