Registry / llm-agents / jaiph
library0.7.0jsnpmunverified

Jaiph is an open-source composable scripting language and runtime for defining and orchestrating AI agent workflows. Version 0.7.0 is the latest stable release, with ongoing development and breaking changes expected. Jaiph allows users to write `.jh` files that combine prompts, rules, scripts, and workflows into executable pipelines. The CLI parses source into an AST, validates references at compile time, and the Node workflow runtime interprets the AST directly. Key differentiators include a dedicated language for AI workflows, built-in test runner, sandboxing, and reporting capabilities. Jaiph is designed to be installed via npm or a curl script, and includes a CLI for running, testing, formatting, and reporting on workflows.

npm install jaiph
INSTALL
IMPORT
SIG · JAIPH
J
jaiph
llm-agentsjavascriptv0.7.0
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.

default
import jaiph from 'jaiph'
The package does not export a default module; use jaiph as a CLI tool.
parse
import { parse } from 'jaiph/parser'
import { parse } from 'jaiph'
Parser is exported from a subpath; importing from the root may fail.
Runtime
import { Runtime } from 'jaiph/runtime'
const Runtime = require('jaiph/runtime')
ESM-only; CommonJS require is not supported.
Validator
import { Validator } from 'jaiph/transpile/validate'
Validator is located in the transpile subpath; use the full path.

Define a workflow with a script, rule, and prompt in Jaiph language.

#!/usr/bin/env jaiph import "tools/security.jh" as security script check_deps = "test -f \"package.json\"" rule deps_exist() { if not run check_deps() { fail "Missing package.json" } } workflow default(task) { ensure deps_exist() const ts = run script() "date +%s" prompt "Build the application: ${task}" ensure security.scan_passes() } // Run with: ./main.jh "add user authentication"
jaiph --version
Debug
Known issues
breakingBreaking changes in minor versions as API evolves
fix
Pin exact version in package.json and check changelog before upgrades.
affects: >=0.1.0
gotchaImport paths require subpath exports (e.g., 'jaiph/parser'), not root
fix
Use 'jaiph/parser', 'jaiph/runtime', etc. instead of 'jaiph'.
affects: >=0.5.0
deprecatedOld CLI command 'jaiph run' without arguments will be removed in v1
fix
Always provide a workflow file or task argument.
affects: >=0.6.0
gotchaJaiph files require shebang for direct execution on Unix
fix
Add '#!/usr/bin/env jaiph' as the first line of .jh files.
affects: >=0.1.0
gotchaESM-only; CommonJS require does not work
fix
Use ES module imports (import) or async import() dynamic imports.
affects: >=0.3.0
Errors
Common errors & fixes
Error: Cannot find module 'jaiph'
Importing from the root instead of a subpath export.
fix
Use correct import path: import { parse } from 'jaiph/parser';
TypeError: jaiph.run is not a function
Using older API where run was a method; now it's a CLI command.
fix
Run 'jaiph run workflow.jh' in the terminal, not via API.
SyntaxError: Unexpected token '?'
Missing shebang or parser version mismatch.
fix
Ensure .jh file starts with '#!/usr/bin/env jaiph' and install jaiph globally.
Error: Failed to resolve import './tools/security.jh'
Relative import path is incorrect or file doesn't exist.
fix
Check that the imported file exists and the path is correct relative to the source file.
Upgrade
Version history
0.7.0latest on npm
Audit
Dependencies
commanderrequiredCLI argument parsing
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
jaiph — npm install jaiph · libregistry