{"slug": "kimi-ai-and-kvcache-ai-open-sources-agentenv-a-distributed-system-that-powers-rl", "title": "Kimi AI and kvcache-ai Open Sources ‘AgentENV’: A Distributed System that Powers Agentic Reinforcement Learning (RL) Training for Kimi K3", "summary": "Moonshot AI's Kimi team and kvcache-ai have open-sourced AgentENV (AENV), a distributed platform for running agent environments at scale that powers agentic reinforcement learning (RL) training for Kimi K3, Moonshot's 2.8-trillion-parameter Mixture-of-Experts model. The system uses Firecracker microVMs to provide isolated sandboxes with snapshot, pause, resume, and fork capabilities, achieving boot or resume times under 50 ms and incremental snapshot capture under 100 ms. AgentENV is released under an MIT license.", "body_md": "Moonshot AI’s Kimi team and [kvcache-ai](https://github.com/kvcache-ai) have open-sourced ** AgentENV (AENV)**, a distributed platform for running agent environments at scale. AgentENV powers agentic reinforcement learning (RL) training for\n\n**Kimi K3**, Moonshot’s 2.8-trillion-parameter Mixture-of-Experts model. The code ships under an\n\n**MIT license**.\n\n**Why Environment Infra Holds Back Agentic RL**\n\nAgentic RL does not just sample text. It requires the model to act inside a real computer. Every rollout needs an isolated Linux environment with a filesystem, a network stack, and live processes.\n\nThat requirement creates a hard trade-off. Containers start fast but share the host kernel, which weakens isolation for model-generated code. Full virtual machines isolate properly but boot slowly and hold memory while idle.\n\nAgentENV targets exactly that gap. It runs [Firecracker](https://github.com/firecracker-microvm/firecracker) microVMs, then makes idle, restart, and branching cheap enough to run at training scale.\n\n**Inside AgentENV’s Firecracker Architecture**\n\nEach sandbox is a Firecracker microVM with its own Linux kernel, filesystem, and network namespace. Requests hit an Axum HTTP API, which forwards to an orchestrator that manages the sandbox lifecycle.\n\nStorage is where the design gets interesting. The rootfs is served through a **ublk** userspace block device backed by ** overlaybd** layered images. Read-only base layers are shared across sandboxes, and each sandbox writes into its own upper layer.\n\nInside every guest, a daemon called **envd** handles command execution, file operations, and health reporting on port `49983`\n\n. A reverse proxy routes HTTP and WebSocket traffic from clients to services running inside the VM.\n\nThe project also lists two density mechanisms. The host page cache is shared across storage and memory-snapshot data. Memory ballooning returns reclaimable guest memory to the host, which sustains overcommit as environments diverge over time.\n\n**Snapshot, pause, resume, fork**\n\nThese four features are the reason the project exists. AgentENV snapshots memory and filesystem changes incrementally rather than writing a full image each time.\n\nThe reported figures are as follows. Snapshot-backed environments boot or resume in under **50 ms** and pause in under **100 ms**. Incremental snapshot capture completes in under **100 ms**, even under heavy disk modification.\n\nFork is the feature most specific to RL. A running sandbox can clone into **up to 16 independent child sandboxes** on the same node. The source pauses briefly during capture, then resumes. Every child inherits the source filesystem, memory, and resource configuration.\n\nThe practical effect is that expensive setup runs once. A team can install dependencies, clone a repository, and reach a task state. That exact state then branches into parallel rollouts. Snapshots persist to S3-compatible object storage or a shared distributed filesystem.\n\nOne default is worth noting. Every sandbox carries a TTL, and expiry triggers a **pause**, not a delete. Deletion requires passing `autoPause: false`\n\non the create API.\n\n**On-demand loading and the snapshot repository**\n\nImages load on demand through overlaybd. Local disk acts as a bounded cache that retains hot data and evicts cold data.\n\nThis is what makes the fleet-level story work. Nodes do not need to pre-warm every image or hold a complete copy of every snapshot. The addressable image set can therefore exceed local disk capacity while startup stays fast cluster-wide.\n\nSnapshot state is organized in three layers. A builder staging workspace holds artifacts during a build. A committed snapshot repository is the durable source of truth. A node-local runtime cache holds launch-time derived configs.\n\nTwo repository backends are supported: `posix_fs`\n\n(default) and `oss`\n\n. The `oss`\n\npath runs through a shared S3-compatible client, so an explicit `region`\n\nis required.\n\nAn optional peer-to-peer transport based on `iroh`\n\ncan advertise committed artifacts to peer nodes. It is **disabled by default**. The documentation is explicit that P2P does not change the committed snapshot model. For shared storage, the docs ask for at least 1 Gbps and strongly recommend 10 Gbps or faster.\n\n**E2B compatibility is the adoption lever**\n\nAgentENV exposes an ** E2B-compatible HTTP API**. Point\n\n`E2B_API_URL`\n\nat your server and the official [E2B](https://github.com/e2b-dev/e2b)Python or TypeScript SDK works without code changes.\n\nThis is a deliberate distribution choice. Teams already running agents on E2B can self-host the runtime without rewriting their agent code. A native `aenv`\n\nCLI is also provided, and the docs recommend it for AgentENV-specific workflows.\n\n**Deployment paths**\n\nPrerequisites are Linux kernel **6.8+** and `/dev/kvm`\n\naccess; the install script additionally requires Ubuntu 24.04. The `aenv`\n\nCLI supports Linux and macOS on x86_64 and arm64. The server itself is Linux-only, because it needs KVM.\n\n**Five paths are documented:**\n\n- An install script that runs the server as a systemd service\n- A Docker image published at\n`ghcr.io/kvcache-ai/aenv-server`\n\n- A Docker Compose stack that simulates a multi-node cluster\n- Kubernetes manifests with a gateway, scheduler, and node DaemonSet\n- A build-from-source route using the Rust toolchain\n\nMulti-node deployments add a **gateway** on `:8080`\n\nand a **scheduler** on `:9090`\n\n.\n\n**Key Takeaways**\n\n- Deployment covers install script, Docker, Docker Compose, and Kubernetes; the multi-node control plane is documented as a prototype.\n- AgentENV runs each agent environment as a Firecracker microVM, not a container, so isolation is kernel-level.\n- The project reports boot or resume under 50 ms, and pause under 100 ms, from snapshots.\n- A running sandbox can fork into up to 16 independent children on the same node.\n- The HTTP API is E2B-compatible, so existing E2B Python and TypeScript SDK code runs unchanged.\n\n*Check out the GitHub repository and documentation. All credit for this research goes to the researchers of this project.*\n\nAsif Razzaq is the CEO of Marktechpost Media Inc.. As a visionary entrepreneur and engineer, Asif is committed to harnessing the potential of Artificial Intelligence for social good. His most recent endeavor is the launch of an Artificial Intelligence Media Platform, Marktechpost, which stands out for its in-depth coverage of machine learning and deep learning news that is both technically sound and easily understandable by a wide audience. The platform boasts of over 2 million monthly views, illustrating its popularity among audiences.", "url": "https://wpnews.pro/news/kimi-ai-and-kvcache-ai-open-sources-agentenv-a-distributed-system-that-powers-rl", "canonical_source": "https://www.marktechpost.com/2026/07/27/kimi-ai-and-kvcache-ai-open-sources-agentenv/", "published_at": "2026-07-27 20:48:53+00:00", "updated_at": "2026-07-27 21:09:25.077463+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-research", "ai-infrastructure", "machine-learning", "ai-tools"], "entities": ["Moonshot AI", "Kimi team", "kvcache-ai", "AgentENV", "Kimi K3", "Firecracker", "MIT license"], "alternates": {"html": "https://wpnews.pro/news/kimi-ai-and-kvcache-ai-open-sources-agentenv-a-distributed-system-that-powers-rl", "markdown": "https://wpnews.pro/news/kimi-ai-and-kvcache-ai-open-sources-agentenv-a-distributed-system-that-powers-rl.md", "text": "https://wpnews.pro/news/kimi-ai-and-kvcache-ai-open-sources-agentenv-a-distributed-system-that-powers-rl.txt", "jsonld": "https://wpnews.pro/news/kimi-ai-and-kvcache-ai-open-sources-agentenv-a-distributed-system-that-powers-rl.jsonld"}}