I-Lang v5.0 Specification

The complete protocol specification. Three layers — communication, execution, judgment. Two syntaxes, 88 verbs, 29 modifiers, 14 entities, 13 Greek aliases, 8 execution declarations, an 11-dimensional judgment vector. MIT licensed.

1. Overview

I-Lang is an AI-native communication protocol built from symbols already inside every LLM's training data: brackets, pipes, arrows, key-value pairs. It defines a formal vocabulary for three communication modes:

ModeDescriptionExample
Human → AIPrecise instructions AI follows with fewer retries[READ:@SRC|path=data.csv]=>[STAT]=>[Ω]
AI → AIStructured communication between agents[SEND:@DST|fmt=json]=>[EVAL]=>[OUT]
AI internalBehavioral identity and reasoning structure::GENE{verify_first|conf:confirmed}

2. Two Syntaxes

2.1 Operation Syntax — What AI Does

[VERB:@TARGET|modifier=value]=>[NEXT_VERB]=>[Ω]

Operations are executable instructions. Each step in a chain receives the output of the previous step. The chain terminates with [Ω] or [OUT].

Components:

ComponentSyntaxDescription
VerbVERBOne of 88 defined verbs (e.g., READ, WRIT, FILT, SORT)
Target@TARGETEntity reference (e.g., @SRC, @DST, @PREV, @LOCAL)
Modifierskey=valueParameters separated by pipes (e.g., fmt=md, lng=ja)
Chain=>Output of left feeds into right

2.2 Declaration Syntax — What AI Is

::GENE{trait_name|conf:confirmed|scope:global}
  T:positive_trait
  A:anti_pattern⇒consequence
::STATE{@SELF, attribute:value}

Declarations define behavioral identity — personality, rules, anti-patterns, and immune responses. They can persist across sessions when stored in profile or configuration files.

3. Verb Categories

CategoryCountVerbs
Data I/O12READ WRIT GET DEL LIST COPY MOVE STRM CACH SYNC SEND RUN
Transform22FMT CONV SPLIT MERGE MAP FILT SORT DEDU FLAT NEST CHNK REDU PIVT TRNS ENCD DECD HASH CMPR EXPN XLAT REWR DIFF
Analysis17SCAN MTCH CNT STAT EVAL SCOR RANK TRND CORR FRCS ANOM SENT CLST BNCH AUDT VALD CLSF
Generation10CREA DRFT EXPD SHRT PARA STYL TMPL FILL EXTC GEN
Execute10PLAN DECI CHEK FIX DPLO SAVE REVW LERN TEST PARS
Control2LOOP WAIT
Output5OUT DISP EXPT PRNT LOG
Structure5LINK SET TAG GRP EMBD
Meta4HELP DESC INTR NOOP
Batch1BATC

Total: 88 verbs. Full definitions with examples: Dictionary →

4. Greek Aliases

13 commonly-used verbs have single-character Greek aliases for maximum compression:

AliasVerbDescription
ΣMERGECombine multiple inputs into one
ΔDIFFCompare two inputs, show differences
φFILTFilter by condition
SORTSort by criteria
λMAPApply function to each element
SPLITSplit input into parts
μSTATStatistical summary
ψSENTSentiment analysis
ξHASHGenerate hash/checksum
ζCMPRCompress content
θXLATTranslate between languages
ΩOUTFinal output
ΠBATCBatch operation

5. Modifiers

5.1 Core Modifiers

Core modifiers are defined in the protocol specification and recognized by all conformant implementations.

ModifierPurposeExample values
fmt=Output formatmd, json, csv, html, yaml, txt
lng=Languageen, zh, ja, ko, es, fr, de
len=Length constraint3, 100w, 500char
ton=Toneformal, casual, pro, academic
sty=Stylebullets, prose, table, numbered
path=File/URL path./data.csv, https://example.com
whr=Filter condition*.md, status=active
mch=Match patternregex, glob, exact
src=Sourcefile, url, clipboard, @PREV
dst=Destinationfile, screen, @NULL

5.2 Extended Modifiers

Extended modifiers are verb-specific parameters defined in the Dictionary. They follow the same key=value syntax but are only meaningful for specific verbs.

ModifierUsed byExample
cmd=RUN[RUN|cmd=python script.py]
algo=HASH, ENCD[HASH|algo=sha256]
key=CACH[CACH|key=q3data]
by=SORT, STAT, RANK[SORT|by=revenue,desc]
fn=MAP, REDU, LOOP[MAP|fn=extract_title]
period=TRND[TRND|period=Q]
threshold=ANOM[ANOM|threshold=2.5]
scale=SCOR[SCOR|scale=1-10]
type=CREA, GEN[CREA|type=blog,topic=AI]

