jaiph
v0.7.0
Published
jaiph compiler/transpiler
Downloads
16
Readme
jaiph.org · Getting Started · Grammar · CLI · Configuration · Testing · Hooks · Inbox & Dispatch · Sandboxing · Reporting · Architecture · Contributing
Open Source · Powerful · Friendly
What is Jaiph?
Jaiph is a composable scripting language and runtime for defining and orchestrating AI agent workflows. You 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.
[!WARNING] Jaiph is still in an early stage. Expect breaking changes.
Core components
- CLI (
src/cli) —jaiph run/test/format/report/init/use; spawns the workflow runner, parses live events, runs hooks. - Parser (
src/parser.ts,src/parse/*) —.jh/.test.jh→ AST. - Validator (
src/transpile/validate.ts) — imports and symbol references at compile time. - Transpiler (
src/transpile/*) — emits atomicscriptfiles underscripts/only (no workflow-level shell). - Node workflow runtime (
src/runtime/kernel/node-workflow-runtime.ts,graph.ts) — interprets the AST;buildRuntimeGraph()is parse-only across imports. - Node test runner (
src/runtime/kernel/node-test-runner.ts) —*.test.jhblocks with mocks. - JS kernel (
src/runtime/kernel/) — prompts, managed scripts,__JAIPH_EVENT__, inbox, mocks. - Reporting (
src/reporting/*) — reads.jaiph/runsandrun_summary.jsonlforjaiph report.
Diagrams, runtime contracts, on-disk artifact layout, and distribution: Architecture. Test layers and E2E policy: Contributing.
Quick try
Run a sample workflow without installing anything first:
curl -fsSL https://jaiph.org/run | bash -s '
workflow default() {
const response = prompt "Say: Hello I'\''m [model name]!"
log response
}'Requires node and curl. The script installs Jaiph automatically if needed.
Install
curl -fsSL https://jaiph.org/install | bashOr install from npm:
npm install -g jaiphVerify: jaiph --version. Switch versions: jaiph use nightly or jaiph use 0.7.0.
Example
#!/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()
}./main.jh "add user authentication"For the full language reference, see Grammar. For CLI commands, configuration, testing, sandboxing, hooks, and inbox dispatch, see Getting Started or visit jaiph.org.
Resources
- Getting Started — install, first run, language overview
- Examples — runnable
.jhfiles matching the landing-page samples - Agent skill — for AI assistants authoring
.jhworkflows
Contributing
See Contributing for branch strategy, pull requests, the test layers, and code style. Use GitHub Issues for bugs and feature discussion.

