An operating system that can explain its own failures.

PsyDian is a small kernel written from scratch in Rust. When something breaks, it records what happened, and you can ask an AI why, in plain English. The AI can suggest commands, but it can never run them.

$ curl -fsSL https://raw.githubusercontent.com/PsyDianOS/PsyDian_OS/main/scripts/install.sh | bash

One command for Linux, macOS and Windows (WSL). Read the script first.

psydian ai

About

A real kernel, with an assistant that stays outside it.

PsyDian boots on bare x86-64 hardware (or QEMU) and gives you a simple shell. It is a prototype built to explore one question: how can AI help with low-level failures without being trusted with the system?

01

Written from scratch

Descriptor tables, interrupts, paging, a kernel heap, keyboard and serial input, and a shell. No borrowed operating system underneath.

02

Failures become records

Faults are caught and turned into structured diagnostics, with a code, a subsystem and context, instead of a frozen screen.

03

Ask in plain English

Type ai why did the heap fail? and get a short explanation with next steps, usually in about two seconds.

04

You stay in charge

Suggested commands carry a risk level. Nothing runs until you type run, and destructive commands are blocked outright.

How it works

The kernel never touches the network.

A separate program on your computer, the AI Bridge, sits between the kernel and the AI service. It is the only part that knows the API key.

inside QEMU

PsyDian kernel

Records diagnostics, sends your question, checks every answer again.

@PSY framesover serial
on your computer

AI Bridge

Builds the context, asks the AI, validates the answer and filters commands.

HTTPSJSON answer
your choice

AI service

Free Gemini by default. OmniRoute, OpenRouter or a local Ollama model also work.

Diagnostic data is wrapped and labelled so that instructions hidden inside it are ignored. Answers are cut to fixed sizes and plain ASCII before they reach the kernel.

Risk levelWhat happens with a suggestionExample
safeRuns when you type run <n>meminfo, logs
sensitiveAsks you to confirm with y/Nai
privilegedAsks you to confirm with y/Nshutdown
destructiveBlocked. Never runs from a suggestionpanic-test

Try it

Three commands from nothing to a running kernel.

The installer sets up Rust, QEMU and everything else it needs, then runs a quick self-test. It takes a few minutes the first time.

Install

On Linux or macOS, in a terminal. On Windows, run wsl --install first and use the Ubuntu terminal.

curl -fsSL https://raw.githubusercontent.com/PsyDianOS/PsyDian_OS/main/scripts/install.sh | bash

Choose an AI service

Pick Gemini and paste a free key from Google AI Studio. It is saved only on your computer.

psydian ai-setup

Boot and ask

Break something on purpose, then ask why.

psydian ai
psydian> fault-test heap
psydian> ai why did the heap fail?
psydian> run 1

No key? psydian demo boots with canned AI answers. Other commands: psydian check, psydian test, psydian help.

Built by

Two students, two halves.

Anurag Singh

Kernel

Boot, memory, interrupts, the shell, diagnostics, the message protocol and the command safety checks.

Aditya Chauhan

AI Bridge

The host program that talks to the AI: context, prompt, providers, answer validation and command filtering.

Progress

  • Week 1Requirements and toolchaindone
  • Week 2Bootable kernel and loggingdone
  • Week 3Exceptions, interrupts, paging, heapdone
  • Week 4Keyboard, serial input and shelldone
  • Week 5Diagnostics and message protocoldone
  • Week 6Host-side AI Bridgedone
  • Week 7AI integration and safety checksdone
  • Week 8Integration, testing and demoin progress