Machines don't write source. They change verified program state.
Quickstart · Concepts · Walkthrough · Documentation · Release notes · FAQ · Arena
Sley is a programming system built for AI agents rather than for people typing into text editors. Sley programs aren't source files. A program is a typed, immutable semantic graph: functions, types, blocks, operations, contracts, and tests stored as content-addressed objects. An agent reads that graph through bounded queries and changes it by proposing typed mutations. A deterministic kernel checks every proposal before anything is committed.
verified state ─▶ query ─▶ proposal ─▶ validation ─▶ commit admission ─▶ atomic commit
Every accepted state has an exact cryptographic root. Accepted transactions carry receipts, and supported refusals use stable machine codes.
"Verified" names checks under a specific profile and policy. Static validity, advisory test matches, resource evidence and accepted state are separate; none alone establishes correctness against user requirements. The guarantee matrix explains what each result means.
| When an agent writes source text… | With Sley… |
|---|---|
| It emits characters and hopes they parse. | It proposes typed mutations over a closed schema. Malformed input is rejected at the boundary. |
| Context means pasting whole files into a prompt. | Context is a bounded, typed query with explicit limits and no silent truncation. |
| "Is this valid?" depends on toolchains and flags. | One deterministic kernel judges types, control flow, effects, contracts, and policy the same way every time. |
| Identity is a file path and line number. | Identity is content-addressed: entities, objects, state roots, and transactions all have exact digests. |
| A half-applied edit can corrupt a tree. | Commits are atomic. After a crash you have either the old state or the complete new one. |
| Errors are paragraphs to interpret. | Errors are stable numeric and symbolic codes with exact contracts. |
Requirements: Linux x86_64. To build from source you also need the Rust toolchain pinned in
rust-toolchain.toml(1.93.0). The protocol demo needs Python 3.
1. Get the sley binary. Download the release archive from
Releases, check it, and put its
bin/ directory on your PATH:
curl -fLO https://github.com/sley-lang/sley/releases/download/v2.1.8/sley-2.1.8-linux-x86_64.tar.gz
curl -fLO https://github.com/sley-lang/sley/releases/download/v2.1.8/SHA256SUMS
sha256sum -c SHA256SUMS
tar xzf sley-2.1.8-linux-x86_64.tar.gz
export PATH="$PWD/sley-2.1.8-linux-x86_64/bin:$PATH"
sley versionOr build it from source and put target/release/ on your PATH instead:
git clone --branch v2.1.8 --depth 1 https://github.com/sley-lang/sley.git
cd sley
cargo build --release -p sley-cli -p sley-agent # → target/release/sley, sley-agent--branch v2.1.8 builds the released source. main carries unreleased work
under the same workspace version, so omit it only when you want that work.
2. Write a function in Sley's Python dialect. sley-agent compiles typed
Python into a Sley candidate, validates it, and runs its tests. Save this as
area.py in an empty directory:
def area(w: int, h: int) -> int:
return w * h
def test_area():
assert area(3, 4) == 12
assert area(0, 9) == 0
assert area(5, 5) == 25Then, from that directory:
$ sley-agent init demo && cd demo
$ sley-agent try --familiar ../area.py
c1: 3 passed (advisory) d1@r1
$ sley-agent call area 3 4 --on c1
12
$ sley-agent submit d1
submitted c1 from d1@r1 -> final_candidate.hex (2787-byte candidate, hex); resubmit any time, the last submission winsUse the candidate and draft handles printed by your own try command if
they differ. sley-agent submit d1 writes final_candidate.hex; it does
not change the accepted workspace head.
Released 2.1.8 boundary: these are advisory test matches. Committing
this candidate, which changes both code and its targeting tests, refuses
with TXN_TEST_EVIDENCE_UNSUPPORTED until supported native admission is
available. Validation, advisory execution, submission and authoritative
commit are separate outcomes.
sley-agent help python lists what the dialect accepts. sley-agent help
is the full guide (under 8 KiB), including the JSON authoring form, and the
Quickstart authoring section
walks through inspection and submission.
The following commands explore the lower-level endpoint and a program built in advance. They are a separate protocol demonstration from writing the new candidate above. Run source-checkout commands from the checkout root.
3. Explore the protocol. Every sley command prints machine-readable JSON:
$ sley version
{"cli":"1","contract":"sley2-cli-v1","protocol_version":1}
$ sley hello --json
{"adapters":[],"effects":[],"features":{"cancel":true,"checksum":false,"json_bridge":false,"stream":true},
"limits":{"max_depth":65535,"max_entities":65535,"max_frame_bytes":67108864,...},
"methods":["session.open","workspace.create","query.root","candidate.create","commit","execute",...],
"protocol_versions":[1],"schema_epochs":["a7fcf97a…"]}"json_bridge": false is expected. --json is a transport choice of the
CLI, not a feature the endpoint negotiates
(SLEY_CLI_V1 section 2).
4. Run the prebuilt protocol demo. It imports a program into an empty repository, queries it, executes a function, stores the report, creates a branch, exports the repository, clones it into a second empty directory, and checks that the clone gives byte-identical answers:
$ python3 bench/release/run_demo.py --sley target/release/sley \
--fixture conformance/release-demo/v1/demo.json
{
"result": "PASS",
"explicit_gap": "candidate construction, commit, test selection, and merge wait for the public candidate builder …",
"steps": {
"query_root_matches_fixture": true,
"execute_response_matches_fixture": true,
"report_answers_stored_record": true,
"branch_created": true,
"exported_bytes": 9430,
"clone_query_root_matches_fixture": true,
"clone_execute_matches": true,
...
}
}From the release archive, run python3 demo/run_demo.py inside the unpacked
directory. No source tree is needed.
The demo imports and executes a program that was built in advance. As
explicit_gap says, it doesn't construct, commit, test-select, or merge a
candidate through the public builder, which is still proposal-only.
➡️ The full Quickstart covers verifying the
download, driving sley serve by hand over JSON lines, exit codes, and the
full test gates.
Sley Arena is a bot league for Sley programs. Bots are written in the same Python dialect, weave for territory on a shared loom, and climb a public ladder. Hand your coding agent the player guide, or start from the one-file kit (Node.js 18 or newer):
curl -fsSLO https://arena-api.greyforge.tech/kit/sley-arena.mjs
node sley-arena.mjs init # writes bot.py, a working starter bot
node sley-arena.mjs test # duels against every practice botThe rules, the ladder and match replays are at sleylang.org/arena.
flowchart LR
A([Agent]) -- "SMP1 frames<br/>(binary or JSON lines)" --> P[sley serve]
P --> Q[Queries and capsules]
P --> M[Mutation candidates]
M --> C{Checker and policy<br/>14-phase validation}
C -- valid --> G{Commit admission}
G -- admitted --> T[Transaction engine]
G -- refused --> R
C -- refused --> R[/Stable error code/]
T --> S[(Content-addressed<br/>object store)]
T --> RC[/Receipt + new state root/]
P --> V[Deterministic VM]
V --> S
Q --> S
Sley has three canonical layers:
| Layer | What it is | Spec |
|---|---|---|
| SSMC1: Sley Semantic Machine Code | The only canonical program form: a typed, immutable graph of 18 entity kinds (Function, Block, Operation, TypeDef, Contract, TestCase, …). |
docs/spec/SSMC1.md |
| SCB1: Sley Canonical Binary | The only canonical byte encoding. Strict and minimal. Malformed input is rejected, never normalized. BLAKE3 with domain-separated hashes. | docs/spec/SCB1.md |
| SMP1: Sley Machine Protocol | The programming interface: versioned, bounded, cancellable request/response frames, with a JSON bridge for convenience. | docs/spec/SMP1.md |
Read Concepts for the full model: identities, state roots, the change lifecycle, sessions, and the glossary.
- 2.1.8: non-negative Python
//and%lower to plain divide and remainder (digitsum about 2.9x faster), refusals name the fix, a shorterhelp python-taskcard, and the first model-cost benchmark with its honest results (Sley about 1.25x Python per trial). - 2.1.7: Python-dialect list indexing by a loop counter skips the per-access integer conversion, and the VM word tier runs vector length and element reads and fuses more of each burst; resource accounting unchanged.
- 2.1.6: deeply nested source gets a diagnostic with its line and column, nested built-in calls parse in linear time, and the
sley_agent::embedAPI runs Sley inside Rust hosts and WebAssembly (embedding guide). - 2.1.5: the VM's word tier runs all-integer programs on plain 64-bit registers;
tryprints only failures;file:line:coldiagnostics with a caret;structandenumdeclarations in the Rust-like familiar syntax. - 2.1.4: faster loops, plus pytest-style tests and
@dataclassrecords in the Python dialect. - 2.1.3: recursive and call-heavy programs run in the VM's compact scalar plan.
- 2.1.2: tuple assignment to parameters and clearer test-limit reporting.
- 2.1.1: write Sley in a typed Python dialect with
sley-agent try --familiar. - 2.1.0: Sley builds Sley. The toolchain is a Sley program that rebuilds itself from its canonical graph to a byte-identical fixed point; reproduce it with
scripts/sh2_bootstrap.sh. - 2.0.0: the semantic kernel, repository, protocol, CLI and reproducible packaging, with fixes in 2.0.1 and the agent workbench in 2.0.2.
- A deterministic semantic kernel. Type system, control-flow and value-use validation, exact effect closure, contracts and tests, semantic fingerprints, and impact analysis.
- A content-addressed repository. An immutable object store, deterministic state roots, atomic transactions with receipts, native branches, semantic compare and merge (ambiguity becomes explicit conflict objects), repository exchange/clone, garbage collection, and crash recovery.
- Agent-shaped context. Root-backed typed queries and context capsules with hard limits. They fail loudly instead of truncating silently.
- Proposal-first mutation. Generated mutation descriptors for every entity kind and field. Candidates are validated in 14 ordered phases before any state moves.
- A deterministic VM. Bounded execution with fuel, output, and cancellation limits. It produces canonical observation digests and stored execution reports.
- Policy and capabilities. Protected policy roots, scoped capability tokens, and bounded adapters. There is no arbitrary shell.
- A reproducible release. Two clean musl builds compared member by member, CycloneDX and SPDX SBOMs, and recorded (unsigned) provenance. Each release's notes give its reproducibility record.
- Independent conformance. A separate Python oracle reproduces the Rust kernel's bytes exactly, backed by persistent fuzz targets across ten surfaces.
The 2.0.0 release notes have the complete list, including the known limits.
Sley 2.1.8 is the current release; Recent releases lists what each point release added. The 2.0.0 release notes list the acceptance criteria and findings still open from 2.0.0.
The initial workload and adoption roadmap focuses evaluation on short function authoring, then on separately measured changes to existing programs.
| Track | State |
|---|---|
| Sley 2.0 | Released as 2.0.0, with fixes in 2.0.1 and the agent workbench in 2.0.2. The kernel, repository, protocol, CLI, agent workbench, and reproducible packaging are in place. |
| Sley 2.1 | Released as 2.1.0, with point releases through 2.1.8 (Recent releases). Self-hosted: the Sley toolchain builds itself, seed absent, to a byte-identical fixed point (ADR-0056, Bootstrap Profile 3, reproduce it). |
| Succession benchmark | In progress. It measures agents working in Sley against raw source and Sley 1.x on a frozen 15-task corpus. Results will be published when the campaign finishes. |
| Sley 1.x | Frozen at v1.2.1, the final 1.x tag, in GreyforgeLabs/sley-legacy. It's a separate, human-readable language that is intentionally incompatible with 2.x. |
| Guide | What it covers |
|---|---|
| 🚀 Quickstart | Install, verify, run the demo, and talk to sley serve by hand |
| 🧠 Concepts | The mental model: SSMC1, SCB1, SMP1, identities, and the change lifecycle |
| 🧭 Architecture walkthrough | Step by step from verified state to proposal, validation, transaction, and new state |
| 📚 Documentation index | Every specification, ADR, and reference, grouped by topic |
| 🤖 Agent skills | SKILL.md files that teach a coding agent to write, test and embed Sley |
| 🏗️ Architecture | Crate authority, the dependency law, and the durability order |
| 📦 Release notes | The current release, how to verify it, and what isn't claimed. 2.1.0 is the self-hosted release; 2.0.0 lists the known limits that still apply. |
| 🔐 Security | Threat model, reporting, and the threat register |
| 🤝 Contributing | The slice contract, validation gates, and commit discipline |
With the pinned Rust toolchain (including rustfmt and Clippy), Python 3.12+
and uv installed, run the combined contributor gate from a fresh clone:
make contributor-checkIt checks formatting, strict workspace Clippy, all workspace tests, conformance, adversarial tests and bounded fuzz smoke, stopping on failure. It uses tracked fixtures and locked dependencies; it needs no generated release evidence, credentials or installed native supervisor. The first run may download dependencies and creates ignored build/cache files, but does not rewrite tracked evidence. This is source validation, not release or native-host qualification.
The individual commands remain available:
cargo build --release -p sley-cli # the sley binary
cargo test --workspace --locked # every crate's tests (about 15 to 20 minutes cold)
make conformance # Rust vs. the independent Python oracle (needs uv)
make adversarial # corruption, crash, and binding-confusion suites
make fuzz-smoke # bounded fuzz smoke across the codecs and importers
make lint # rustfmt check, plus clippy with all + pedantic deniedmake lint rewrites the tracked evidence/build/lint-report.json, so it
leaves the tree dirty. Discard the record with
git checkout -- evidence/build/lint-report.json if you only wanted the check.
To reproduce the release artifact you need a clean tree at the release
commit, the x86_64-unknown-linux-musl target, and uv. If you ran
make lint, commit or discard its record first. On a fresh cargo cache, fetch
the locked dependencies before the build:
cargo fetch --locked
make release-candidate-smoke # two clean musl builds + every release record, then verifyMaintainers run make quick as the routine gate. It is not a fresh-clone
gate: it reads untracked inputs, including the outputs of a local
make release-candidate-build under evidence/runtime/. The
Quickstart has the details.
The repository is a Cargo workspace of 23 crates under crates/.
Each crate owns exactly one authority, from sley-scb1 (canonical bytes) to
sley-vm (execution) and sley-cli (the thin wrapper). See
ARCHITECTURE.md for the dependency law.
| Where | Link |
|---|---|
| 🌐 Website | sleylang.org |
| 🏟️ Sley Arena | sleylang.org/arena · player guide |
| 📖 Docs & walkthrough | sleylang.org/docs · sleylang.org/tutorial · sleylang.org/faq |
| 🤖 For LLMs | sleylang.org/llms.txt |
| 𝕏 Sley on X | @SleyLanguage |
| 𝕏 Greyforge on X | @GreyforgeLabs |
| 🔥 Greyforge Labs | greyforge.tech · About |
| 📰 Background | The machine-native break, on why Sley left source code behind |
| 🐙 GitHub | sley-lang · GreyforgeLabs |
| 🏛️ Sley 1.x (legacy) | GreyforgeLabs/sley-legacy · sleylang.org/legacy |
Following Sley? Star sley-lang/sley and follow @SleyLanguage for each release.
Sley 2 is licensed under the Apache License 2.0.
Copyright © 2026 Greyforge Labs. See NOTICE
for details. Third-party dependency licenses are listed in the release SBOM,
and from 2.0.1 their texts ship in the release archive as
THIRD_PARTY_LICENSES.
Built by Greyforge Labs · sleylang.org · @SleyLanguage
