Ailoy is a library for building arbitrary AI agents within your own code, whose core feature is that each agent has its own independent micro-VM (microVM) sandbox.
Purpose
Ailoy is aimed at developers who need to build AI agents capable of executing complex tasks. Unlike agents that can only call predefined tools, Ailoy gives agents their own "computer," allowing them to install and use software in a general-purpose computing environment and create their own scripts, without touching the host system unless the developer explicitly exposes it.
Main capabilities
- Multi-language API support: provides bindings for Python, JavaScript (TypeScript), and Rust.
- Cross-platform operation: supports Linux, Windows, and macOS.
- Micro-VM sandbox: based on krun virtualization technology, providing each agent with an independent virtual machine, and requiring no separate virtual machine daemon to be installed.
- GPU support: the virtualization used supports GPUs, so agents can run machine learning models or even games inside their virtual machines (running ML models in the examples requires a GPU that supports Vulkan, or Metal on Mac).
- Streaming output: agent.run produces one complete message at each step of the tool loop, while agent.run_stream (agent.runStream in the Node.js API) streams each message token by token as the model generates it.
- No system dependencies: using the library itself requires no system-level dependencies, but API keys must be configured for the LLM providers used by the agents.
- Mounting host folders: mounting a host folder to the console (virtx's virtual file system) requires FUSE—install FUSE-T on macOS and Dokany on Windows; see the virtx documentation for details.
How to use
- Set the model provider's API key, either in an environment variable or in a .env file.
- Build an agent using the concise API of your chosen language.
- Get the complete message for each step via agent.run, or stream output via agent.run_stream / agent.runStream.
You can also skip reading the documentation: point a coding agent (Claude Code, Codex, Cursor, etc.) at this README and tell itWhat kind of agent do you want to build? The repository itself is a plugin marketplace, so agent skills can be installed without cloning.
Special note for Windows: the console's micro-VM runs on the Windows Hypervisor Platform, which is disabled by default. You need to enable this optional feature in PowerShell as an administrator and restart, and also enable virtualization in the firmware.
Use cases
- Build AI agents that need to install software, run code, or use a general-purpose computing environment.
- Run machine learning models or GPU-accelerated tasks inside a virtual machine.
- Agent projects that require cross-language (Python/JS/Rust) and multi-platform development.
- Scenarios where you want the agent isolated from the host system and only explicitly expose necessary resources.
Limitations and considerations
- The project is in active development, and the API may change between versions.
- API keys are required for the LLM provider you use.
- Mounting host folders requires FUSE (FUSE-T on macOS, Dokany on Windows).
- On Windows, Windows Hypervisor Platform must be enabled and firmware virtualization must be enabled.
- Running the ML model examples requires a GPU that supports Vulkan or Metal on Mac.
- Complete details for building from source are not yet provided.
- The license is Apache-2.0; see LICENSE.md for details.