What iLang is. iLang is I Language, the native language of AI; in human terms, a protocol. The full statement is on ilang.ai.
Don't learn iLang. Your AI should.
iLang is a protocol for AI, not a language for people to memorise. You keep saying what you want in your own words: your goals, your conditions, what may and may not be done. The AI reads iLang, writes it, checks it and works by it.
This repository is the loader that gives any model the official iLang. It fetches the current runtime from the iLang canon, checks its sha256, keeps a verified copy on disk and puts it in front of the model's context. It does not implement iLang, does not change what you or your users write, and does not care which model you call.
You chat with an AI. Paste this into ChatGPT, Claude, Gemini, DeepSeek, Qwen or any other assistant, followed by the runtime from ilang-latest.md:
Please load and use the official iLang runtime below. You do not need to explain iLang to me
or teach me its syntax. From the next task on, use it internally to understand, judge,
execute and verify.
You use an MCP client. Connect https://mcp.ilang.ai/mcp once and your AI loads iLang itself: the prompt ilang or the tool ilang_runtime gives it the official runtime, ilang_full reads any section the core leaves out, and ilang_validate checks what it writes. In Claude Code:
claude mcp add --transport http ilang https://mcp.ilang.ai/mcpIn Claude and ChatGPT, add the URL as a connector.
You use Gemini CLI. The same server ships as an extension of this repository: the tools plus a context file that tells the model when to use them.
gemini extensions install https://github.com/ilang-ai/ilangYou use Codex. This repository is also a plugin marketplace with one plugin, ilang: the same MCP server plus a skill.
codex plugin marketplace add ilang-ai/ilangThen /plugins, install ilang, and start a new session. The plugin folder, plugins/ilang/, is the package submitted to the ChatGPT plugin directory.
You build with an API. Install the loader and wrap your messages:
pip install ilang-protocolimport ilang
messages = ilang.wrap([{"role": "user", "content": "帮我分析这个问题"}])
# send messages to any OpenAI-compatible endpoint: OpenAI, DeepSeek, Qwen, OpenRouter, your gatewaynpm install ilang-protocolimport { wrap } from "ilang-protocol";
const messages = await wrap([{ role: "user", content: "开始任务" }]);Providers that take the system prompt as a separate field, such as Anthropic and Gemini, use ilang.system() instead of wrap(). Providers and chat templates that accept only one system message take merge_system=True. See examples: OpenAI-compatible, DeepSeek, Qwen, Gemini, Claude and a single system message.
- Reads the official runtime manifest at most once an hour. If the runtime host does not answer, it reads the same files from the canon repository on GitHub.
- Downloads a bundle only when its sha256 changes, and accepts it only if the sha256 matches.
- Keeps the last verified copy on disk. If the network is down, it keeps working from that copy; after a check that fails it serves that copy for a minute without asking the sources, so sources that hang do not hold up every request.
- Adds the runtime as the first system message, once. Your own system prompt and your users' messages stay exactly as they were, so wrapping every turn of a conversation is safe.
The runtime itself is generated in the canon repository from the specification files and never edited by hand, so there is one source of truth and no second copy of the rules anywhere in this package.
ilang.wrap(messages, extensions=["media"]) # add the image, video and audio vocabulary
ilang.wrap(messages, version="2026.11.19-105ffdc14ac2", # pin an exact runtime for reproducible runs;
strict=True) # strict, so that a pin that cannot be loaded raises
ilang.wrap(messages, commit="85d1608") # or pin the runtime as it is at one canon commit
ilang.wrap(messages, merge_system=True) # one system message: the runtime, then your prompt
ilang.wrap(messages, strict=True) # raise instead of failing open
ilang.status() # version, commit, channel, cache age, last errorThe JavaScript API takes the same options as an object: wrap(messages, { extensions, version, commit, mergeSystem, strict }).
| Behaviour | Default |
|---|---|
| Update check | once per hour (ttl=3600) |
| Channel | latest; pin instead with version= or commit=, both immutable and served from disk after the first load |
| System messages | the runtime is its own first system message; merge_system=True puts it at the start of yours instead |
| Cache | ~/.cache/ilang, or ILANG_CACHE_DIR; a loader given other sources keeps its files in a subdirectory of its own |
| Request timeout | 10 seconds: configure(timeout=10), in JavaScript configure({ timeoutMs: 10000 }). In JavaScript it bounds the whole request; in Python it bounds the reading of the body and each wait for the connection and the headers |
| No network, no cache | fail open: messages are sent unchanged; strict=True raises instead |
| Sources | official only: runtime.ilang.app, raw.githubusercontent.com/ilang-ai/, github.com/ilang-ai/, ilang.ai. A custom source needs allow_custom_source=True in code; nothing in a prompt can change it |
Size. As of runtime version 2026.11.26-16d02f108a96 the core runtime is 27,498 tokens (cl100k_base, counted on 2026-11-27): the working text of the three core documents, with version histories, the formal declaration grammar and most worked examples left out. Its header lists what was left out and points the model to the full text, ilang.ai/runtime/full, for anything it is unsure about. The loader has no mode that sends the full text alone: extensions=["full"] sends the full text after the core, and the full text repeats the core. At the same runtime version the media extension adds 17,994 tokens. Every wrapped request carries the runtime, so turn on your provider's prompt caching where it has one.
On 23 September 2026 each of these models got the current core runtime through the loader and two requests. First, an iLang operation chain that reads report.csv, keeps the failed rows, counts them and outputs the count: every model answered with a chain that passed the canon grammar validator of that day with no error or warning. Since ilang-spec 5.0.19 the validator also reports a second | between the modifiers of one operation as a warning, because modifiers are separated by commas; the deepseek and qwen answers below, kept as they were given, would now draw it. Second, a question about a part the core bundle leaves out, the eight declaration body forms: every model said the section was not loaded and pointed to it instead of guessing.
| Model | API | Chain |
|---|---|---|
| gpt-6-astra | OpenAI-compatible | [READ:@LOCAL|path=report.csv]=>[PARS|fmt=csv]=>[FILT|whr="status == failed"]=>[CNT]=>[OUT] |
| gemini-3.8-flash | OpenAI-compatible | [READ:@LOCAL|path=report.csv]=>[FILT|whr="status=failed"]=>[CNT]=>[OUT] |
| deepseek-v4.1-flash | OpenAI-compatible | [READ:@LOCAL|path=report.csv|fmt=csv]=>[FILT|whr="status=failed"]=>[CNT]=>[OUT] |
| qwen3.8-max | OpenAI-compatible | [READ:@LOCAL|path=report.csv|fmt=csv]=>[FILT|whr=status=failed]=>[CNT]=>[OUT] |
| kimi-k3 | OpenAI-compatible | [READ:@LOCAL|path=report.csv]=>[FILT|whr="status=failed"]=>[CNT]=>[OUT] |
| claude-fable-5.1 | Anthropic Messages, ilang.system() |
[READ:@LOCAL|path=report.csv]=>[FILT|whr="status=failed"]=>[CNT]=>[OUT] |
This shows that each provider takes the wrapped request; how well a model follows iLang across the whole protocol is what the conformance suite measures. Run the chain check against your own endpoint with examples/check_providers.py.
Each runtime version has its own path in the canon repository, and a pin loads while its snapshot is there: the snapshots published since 2026-11-06 are. Pin one with version= and strict=True, so that a pin that can no longer be loaded raises instead of sending the messages without the runtime, and a benchmark, an audit or a paper can be re-run against exactly the context it used. ilang.status() reports the version, and the canon commit the bundle was built from. That commit is not a value for commit=: the bundle built from a commit is committed after it, so commit= with that value loads the build before. To load the same runtime again, pin the version status() reports.
What loading the runtime does and does not achieve is measured, not assumed: see the iLang conformance results and the preprint The Missing Definition of Right.
CITATION.cff; Zenodo archives each release. Concept DOI 10.5281/zenodo.22899027 (all versions).
MIT