🤖 AI Hot

Microsoft Orchard: The Open Framework for Agent Training

A
Alex Chen

Most open-source agent frameworks are good at running agents and terrible at training them. You can orchestrate a LangChain pipeline or chain GPT-5.6 prompts, but when you want to improve the agent itself — through RL, distillation, or fine-tuning — you hit a wall. The training infrastructure either doesn’t exist or only works inside a proprietary pipeline.

Microsoft Research’s Orchard is the first open framework that takes agent training seriously. MIT-licensed. Kubernetes-native. Three domains. One shared environment service. And a new RL extension called OpenForge that trains agents directly inside their production harnesses.

What Orchard Is

Orchard is built around a single architectural insight: agent training across different domains needs the same things. A sandbox. A way to run commands. File I/O. Network policies. A REST API to observe and control the environment. If you build those primitives once and make them reusable, every domain-specific agent recipe can sit on top.

That shared layer is called Orchard Env. It runs on Kubernetes, exposes a thin API, and doesn’t care whether the agent using it is writing code, clicking buttons in a browser, or managing a calendar. Three recipes are built on top:

  • SWE agent: software engineering tasks on real repositories
  • GUI agent: browser navigation and computer use
  • Personal assistant: calendar, email, and task management

The paper reports 67.5% on SWE-bench Verified, state-of-the-art among fully open-source systems. The GUI agent reached comparable performance with only 400 distilled trajectories — an order of magnitude less data than most competing approaches.

The Train-Deploy Gap

The problem Orchard solves isn’t new. It’s the same one that plagues robotics: a model trained in simulation fails in the real world because the simulation is too clean.

In agent terms, the “simulation” is a simplified reimplementation of the deployment environment. Your agent trains against a mock API or a sandboxed file system, then gets deployed against a real GitHub repo or a live browser. The gap between the two — different error modes, different latency, different tool schemas — eats into the gains from training.

OpenForge RL, released in July 2026 as an extension to Orchard, addresses this directly. It trains agents inside their actual deployment harnesses: ZeroClaw, OpenClaw, and Codex. No reimplementation. The agent uses the same tools and environments during training that it will use in production.

This matters because tool-calling agents are sensitive to the exact shape of their environment. Train an agent against a simplified exec_command function, and it learns patterns that break when the real CLI has different error handling or timeout behavior. Train it inside the real harness, and the RL signal reflects actual deployment conditions.

The Training Pipeline

Orchard’s training follows a three-stage pipeline shared across all three domains:

Stage 1: Trajectory distillation. Collect successful agent runs from a strong teacher model (GPT-5.6 or Claude Opus 5), then train a smaller student model to mimic those trajectories. This produces a baseline agent without RL. Microsoft collected 107,000 trajectories across all three domains for the initial distillation.

Stage 2: On-policy RL rollouts. Deploy the distilled agent into Orchard Env sandboxes, let it attempt tasks, and collect reward signals. The environment provides the reward: does the code pass tests? Did the browser reach the target page? Was the calendar event created correctly?

Stage 3: Policy improvement. Update the model weights using the RL signal. Repeat stages 2-3 until convergence or budget exhaustion.

The Kubernetes-native design makes the rollout phase scalable. Spin up 50 sandboxes, run 50 tasks in parallel, collect results. This is the kind of infrastructure that previously only existed inside well-funded labs — Orchard makes it available to anyone with a Kubernetes cluster.

Why Kubernetes

The choice of Kubernetes as the substrate isn’t cosmetic. Agent rollouts need isolated, ephemeral environments that can be created, monitored, and destroyed at scale. A coding agent needs a fresh container with a specific git checkout. A GUI agent needs a browser with certain extensions installed. A personal assistant needs API credentials scoped to a test account.

Kubernetes already solves all of this: pods as isolation boundaries, declarative configuration for environment setup, built-in resource limits and monitoring. Orchard Env wraps these into a domain-agnostic API that any agent harness can call.

The downside: Kubernetes has an operational learning curve. If you’re a solo developer who just wants to fine-tune a coding agent, spinning up a cluster is overkill. Orchard’s README acknowledges this — it’s designed for research teams and organizations that already have Kubernetes experience or are willing to invest in it.

Open vs. Proprietary Agent Training

Orchard enters a landscape where the best agent training pipelines are proprietary and undisclosed.

Anthropic trains Claude’s agentic capabilities but doesn’t publish the infrastructure. OpenAI’s Codex is trained on internal data with internal tooling. Google’s Gemini agent stack is integrated with their cloud infrastructure in ways that aren’t reproducible outside Google.

The open-source alternatives before Orchard fell into two categories. Frameworks like LangChain and CrewAI focus on orchestration — they run agents but don’t train them. Research projects like SWE-agent and OpenHands include some training infrastructure but are tied to specific domains or model families.

Orchard is the first to separate the environment layer from everything else, making it possible to train a SWE agent, a GUI agent, and a personal assistant on the same infrastructure. The three recipes in the paper are proof that the architecture works across different task types.

