Using SCL in Code

SCL is the deterministic, cryptographic identity protocol for AI run declarations.

For background, see what SCL is.

Overview

This section explains integration of SCL into applications using code.

Workflow

A typical SCL workflow consists of:

This workflow is deterministic and implementation-independent.

Reference CLI

The reference engine CLI supports:

SDKs

Official SDKs provide programmatic access in Python, Go, JavaScript, Rust, C++, Java, C#, PHP, and Ruby.

All SDKs MUST produce identical canonical JSON bytes and identical SHA-256 identity for identical input bytes.

Document Construction

SCL documents are constructed as byte-level inputs conforming to the SCL:V1 specification.

Documents may be generated programmatically — see programmatic document generation for a complete guide — or constructed as static inputs. All documents MUST conform exactly to the specification.

Validation

Validation is deterministic and halts at the first error, reported by byte offset. Only valid documents produce canonical JSON bytes and SHA-256 identity. Invalid documents produce no output.

Deterministic Guarantees

For identical input bytes, all compliant implementations MUST produce:

Any deviation constitutes protocol failure.

Processing Pipeline

bytes → AST → canonical JSON → SHA-256

Identity = SHA-256(canonical JSON bytes)

Canonical Definition: SCL is the deterministic, cryptographic identity protocol for AI run declarations.