{"id":25776,"library":"jaiph","title":"Jaiph (jaiph)","description":"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.","status":"active","version":"0.7.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install jaiph","lang":"bash","label":"npm"},{"cmd":"yarn add jaiph","lang":"bash","label":"yarn"},{"cmd":"pnpm add jaiph","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"CLI argument parsing","package":"commander","optional":false}],"imports":[{"note":"The package does not export a default module; use jaiph as a CLI tool.","symbol":"default","correct":"import jaiph from 'jaiph'"},{"note":"Parser is exported from a subpath; importing from the root may fail.","wrong":"import { parse } from 'jaiph'","symbol":"parse","correct":"import { parse } from 'jaiph/parser'"},{"note":"ESM-only; CommonJS require is not supported.","wrong":"const Runtime = require('jaiph/runtime')","symbol":"Runtime","correct":"import { Runtime } from 'jaiph/runtime'"},{"note":"Validator is located in the transpile subpath; use the full path.","symbol":"Validator","correct":"import { Validator } from 'jaiph/transpile/validate'"}],"quickstart":{"code":"#!/usr/bin/env jaiph\n\nimport \"tools/security.jh\" as security\n\nscript check_deps = \"test -f \\\"package.json\\\"\"\n\nrule deps_exist() {\n  if not run check_deps() {\n    fail \"Missing package.json\"\n  }\n}\n\nworkflow default(task) {\n  ensure deps_exist()\n  const ts = run script() \"date +%s\"\n  prompt \"Build the application: ${task}\"\n  ensure security.scan_passes()\n}\n\n// Run with: ./main.jh \"add user authentication\"","lang":"jaiph","description":"Define a workflow with a script, rule, and prompt in Jaiph language."},"warnings":[{"fix":"Pin exact version in package.json and check changelog before upgrades.","message":"Breaking changes in minor versions as API evolves","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use 'jaiph/parser', 'jaiph/runtime', etc. instead of 'jaiph'.","message":"Import paths require subpath exports (e.g., 'jaiph/parser'), not root","severity":"gotcha","affected_versions":">=0.5.0"},{"fix":"Always provide a workflow file or task argument.","message":"Old CLI command 'jaiph run' without arguments will be removed in v1","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"Add '#!/usr/bin/env jaiph' as the first line of .jh files.","message":"Jaiph files require shebang for direct execution on Unix","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use ES module imports (import) or async import() dynamic imports.","message":"ESM-only; CommonJS require does not work","severity":"gotcha","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use correct import path: import { parse } from 'jaiph/parser';","cause":"Importing from the root instead of a subpath export.","error":"Error: Cannot find module 'jaiph'"},{"fix":"Run 'jaiph run workflow.jh' in the terminal, not via API.","cause":"Using older API where run was a method; now it's a CLI command.","error":"TypeError: jaiph.run is not a function"},{"fix":"Ensure .jh file starts with '#!/usr/bin/env jaiph' and install jaiph globally.","cause":"Missing shebang or parser version mismatch.","error":"SyntaxError: Unexpected token '?'"},{"fix":"Check that the imported file exists and the path is correct relative to the source file.","cause":"Relative import path is incorrect or file doesn't exist.","error":"Error: Failed to resolve import './tools/security.jh'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}