What You Can Actually Do With It

If you have access to a Kubernetes cluster and a budget for API calls, here’s what Orchard enables:

Train a coding agent on your own repositories. The SWE recipe works on any git repo. If your team has internal libraries with specific patterns, you can collect trajectories on those repos and train an agent that knows your codebase.

Build a GUI agent for internal tools. Most enterprise software has web UIs that weren’t designed for automation. A GUI agent trained on your specific dashboards and workflows can navigate them programmatically.

Fine-tune a smaller model for cost-sensitive deployments. The distillation pipeline takes a strong but expensive teacher model and produces a smaller student that runs cheaper. For high-volume agent calls, this can drop costs by 10-50x.

Limitations

Orchard requires Kubernetes. If you don’t have a cluster or the expertise to run one, the barrier is real. Local development with Minikube or kind is possible but adds friction.

The training recipes assume access to strong teacher models, which means API costs. Microsoft’s 107,000 trajectories across three domains represent a significant compute bill — expect to spend hundreds to thousands of dollars on a serious training run, depending on scale.

The framework is research-grade, not production-grade. Error handling, monitoring, and operational tooling are minimal. You’ll need to build your own deployment and observability layer on top.

Finally, Orchard trains the model behind the agent — it doesn’t provide the agent harness itself. You still need ZeroClaw, OpenClaw, Codex, or your own harness to actually run the agent in production. Orchard handles the training; deployment is on you.

How Orchard Compares to Other Agent Frameworks

The agent framework landscape is crowded, but most tools focus on orchestration, not training. Here’s where Orchard fits:

FrameworkOrchestrationTrainingOpen SourceMulti-Domain
OrchardVia harnessRL + distillationMITSWE, GUI, Assistant
LangChainFullNoneMITAny (orchestration only)
CrewAIFullNoneMITAny (orchestration only)
SWE-agentSWE onlyLimitedMITSWE only
OpenHandsFullNoneMITSWE + browser
AutoGPTFullNoneApache 2.0Any

The table reveals the gap Orchard fills. Every other open-source framework can run agents. None provides a reusable training infrastructure that works across domains and harnesses.

OpenHands comes closest with its sandboxed execution environment, but it doesn’t include RL or distillation pipelines. You can evaluate an agent in OpenHands. You can’t train one to get better.

Proprietary alternatives exist at every major lab — Anthropic’s internal training pipeline, OpenAI’s RL infrastructure for Codex, Google’s agent training on Vertex AI — but none are available to the public.

A Day in the Life of an Orchard Training Run

To make this concrete, here’s what a SWE agent training run looks like end to end.

You start with a base model, say Llama 4 Maverick, and a teacher model, GPT-5.6 Terra. The teacher model is expensive but reliable. The student is cheap but inaccurate.

Morning: trajectory collection. Orchard spins up 20 Kubernetes pods, each with a fresh checkout of a random GitHub issue from SWE-bench. The teacher model gets the issue description, the repo contents, and a terminal. It reads files, writes code, runs tests. If the tests pass, the trajectory — every command, file read, and code edit — gets saved. After six hours, you have 500 successful trajectories.

Afternoon: distillation. Orchard’s training script takes those 500 trajectories and trains the student model to mimic the teacher’s actions. This is supervised fine-tuning, not RL. The student learns to read the right files and write plausible patches. After distillation, it solves about 45% of SWE-bench tasks on its own.

Evening: RL rollouts. The distilled student is deployed into fresh pods with new issues. It attempts to solve them. Orchard Env provides the reward: 1.0 if the tests pass, 0.0 otherwise. The model weights are updated based on which actions led to which rewards. After two rounds of RL, accuracy climbs from 45% to 62%.

Overnight: another round of trajectory collection with the improved student, now acting as its own teacher for harder tasks. By morning, you have a model that solves about 67% of SWE-bench tasks — competitive with the best open-source results.

The total compute cost depends on model size and episode count. For a 7B parameter model with 2,000 RL episodes, expect to spend $300-600 on API calls plus the Kubernetes cluster costs. A 70B model with 10,000 episodes scales accordingly.

Research teams building open-source agents now have a shared infrastructure baseline. Instead of each lab building its own sandbox service, they can contribute recipes to Orchard and share the environment layer.

Companies deploying agents at scale can reduce their per-call costs through distillation and fine-tuning. If you’re paying $0.05 per agent call to GPT-5.6 and running a million calls a month, training a smaller model that handles 90% of cases at $0.002 per call pays for itself quickly.

Infrastructure teams evaluating Kubernetes-native AI workloads will find Orchard’s architecture instructive. The separation of environment from harness from trainer is a pattern that generalizes beyond agent training.

Orchard doesn’t replace anything. It fills a gap that shouldn’t have existed — the gap between “we can run agents” and “we can make them better.”

Disclosure: CarCare Guide is reader-supported. When you buy through links on our site, we may earn an affiliate commission at no extra cost to you. Learn more.
A
Alex Chen