Skip to main content
This quickstart walks you from a fresh install to a running Kairo application in a few minutes. You’ll create a console application from the built-in template, check it with Forge, build it, and run it on the Pulse runtime.
If you haven’t installed the Astra Kairo SDK yet, follow the Installation guide first, then come back here.

Verify Your Install

Open a new terminal and confirm the toolchain is on your PATH.
Expected result:
  • Exits with code 0
  • Prints Astra Kairo SDK Doctor
  • Reports Result: OK
  • Reports Studio, Forge, Pulse, and Kairo CLI executables present
If kairo doctor reports missing components, revisit the Installation page before continuing.

Create a New Project

Kairo ships with three templates: Console Application, Library, and Empty Package. For this quickstart we’ll use Console Application.
This creates a package with the following layout:
Open src/Program.ak and you’ll see a starting program that looks like this:
The module declaration on the first line is authoritative for the file’s identity. File paths should follow module names, but they never define language meaning.

Check the Code

Run Forge’s static check to validate the package before building.
Expected result:
  • Exits with code 0
  • Prints check succeeded
  • Reports the package name from kairo.toml

Build the Package

Compile the package to build artifacts with the managed backend.
Expected result:
  • Exits with code 0
  • Prints build succeeded
  • Emits artifacts under build/

Run on Pulse

Pulse consumes Forge-produced artifacts and executes them. It never parses Kairo source directly.
Expected output:
Expected exit code: 0.
pulse validate . is a lightweight pre-run check that verifies artifacts are well-formed without executing them. Use it in CI before pulse run.

Explore the Contact Preview Sample

The SDK ships a richer sample called Contact Preview that demonstrates value, object, enum, Result<T, E>, instance methods, match, Pulse.Console, and custom application exit codes.
1

Open the sample

Launch Studio and choose Open Sample Project → Contact Preview.
2

Check, build, and run

Run Check, then Build, then Run from the Studio toolbar.
3

Debug it

Set a breakpoint on any line in main, then start Debugging. Step through the code and inspect locals and watches.
Expected runtime output:
Expected process exit code: 42. You can also run the sample from the command line:

Where to Next

Language Syntax

Modules, imports, visibility, and file structure.

Types

Values, objects, contracts, and enums.

Functions

Free functions, methods, and async callables.

Command Catalog

Every language construct with syntax and examples.