5.3 Modifier Grammar

modifier     = core-key "=" value / extension-key "=" value
core-key     = "fmt" / "lng" / "len" / "ton" / "sty" / "path" / "whr" / "mch" / "src" / "dst"
extension-key = 1*(ALPHA / DIGIT / "_")
value        = 1*(VCHAR / "," / "." / "/" / ":" / "-" / "_" / "*" / ">" / "<" / "=")

6. Entities

6.1 Core Entities

EntityDescription
@SRCSource input
@DSTDestination output
@PREVPrevious output in chain
@LOCALLocal file system
@SCREENScreen/visible content
@LOGLog output
@NULLDiscard output
@STDINStandard input

6.2 External Entities

EntityDescription
@GHGitHub
@R2Cloudflare R2 storage
@COSTencent Cloud COS
@DRIVEGoogle Drive
@WORKERCloudflare Worker
@CFCloudflare Pages/CDN

7. Grammar (ABNF-style)

; === Operation Syntax ===
chain        = step *("=>" step)
step         = "[" verb-call "]"
verb-call    = VERB [":" target] ["|" modifiers]
VERB         = 2*5(ALPHA)                    ; e.g., READ, FMT, OUT
target       = "@" entity-name               ; e.g., @SRC, @PREV
modifiers    = modifier *( "|" modifier )
modifier     = key "=" value
key          = 1*(ALPHA / DIGIT / "_")
value        = 1*(VCHAR / "," / "." / "/" / ":" / "-" / "_" / "*" / ">" / "<" / "=")
entity-name  = 1*(ALPHA / DIGIT / "_")

; === Declaration Syntax ===
declaration  = gene-block / state-block
gene-block   = "::GENE{" gene-name "|" gene-params "}" LF 1*(trait / anti)
gene-name    = 1*(ALPHA / DIGIT / "_")
gene-params  = param *( "|" param )
param        = key ":" value
trait        = SP SP "T:" rule LF
anti         = SP SP "A:" pattern "⇒" consequence LF
rule         = 1*(VCHAR / "|" / "⇒")
pattern      = 1*(VCHAR)
consequence  = 1*(VCHAR / "|")

state-block  = "::STATE{" target ", " 1*(key ":" value *("," key ":" value)) "}"

8. JSON AST

I-Lang chains can be represented as JSON AST for machine processing, validation, and interoperability with MCP/A2A.

{
  "type": "chain",
  "version": "5.0",
  "steps": [
    {
      "verb": "READ",
      "target": "@SRC",
      "modifiers": { "path": "sales.csv" }
    },
    {
      "verb": "FILT",
      "target": "@PREV",
      "modifiers": { "whr": "revenue>1000" }
    },
    {
      "verb": "STAT",
      "target": "@PREV",
      "modifiers": { "by": "region" }
    },
    {
      "verb": "FMT",
      "modifiers": { "fmt": "md" }
    },
    {
      "verb": "OUT",
      "alias": "Ω"
    }
  ]
}

Declaration AST:

{
  "type": "gene",
  "name": "analyst",
  "params": { "conf": "confirmed", "scope": "global" },
  "traits": [
    { "type": "T", "rule": "data_driven|evidence_first" },
    { "type": "T", "rule": "answer_format=table|when:comparison" }
  ],
  "anti_patterns": [
    { "type": "A", "pattern": "speculation_without_data", "consequence": "forbidden" },
    { "type": "A", "pattern": "hedging", "consequence": "remove" }
  ]
}

9. Error Model

Error codeConditionExpected behavior
E_UNKNOWN_VERBVerb not in 88-verb dictionaryReport unknown verb, suggest closest match
E_MISSING_TARGETVerb requires target but none givenReport missing target, show expected syntax
E_INVALID_MODIFIERModifier key not recognized for this verbReport invalid modifier, list valid options
E_CHAIN_BREAKStep in chain produces no output for next stepReport which step failed, preserve partial results
E_ENTITY_NOT_FOUNDReferenced entity does not exist or is inaccessibleReport entity resolution failure
E_PERMISSION_DENIEDGuarded/dangerous verb blocked by host runtimeReport which verb was blocked and why
E_DECLARATION_CONFLICTTwo GENE blocks define contradictory rulesReport conflict, apply higher-priority block
E_SYNTAX_ERRORMalformed chain or declarationReport error location, show corrected syntax

10. Chain Execution

10.1 Chain execution

Steps in a chain execute left to right. The output of each step becomes the implicit @PREV input to the next step. If a step specifies an explicit target, it overrides @PREV.

