Lichii Is Emulating the Switch 2, and It Wrote an Operating Manual for AI Agents
A yuzu descendant ships a live debug server, a 17-game compatibility table, and a strict upstream-first protocol. The most interesting file in the repo is the one written for the robots.
- Lichii is a C++ emulator descended from yuzu, Eden, and Eglantine that is now targeting Switch 2 hardware on a default branch named nx2.
- Its most novel artifact is AGENTS.md, a workflow contract that forces AI coding agents to reconcile with upstream before writing a single line of new code.
- A live JSON debug server on 127.0.0.1:6545 lets an agent query a running game for status, screenshots, and log tails, then propose a fix.
- The project is careful not to oversell: it does not claim to be the fastest, most compatible, or most stable, and its own release notes say performance varies.
A Fork That Aimed at Hardware Nobody Had Emulated
The repository describes itself plainly: Lichii is an experimental, open-source Nintendo Switch and Switch 2 emulator written in C++. It is GPL-3.0, roughly 95 percent C++ by bytes, and its default branch is named nx2.
Switch emulation is a crowded, well-mapped field. Switch 2 emulation is not. The console is new, its firmware keeps moving, and public documentation for the hardware is thin. Targeting it means chasing a goalpost that shifts under your feet, on a codebase inherited from a project that no longer exists.
Lichii does not ship games, keys, or firmware. Users supply their own, and the README asks them to use only legally obtained files and to back up saves before running an experimental build.
The snapshot figures are modest for this ambition: around 2,891 stars, 445 forks, and 147 open issues, as of the repository at time of writing. The project's own release notes are careful not to oversell. Build 88 states that performance varies by hardware and scene, that gameplay timing has not been fully verified, and that no universal FPS gain is promised.
And yet the strangest part of Lichii has nothing to do with the console at all. It is a file in the repository root called AGENTS.md, and it is addressed to machines.
The Repo Has a Job Description for Its AI Co-Worker
AGENTS.md is not a style guide. It is a workflow contract for AI coding agents working on the emulator, and it reads like the rules you would hand a new engineer in their first week.
The first rule is reconciliation. The agent must add the upstream Eglantine remote, fetch it, check open and closed pull requests and issues, and read the actual diffs, not just the titles. If the branch is behind upstream, merge first. If an upstream fix already exists, port it and cite the PR or commit. Only when nothing upstream addresses the root cause is the agent allowed to write new code.
That sequence is the point. In a fork ecosystem, the most common failure mode is duplicated work. Someone upstream fixes a bug, a downstream fork fixes it again from scratch, and the two patches drift apart. The protocol makes the agent check before it types.
Then come the operational restrictions, and they are specific. The agent may never start or stop the emulator. It must restore every shader hash it rejects. It must use full 16-digit hashes. It must not run capture loops while the owner is playing. A shader replacement that happens to reduce fog is, in the file's own framing, not proof of an emulator fix.
There is also a comment policy that will feel familiar to anyone who has reviewed AI-generated code.
The file also carries a table of 17 known game program IDs, so the agent can map a raw log line from the emulator to a title like Mario Kart World, Donkey Kong Bananza, or Kirby Air Riders without asking. That table is the bridge between a player's bug report and a proposed fix.
A JSON Port Into a Running Game
A debug build of Lichii launches with a live JSON server bound to 127.0.0.1:6545. The agent can talk to a running game over a local socket. A status call looks like this.
// request
{ "method": "status" }
// response
{
"running": true,
"title": "010015100B514000",
"build": "nx2-<sha>",
"framebuffer": "640x360"
}
The methods are small and concrete. status returns the emulator's current state. screenshot returns the framebuffer. log_tail returns recent log lines. capture_frame grabs a frame for inspection. reject_shaders marks a shader as broken. The same Python entry point can also run as a stdio MCP server, which means the workflow can be wired into any agent runtime that speaks the Model Context Protocol.
Three environment switches change what the emulator records. EDEN_NX2_SVC_TRACE logs every supervisor call with its arguments and results. EDEN_NX2_IPC_TRACE logs every IPC command and any non-zero result word. EDEN_NX2_AUTO_STUB answers every unknown service command with an empty success and records that it did.
There are RenderDoc rules too. Captures stay on the owner's machine, because a replay can change timing and hide a race condition. Before an agent rules out a synchronization bug, it has to reproduce the problem in a comparison that was not captured. A captured run that looks clean proves less than it seems.
What It Inherits, and What It Owes
Lichii is one link in a chain. yuzu is the root. Eden and Sudachi are yuzu descendants. Eglantine is the immediate upstream that Lichii fetches from. The repository states the relationship directly: Lichii builds on Eglantine, Eden, yuzu, and Sudachi, and it retains their original notices and third-party licenses.
In 2024, yuzu settled with Nintendo and shut down. Every emulator that followed carries that shadow. Lichii's answer is to be explicit about where it stands.
This is an independent fork, not an official release of those upstream projects. Lichii is not affiliated with Nintendo.
The rebrand also keeps the past on purpose. Lichii retains the existing Eden and Eglantine data directories and configuration keys, so a user coming from those projects does not lose saves, settings, or shader caches. Internally, the CMake project is still named yuzu, a small fossil of the lineage that the build system never renamed.
How Lichii Compares
| Project | Language | Stated lineage | Switch 2 target | AI agent workflow | Data continuity |
|---|---|---|---|---|---|
| Lichii | C++ | Eglantine + Eden + yuzu + Sudachi | Yes (default branch nx2) | Yes (AGENTS.md, live debug server) | Keeps Eden/Eglantine dirs and config keys |
| Eglantine | C++ | yuzu + Eden lineage | Not stated | Not documented | N/A |
| Eden | C++ | yuzu lineage | Not stated | Not documented | N/A |
| yuzu | C++ | Original | N/A (discontinued 2024) | No | N/A |
| Sudachi | C++ | yuzu lineage | Not stated | Not documented | N/A |
| Ryujinx | C# | Independent | Not stated | Not documented | N/A |
Star counts and statuses for the comparison projects are not asserted here; check each repository for current figures. Lichii's figures are a snapshot from the repository at time of writing.
The table is factual, and so is the caveat. Lichii is not the fastest emulator, not the most compatible, and not the most stable. The project says so itself. It is a fast-moving fork with an experimental Switch 2 target and targeted renderer fixes, aimed at people willing to run pre-release builds and file useful reports.
The Takeaway
Lichii is two experiments running at once. One is technical: emulating hardware that is still new, on a codebase inherited from a project that no longer exists. The other is procedural: maintaining a large C++ emulator with AI agents in the loop.
The second bet may outlive the first. Switch 2 emulation will either mature or stall, but the pattern of handing a model a rulebook, a live probe into the running program, and a leash on what it is allowed to touch is portable. If you are going to let an agent near your codebase, that is the shape of the thing you have to build. Lichii just wrote it down first.





