Skip to content

Commit 7af1b70

Browse files
author
Andrey Cheptsov
committed
[Blog] Infrastructure orchestration is an agent skill
1 parent a357347 commit 7af1b70

1 file changed

Lines changed: 251 additions & 0 deletions

File tree

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
---
2+
title: "Infrastructure orchestration is an agent skill"
3+
date: 2026-03-10
4+
description: "Agentic engineering pulls compute discovery, provisioning, scheduling, and observability into the execution loop. Infrastructure orchestration is becoming an agent skill."
5+
slug: agentic-orchestration
6+
image: https://dstack.ai/static-assets/static-assets/images/agentic-orchestration.png
7+
categories:
8+
- Changelog
9+
---
10+
11+
# Infrastructure orchestration is an agent skill
12+
13+
Andrej Karpathy's [autoresearch demo](https://github.com/karpathy/autoresearch) shows the main change: the agent does not stop at suggesting code. It runs experiments, evaluates the results, commits improvements, and repeats the cycle. Execution itself is now inside the loop.
14+
15+
<img src="https://dstack.ai/static-assets/static-assets/images/agentic-orchestration.png" width="630" />
16+
17+
<!-- more -->
18+
19+
Once execution is inside the loop, infrastructure is no longer just setup around it. The agent also needs to provision compute, run workloads, inspect what happened, and decide what to do next.
20+
21+
This post is about that emerging shift: infrastructure orchestration becoming part of the agent loop.
22+
23+
## Before: orchestration assumed a human control loop
24+
25+
Until now, orchestration for AI workloads has usually been owned by platform teams.
26+
27+
Those teams automated provisioning, prepared runtime environments, scheduled workloads, and operated the infrastructure. Automation existed, but the orchestration loop itself still required human intervention.
28+
29+
That model fits a world where infrastructure operations stay separate from the training, evaluation, and inference workflow itself. The emerging agentic workflow pulls orchestration into the loop.
30+
31+
## After: provisioning and scheduling move into the loop
32+
33+
If an agent is driving a training, evaluation, or inference workflow, it cannot stop at generating code or launching a job. It also has to provision the right compute, place workloads efficiently, observe execution state, and adjust based on the result.
34+
35+
That is the shift: compute provisioning and scheduling move into the agent loop. If platform teams are no longer in the hot path for each step, orchestration has to expose explicit primitives for capacity discovery, bounded provisioning, workload lifecycle management, and machine-readable state.
36+
37+
Without those primitives, the workflow still depends on manual intervention or a bespoke internal platform layer.
38+
39+
## What this does to platform teams
40+
41+
Platform teams are not going to stay in the business of manually orchestrating AI infrastructure. The old model treats orchestration as an internal service layer that humans operate on behalf of everyone else. In the emerging model, that ownership shifts.
42+
43+
The platform team's job becomes enabling agent-driven orchestration and controlling it safely. That means defining the supported abstractions, access boundaries, budgets, quotas, and observability that let agents provision compute and operate workloads directly without turning the platform into an unbounded automation surface.
44+
45+
## What this does to cloud and datacenter providers
46+
47+
For cloud and datacenter providers, orchestration stops being a detail above the hardware stack and becomes part of the product. Their capacity is no longer consumed only by humans or by platform teams operating custom glue. It is increasingly consumed through the orchestration layer that sits between the workload and the provider.
48+
49+
That changes what makes capacity usable. A provider now has to fit the vendor-agnostic orchestration layer that agents use to discover capacity, provision it, schedule workloads, and observe state.
50+
51+
Providers that fit that layer become much easier to integrate into agent-driven systems. Providers that still require provider-specific operating patterns remain harder to operationalize, even when the underlying hardware is strong.
52+
53+
## What this looks like with dstack
54+
55+
dstack is an open-source control plane for provisioning GPU compute and orchestrating GPU workloads across a range of environments, including clouds, Kubernetes, and on-prem clusters. It exposes that infrastructure surface to agents and human operators through the CLI and configuration files.
56+
57+
**Step 1: treat available compute as queryable state**
58+
59+
`dstack offer` turns available compute into something the workflow can query directly. It returns offers from configured backends and managed capacity, including region, resources, spot availability, and price.
60+
61+
```shell
62+
dstack offer --gpu H100:1.. --max-offers 3
63+
```
64+
65+
```shell
66+
# BACKEND REGION INSTANCE TYPE RESOURCES SPOT PRICE
67+
1 verda FIN-01 1H100.80S.30V 30xCPU, 120GB, 1xH100 (80GB), 100.0GB (disk) no $2.19
68+
2 runpod US-KS-2 NVIDIA H100 PCIe 16xCPU, 251GB, 1xH100 (80GB), 100.0GB (disk) no $2.39
69+
3 nebius eu-north1 gpu-h100-sxm 16xCPU, 200GB, 1xH100 (80GB), 100.0GB (disk) no $2.95
70+
...
71+
Shown 3 of 99 offers
72+
```
73+
74+
In an agentic workflow, compute selection becomes part of execution. The workflow can inspect available capacity before deciding what to run.
75+
76+
**Step 2: define capacity pools and provisioning bounds**
77+
78+
```yaml
79+
# fleet.dstack.yml
80+
type: fleet
81+
name: h100-fleet
82+
83+
nodes: 0..2
84+
idle_duration: 1h
85+
86+
resources:
87+
gpu: H100:8
88+
89+
blocks: 4
90+
```
91+
92+
A fleet is dstack's unit of provisioning control. It can represent an elastic template over cloud or Kubernetes backends, a pre-provisioned pool, or a set of SSH-managed on-prem hosts. This is how dstack keeps provisioning explicit and bounded: the agent operates within declared capacity instead of interacting with provider infrastructure directly.
93+
94+
```shell
95+
dstack apply -f fleet.dstack.yml
96+
```
97+
98+
In this context, `dstack apply` creates or updates the fleet resource. If the fleet is only a template, later runs can draw instances from it on demand. If it is pre-provisioned, the capacity is already present.
99+
100+
```shell
101+
dstack fleet
102+
103+
NAME NODES GPU SPOT BACKEND PRICE STATUS CREATED
104+
gpu-cluster 2..4 A100:80GB:8 auto aws $0..$32 active 2 hours ago
105+
instance=0 A100:80GB:8 spot aws (us-ea…) $28.50 busy 2 hours ago
106+
instance=1 A100:80GB:8 spot gcp (us-ce…) $26.80 busy 1 hour ago
107+
on-prem 4 - - ssh - active 3 days ago
108+
instance=0 A100:40GB:4 - ssh - busy 3 days ago
109+
instance=1 A100:40GB:4 - ssh - idle 3 days ago
110+
test-fleet 0..1 gpu:16GB on-demand * - active 10 min ago
111+
```
112+
113+
In an agentic workflow, this gives the agent a visible provisioning surface: it can see which fleets exist, what capacity they expose, and whether that capacity is active, busy, or idle before deciding what to run next.
114+
115+
**Step 3: run evaluation or training loops as tasks**
116+
117+
Tasks are dstack's workload type for evaluation, fine-tuning, training, and other job-oriented workflows. They can also be distributed, in which case dstack handles cluster selection and job coordination across nodes.
118+
119+
```yaml
120+
# train.dstack.yml
121+
type: task
122+
name: train-qwen
123+
124+
image: huggingface/trl-latest-gpu
125+
working_dir: /workspace
126+
127+
repos:
128+
- .:/workspace
129+
130+
commands:
131+
- pip install -r requirements.txt
132+
- python train.py --model Qwen/Qwen2.5-7B-Instruct --output-dir /workspace/checkpoints
133+
134+
max_duration: 2h
135+
resources:
136+
gpu: 24GB
137+
shm_size: 16GB
138+
```
139+
140+
Once a task is running, the agent may need to re-attach to the session, open a shell inside the container, or inspect runtime state before deciding what to do next. dstack exposes each of those actions directly.
141+
142+
```shell
143+
dstack attach train-qwen --logs
144+
```
145+
146+
```shell
147+
ssh train-qwen
148+
```
149+
150+
**Step 4: run model inference as services**
151+
152+
Services are dstack's workload type for long-lived inference endpoints. The same control plane that runs training and evaluation jobs can also deploy model-serving endpoints with stable URLs, autoscaling rules, and health checks.
153+
154+
```yaml
155+
# serve.dstack.yml
156+
type: service
157+
name: qwen25-instruct
158+
159+
image: lmsysorg/sglang:latest
160+
161+
env:
162+
- MODEL_ID=Qwen/Qwen2.5-32B-Instruct
163+
164+
commands:
165+
- |
166+
python -m sglang.launch_server \
167+
--model-path $MODEL_ID \
168+
--port 8000 \
169+
--trust-remote-code
170+
171+
port: 8000
172+
gateway: true
173+
model: Qwen/Qwen2.5-32B-Instruct
174+
replicas: 1..4
175+
scaling:
176+
metric: rps
177+
target: 10
178+
179+
resources:
180+
gpu: 80GB
181+
disk: 200GB
182+
```
183+
184+
The endpoint can then be accessed directly, including from another agent step:
185+
186+
```shell
187+
curl https://qwen25-instruct.example.com/v1/chat/completions \
188+
-H 'Content-Type: application/json' \
189+
-H 'Authorization: Bearer <dstack token>' \
190+
-d '{
191+
"model": "Qwen/Qwen2.5-32B-Instruct",
192+
"messages": [{"role": "user", "content": "Hello"}]
193+
}'
194+
```
195+
196+
The agent can launch the service, call the endpoint, and scale it through the same orchestration layer.
197+
198+
**Step 5: observe through events and metrics**
199+
200+
`dstack` exposes structured lifecycle data through events and metrics, so the loop can inspect state transitions and resource usage directly instead of inferring everything from logs.
201+
202+
```shell
203+
dstack event --within-run train-qwen
204+
```
205+
206+
```shell
207+
[2026-01-21 13:09:37] [run train-qwen] Run submitted. Status: SUBMITTED
208+
[2026-01-21 13:09:57] [job train-qwen-0-0] Job status changed SUBMITTED -> PROVISIONING
209+
[2026-01-21 13:11:49] [job train-qwen-0-0] Job status changed PULLING -> RUNNING
210+
```
211+
212+
```shell
213+
dstack metrics train-qwen
214+
```
215+
216+
```shell
217+
NAME STATUS CPU MEMORY GPU
218+
train-qwen running 92% 118GB/200GB gpu=0 mem=71GB/80GB util=97%
219+
```
220+
221+
Taken together, these are the fine-grained primitives a fully autonomous agent needs: discover capacity, provision it, run the right workload type, inspect state, and decide what to do next without handing orchestration back to a human operator.
222+
223+
## Skills
224+
225+
Those primitives become much more useful when they are paired with operational knowledge. dstack already ships an installable [agent skill](https://github.com/dstackai/dstack/blob/master/.agents/skills/dstack/SKILL.md) and documents how to install it:
226+
227+
```shell
228+
npx skills add dstackai/dstack
229+
```
230+
231+
> Skills are where operational know-how can live: how to run training, fine-tuning, inference, evals, and other specialized workflows against the orchestration layer. This should not stop at one built-in skill. The ecosystem needs specialized skills that encode the operational patterns agents actually use for these workloads.
232+
233+
## Governance and permissions
234+
235+
As infrastructure management is delegated to agents, governance and observability become part of the orchestration model itself, not something added later around it.
236+
237+
dstack already exposes part of that model through projects and permissions. Projects isolate teams and resources, define access boundaries, and control which backends and infrastructure surfaces an agent or user can operate against.
238+
239+
## Why open source and the ecosystem matter here
240+
241+
If agents are going to provision compute and orchestrate workloads directly, the control plane cannot be a black box.
242+
243+
Teams need to see which backends it supports, how scheduling decisions are made, how permissions are enforced, and how lifecycle state is exposed. They also need to extend it: add new providers, refine operational policies, and encode better training, fine-tuning, inference, and evaluation workflows as reusable skills and recipes.
244+
245+
dstack is MPL-2.0 licensed and designed around backends, fleets, projects, events, and metrics that can span different capacity sources. That matters because agentic orchestration will not be built once inside a single vendor boundary; it will be assembled across clouds, Kubernetes, on-prem infrastructure, and a growing ecosystem of specialized operational patterns.
246+
247+
## What's next
248+
249+
If you are already running agent-driven loops, feedback on the hard parts is especially useful: what still forces a human back into the path, which signals are missing, where provider integration still feels manual, and which specialized skills or recipes would be most valuable.
250+
251+
If you want to use dstack for these workflows or contribute to the surrounding ecosystem, issues and feedback are welcome in the [GitHub repo](https://github.com/dstackai/dstack).

0 commit comments

Comments
 (0)