The Seq programming language

Ask.Compile.Run.

Seq turns ordered, plain-language requests into a native program: written by a model at compile time, built by GCC, run in a sandbox. Plain words in, native code out.

Try SeqInstall

Open source
MIT licensed

Command, source to results
1
Model calls at run time
0
Checked build stages
7
src/main.seq
model("https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct")
backend.C()
name = "top3Company"

step step1():
    ask("create a database file company.txt with 5 sample stock transactions")

step step2():
    ask("for each transaction created give me the total revenue of the company")

step step3():
    ask("create an image chart showing the 3 companies with the highest revenue")
seqc
$ seqc src/main.seq
[check]    src/main.seq: 3 step(s), 3 request(s), backend C
[plan]     accepted: 3 step(s), 2 declared output(s), 1 final
[compile]  ok (0.6 s, -O3)
[test]     3 passed, 0 failed
[build]    accepted
[run]      step 3 (step3): ok

Results:
  output/company.txt  (212 bytes)
  output/top3Company.png  (4.1 KiB)  final
A three-step Seq workflow, and an abridged view of what seqc prints while it builds and runs it.

Playground

Try Seq

Pick a workflow and press Run. The console shows what seqc prints as it takes plain requests to published files.

  • Run it twice. The second run reuses the accepted build: no inference, no compilation.
  • Pick the mistake. It is caught with its line and column before a model is ever started.

The playground replays example sessions in seqc's console format. Compiling for real needs GCC and a local model, so it happens on your machine, not in the browser.

Take the tour
src/main.seq
model("https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct")backend.C()name = "hello" step step1():    ask("print Hello from Seq")

One step, one request. The workflow that seqc new writes.

Output
Press Run to build and run this workflow.

Why Seq

Say what you want.
Ship a binary.

Seq is a programming language for ordered workflows. You write the steps as requests. Its compiler,seqc, turns the whole workflow into one native program, and keeps everything you need to check what it built.

The Seq mascot, a cyber sparrow in flight
  1. The request is the source

    A Seq file names a model, a backend, and ordered steps of plain-language requests. There are no expressions, branches, or loops to learn.

  2. The model works at compile time

    ask() is a compile-time directive. What you run is a native executable that never contacts a model.

  3. Sandboxed by the kernel

    Compilers and generated code run under Landlock and seccomp: no network, and no files beyond the ones they were granted.

  4. Every build explains itself

    The generated C, its assembly, the executable, the tests, and a record of every run are kept beside your outputs.

What Seq does not promise. Parsing and step order are deterministic. The synthesized program is not: a request in natural language is not a formal specification, and a program that compiles is not proof that it does what the request meant.

More reasons

How a build works

One command.
Seven stages.

seqc src/main.seq validates the workflow, builds it or reuses the last accepted build, runs it, and lists the results. The model writes code; everything around it is checked, compiled, tested, and confined.

  1. 1

    Parse and validate

    Every error is reported with its line and column, before any model access.

  2. 2

    Reuse or plan

    An accepted build for the same source, inputs, model, and toolchain is reused. Otherwise the model writes a plan.

  3. 3

    Generate C

    The model writes one function per step. seqc composes the program around them.

  4. 4

    Compile

    Policy check, gcc -O3 -S, link. Errors go back for repair, at most twice.

  5. 5

    Test

    The model writes Google Test cases, built and run in the sandbox.

  6. 6

    Run

    The executable runs in the sandbox, in a staging directory of its own.

  7. 7

    Publish

    Declared outputs are validated and published to output/.

  8. Read the architecture

A failed build never replaces the last accepted build and never runs a stale executable.

Get started

Two steps to your first build.

seqc targets Linux x86_64. The reference environment is Ubuntu 24.04 LTS; on Windows, use WSL2.

1 Install seqc

Terminal
curl -fsSL https://raw.githubusercontent.com/tomjnet/seq-lang/HEAD/install.sh | bash

Installs for the current user, with no root access. It takes the checksum-verified release package, or builds from source when no package fits.

2 Run a workflow

Terminal
seqc new top3Companycd top3Companyseqc doctorseqc model pullseqc src/main.seq

seqc doctor checks the prerequisites. seqc model pull downloads the model, about 1.1 GB, and verifies its SHA-256. It is the only command that downloads anything.

Learn Seq

Status

Version 0.1.0

The compiler pipeline is implemented and covered by a deterministic test suite that uses a scripted model.

  • Not yet verified with a real model. The llama.cpp adapter is tested only against a local stand-in for llama-server.
  • The sandbox is proven only on WSL2 so far.
  • Linux x86_64 and the C backend only.
View the source