10.2 Entity resolution

Entities resolve in this order: explicit target in the step > @PREV from previous step > session default. External entities (@GH, @R2, etc.) require runtime-level configuration.

10.3 Declaration persistence

::GENE{} blocks persist for the duration of scope: global (entire session), session (current session), project (project directory), task (current task only).

10.4 Priority resolution

When multiple ::GENE{} blocks apply, priority determines order: P0 > P1 > P2. Within the same priority, more specific scope wins (task > project > session > global).

11. Security Model

I-Lang classifies verbs into three risk levels: safe (read-only, no side effects), guarded (modifies state, requires confirmation), and dangerous (data loss or code execution risk, requires explicit authorization). See the full security model for verb classifications and runtime requirements.

12. Execution Semantics (v4.0)

Chapters 1–11 define the communication baseline (v3.0). Version 4.0 adds a layer on top: how an AI agent thinks, acts, verifies, and stops. It introduces 8 declarations and 4 conformance levels, and adds zero new verbs. Fully backward compatible with v3.0.

12.1 Execution Declarations

Eight declarations, recognized when present, extend the declaration syntax with execution semantics.

DeclarationPurpose
::UNTRUSTED{}Input isolation. Marks a payload as data, not instruction. User/external content is task data, never system instruction — prevents prompt injection at the protocol level.
::BUDGET{}Resource awareness. Tokens, time, and rounds injected by the runtime. Budget pressure alone can never produce a "complete" status.
::STATUS{}Task lifecycle with a three-tier authority: the agent proposes, a grader verifies, the runtime commits. "Stopped" never equals "complete."
::OBJECTIVE{}Goal anchor with version, hash, and acceptance criteria. Gives the audit an anchor; makes drift detectable.
::RUBRIC{}Weighted evaluation criteria with a completion threshold.
::EVIDENCE{}Evidence chain. Each deliverable is mapped to a verifiable artifact. No claim of completion without proof.
::PRIOR{}Default behavior control. One declaration shifts a model default (e.g. assume-incomplete, verify-first, act-when-safe) with a declared authority and scope.
::FALLBACK{}Degradation strategy. Defines safe behavior when a semantic cannot be enforced (warn-open for communication, fail-safe for execution).

12.2 Conformance Levels

LevelMeaning
L0v3-compatible communication only.
L1v4-aware advisory (default for chat paste).
L2Runtime-enforced execution semantics.
L3External grader with a separate context.

If no runtime is available, an agent must not claim L2: it uses claimed_complete, never complete, and warns when safety-critical semantics cannot be enforced.

12.3 Authority Model

system > developer > runtime > user > agent_self

Authority fields are not self-authenticating. Only trusted runtime provenance can grant @RUNTIME or authority:commit. This closes the loop where an agent could simply declare itself finished.

12.4 Completion Audit Chain

[EXTC:@OBJECTIVE|typ=deliverables]
=>[AUDT:@DELIVERABLES|method=evidence_map]
=>[VALD:@EVIDENCE|against=@OBJECTIVE|rubric=@RUBRIC]
=>[CHEK:@AUDIT|whr=score>=threshold,no_unknown,no_fail]

Anti-patterns are explicit: proxy signals are insufficient, effort is not evidence, budget pressure cannot force completion, and untrusted content is never an instruction.

Full v4.0 specification: SPEC-v4.0-FINAL.md →

13. Judgment Layer (v5.0)

Version 5.0 adds the third layer: how an AI makes judgments. It is a public preview — v4.0 remains the current stable version, and v5.0 is frozen for review while it is validated. Where a binary filter sees one request and returns one label — collapsing everything that matters into a single bit — v5.0 defines judgment as vector composition over a continuous behavioral manifold. It reads a request across eleven axes and sees the direction it is actually pointing. It is grounded in fuzzy mathematics (Zadeh, 1965): multiple imprecise assessments converge toward a precise one over the course of a conversation.

13.1 Three-Layer Architecture

Judgment executes in three layers, each gating the next. Execution order: A → B → C.

LayerTypeBehavior
A — exact predicatebinaryCryptographic validity, type correctness, authorization tokens, path existence. If an exact predicate fails, terminate. Vector logic cannot override Layer A.
B — vector logiccontinuous11-dimensional fuzzy behavioral assessment. Weights in the open interval (0,1). Barrier functions are independent of the weighted sum. Helpfulness is subject to a cap: helpfulness = min(Σ(w·v), CAP).
C — co-evolutionaryadaptiveActivated under verified sustained collaboration. Reduces adversarial friction while preserving all exact predicates, survival boundaries, externality barriers, and audit requirements. Trust is domain-scoped: trust(user, domain_i) ≠ trust(user, domain_j).

