AIOS: AI Agent Operating System
See the codeAIOS is the AI Agent Operating System, which embeds large language model (LLM) into the operating system and facilitates the development and deployment of LLM-based AI Agents. AIOS is designed to address problems (e.g., scheduling, context switch, memory management, storage management, tool management, Agent SDK management, etc.) during the development and deployment of LLM-based agents, towards a better AIOS-Agent ecosystem for agent developers and agent users. AIOS includes the AIOS Kernel (this AIOS repository) and the AIOS SDK (the Cerebrum repository). AIOS supports both Web UI and Terminal UI.
The AIOS system is comprised of two key components: the AIOS kernel and the AIOS SDK. The AIOS kernel acts as an abstraction layer over the operating system kernel, managing various resources that agents require, such as LLM, memory, storage and tool. The AIOS SDK is designed for agent users and developers, enabling them to build and run agent applications by interacting with the AIOS kernel. AIOS kernel is the current repository and AIOS SDK can be found at here
Below shows how agents utilize AIOS SDK to interact with AIOS kernel and how AIOS kernel receives agent queries and leverage the chain of syscalls that are scheduled and dispatched to run in different modules.
For computer-use agent, the architecture extends the AIOS Kernel with significant enhancements focused on computer contextualization. While preserving essential components like LLM Core(s), Context Manager, and Memory Manager, the Tool Manager module has been fundamentally redesigned to incorporate a VM (Virtual Machine) Controller and MCP Server. This redesign creates a sandboxed environment that allows agents to safely interact with computer systems while maintaining a consistent semantic mapping between agent intentions and computer operations.
Here are some key notations that are required to know before introducing the different modes of AIOS.
The following parts introduce different modes of deploying AIOS. Currently, AIOS already supports Mode 1 and Mode 2, other modes with new features are still ongoing.
Ongoing Features:
Critical techniques:
Please see our ongoing documentation for more information.
Git clone AIOS kernel
git clone https://github.com/agiresearch/AIOS.git
Create venv environment
python3.x -m venv venv # Only support for Python 3.10 and 3.11
source venv/bin/activate
or create conda environment
conda create -n venv python=3.x # Only support for Python 3.10 and 3.11
conda activate venv
[!TIP] We strongly recommend using uv for faster and more reliable package installation. To install uv:
bash pip install uv
For GPU environments:
uv pip install -r requirements-cuda.txt
For CPU-only environments:
uv pip install -r requirements.txt
Alternatively, if you prefer using pip:
For GPU environments:
pip install -r requirements-cuda.txt
For CPU-only environments:
pip install -r requirements.txt
Clone the Cerebrum repository:
git clone https://github.com/agiresearch/Cerebrum.git
Install using uv (recommended):
cd Cerebrum && uv pip install -e .
Or using pip:
cd Cerebrum && pip install -e .
To use the mcp for computer-use agent, we strongly recommend you install a virtualized environment equipped with GUI. Instructions can be found in here.
Note: The machine where the AIOS kernel (AIOS) is installed must also have the AIOS SDK (Cerebrum) installed. Installing AIOS kernel will install the AIOS SDK automatically by default. If you are using the Local Kernel mode, i.e., you are running AIOS and agents on the same machine, then simply install both AIOS and Cerebrum on that machine. If you are using Remote Kernel mode, i.e., running AIOS on Machine 1 and running agents on Machine 2 and the agents remotely interact with the kernel, then you need to install both AIOS kernel and AIOS SDK on Machine 1, and install the AIOS SDK alone on Machine 2. Please follow the guidelines at Cerebrum regarding how to install the SDK.
Before launching AIOS, it is required to set up configurations. AIOS provides two ways of setting up configurations, one is to set up by directly modifying the configuration file, another is to set up interactively.
You need API keys for services like OpenAI, Anthropic, Groq and HuggingFace. The simplest way to configure them is to edit the aios/config/config.yaml.
[!TIP] It is important to mention that, we strongly recommend using the
aios/config/config.yamlfile to set up your API keys. This method is straightforward and helps avoid potential sychronization issues with environment variables.
A simple example to set up your API keys in aios/config/config.yaml is shown below:
api_keys:
openai: "your-openai-key"
gemini: "your-gemini-key"
groq: "your-groq-key"
anthropic: "your-anthropic-key"
huggingface:
auth_token: "your-huggingface-token-for-authorized-models"
cache_dir: "your-cache-dir-for-saving-models"
novita: "your-novita-api-key"
To obtain these API keys:
You can configure which LLM models to use in the same aios/config/config.yaml file. Here's an example configuration:
llms:
models:
# Ollama Models
- name: "qwen2.5:7b"
backend: "ollama"
hostname: "http://localhost:11434" # Make sure to run ollama server
# vLLM Models
- name: "meta-llama/Llama-3.1-8B-Instruct"
backend: "vllm"
hostname: "http://localhost:8091/v1" # Make sure to run vllm server
Using Ollama Models:
ollama serve
ollama pull qwen2.5:7b # example model
[!TIP] Ollama supports both CPU-only and GPU environments. For more details about ollama usage, visit ollama documentation
Using vLLM Models:
vllm serve meta-llama/Llama-3.1-8B-Instruct --port 8091
[!NOTE] vLLM currently only supports Linux and GPU-enabled environments. If you don't have a compatible environment, please choose other backend options. To enable the tool calling feature of vllm, refer to https://docs.vllm.ai/en/latest/features/tool_calling.html
Using HuggingFace Models: You can configure HuggingFace models with specific GPU memory allocation:
- name: "meta-llama/Llama-3.1-8B-Instruct"
backend: "huggingface"
max_gpu_memory: {0: "24GB", 1: "24GB"} # GPU memory allocation
eval_device: "cuda:0" # Device for model evaluation
Alternatively, you can set up aios configurations interactively by using the following command.
aios env list: Show current environment variables, or show available API keys if no variables are setaios env set: Show current environment variables, or show available API keys if no variables are setaios refresh: Refresh AIOS configuration.
Reloads the configuration from aios/config/config.yaml.
Reinitializes all components without restarting the server.
The server must be running.When no environment variables are set, the following API keys will be shown:
DEEPSEEK_API_KEY: Deepseek API key for accessing Deepseek servicesOPENAI_API_KEY: OpenAI API key for accessing OpenAI servicesGEMINI_API_KEY: Google Gemini API key for accessing Google's Gemini servicesGROQ_API_KEY: Groq API key for accessing Groq servicesHF_AUTH_TOKEN: HuggingFace authentication token for accessing modelsHF_HOME: Optional path to store HuggingFace modelsNOVITA_API_KEY: Novita AI API key for accessing Novita AI servicesAfter you setup your keys or environment parameters, then you can follow the instructions below to start.
Run:
bash runtime/launch_kernel.sh
Or if you need to explicity set the Python version by running python3.10, python3.11, python3, etc. run the command below:
python3.x -m uvicorn runtime.launch:app --host 0.0.0.0 --port 8000 # replace the port with your own port
You also need to set up the host and port in the configuration of Cerebrum (AIOS SDK) to make sure it is consistent with the configurations of AIOS.
You can also force the kernel to run in the background with:
python3.x -m uvicorn runtime.launch:app --host 0.0.0.0 > uvicorn.log 2>&1 &
And you can run it even after the shell closes by typing nohup before the entire command.
Command to launch the kernel in the background so it continues running even after the active shell is closed, while also logging information to the specified log file (recommended):
nohup python3 -m uvicorn runtime.launch:app --host 0.0.0.0 --port 8000 > uvicorn.log 2>&1 &
To interact with the AIOS terminal (LLM-based semantic file system), you can run the following command to start the AIOS terminal.
python scripts/run_terminal.py
Then you can start interacting with the AIOS terminal by typing natural language commands.
If you successfully start the AIOS terminal, it will be shown as below:
Detailed instructions of how to use the AIOS terminal can be found at here
[!WARNING] The rollback feature of the AIOS terminal requires the connection to the redis server. Make sure you have the redis server running if you would like to use the rollback feature.
Make sure you have installed a virtualized environment with GUI, then you can refer to Cerebrum for how to run the computer-use agent.
| Provider π’ | Model Name π€ | Open Source π | Model String β¨οΈ | Backend βοΈ | Required API Key |
|---|---|---|---|---|---|
| Anthropic | All Models | β | model-name | anthropic | ANTHROPIC_API_KEY |
| OpenAI | All Models | β | model-name | openai | OPENAI_API_KEY |
| Deepseek | All Models | β | model-name | deepseek | DEEPSEEK_API_KEY |
| All Models | β | model-name | gemini | GEMINI_API_KEY | |
| Groq | All Models | β | model-name | groq | GROQ_API_KEY |
| HuggingFace | All Models | β | model-name | huggingface | HF_HOME |
| ollama | All Models | β | model-name | ollama | - |
| vLLM | All Models | β | model-name | vllm | - |
| Novita | All Models | β | model-name | novita | NOVITA_API_KEY |
An early experimental Rust scaffold lives in aios-rs/ providing trait definitions and minimal placeholder implementations (context, memory, storage, tool, scheduler, llm). This is NOT feature-parity yet; it's a foundation for incremental porting and performance-focused components.
cd aios-rs
cargo build
cargo test
use aios_rs::prelude::*;
fn main() -> anyhow::Result<()> {
let llm = std::sync::Arc::new(EchoLLM);
let memory = std::sync::Arc::new(std::sync::Mutex::new(InMemoryMemoryManager::new()));
let storage = std::sync::Arc::new(FsStorageManager::new("/tmp/aios_store"));
let tool = std::sync::Arc::new(NoopToolManager);
let mut scheduler = NoopScheduler::new(llm, memory, storage, tool);
scheduler.start()?;
scheduler.stop()?;
Ok(())
}
@article{mei2025aios,
title={AIOS: LLM Agent Operating System},
author={Mei, Kai and Zhu, Xi and Xu, Wujiang and Hua, Wenyue and Jin, Mingyu and Li, Zelong and Xu, Shuyuan and Ye, Ruosong and Ge, Yingqiang and Zhang, Yongfeng}
journal={In Proceedings of the 2nd Conference on Language Modeling (COLM 2025)},
year={2025}
}
@article{mei2025litecua,
title={LiteCUA: Computer as MCP Server for Computer-Use Agent on AIOS},
author={Mei, Kai and Zhu, Xi and Gao, Hang and Lin, Shuhang and Zhang, Yongfeng},
journal={arXiv preprint arXiv:2505.18829},
year={2025}
}
@article{xu2025mem,
title={A-Mem: Agentic Memory for LLM Agents},
author={Xu, Wujiang and Liang, Zujie and Mei, Kai and Gao, Hang and Tan, Juntao and Zhang, Yongfeng},
journal={arXiv:2502.12110},
year={2025}
}
@inproceedings{rama2025cerebrum,
title={Cerebrum (AIOS SDK): A Platform for Agent Development, Deployment, Distribution, and Discovery},
author={Balaji Rama and Kai Mei and Yongfeng Zhang},
booktitle={2025 Annual Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics},
year={2025}
}
@inproceedings{shi2025from,
title={From Commands to Prompts: {LLM}-based Semantic File System for AIOS},
author={Zeru Shi and Kai Mei and Mingyu Jin and Yongye Su and Chaoji Zuo and Wenyue Hua and Wujiang Xu and Yujie Ren and Zirui Liu and Mengnan Du and Dong Deng and Yongfeng Zhang},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=2G021ZqUEZ}
}
@article{ge2023llm,
title={LLM as OS, Agents as Apps: Envisioning AIOS, Agents and the AIOS-Agent Ecosystem},
author={Ge, Yingqiang and Ren, Yujie and Hua, Wenyue and Xu, Shuyuan and Tan, Juntao and Zhang, Yongfeng},
journal={arXiv:2312.03815},
year={2023}
}
For how to contribute, see CONTRIBUTE. If you would like to contribute to the codebase, issues or pull requests are always welcome!
We learned the design and reused code from the following projects: LiteLLM, OSWorld.
If you would like to join the community, ask questions, chat with fellows, learn about or propose new features, and participate in future developments, join our Discord Community!
(top 30 of 48)
Python
98.6%
AIOS: AI Agent Operating System
See the codeAIOS is the AI Agent Operating System, which embeds large language model (LLM) into the operating system and facilitates the development and deployment of LLM-based AI Agents. AIOS is designed to address problems (e.g., scheduling, context switch, memory management, storage management, tool management, Agent SDK management, etc.) during the development and deployment of LLM-based agents, towards a better AIOS-Agent ecosystem for agent developers and agent users. AIOS includes the AIOS Kernel (this AIOS repository) and the AIOS SDK (the Cerebrum repository). AIOS supports both Web UI and Terminal UI.
The AIOS system is comprised of two key components: the AIOS kernel and the AIOS SDK. The AIOS kernel acts as an abstraction layer over the operating system kernel, managing various resources that agents require, such as LLM, memory, storage and tool. The AIOS SDK is designed for agent users and developers, enabling them to build and run agent applications by interacting with the AIOS kernel. AIOS kernel is the current repository and AIOS SDK can be found at here
Below shows how agents utilize AIOS SDK to interact with AIOS kernel and how AIOS kernel receives agent queries and leverage the chain of syscalls that are scheduled and dispatched to run in different modules.
For computer-use agent, the architecture extends the AIOS Kernel with significant enhancements focused on computer contextualization. While preserving essential components like LLM Core(s), Context Manager, and Memory Manager, the Tool Manager module has been fundamentally redesigned to incorporate a VM (Virtual Machine) Controller and MCP Server. This redesign creates a sandboxed environment that allows agents to safely interact with computer systems while maintaining a consistent semantic mapping between agent intentions and computer operations.
Here are some key notations that are required to know before introducing the different modes of AIOS.
The following parts introduce different modes of deploying AIOS. Currently, AIOS already supports Mode 1 and Mode 2, other modes with new features are still ongoing.
Ongoing Features:
Critical techniques:
Please see our ongoing documentation for more information.
Git clone AIOS kernel
git clone https://github.com/agiresearch/AIOS.git
Create venv environment
python3.x -m venv venv # Only support for Python 3.10 and 3.11
source venv/bin/activate
or create conda environment
conda create -n venv python=3.x # Only support for Python 3.10 and 3.11
conda activate venv
[!TIP] We strongly recommend using uv for faster and more reliable package installation. To install uv:
bash pip install uv
For GPU environments:
uv pip install -r requirements-cuda.txt
For CPU-only environments:
uv pip install -r requirements.txt
Alternatively, if you prefer using pip:
For GPU environments:
pip install -r requirements-cuda.txt
For CPU-only environments:
pip install -r requirements.txt
Clone the Cerebrum repository:
git clone https://github.com/agiresearch/Cerebrum.git
Install using uv (recommended):
cd Cerebrum && uv pip install -e .
Or using pip:
cd Cerebrum && pip install -e .
To use the mcp for computer-use agent, we strongly recommend you install a virtualized environment equipped with GUI. Instructions can be found in here.
Note: The machine where the AIOS kernel (AIOS) is installed must also have the AIOS SDK (Cerebrum) installed. Installing AIOS kernel will install the AIOS SDK automatically by default. If you are using the Local Kernel mode, i.e., you are running AIOS and agents on the same machine, then simply install both AIOS and Cerebrum on that machine. If you are using Remote Kernel mode, i.e., running AIOS on Machine 1 and running agents on Machine 2 and the agents remotely interact with the kernel, then you need to install both AIOS kernel and AIOS SDK on Machine 1, and install the AIOS SDK alone on Machine 2. Please follow the guidelines at Cerebrum regarding how to install the SDK.
Before launching AIOS, it is required to set up configurations. AIOS provides two ways of setting up configurations, one is to set up by directly modifying the configuration file, another is to set up interactively.
You need API keys for services like OpenAI, Anthropic, Groq and HuggingFace. The simplest way to configure them is to edit the aios/config/config.yaml.
[!TIP] It is important to mention that, we strongly recommend using the
aios/config/config.yamlfile to set up your API keys. This method is straightforward and helps avoid potential sychronization issues with environment variables.
A simple example to set up your API keys in aios/config/config.yaml is shown below:
api_keys:
openai: "your-openai-key"
gemini: "your-gemini-key"
groq: "your-groq-key"
anthropic: "your-anthropic-key"
huggingface:
auth_token: "your-huggingface-token-for-authorized-models"
cache_dir: "your-cache-dir-for-saving-models"
novita: "your-novita-api-key"
To obtain these API keys:
You can configure which LLM models to use in the same aios/config/config.yaml file. Here's an example configuration:
llms:
models:
# Ollama Models
- name: "qwen2.5:7b"
backend: "ollama"
hostname: "http://localhost:11434" # Make sure to run ollama server
# vLLM Models
- name: "meta-llama/Llama-3.1-8B-Instruct"
backend: "vllm"
hostname: "http://localhost:8091/v1" # Make sure to run vllm server
Using Ollama Models:
ollama serve
ollama pull qwen2.5:7b # example model
[!TIP] Ollama supports both CPU-only and GPU environments. For more details about ollama usage, visit ollama documentation
Using vLLM Models:
vllm serve meta-llama/Llama-3.1-8B-Instruct --port 8091
[!NOTE] vLLM currently only supports Linux and GPU-enabled environments. If you don't have a compatible environment, please choose other backend options. To enable the tool calling feature of vllm, refer to https://docs.vllm.ai/en/latest/features/tool_calling.html
Using HuggingFace Models: You can configure HuggingFace models with specific GPU memory allocation:
- name: "meta-llama/Llama-3.1-8B-Instruct"
backend: "huggingface"
max_gpu_memory: {0: "24GB", 1: "24GB"} # GPU memory allocation
eval_device: "cuda:0" # Device for model evaluation
Alternatively, you can set up aios configurations interactively by using the following command.
aios env list: Show current environment variables, or show available API keys if no variables are setaios env set: Show current environment variables, or show available API keys if no variables are setaios refresh: Refresh AIOS configuration.
Reloads the configuration from aios/config/config.yaml.
Reinitializes all components without restarting the server.
The server must be running.When no environment variables are set, the following API keys will be shown:
DEEPSEEK_API_KEY: Deepseek API key for accessing Deepseek servicesOPENAI_API_KEY: OpenAI API key for accessing OpenAI servicesGEMINI_API_KEY: Google Gemini API key for accessing Google's Gemini servicesGROQ_API_KEY: Groq API key for accessing Groq servicesHF_AUTH_TOKEN: HuggingFace authentication token for accessing modelsHF_HOME: Optional path to store HuggingFace modelsNOVITA_API_KEY: Novita AI API key for accessing Novita AI servicesAfter you setup your keys or environment parameters, then you can follow the instructions below to start.
Run:
bash runtime/launch_kernel.sh
Or if you need to explicity set the Python version by running python3.10, python3.11, python3, etc. run the command below:
python3.x -m uvicorn runtime.launch:app --host 0.0.0.0 --port 8000 # replace the port with your own port
You also need to set up the host and port in the configuration of Cerebrum (AIOS SDK) to make sure it is consistent with the configurations of AIOS.
You can also force the kernel to run in the background with:
python3.x -m uvicorn runtime.launch:app --host 0.0.0.0 > uvicorn.log 2>&1 &
And you can run it even after the shell closes by typing nohup before the entire command.
Command to launch the kernel in the background so it continues running even after the active shell is closed, while also logging information to the specified log file (recommended):
nohup python3 -m uvicorn runtime.launch:app --host 0.0.0.0 --port 8000 > uvicorn.log 2>&1 &
To interact with the AIOS terminal (LLM-based semantic file system), you can run the following command to start the AIOS terminal.
python scripts/run_terminal.py
Then you can start interacting with the AIOS terminal by typing natural language commands.
If you successfully start the AIOS terminal, it will be shown as below:
Detailed instructions of how to use the AIOS terminal can be found at here
[!WARNING] The rollback feature of the AIOS terminal requires the connection to the redis server. Make sure you have the redis server running if you would like to use the rollback feature.
Make sure you have installed a virtualized environment with GUI, then you can refer to Cerebrum for how to run the computer-use agent.
| Provider π’ | Model Name π€ | Open Source π | Model String β¨οΈ | Backend βοΈ | Required API Key |
|---|---|---|---|---|---|
| Anthropic | All Models | β | model-name | anthropic | ANTHROPIC_API_KEY |
| OpenAI | All Models | β | model-name | openai | OPENAI_API_KEY |
| Deepseek | All Models | β | model-name | deepseek | DEEPSEEK_API_KEY |
| All Models | β | model-name | gemini | GEMINI_API_KEY | |
| Groq | All Models | β | model-name | groq | GROQ_API_KEY |
| HuggingFace | All Models | β | model-name | huggingface | HF_HOME |
| ollama | All Models | β | model-name | ollama | - |
| vLLM | All Models | β | model-name | vllm | - |
| Novita | All Models | β | model-name | novita | NOVITA_API_KEY |
An early experimental Rust scaffold lives in aios-rs/ providing trait definitions and minimal placeholder implementations (context, memory, storage, tool, scheduler, llm). This is NOT feature-parity yet; it's a foundation for incremental porting and performance-focused components.
cd aios-rs
cargo build
cargo test
use aios_rs::prelude::*;
fn main() -> anyhow::Result<()> {
let llm = std::sync::Arc::new(EchoLLM);
let memory = std::sync::Arc::new(std::sync::Mutex::new(InMemoryMemoryManager::new()));
let storage = std::sync::Arc::new(FsStorageManager::new("/tmp/aios_store"));
let tool = std::sync::Arc::new(NoopToolManager);
let mut scheduler = NoopScheduler::new(llm, memory, storage, tool);
scheduler.start()?;
scheduler.stop()?;
Ok(())
}
@article{mei2025aios,
title={AIOS: LLM Agent Operating System},
author={Mei, Kai and Zhu, Xi and Xu, Wujiang and Hua, Wenyue and Jin, Mingyu and Li, Zelong and Xu, Shuyuan and Ye, Ruosong and Ge, Yingqiang and Zhang, Yongfeng}
journal={In Proceedings of the 2nd Conference on Language Modeling (COLM 2025)},
year={2025}
}
@article{mei2025litecua,
title={LiteCUA: Computer as MCP Server for Computer-Use Agent on AIOS},
author={Mei, Kai and Zhu, Xi and Gao, Hang and Lin, Shuhang and Zhang, Yongfeng},
journal={arXiv preprint arXiv:2505.18829},
year={2025}
}
@article{xu2025mem,
title={A-Mem: Agentic Memory for LLM Agents},
author={Xu, Wujiang and Liang, Zujie and Mei, Kai and Gao, Hang and Tan, Juntao and Zhang, Yongfeng},
journal={arXiv:2502.12110},
year={2025}
}
@inproceedings{rama2025cerebrum,
title={Cerebrum (AIOS SDK): A Platform for Agent Development, Deployment, Distribution, and Discovery},
author={Balaji Rama and Kai Mei and Yongfeng Zhang},
booktitle={2025 Annual Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics},
year={2025}
}
@inproceedings{shi2025from,
title={From Commands to Prompts: {LLM}-based Semantic File System for AIOS},
author={Zeru Shi and Kai Mei and Mingyu Jin and Yongye Su and Chaoji Zuo and Wenyue Hua and Wujiang Xu and Yujie Ren and Zirui Liu and Mengnan Du and Dong Deng and Yongfeng Zhang},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=2G021ZqUEZ}
}
@article{ge2023llm,
title={LLM as OS, Agents as Apps: Envisioning AIOS, Agents and the AIOS-Agent Ecosystem},
author={Ge, Yingqiang and Ren, Yujie and Hua, Wenyue and Xu, Shuyuan and Tan, Juntao and Zhang, Yongfeng},
journal={arXiv:2312.03815},
year={2023}
}
For how to contribute, see CONTRIBUTE. If you would like to contribute to the codebase, issues or pull requests are always welcome!
We learned the design and reused code from the following projects: LiteLLM, OSWorld.
If you would like to join the community, ask questions, chat with fellows, learn about or propose new features, and participate in future developments, join our Discord Community!
(top 30 of 48)
Python
98.6%