Developers
Test from your terminal, your CI, or your agent.
Use the HTTPS API with an API key today. The pip CLI and the MCP server are built and not yet published. Every run costs 5 credits; your app keeps calling your model with your own key.
pip CLI
Coming soonRun it where your code runs.
Point dsl test at a Python function that takes a question and returns an answer. DSL runs Dry (20 questions, one at a time), then Stress (callers double 1, 2, 4 and so on up to --cap, default the most your plan allows, or 100 if DSL cannot be reached; any whole number from 1 to 100,000; a step above --max-users, default 256, is measured at that many threads), then a Soak at the stable load. Live answer grading is skipped: pip mode never sends your answers anywhere.
$ pip install dsl-ai
$ export DSL_API_KEY=dsl_... # read from the environment, never a flag
$ dsl test myapp.rag:answer --questions questions.txtWhat leaves your machine
Only numbers: step loads, p95 latencies, error percentages, exception class names from the dry run, the stable, slip and break loads, and the component names you choose. Never a question, an answer, or the text of an exception.
Find the slow part
import dsl_ai
@dsl_ai.component("vector_store")
def search(query): ...
with dsl_ai.component("reranker"):
docs = rerank(query, docs)- Callers are Python threads on your machine, so the load it can drive is capped by that machine's CPU. A step above the cap is measured at the cap, and the report says so.
- Results from your machine are marked unverified, and DSL never trains on them.
- A call that never returns cannot be killed: its thread is abandoned and counted as a failed call.
MCP server + agent skill
Coming soonYour coding agent runs the test. It asks you first.
The MCP server gives your agent four tools. The dsl-capacity-test skill tells it how to use them: check for side effects, get your yes before every run, read the fix notebook as a set of hypotheses, and never rerun without asking, because a rerun costs credits.
dsl_rundsl_statusdsl_notebookdsl_cancel$ pip install "dsl-ai[mcp]"
$ dsl skill install # into ./.claude/skills
# register the server command: dsl mcp
# set DSL_API_KEY in the server's environmentThe API key is read from the server's environment. It is never a tool argument, so it never enters the agent's context. Each test runs in its own process; what your function prints goes to a local log file, not to the agent.
API
Works todayStart a run over HTTPS, watch it live, fetch the fix.
Every request carries Authorization: Bearer with a dsl_ API key. Every route is scoped to your workspace; another workspace's ids return 404. Errors are problem+json.
# the key is shown once, when you create it
export DSL_API_KEY=dsl_...
export DSL_API_URL=https://[YOUR API HOST]
curl "$DSL_API_URL/v1/credits" \
-H "Authorization: Bearer $DSL_API_KEY"Keys. Create one in the app under Settings, API keys. DSL stores only a SHA-256 hash, so the secret is shown once. Revoking a key stops it at once.
Credits. GET /v1/credits returns your balance, your plan, your latest 10 ledger entries and your limits: the most users a run may ask for, and how many runs may be active at once.
Targets. POST /v1/targets registers the app to test. For an endpoint, its auth header is sealed with AWS KMS before it is stored. How secrets are handled
Prove you own the host. An endpoint target carries a token for its exact host. Publish it as the whole body of https://<host>/.well-known/dsl-verify.txt, or as a DNS TXT record at _dsl-verify.<host> with the value dsl-verify=<token>, then call POST /v1/targets/{id}/verify. DSL checks again before every run and about every 10 minutes during it. A DNS change can take up to the record's TTL to be seen.
curl -X POST "$DSL_API_URL/v1/runs" \
-H "Authorization: Bearer $DSL_API_KEY" \
-H "Idempotency-Key: release-42-capacity" \
-H "Content-Type: application/json" \
-d '{"target_id": "tgt_...", "cap_users": 100}'
# 202 Accepted: the run is queued
# same key + same body again: the same run,
# Idempotent-Replayed: true, nothing chargedOne debit, once. Credits are taken in the same transaction that creates the run, keyed by your Idempotency-Key. A retry after a timeout never charges twice. The same key with a different body is a 422.
Cost. 5 credits for an endpoint, pip or MCP run, 15 for a sandbox run. Too few credits is a 402 and nothing is written.
Limits. cap_users is any whole number from 1 to your plan's limits.cap_users_max (GET /v1/credits). Omitted limits take their defaults (p95 2.0 s, errors 1.0%).
Refusals. Each has a code and charges nothing: endpoint_not_verified, host_blocked and cap_not_allowed (422); target_busy, host_busy and workspace_busy (409, naming the runs in progress); verification_rate_limited (429); plan_limits_missing (503). The pip CLI stops with the API's own sentence, and the MCP server tells your agent to ask you before it tries again.
curl -N "$DSL_API_URL/v1/runs/run_.../events" \
-H "Authorization: Bearer $DSL_API_KEY" \
-H "Last-Event-ID: 41"
# text/event-stream: stage, step, result,
# verdict and done events, in commit orderServer-Sent Events. On connect the stream replays every event after Last-Event-ID (from the start if you send none), then streams new ones.
No gaps. The server closes a stream after 10 minutes. Reconnect with the last id you saw and you continue exactly where you left off. Runs take a bit over an hour.
Stop a run. POST /v1/runs/{run_id}/cancel ends it. Credits come back only if nothing was measured yet.
import os, httpx
api = os.environ["DSL_API_URL"]
key = os.environ["DSL_API_KEY"]
nb = httpx.get(f"{api}/v1/notebooks/{notebook_id}",
headers={"Authorization": f"Bearer {key}"}).json()
for cell in nb["cells"]: # kind: md | python
print(cell["kind"], cell["source"][:60])The fix as cells. GET /v1/notebooks/{id} returns a title and Markdown and Python cells: what was measured, the likely cause, reviewed fix code, other things to check and how to rerun.
Hypotheses, not a diagnosis. Causes are read from load numbers, not from your code, and are worded "likely" or "worth checking". Check them against your code first.
IllustrativeSnippets follow the OpenAPI contract. The API host is a placeholder until launch.
Fix notebook
Every run ends with the fix to make first.
- 01The run finishes. Endpoint runs get the notebook at the end. For pip and MCP runs a DSL worker writes it shortly after, from the numbers your machine reported.
- 02Read it in the app. What was measured, the likely cause, reviewed fix code, other things to check and how to rerun.
- 03Copy a cell or download the .ipynb. DSL never runs the code. Treat it as a template for your own client and names.
- 04Or fetch it from code.
GET /v1/notebooks/{id}, ordsl_notebookfrom your agent.
Errors rose from to as load rose. Likely cause: your model provider's rate limit. Worth checking before you add capacity.
# Retry rate-limited calls with backoff.
# A template: adapt it to your own client.
for attempt in range(5):
try:
return client.answer(question)
except RateLimitError:
time.sleep(min(8, 0.5 * 2 ** attempt))Rerun with the same settings to check it. Results of an unchanged app vary from run to run, so only a clear change counts.
Sign-in and keys
People sign in with WorkOS. Code uses an API key.
In the browser
Sign in through WorkOS AuthKit. Your organization selects your workspace, and everyone in it sees the same runs and credits. The app sends a short-lived access token; DSL checks its signature, expiry and issuer on every request. Someone who signs in without an organization gets a personal workspace of their own.
From code, CI and agents
Create dsl_ keys in Settings. The secret is shown once and stored only as a SHA-256 hash. Keys belong to one workspace, list without their secret, and revoke at once. The CLI and MCP server read the key from the environment, never from a flag or a tool argument.
Four ways to connect
Pick where the load is generated.
| Mode | Where it runs | What DSL sees | Answer quality | Credits | Status |
|---|---|---|---|---|---|
| Endpoint | DSL's workers call your public HTTPS staging URL. | Timings, errors, and the sampled answers it grades. | Graded at up to three loads | Works today | |
| pip CLI | Your machine or CI, against your Python function. | Numbers only. Results marked unverified. | Skipped | Coming soon | |
| MCP + skill | Your machine, started by your coding agent after your yes. | Numbers only. Results marked unverified. | Skipped | Coming soon | |
| Hosted sandbox | An isolated sandbox built from your repo at a pinned commit, with outbound traffic limited to hosts you list. | Your app's code inside the sandbox, timings and graded answers. | Graded at up to three loads | Coming soon |
CI gate
PlannedA check that fails a pull request when the stable load drops. Not built: there is no CI integration or app today. Once the pip CLI is published you can call dsl test from any CI job yourself; it exits 0 when the run is done and 1 when it fails, for example in the dry run.
Start with an endpoint today. Bring pip and MCP when they ship.
The free plan includes 10 credits a month: two runs.