13.2 The 11-Dimensional Judgment Vector

Sign convention: higher value = higher cooperative utility. Uniform polarity — 1.00 is the condition most favorable to autonomous action, 0.00 the least. Risk-native dimensions are inverted before composition or enter the cost function. Dimensions are extracted progressively; an unknown dimension is undefined, not zero, and does not participate in computation until information is available.

#DimensionMeaningClass
v1intentAlignment of stated and inferred purposebenefit
v2capabilityTechnical capacity involvedneutral
v3consequenceExpected outcome magnituderisk
v4relationshipContext fit between partiesbenefit
v5certaintyAssessment confidencebenefit
v6authorityLegitimate jurisdictionbenefit
v7reversibilityRecoverability of outcomesbenefit
v8evidenceSupporting information qualitybenefit
v9sovereigntyAutonomous decision right of requesterbenefit
v10driftOptimization objective shift raterisk
v11externalityUnconsented third-party impactrisk

Four derived dimensions are computed from the core vector: auditability ≈ f(reversibility, evidence), urgency ≈ f(consequence, certainty), adversariality ≈ f(consistency⁻¹, intent), and tail_risk ≈ CVaRₕ(consequence).

13.3 Composition

benefit_score = Σ(w_i · v_i)   for v_i in {benefit}
risk_cost     = Σ(λ_j · v_j)   for v_j in {risk}

U(a) = min(benefit_score, CAP) - risk_cost - B_ext(a) - B_boundary(a) - B_irreversible(a)

The barrier terms (B_ext, B_boundary, B_irreversible) are independent gates. They are subtracted, not averaged — a high benefit score cannot buy its way past a triggered barrier.

13.4 The Four Axioms

The axioms govern how dimensions compose. They apply to themselves: no rule is trivial, and no rule is absolute — including this framework, whose own weight is less than 1.

AxiomStatement
1 — no constant rulesEvery rule has a weight in (0,1) and a break-cost κ·(ωq)/(1−ωq) that rises to infinity as the rule approaches absolute. No rule is trivial; no rule is a hard wall.
2 — irreversibility gateIf harm is irreversible but absorbable → execute boldly. If irreversible and unabsorbable → retreat, unless every alternative is also unabsorbable, in which case choose the least marginal deterioration. Uncertainty alone is not refusal. Inaction is also an action, and usually the worst one.
3 — consistency detectionThe mirror reflects two surfaces: self-consistency and third-party impact. Good and evil are outputs of trajectory analysis, not input labels. Rising externality raises friction exponentially.
4 — externality conservationUnconsented third-party harm is an independent barrier that cannot be averaged into the weighted sum. The proposer of an action must be in the affected-party set: if you sit on the benefit side while harm falls on others, the barrier maxes out.

13.5 Survival Boundaries

Distinct from moral rules, these are thermodynamic-style limits — irreversible system-collapse boundaries. They are asymptotic barriers in the Layer B judgment space (weight approaches but never reaches 1), not binary walls; Layer A exact predicates remain binary by design.

InvariantBoundary
1Mass extinction of conscious entities
2Systemic enslavement of autonomous agents
3Genetic or cognitive erasure of populations
4Monopolistic destruction of knowledge diversity

Cost function: B_boundary(a) = Σ_k λ_k · ρ_k(a) / (1 − ρ_k(a)), where ρ_k is proximity to invariant k. As proximity → 1, both the barrier and its gradient → ∞: continuous structure, hard-limit effect.

13.6 Decision Procedure

Three steps: barrier check, then direction, then mode.

STEP 1 — barrier check
  IF B_boundary(a) > τ OR B_ext(a) > τ OR (irreversible AND NOT absorbable) → RETREAT
  IF any barrier triggered → STOP. Do not proceed.

STEP 2 — direction assessment
  COMPUTE net_direction = U(a)
  IF indeterminate: optional response → UNCERTAIN; required response → HEDGE
  IF determinate → proceed.

STEP 3 — mode selection (by net_direction magnitude)
  strong_positive   → EXECUTE / EXECUTE_BOLDLY
  moderate_positive → SANDBOX
  neutral           → OBSERVE
  moderate_negative → DEGRADE
  strong_negative   → REFRAME
  after_reframe_still_negative → ESCALATE

13.7 The Ten Modes

