Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ele001/Agent-Kernel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agent-Kernel Logo

We appreciate your support! Help us grow and improve by giving Agent-Kernel a 🌟 star on GitHub!

Agent-Kernel: Explore the Scaling Law of Collective Intelligence

Agent-Kernel is a Multi-Agent System (MAS) framework featuring a novel society-centric modular microkernel architecture, designed to support agent-based social simulation in both distributed and standalone environments.

📍 Table of Contents

✨ Core Advantages: Why Choose Agent-Kernel?

Agent-Kernel offers four core advantages for social simulation, making it stand out in the study of multi-agent systems:

1. Adaptability

Agent-Kernel supports adding/removing agents, changing environments, and modifying behaviors at runtime. This enables simulations to naturally reflect population flow, environmental shifts, and evolving behavioral patterns.

2. Configurability

With the Controller module, Agent-Kernel allows real-time adjustments to parameters or events during simulation. This makes it easy to test and validate complex sociological hypotheses.

3. Reliability

Agent-Kernel employs a strict system-level verification mechanism, validating every agent action. This ensures that simulation behaviors follow physical and social rules, maintaining scientific rigor.

4. Reusability

Agent-Kernel uses a standardized, plugin-based modular design. Codes can be reused across scenarios, significantly accelerating research iteration.

🎬 Showcase

Agent-Kernel has been successfully applied to several complex social simulation scenarios:

1. Universe 25 Experiment

Simulating the famous "Universe 25" sociological experiment to explore the relationships between population density, social structure, and behavioral anomalies.

Universe 25 Experiment

2. ZJU Campus Life

Constructing a high-fidelity simulation of the campus environment to study pedestrian flow dynamics, resource allocation, and social interaction patterns.

ZJU Campus Life

🏛️ Architecture and Design

1. Framework Overview

The Agent-Kernel framework adopts a modular microkernel architecture, with a core system—composed of the Agent, Environment, Action, Controller, and System modules—and multiple plugins. The core manages plugin registration, behavior verification, asynchronous communication, and other core responsibilities, while plugins provide the specialized functions for social simulation, as shown in the diagram below:

Agent-Kernel Framework

2. Software Design

To realize the core design goals of the Agent-Kernel framework, we made a series of deliberate software design decisions, as illustrated in the diagram below:

Agent-Kernel Software Design

🚀 Quick Start

1. Requirements

  • Python ≥ 3.11
  • uv

Install uv:

# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

# or via pip
pip install uv

2. Clone and activate environment

git clone https://github.com/ZJU-LLMs/Agent-Kernel.git
cd Agent-Kernel
uv venv
# Linux/macOS
source .venv/bin/activate
# Windows PowerShell
# .venv\Scripts\Activate.ps1

3. Choose a package to install

You can work with either distributed or standalone package.

Both support optional extras:

  • webaiohttp, fastapi, uvicorn
  • storagesasyncpg, pymilvus, redis
  • all → includes both web and storages

You can add extras with .[web], .[storages], or .[all] after the package path.

Agent-Kernel Distributed

cd packages/agentkernel-distributed
# base install
uv pip install -e .

# with optional features:
# uv pip install -e ".[web]"
# uv pip install -e ".[storages]"
# uv pip install -e ".[all]"
  • The distributed package depends on Ray and will install it automatically.
  • No manual Ray cluster startup is required for local usage.

Run the distributed example:

uv run python -m examples.distributed_test.run_simulation

Agent-Kernel Standalone

cd packages/agentkernel-standalone
# base install
uv pip install -e .

# with optional features:
# uv pip install -e ".[web]"
# uv pip install -e ".[storages]"
# uv pip install -e ".[all]"

Run the standalone example:

uv run python -m examples.standalone_test.run_simulation

4. (Optional) Start Society-Panel

Society-Panel is a web-based control panel to help you configure, deploy, and monitor your simulations visually.

  1. Launch the panel: Use the provided startup scripts to launch the entire application stack (backend + UI). These scripts will automatically check for and install all required dependencies, so no manual environment setup is needed.

    • On Linux/macOS:

      # Grant execution permission (first time only)
      chmod +x scripts/start_society_panel.sh
      ./scripts/start_society_panel.sh
    • On Windows:

      scripts\start_society_panel.bat
  2. Access the UI: Once the script confirms that the services are running, open your browser and navigate to: http://localhost:5174

From the panel, you can upload custom code packages, edit configuration files through a graphical interface, and control the simulation lifecycle. To shut down the panel and all related services, simply press Ctrl+C in the terminal where you ran the script.

📂 Project Structure

MAS/
├── packages/
│   ├── agentkernel-distributed/   # Distributed version (installs Ray automatically)
│   └── agentkernel-standalone/    # Local single-machine version
│
├── examples/
│   ├── distributed_test/          # Example for the distributed version (Ray)
│   └── standalone_test/           # Example for the local standalone version
│
├── society-panel/
│   ├── backend/                   # FastAPI backend service
│   └── frontend/                  # Vue 3 + Vite frontend
│
└── README.md

🎓 Citation

If you use Agent-Kernel in your research, please consider citing our paper:

@misc{mao2025agentkernelmicrokernelmultiagentframework,
      title={Agent-Kernel: A MicroKernel Multi-Agent System Framework for Adaptive Social Simulation Powered by LLMs},
      author={Yuren Mao and Peigen Liu and Xinjian Wang and Rui Ding and Jing Miao and Hui Zou and Mingjie Qi and Wanxiang Luo and Longbin Lai and Kai Wang and Zhengping Qian and Peilun Yang and Yunjun Gao and Ying Zhang},
      year={2025},
      eprint={2512.01610},
      archivePrefix={arXiv},
      primaryClass={cs.MA},
      url={https://arxiv.org/abs/2512.01610},
}

🤝 Contributors

Thanks to all the developers who have contributed to Agent-Kernel:

We also welcome you to become one of our contributors via Pull Requests!

📜 License

This project is licensed under the Apache 2.0.

About

A MicroKernel Multi-Agents System Framework for Adaptive Social Simulation Powered by LLMs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.6%
  • Vue 13.2%
  • CSS 1.9%
  • Batchfile 1.0%
  • Shell 0.9%
  • JavaScript 0.3%
  • HTML 0.1%