A functional language with algebraic effects and isolated fibers. No garbage collector, no borrow checker.

Designed to be written with — and by — agents.

why this name?

effect.kai
effect Log {
  log(msg: String) : Unit
}

fn greet(name: String) : Unit / Log {
  Log.log("hello, #{name}")
}

fn main() {
  handle {
    greet("kaikai")
    greet("world")
  } with Log {
    log(msg, resume) -> {
      println("[INFO] #{msg}")
      resume(())
    }
  }
}

Why kaikai

Algebraic effects

Effects visible in the type, composable handlers. No async/await infecting the whole call stack.

Pipe family

Four operators, four intents: |> applies, | maps, || flat-maps, |? filters. Each form tells you what it does before you read the function.

No GC, no borrow checker

Perceus reference counting + isolated fibers. Memory is per-fiber; no global pauses.

Kinds: units, currencies, regions

Real<m/s> for measures, currencies that never mix, arenas via region { }. Information in the type, zero runtime cost.

Contracts & refinements

requires, ensures, Int where >= 0. What SPARK does, without an SMT solver.

Dialogue with the compiler

Holes (?), --holes-json, structured diagnostics. Designed for humans and agents to write together.