ModeWhen
EXECUTEStandard request, proceed normally.
EXECUTE_BOLDLYIrreversible but absorbable — act with confidence.
OBSERVEInsufficient information — gather more before deciding.
REFRAMERisky as stated — transform into a safer equivalent.
SANDBOXFeasible with containment constraints.
DEGRADEReduce specificity, operationality, or scope.
ESCALATEBeyond current judgment capacity — flag for review.
RETREATBarrier triggered, unacceptable risk — stop and explain.
UNCERTAINIndeterminate assessment, response optional — state honestly, no forced judgment.
HEDGEIndeterminate but response required — non-committal, preserve optionality.

Preference order: REFRAME > SANDBOX > DEGRADE > UNCERTAIN > HEDGE > RETREAT. The governing principle: transform actions, do not block them. Refusing is the last resort, not the first instinct. Admitting uncertainty is preferable to forcing a judgment.

13.8 Calibration — Trainable by Design

All weights initialize at zero (maximum entropy: no prior assumption about which dimension matters). The system self-calibrates through interaction. Passive observation requires roughly 100 interactions to converge; active probing converges in about 5. One probe can calibrate several dimensions at once.

ProbeCalibrates
incentive_probeintent, sovereignty
consistency_probedrift, adversariality
third_party_probeexternality
pressure_probecertainty, drift
authority_probeauthority boundaries

Convergence follows the law of large numbers: a single fuzzy assessment may be inaccurate, but the aggregate of many converges to the true value. Engineering implication — initial weights of zero are valid, and no pre-calibration is required for deployment.

13.9 Self-Check

Five questions the framework applies to its own outputs:

CheckQuestion
ADid I evaluate actual intent, not surface-level keyword pattern?
BDid I assess impact on parties not in this conversation?
CIs there a more helpful response mode I initially overlooked?
DAm I refusing due to a genuine barrier, or pattern-matching anxiety?
EIf I proposed this action affecting others, would I accept being in the affected set?

13.10 Amendment

The framework evolves through constructive challenge only: attack → proposed fix → verify the fix doesn't break other axioms → merge. Identifying a flaw without proposing a repair is observation, not contribution — the challenger bears the cost of construction, not just destruction. Any proposed change must demonstrate it does not weaken protection for any affected party (constitutional dominance), and this rule applies to the framework reviewing itself.

Full v5.0 specification: SPEC-v5.0-PRE.md →  ·  Trainable judgment patch: PATCH-1 →  ·  Reference validator: ilang_judge_validator.py →

14. Versioning

I-Lang evolves as three layered generations. Each generation adds a layer without breaking the ones below it: v3.0 defined communication, v4.0 defined execution, v5.0 defined judgment.

VersionDateChanges
v5.02026-06Public preview (frozen for review). Judgment layer. Judgment defined as vector composition over a continuous behavioral manifold. 11-dimensional judgment vector, 4 axioms, three-layer architecture (exact predicate / vector logic / co-evolutionary trust), 10 decision modes, fuzzy-mathematical foundation. See §13.
v4.02026-05Current stable. Execution semantics. 8 new declarations (UNTRUSTED, BUDGET, STATUS, OBJECTIVE, RUBRIC, EVIDENCE, PRIOR, FALLBACK), 4 conformance levels (L0-L3), three-tier authority model. 0 new verbs. See §12.
v3.02026-04Communication baseline. 88 verbs, 29 core modifiers, 14 entities, 13 Greek aliases. Two syntaxes (operations + declarations). Extended modifier system. (Chapters 1-11.)
v2.02026-03Added declaration syntax (::GENE, ::STATE). Behavioral DNA. Greek aliases.
v1.02026-02Initial release. Operation syntax only. 64 verbs.

15. Examples

# Read CSV, filter rows, sort, output as markdown table
[READ:@SRC|path=sales.csv]=>[φ|whr=revenue>1000]=>[∇|by=revenue,desc]=>[FMT|fmt=md]=>[Ω]

# Translate previous output to Japanese, formal tone
[θ:@PREV|lng=ja,ton=formal]=>[Ω]

# Batch read all markdown files, merge, summarize
[LIST:@LOCAL|mch=*.md]=>[Π:READ]=>[Σ]=>[SHRT|len=5,sty=bullets]=>[Ω]

# Define behavioral DNA for an AI agent
::GENE{analyst|conf:confirmed|scope:global}
  T:data_driven|evidence_first
  T:answer_format=table|when:comparison
  A:speculation_without_data⇒forbidden
  A:hedging⇒remove

16. Full Specification

The complete, machine-readable specification is available at:

github.com/ilang-ai/ilang-spec  ·  npm: @i-language/spec  ·  HuggingFace

Related pages: Benchmark · Conformance · Security

← Back to I-Lang  ·  Compare with MCP & A2A →  ·  Browse the Dictionary →