v0.5.5 is out

The NTNT
Programming Language.

The agent-optimized language for building modern applications.

import { json, parse_json } from "std/http/server"
import { schema, validate, required, email } from "std/validate"

let signup_rules = schema(map {
    "email": [required, email],
    "name": [required, str]
})

// @implements: feature.signup
fn signup(req)
    requires len(req.body) < 4096
{
    let body = parse_json(req) otherwise {
        return json(map { "error": "bad json" }, 400)
    }
    let user = validate(signup_rules, body) otherwise {
        return json(map { "errors": err }, 422)
    }
    return json(map { "welcome": user["name"] }, 201)
}

post("/signup", signup)
listen(8080)
## Glossary

| Term                          | Means                     |
|-------------------------------|---------------------------|
| someone signs up with {body}  | POST /signup body {body}  |
| they are welcomed             | status 201                |
| they are asked to fix it      | status 422                |

---

Feature: Signup
  id: feature.signup

  Scenario: Valid details
    When someone signs up with {"email": "[email protected]", "name": "Ada"}
    → they are welcomed
    → body contains "Ada"

  Scenario: Bad email
    When someone signs up with {"email": "nope", "name": "Ada"}
    → they are asked to fix it
$ ntnt intent check server.tnt -vv

✓ Feature: Signup
  ✓ Valid details
      → they are welcomed
      → body contains "Ada"
        ✓ status: 201
        ✓ body contains "Ada"
  ✓ Bad email
      → they are asked to fix it
        ✓ status: 422

=== Summary ===
Features:   1 total, 1 passed, 0 failed
Scenarios:  2 passed, 0 failed, 0 skipped
Assertions: 3 passed, 0 failed

Built for agentic development.

Every major programming language was designed for people writing code by hand. NTNT is designed for agents writing the code while people decide what it should do, so the language, the tooling, and the standard library are all built around how an agent works.

Self-teaching language
ntnt learn writes setup files for Claude Code, Cursor, Codex, and Copilot, and ntnt docs answers any question about a function from the terminal. Your agent doesn’t need NTNT in its training data.
Closed-loop verification
With Intent-Driven Development, your requirements become scenarios, and ntnt intent check runs them against the real code after every change. ntnt lint and ntnt validate report errors as JSON, and ntnt inspect lists every route, function, and contract. The server hot-reloads, so each change is checked in seconds.
Operational minimalism
HTTP, databases, auth, jobs, and email are in one binary, under 30 MB for Linux x64. Every package install is a step where an agent can go wrong, and there’s no dependency tree to audit or install script to run, a common route for supply-chain attacks on npm and PyPI.
Flexible types, strict errors
Start without type annotations and add them where they help. NTNT_TYPE_MODE sets how strictly types are checked at runtime and NTNT_LINT_MODE sets how strictly they’re checked before it runs, so a prototype and a production app can use the same code. Errors are Result values, handled with ? or otherwise instead of slipping past, and requires and ensures report the values that broke them. In a route, a failed requires returns a 400.
Security-forward architecture
Templates escape output, fetch blocks private network addresses, responses get security headers, and std/secrets keeps credentials out of logs and pages.

Built with NTNT.

Applications running on NTNT in production today.

See all projects

Intent-driven development.

Describe what the app should do in plain sentences, and NTNT turns them into tests. Scenarios are written in the Intent Assertion Language (IAL), where a glossary maps each phrase to a concrete check against routes, responses, or functions. Contracts check the code from the inside: requires and ensures state what each function accepts and returns, and fail with the values that broke them. Your agent writes both from your request, runs them after every change, and fixes what fails.

  1. Describe the intent

    Your agent writes your requirements as IAL scenarios in a .intent file, and ntnt intent lint confirms every phrase resolves before anything runs.

    ntnt intent lint server.intent
  2. Implement against it

    @implements ties each function to the requirement it serves. requires and ensures check what goes in and what comes out.

    ntnt lint server.tnt
  3. Verify, then iterate

    ntnt intent check runs every scenario against the real code and reports each assertion. Your agent fixes what fails and runs it again.

    ntnt intent check server.tnt

How Intent-Driven Development works, with coverage reports and a visual studio

What you can build.

Each of these has a recipe with a working example or a prompt you can hand to your agent.

Server-rendered websites.

Routes render HTML templates with escaped output, loops, conditionals, and shared partials. No front-end build step, and no template package to install.

Build a website with templates

Google and GitHub login.

std/auth handles OAuth and OpenID Connect for Google, GitHub, Microsoft, Apple, and others, with sessions and CSRF protection. A few lines turn on login; no auth package needed.

Add social login

Sign-in and secrets.

Magic-link authentication includes sessions and rate limiting. std/secrets keeps secret values redacted in logs and rendered output.

Build a passwordless flow

Durable background jobs.

Jobs live in PostgreSQL or Redis. Several workers can share a queue, pick up work left by a worker that crashed, and retry on failure. ntnt jobs and ntnt workers show the queue and scale workers while they run.

Queue email safely

Network monitoring.

DNS, ICMP, TCP, and SNMP checks are native APIs. Persistent ping probes keep results current, and a check that starts late is reported as late.

Build a network check

Function-level tests.

Call ordinary functions from .intent scenarios to test business rules without starting an HTTP server.

Run a function-level intent test

538 functions. 28 modules. One binary.

Web servers, databases, authentication, and background jobs ship in the runtime. ntnt docs gives an agent any function’s signature and examples without leaving the terminal.

Web

  • std/http/serverRouting, middleware, static files, response builders
  • std/httpFetch with SSRF protection and safe redirects
  • std/authOAuth/OIDC, sessions, CSRF, TOTP, magic links
  • std/validateDeclarative schemas for forms and APIs
  • std/emailSMTP, batches, and a log transport for dev

Data

  • std/postgresPooled queries and transactions
  • std/sqliteEmbedded database with transaction modes
  • std/kvRedis, Valkey, SQLite, or in-memory
  • std/json std/csvParse and serialize
  • std/markdownRendering and source-mapped block parsing

Runtime

  • std/jobsDurable queues, cron, retries, crash-safe leases
  • std/concurrentTasks, channels, select, parallel, race
  • std/processSupervised child processes, off by default
  • std/secretsOpaque, redacted secret values
  • std/logStructured logs with JSON context

Everything else

  • std/net std/netmonCIDR math, ping, TCP, DNS, SNMP
  • std/string std/collectionsText and higher-order data tools
  • std/time std/mathDates, durations, “3 hours ago”
  • std/cryptoHashing, AES-GCM, Argon2, UUIDs
  • std/fs std/path std/env std/urlFiles, paths, config, URLs

Full standard library reference

HTTP performance.

Requests are handled by a Rust HTTP server on Tokio, and your route handlers run in the NTNT interpreter. In our nine-framework comparison, NTNT served over 300,000 plaintext requests per second.

How we benchmark NTNT

Actix (Rust)477K
Gin (Go)406K
NTNT303K
FastAPI174K
Hono (Bun)118K
Fastify81K
Express18K
Django18K
Rails11K
Plaintext requests / sec · NTNT 0.4.2 comparison

Built in the open.

NTNT is open source under MIT and Apache 2.0. The code, the issues, and the roadmap are on GitHub.

Latest
v0.5.5
Commits
696
Stdlib functions
538
Modules
28