---
slug: 00-quickstart
title: Quickstart
description: Synsema is a programming language designed for AI agents. Install it and run your first program, HTTP server and LLM call in minutes — a single static binary, no runtime.
example_ids: [hello-world]
---

# Quickstart

**Synsema is a programming language designed for AI agents** — LLM reasoning, multi-agent
coordination, human approval gates, an HTTP server and a deny-by-default security model are
built into the language, not bolted on as frameworks. It ships as a **single static binary**
(written in Rust) — no Python, no Node, no runtime to install.

## Install

macOS / Linux:

```sh
curl -fsSL https://synsema.org/install.sh | sh
```

Windows (PowerShell):

```powershell
irm https://synsema.org/install.ps1 | iex
```

From npm (Linux, macOS, Windows — the same native binary, nothing else runs; v0.6.3+):

```sh
npm i -g synsema          # then: synsema run app.syn
npx synsema run app.syn   # per project, no global install
```

Updating: `synsema update` (or `npm i -g synsema@latest` when npm installed it — the
binary notices and says so).

Check it:

```sh
synsema version
```

## Hello, world

The fastest start is the scaffold — it generates a commented `hello.syn` (a short tour of the
language, with its test), a `.env.example` with every knob explained, and a `.gitignore`:

```sh
synsema init my-project
```

Or write it yourself — put this in `hello.syn`:

```synsema
-- Doc example: your first Synsema program. Comments in English (universal code).
intent: "doc example: hello world + a tiny task"

task greet(name)
    give "Hello, " + name + "!"

print(greet("World"))                 -- run shows: Hello, World!

test "greet builds a friendly message"
    assert_eq(greet("World"), "Hello, World!")
    assert_eq(greet("Synsema"), "Hello, Synsema!")
```

Run it:

```sh
synsema run hello.syn
```

`synsema run` executes a file; `synsema test` runs its `test` blocks; `synsema check` parses without running.

## Your first HTTP server

Synsema has a production HTTP server built in — no framework to add. Everything is **deny-by-default**, so you declare what the program may do with `require`.

```synsema
require serve(8080)

serve on 8080
    route "GET /hello"
        give {"msg": "hi"}
```

```sh
synsema serve app.syn          # → http://127.0.0.1:8080/hello
```

## Your first web page

The same server serves real HTML. A page is a template with `{ holes }`; your CSS/JS live in `static/` (they hot-reload per request — edit, refresh, done):

```synsema
require serve(8080)

serve on 8080
    static "/assets" from "./static"        -- app.css, app.js
    route "GET /"
        give render("pages/home.html", {"title": "My site"})
```

```html
<!-- pages/home.html -->
<!DOCTYPE html><html><head><title>{ title }</title>
<link rel="stylesheet" href="/assets/app.css"></head>
<body><h1>{ title }</h1></body></html>
```

Full walkthrough (layout, components, forms, error pages): **[Build a website](41a-build-a-website)**.

## Your first LLM call

The LLM is a built-in primitive. Put your provider key in `.env` (it is never exposed to the program), then:

```synsema
require llm

let summary be generate "a one-line summary" given report
let action be decide between ["approve", "reject"] given request
```

The result of a `decide` is validated to be one of the options — with automatic retries. See **LLM** in the sidebar for native ops and for calling a provider's HTTP API directly.

## Next

- **[Try Synsema](https://try.synsema.org)** — learn by building software for real businesses, in the browser, nothing to install: courses, missions checked in a real sandbox, XP and levels.
- **[Counter your priors](/en/0.6.x/01-counter-your-priors)** — where Synsema differs from what an LLM assumes (read this before you write much).
- **[Capabilities & intent](/en/0.6.x/20-capabilities)** — the deny-by-default security model.
- **[Secrets](/en/0.6.x/21-secrets)** — API keys and tokens without ever exposing them.
- **[Your app on the phone (PWA)](/en/0.6.x/41b-pwa)** — `synsema init --pwa`: the site installs on Android, iOS and desktop, with native push.
