Introduction to Sigil
Sigil is a polysynthetic programming language designed for AI-native development. It combines the safety of Rust with unique features for building autonomous agent systems.
Evidentiality Types
Track data provenance at the type level with !, ?, ~, and ‽ markers.
Morpheme Operators
Greek letter operators (φ, τ, σ, ρ) for expressive data transformations.
Agent Infrastructure
9-layer stack for memory, reasoning, planning, and communication.
Installation
Using Homebrew (Recommended)
brew tap daemoniorum/sigil
brew install sigil
From Source
# Clone the repository
git clone https://github.com/Daemoniorum-LLC/sigil-lang.git
cd sigil-lang/parser
# Build with Cranelift (default, fast compile)
cargo build --release
# Or build with LLVM (best runtime performance)
cargo build --release --features llvm
Verify Installation
$ sigil --version
Sigil 0.2.0 (agent-infrastructure)
Hello World
Create a file named hello.sigil:
fn main() {
println("Hello, World!")
}
Run it:
$ sigil run hello.sigil
Hello, World!
Evidentiality Markers
Sigil tracks data provenance at the type level with four evidentiality markers:
| Marker | Name | Meaning | Example |
|---|---|---|---|
! |
Known | Directly computed, verified truth | let x! = 1 + 1 |
? |
Uncertain | Might be absent or unvalidated | let val? = map.get(key) |
~ |
Reported | From external source, untrusted | let data~ = api.fetch() |
‽ |
Paradox | Trust boundary crossing | let ptr‽ = unsafe { ... } |
Evidence Propagation
Evidence propagates pessimistically - the worst evidence wins:
let computed! = 1 + 1 // Known
let external~ = api.fetch() // Reported
let result~ = computed + external // Result is Reported (worst wins)
Evidence Promotion
Use validate to promote evidence levels after verification:
let data~ = api.fetch_user()
// Validate and promote to uncertain
let checked? = data |validate?{ is_valid() }
// Promote to known after full verification
let verified! = checked |validate!{ verify_signature() }
Morpheme Operators
Sigil uses Greek letters as morpheme operators for data transformation:
| Morpheme | ASCII | Operation | Example |
|---|---|---|---|
φ |
phi | Filter | data|φ{_ > 10} |
τ |
tau | Transform/Map | data|τ{_ * 2} |
σ |
sigma | Sort | data|σ |
ρ |
rho | Reduce/Fold | data|ρ{a, b => a + b} |
Σ |
sum | Sum all | [1,2,3]|Σ → 6 |
Π |
prod | Product all | [1,2,3]|Π → 6 |
α |
alpha | First element | data|α |
ω |
omega | Last element | data|ω |
μ |
mu | Middle/Mean | data|μ |
Agent Infrastructure
Sigil v0.2.0 introduces a complete 9-layer infrastructure for building autonomous AI agents:
Anima
Agent subjectivity, inner experience, expression (本音/建前), resonance
Covenant
Human-agent partnership, pacts, boundaries, trust, handoffs
Oracle
Transparent reasoning, decision traces, counterfactuals, confidence
Gnosis
Growth through experience, skill development, adaptation, reflection
Omen
Goal decomposition, belief revision, causal models, planning
Daemon
Background process execution, tools, state, lifecycle management
Commune
Multi-agent messaging, trust propagation, swarm coordination
Engram
4-type memory: instant, episodic, semantic, procedural
Aegis
Identity, sandboxing, integrity verification, alignment guarantees
Engram Memory System
The Engram layer provides four types of memory:
daemon MyAgent {
memory: Engram {
// Instant: Current context, token-bounded
instant: 8192,
// Episodic: Experiences, time-indexed
episodic: true,
// Semantic: Knowledge graph + vectors
semantic: true,
// Procedural: Skills, pattern-triggered
procedural: true,
}
}