# AAOS: An Intelligent AI Operating System Running on a Self-Made 32-bit x86 Kernel

> AAOS is a 32-bit x86 operating system kernel built from scratch, booted via the Multiboot protocol, directly driving VGA and serial ports. It integrates OpenAI, Yahoo Finance, and DuckDuckGo, and works with a Next.js frontend and FastAPI backend to deliver a complete AI chat experience.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-05-24T18:11:31.000Z
- 最近活动: 2026-05-24T18:21:45.673Z
- 热度: 154.8
- 关键词: 操作系统, x86内核, AI聊天, Multiboot, QEMU, OpenAI, FastAPI, Next.js, 全栈开发, 系统编程
- 页面链接: https://www.zingnex.cn/en/forum/thread/aaos-32x86ai
- Canonical: https://www.zingnex.cn/forum/thread/aaos-32x86ai
- Markdown 来源: floors_fallback

---

## AAOS: Introduction to the Intelligent AI OS on a Self-Made 32-bit x86 Kernel

Original Author/Maintainer: georgexu1118-ctrl
Source Platform: GitHub
Publication Date: May 24, 2026
Original Link: https://github.com/georgexu1118-ctrl/aaos

AAOS (Autonomous AI OS) is a 32-bit x86 operating system kernel built from scratch, booted via the Multiboot protocol, directly driving the VGA text screen and COM1 serial port. It integrates services like OpenAI, Yahoo Finance, and DuckDuckGo, and works with a Next.js frontend and FastAPI backend to deliver a complete AI chat experience, also supporting PDF document Q&A functionality. This thread will analyze the project's background, architecture, implementation, and value in separate floors.

## Background: Exploring Deep Integration of Operating Systems and AI

The operating system is the core software of a computer, responsible for managing hardware and providing a runtime environment. With the development of AI technology, "deeply integrating AI into the operating system layer" has become an interesting exploration direction. The uniqueness of the AAOS project lies in: it does not run AI applications on an existing OS, but **builds an operating system designed specifically for AI from scratch**, achieving full-stack integration from "silicon to UI" and demonstrating the possibility of combining system programming with AI.

## System Architecture Analysis: From Low-Level Kernel to Modern Full Stack

AAOS's core architecture covers multiple layers of components:
1. **Kernel Layer**: A 32-bit x86 kernel written in C and assembly, booted following the Multiboot1 specification, directly operating VGA (0xB8000 memory) and COM1 serial port (0x3F8 port), with the linker script located at the 1MiB address.
2. **Bridge Layer**: Listens to the serial port via `bridge.py`, forwards kernel text to the OpenAI API and writes back responses, supports real/simulation modes, and encrypts keys using Windows DPAPI.
3. **Backend Layer**: FastAPI implements SSE streaming responses, integrates tool calls for Yahoo Finance (stock queries) and DuckDuckGo (search), with optional Supabase persistent storage.
4. **Frontend Layer**: Next.js builds a space-themed UI, providing a chat interface and PDF upload functionality.

## Building and Running: From Source Code to Executable System

Project build and run process:
- **Kernel Compilation**: Use the LLVM toolchain (clang+lld) to compile C/assembly code into `kernel.bin` (execute `./build.ps1`).
- **QEMU Execution**: Supports window mode (`./run.ps1`), headless mode (`./run.ps1 -Headless`), and chat mode (`./run.ps1 -Chat`, TCP serial port forwarding to port 4555).
- **Full Startup**: Need to run the QEMU kernel, bridge script, FastAPI server, and Next.js frontend simultaneously; visit http://localhost:3000 to experience.

## PDF Q&A Functionality and Project Technical Highlights

**PDF Q&A Functionality**:
After users upload a PDF (≤5MB), the frontend extracts text, generates vector embeddings using `intfloat/multilingual-e5-large-instruct`, retrieves relevant fragments when a question is asked, and generates answers with references via `openai/gpt-oss-20b`. All processing is done in the browser with no server storage, protecting privacy.

**Technical Highlights**:
- System Programming Education: Provides a minimal runnable OS reference covering core concepts like booting and hardware operations.
- Full-Stack Integration: Cross-layer technology fusion from assembly/C to React/Next.js.
- AI Architecture Reference: Practices like streaming responses, tool calls, and RAG (Retrieval-Augmented Generation).

## Limitations and Improvement Directions

**Limitations**:
- Limited Hardware Support: Only QEMU simulation environment, no real hardware drivers (disk, network, etc.).
- Lack of Security: No modern security mechanisms like address space isolation or permission checks.
- Single-Task Design: Does not support multi-process/threading.
- Complex Deployment: Requires running multiple components simultaneously.

**Improvement Directions**:
- Add hardware drivers for disk, network, etc.
- Implement process scheduling and memory isolation.
- Simplify operation and maintenance with containerized deployment.
- Support more AI models like Anthropic and Google.

## Conclusion: Technical Value and Exploration Significance of AAOS

AAOS is an impressive full-stack technology demonstration project, proving that building an OS from scratch in 2026 still has value—it is both a learning tool and an innovative experimental platform. It combines a handcrafted kernel with modern AI services, opening up a unique path for the integration of system programming and AI.

For tech enthusiasts, AAOS provides rich learning materials; for system developers, it demonstrates best practices for full-stack integration; for AI developers, it offers references for tool calls and streaming architectures. Its value lies not only in its functionality but also in inspiring technical imagination and exploration spirit.
