Programming language · AI agent framework · secure by default
Humans read the page.
Agents read the source.
One URL, content-negotiated. Synsema is a fast, secure-by-default programming language for AI agents, with the agent framework built in: the same route serves HTML to people and Markdown to models. Flip the panel to see the exact Markdown an LLM gets from this page.
Learn by building at try.synsema.org — courses with a real sandbox, nothing to install.
# Synsema > A programming language for AI agents. ## What it is - Fast. 47,200 req/s, ahead of Go and Node. - Secure by default. No `require`, no access. - Agent-native. One route, HTML or Markdown. ## Install curl -fsSL synsema.com/install.sh | sh Agent index: /llms.txt
Synsema
A programming language for AI agents.
- Throughput
- 47,200req/s
- vs Go (net/http)
- +10%
- Secure by default
- ✓
- Agent-native
- ✓
↑ same resource, two representations · curl -H "Accept: text/markdown" synsema.com/lang
Fast · req/s at c=50
47,200req/s
Ahead of Go (42,800) and Node (38,700)1. Async-native, true multi-core, one static binary, zero runtime.
Secure by default
-- no require, no access require net("api.shop.com") fetch("api.shop.com") ✓ allowed fetch("evil.com") ⊘ refused
No require, no access — the interpreter refuses, not a code review. Auth, validation and intent are declarative.
Agent-native
This page is the demo. Every route serves HTML to people and Markdown/JSON to agents, with /llms.txt, /sitemap.xml and /openapi.json derived from the route table.
The docs expose an MCP server: agents search, read, run and test code through one endpoint.
1 · measured on a Linux VPS, 6 workloads, c=50, median of runs (first discarded). Reproducible harness: synsema-arena.
What you build with it
An AI agent framework and a programming language, in one binary.
Everything an agentic app needs is in the language, not in a framework glued on top: LLM calls, tool use, memory, human-in-the-loop, multi-agent orchestration, a production server and the security model. So the same language also builds the API, the site, the phone and desktop app, the cron job and the CLI around the agent.
Agents
AI agents & LLM apps
reason, decide, analyze, generate are primitives: validated answers, retries, any provider, the key sealed as a secret.
Orchestration
Multi-agent systems
Agents on real threads, a shared blackboard, signals, an event bus and durable memory — no message broker to run.
docs ↗Human-in-the-loop
Approvals and gates
approve, confirm, ask wait for a real person, in the terminal or queued behind one-time links; nobody there means denied.
Tools
MCP servers
Expose what a program can do to Claude Code, Cursor or Lampson. The docs site's own MCP server is written this way.
docs ↗Backends
REST APIs & CRUD
Routes, declarative auth and validation, pagination, SQLite, Postgres, MySQL, Mongo or Redis — in one file, with the production server built in.
docs ↗Realtime
Agentic apps
Incoming WebSockets, child processes you watch line by line, one select over all of it, cancellation and ordered shutdown.
Web
Websites, SSR
Templates, layouts and components; every page negotiated for agents; /llms.txt, sitemap and OpenAPI for free. This site is one.
Deploy
Automatic HTTPS
--tls-auto you@site.com: Let's Encrypt certificates and renewals, HTTP/2, www to apex, a reverse proxy when you need one.
Apps
One app: web, phone and desktop
synsema init --desktop: the same server-rendered app installs on Android and iOS as a PWA with native push, and ships as a desktop app — one binary, a browser app window, your icon, no console.
Automation
Cron, webhooks, jobs
Scheduled tasks and live feeds over WebSocket; long-running work under a real event loop, with observability built in.
docs ↗Data
Data & charts
CSV, SQL, stats, numeric arrays and native SVG charts that agents read as data and humans as pictures; PNG and PDF export.
docs ↗Ship
One binary, or WASM
synsema build seals program and assets into one executable; the interpreter also runs in browsers, edge runtimes and TEEs.
One file
The whole backend, with its permissions on top.
A Synsema program opens by declaring what it may touch. Everything under that line runs inside it: the routes, the database, the secrets, the model. Both files below parse and run as written.
-- A bookshop API. The `require` lines are the whole permission
-- surface: a port, one database file, one secret. Nothing else.
intent: "public read API; writes need the staff token"
require serve(8080)
require db("./shop.db")
require secret("API_TOKEN")
task check_token(token)
let want be hmac_sha256("staff", token)
when verify_hmac("staff", want, secret("API_TOKEN"))
give {"role": "staff"}
give nothing
serve on 8080
auth with check_token
rate_limit 120 per minute
route "GET /books"
give paged("SELECT id, title, price FROM books")
route "POST /books" requires auth
expect body {title: text, price: number}
let b be json of request
sql_exec("INSERT INTO books (title, price) VALUES (?, ?)",
[b.title, b.price])
give created(b)
route "GET /about"
let doc be page([heading(1, "Bookshop"),
prose("HTML or Markdown, one route.")],
{"title": "Bookshop"})
give content(doc)-- An agent that triages support tickets. The model decides;
-- a human approves refunds; the API key is a sealed secret.
intent: "triage open tickets; refunds wait for a human"
require llm
require net("api.example.com")
require secret("SUPPORT_TOKEN")
let api be "https://api.example.com"
let auth be {"Authorization": bearer(secret("SUPPORT_TOKEN"))}
let r be http_get(api + "/tickets?open=1", auth)
let tickets be json_decode(body of r)
each t in tickets
let msg be t["text"]
let kind be decide between ["bug", "billing", "other"] given msg
when kind == "billing"
let amount be analyze msg for "the amount to refund"
let who be t["customer"]
approve "Refund " + text(amount) + " to " + who + "?" within 1h
otherwise
let reply be generate "a short, kind answer" given msg
let url be api + "/tickets/" + t["id"] + "/reply"
http_post(url, {"text": reply}, auth)requireis the permission surface. A port, one database file, one secret. Afetchto any other host is refused by the interpreter.- Auth and validation are declarations.
auth withnames the task that says who a token is;expect bodyrejects a bad payload with a 400 that names the field. - One route, every reader.
content()answers HTML to browsers and Markdown or JSON to agents;paged()pages big result sets for you. - The model is a primitive.
decidereturns one of the options or retries;analyzeandgenerateare typed, not prompt strings glued by hand. - A human is a primitive too.
approve … within 1hblocks on a real person; with nobody there, it denies. - Secrets never materialise. The key travels sealed to the socket; the model sees a placeholder.
Built with Synsema
Three things you can use today.
Coding agent
Lampson
An open-source AI coding agent for your terminal and browser, written entirely in Synsema: tools confined to your project, permissions you control, sub-agents, scheduled tasks, plugins.
lampson.org ↗Capabilities for agents
Lamps
Portable units of capability: a manifest that declares what the code may touch, a runtime that enforces it and audits every call. lamp add, then lamp mcp for Claude Code, Cursor or any MCP agent.
Learn
Try Synsema
Learn by building software for real businesses, in the browser: courses, missions checked in a real sandbox, XP and levels. Nothing to install.
try.synsema.org ↗