Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Harn

Harn is a pipeline-oriented programming language for orchestrating AI coding agents. It has native LLM calls, tool use, structured output, and async concurrency built into the language.

pipeline default(task) {
  let tools = tool_registry()
    |> tool_add("search", "Search the web", search_fn, {query: "string"})

  let result = llm_call(task, "You are a research assistant", {
    tools: tools,
    response_format: "json",
  })

  log(result.data)
}

Getting started

Prerequisites

Harn is built with Rust. You’ll need:

  • Rust (1.70 or later) — install with curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Git

Install from source

git clone https://github.com/burin-labs/harn
cd harn && cargo build --release
cp target/release/harn ~/.local/bin/

Create a project and run it:

harn init my-agent
cd my-agent
export ANTHROPIC_API_KEY=sk-...
harn run main.harn

What’s in this guide