dstack is a control plane that provisions and coordinates GPU computing for machine-learning development, training, inference, and agent workloads across cloud providers, Kubernetes, and on-premises clusters. It is used by teams running workloads on NVIDIA, AMD, Google TPU, or Tenstorrent hardware. The catalogue add-ons operate dstack through its CLI, API, or server workflow.
Borrowing it
Nothing to install: this file belongs to dstackai/dstack. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/dstackai/dstack/master/AGENTS.mdgit clone --depth 1 https://github.com/dstackai/dstackWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/dstackai/dstack/agents-md)<a href="https://agentmods.dev/instructions/dstackai/dstack/agents-md"><img src="https://agentmods.dev/badge/instructions/dstackai/dstack/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/dstackai/dstack/agents-md"><img src="https://agentmods.dev/badge/instructions/dstackai/dstack/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01263 | $0.01263 |
| Opus 5.5 | $0.00505 | $0.00505 |
| Sonnet 5.5 | $0.00253 | $0.00253 |
| Haiku 4.5 | $0.00126 | $0.00126 |
Grade A, and why
dstack AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Guidelines
Before touching a subsystem, read the relevant notes in contributing/: ARCHITECTURE.md,
PIPELINES.md, LOCKING.md, DATABASE.md, MIGRATIONS.md, RUNS-AND-JOBS.md, AUTOSCALING.md,
BACKENDS.md, ORPHAN-CLEANUP.md, GPUHUNT.md, PROXY.md, RUNNER-AND-SHIM.md, FRONTEND.md,
DOCS.md, DEVELOPMENT.md, RELEASE.md.
Project Structure & Module Organization
- Core Python package lives in
src/dstack; internal modules (including server) sit under_internal, API surfaces underapi, and plugin integrations underplugins. - Tests reside in
src/testsand mirror package paths; add new suites alongside the code they cover. - Frontend lives in
frontend(React/webpack) and is built intosrc/dstack/_internal/server/statics. - Docs sources are in
mkdocs/docs/with extra contributor notes incontributing/*.md.
Build, Test, and Development Commands
- Install deps (editable package with extras):
uv sync --all-extras(uses.venvin repo). - Run CLI/server from source:
uv run dstack ...(e.g.,uv run dstack server --port 8000). - Lint/format:
uv run ruff check .anduv run ruff format .. - Type check:
uv run pyright -p .. - Test suite:
uv run pytest. - Frontend: from
frontend/runnpm install,npm run build, then copyfrontend/buildintosrc/dstack/_internal/server/statics/; for dev,npm run startwith API on port 8000.
Coding Style & Naming Conventions
- Python targets 3.10+ with 4-space indentation and max line length of 99 (see
pyproject.toml;E501is ignored but keep lines readable). - Imports are sorted via Ruff’s isort settings (
dstacktreated as first-party). - Keep primary/public functions before local helper functions in a module section.
- Roughly keep function definitions in the order they are referenced within a file so call flow stays easy to follow.
- Prefer early returns over nested
if/elseblocks when they make the control flow simpler. - Keep private classes, exceptions, and similar implementation-specific types close to the private functions that use them unless they are shared more broadly in the module.
- Prefer pydantic-style models in
core/models. - Document attributes when the note adds behavior, compatibility, or semantic context that is not obvious from the name and type. Use attribute docstrings without leading newline.
- Tests use
test_*.pymodules andtest_*functions; fixtures live near usage. - Never make network calls inside a DB session or transaction. Fetch what you need before opening the session, or commit and close it before the call. See
contributing/DATABASE.md. - Don't use function-level (inner) imports to break circular imports. Inject the dependency or move the shared code to a lower-level module instead.
- Never edit a migration that has already been applied or released; add a new migration instead.
- Derive paths under
SERVER_DIR_PATHon access (aget_*function), not as module-level constants, so that patchingsettings.SERVER_DIR_PATHredirects all of them. Tests rely on this to keep server state out of the real~/.dstack. - Preserve client/server backward compatibility when updating Pydantic models. New fields must be excluded from client requests when unset, for compatibility with older servers (see
core/compatibility/*.py). If the allowed domain/type of an existing field is extended, server responses may need to be patched for older clients (seeserver/compatibility/*.py). No need to exclude new fields from server responses, since clients rely onvalidate_extra_ignore.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 6d ago Changed · +9 tokens per session e426204d0831
- 1mo ago Changed · +12 tokens per session 27b779dab663
- 2mo ago First seen · 53 lines · 1,242 tokens per session scan A b7036458ef45
dstack AGENTS.md is an instructions file published in the GitHub repository dstackai/dstack (2,293 stars, last pushed today), licensed MPL-2.0. It adds 1,263 tokens to every session, about $0.0051 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.