RepoInclusionAI (Ant Group)InclusionAI (Ant Group)published Jul 11, 2026seen 3d

inclusionAI/AKernel

Python

Open original ↗

Captured source

source ↗
published Jul 11, 2026seen 3dcaptured 3dhttp 200method plain

inclusionAI/AKernel

Description: Programmable datacenter-scale infrastructure for Agents.

Language: Python

License: Apache-2.0

Stars: 28

Forks: 5

Open issues: 0

Created: 2026-07-11T12:37:11Z

Pushed: 2026-07-23T06:26:51Z

Default branch: main

Fork: no

Archived: no

README:

AKernel: Programmable Datacenter-Scale Infrastructure for Agents

Overview

AKernel (Agent Kernel) is a distributed kernel that combines the performance of AFaaS with the architecture of openYuanrong, enabling true "datacenter use" — treating the entire datacenter as a programmable extension of your AI Agent.

Traditional infrastructure tools (IaC, Kubernetes-native platforms, multi-cloud Terraform, and vendor-specific CDKs) are designed for provisioning infrastructure, not operating it. They fall short for AI agents, RL training, and data pipelines that require runtime elasticity, dynamic workflows, and programmatic access to datacenter capabilities.

AKernel solves this with five key advantages:

Datacenter Use: Unified Programming Interface

A single Python SDK (akernel_sdk) to programmatically control compute, networking, and storage — no YAML, no manual orchestration. Multi-language support is planned.

from akernel_sdk import Sandbox

with Sandbox(cpu=2000, memory=4096) as sb:
result = sb.commands.run("echo 'hello from AKernel'")
print(result.stdout)

One-Click Deployment: From Laptop to Multi-Cloud

One all-in-one image, multiple deployment targets — deploy in under 10 minutes:

| Mode | Target | Scale | Deploy Time | |------|--------|-------|-------------| | Standalone | Single machine | 1 node | ~1 min | | Private K8s | On-premise cluster | 100 nodes | ~5 min | | Multi-Cloud | Alibaba Cloud, Huawei Cloud, etc. | 100 nodes | ~10 min |

Secure Isolation with Extreme Performance

  • 40 ms cold start: Fork-based launch with lazy loading for near-zero startup latency
  • Sandbox isolation: gVisor today, with Kata Containers support planned
  • Checkpoint/Restore: Save and restore sandbox state for fast recovery

Planned for an open-source release and not available in AKernel v0.1.0.

AI-Native Development and Operations

  • AI-contributed codebase: Significant portions of AKernel code are authored by AI, enabling rapid iteration
  • AI-driven operations: Cluster deployment, day-2 operations, and troubleshooting powered by AI agents
  • Agent-friendly: Built as infrastructure that AI agents can programmatically control and reason about

Full-Stack Observability

Built-in OpenTelemetry (OTEL) integration provides complete observability out of the box — not just resource management, but the full picture:

  • Metrics: Prometheus-based collection for compute, networking, and sandbox performance
  • Dashboards: Pre-configured Grafana dashboards for real-time cluster monitoring
  • Tracing & Logging: End-to-end request tracing and centralized log aggregation

Quick Start

Quick Navigation

  • 💡 [Examples](./sdk/python/examples/) - AKernel SDK examples and use cases
  • 🏗️ [Architecture](#architecture) - System design and components
  • 🚀 [Deployment](./deploy/README.md) - Installation and configuration guide

Bootstrap a Cluster

AKernel provides guided Terraform deployment for Alibaba Cloud ACK and Huawei Cloud CCE. Clone the repository and prepare the cloud credentials before selecting one of the image options below.

The workflow requires Terraform, Docker, Helm, kubectl, Python 3, GNU Make, and cloud credentials with permission to create the required infrastructure. For Alibaba Cloud, export the credentials and region first:

git clone --recurse-submodules https://github.com/akernel-dev/akernel.git
cd akernel

export ALICLOUD_ACCESS_KEY=""
export ALICLOUD_SECRET_KEY=""
export ALICLOUD_REGION="cn-hangzhou"

Option 1: Use the Official Image

Use the public AKernel image from Docker Hub:

make config VENDOR=aliyun \
IMAGE_REPOSITORY=akerneldev/all-in-one \
IMAGE_TAG=latest
make deploy

Option 2: Build from Source

Configure a registry that your cluster can access, then build and push the all-in-one image before deployment:

make config VENDOR=aliyun \
IMAGE_REPOSITORY=registry.example.com/akernel/all-in-one \
IMAGE_TAG=your-release-tag
docker login registry.example.com
make build
make push
make deploy

See the [Deployment Guide](./deploy/README.md) for prerequisites, cloud-specific configuration, deployment verification, and cluster cleanup, and the [Build Guide](./CLAUDE.md) for development details.

Create a Sandbox

Install the Python SDK from PyPI or source:

# PyPI
python -m pip install akernel-sdk

# Source
python -m pip install ./sdk/python

Configure the AKernel environment:

export AKERNEL_SERVER_ADDRESS=""
export AKERNEL_TOKEN=""

Use the SDK to create and interact with a sandbox:

from akernel_sdk import Sandbox

with Sandbox(cpu=1000, memory=2048) as sandbox:
result = sandbox.commands.run("echo 'hello from AKernel'")
print(result.stdout)

sandbox.files.write("/tmp/hello.txt", "hello from the SDK")
print(sandbox.files.read("/tmp/hello.txt"))

See the complete [basic usage example](./sdk/python/examples/basic_usage.py) and the other [SDK examples](./sdk/python/examples/) for more operations.

Architecture

![AKernel architecture](./assets/akernel-architecture.svg)

System Components

Node-Level Infrastructure

  • gVisor: Secure sandboxed container runtime
  • sandboxd: Sandbox lifecycle daemon with pluggable sandbox runtime integration
  • distill-fs: Rust-based FUSE filesystem for lazy rootfs access, chunk caching, and deduplication

Cluster-Wide Services

  • Distributed Scheduler: Workload-aware placement and scaling
  • API Gateway: Unified interface for all operations
  • Object Storage: Raw and Nydus rootfs images and read-only sandbox mounts
  • Cloud Provisioning: Terraform modules for Alibaba Cloud ACK and Huawei Cloud CCE

How It Works

1. Agent Submits Workload: Through unified API or SDK 2. Scheduler Places Sandbox: Selects a worker based on requested CPU, memory, and available capacity 3. Sandbox Created: Prepares the rootfs and network and starts gVisor on the selected worker 4. **Workload...

Excerpt shown — open the source for the full document.