Upload 12 files
Browse files- .gitattributes +4 -0
- README.md +19 -5
- assets/banner.png +0 -0
- assets/banner.svg +1 -0
- assets/desktop.png +3 -0
- assets/live-desktop.png +3 -0
- assets/live-mobile.png +0 -0
- assets/mobile.png +3 -0
- assets/read-only-tour.mp4 +3 -0
- assets/tour-transcript.txt +5 -0
- assets/tour.vtt +13 -0
- index.html +15 -19
- task-budget.html +53 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/desktop.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/live-desktop.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/mobile.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/read-only-tour.mp4 filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: CloudGPU Agent Compute Lab
|
| 3 |
+
emoji: 🧭
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
short_description: Read-only agent compute discovery and billing explorer
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Agent Compute Lab
|
| 13 |
+
|
| 14 |
+
A static, free-to-host demo: billing illustration, live anonymous readiness link, a minute-source estimate handoff, verified internal smoke-test evidence, and Skill/MCP installation. No API keys, customer data, paid GPU allocation or model execution occurs here.
|
| 15 |
+
|
| 16 |
+
Source: https://github.com/cloudgpu-app/cloudgpu-agent-skills
|
| 17 |
+
|
| 18 |
+
Copy `docs/index.html` to this Space's root as `index.html`, and `docs/assets` as `assets`. The self-check opens the actual CloudGPU endpoint directly, so browser cross-origin restrictions cannot be confused with a platform outage.
|
| 19 |
+
|
| 20 |
+
## Publishing
|
| 21 |
+
|
| 22 |
+
Install `huggingface_hub`, configure `HF_TOKEN` in a secure environment and `HF_SPACE_ID=your-account/agent-compute-lab`, then run `python publish.py`. The token is read only from the environment and is never printed. `python publish.py --dry-run` validates the static bundle without credentials or network.
|
| 23 |
+
|
| 24 |
+
Anonymous quotes are planning estimates only. On the external Space, validated inputs open the CloudGPU quote form; a cross-origin POST is not attempted. The user explicitly requests the estimate there. Whole-hour offers still require a separate binding quote and owner acceptance before allocation.
|
assets/banner.png
ADDED
|
assets/banner.svg
ADDED
|
|
assets/desktop.png
ADDED
|
Git LFS Details
|
assets/live-desktop.png
ADDED
|
Git LFS Details
|
assets/live-mobile.png
ADDED
|
assets/mobile.png
ADDED
|
Git LFS Details
|
assets/read-only-tour.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:01479485b809e8034ceaf5603a073b3e1a9ebde819cb96d976f8e5ca9783a8de
|
| 3 |
+
size 623453
|
assets/tour-transcript.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Read-only Compute Lab tour; no GPU allocation.
|
| 2 |
+
0–4s: Discover the anonymous self-check and owner-controlled workflow.
|
| 3 |
+
4–11s: Change the example runtime from 12 to 61 minutes, then back to 12. The calculator compares minute and whole-hour rounding at an illustrative $0.40/hour. It is not a live quote.
|
| 4 |
+
11–15s: Inspect historical environment, small-video and causal-LM LoRA smoke-test evidence, including fees and development-attempt qualifications.
|
| 5 |
+
15–21s: View Agent Skills installation and remote/local MCP entry points. Installing or connecting does not approve a paid job.
|
assets/tour.vtt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
WEBVTT
|
| 2 |
+
|
| 3 |
+
00:00.000 --> 00:04.000
|
| 4 |
+
Read-only UI tour. No GPU allocation or paid work.
|
| 5 |
+
|
| 6 |
+
00:04.000 --> 00:11.000
|
| 7 |
+
Compare minute and whole-hour rounding with illustrative rates.
|
| 8 |
+
|
| 9 |
+
00:11.000 --> 00:15.000
|
| 10 |
+
Historical small-task evidence includes elapsed time, fees and development attempts.
|
| 11 |
+
|
| 12 |
+
00:15.000 --> 00:21.000
|
| 13 |
+
Install Agent Skills or configure MCP. Connection does not approve spending.
|
index.html
CHANGED
|
@@ -1,19 +1,15 @@
|
|
| 1 |
-
<!doctype html>
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
</p>
|
| 17 |
-
</div>
|
| 18 |
-
</body>
|
| 19 |
-
</html>
|
|
|
|
| 1 |
+
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="Try a read-only agent compute readiness check. Explore verified small GPU, video and LoRA tasks, source-specific billing and explicit spending controls."><meta property="og:title" content="CloudGPU · Compute for agents. Human control."><meta property="og:image" content="https://cloudgpu.app/agent-lab/assets/banner.png"><link rel="canonical" href="https://cloudgpu.app/agent-lab/index.html"><title>CloudGPU · Agent Compute Lab</title><style>
|
| 2 |
+
:root{--bg:#f5f5ed;--ink:#152219;--muted:#647064;--line:#d9dfd2;--lime:#d4ff84}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}a{color:inherit;text-underline-offset:4px}button{font:inherit;cursor:pointer}nav,main,footer{max-width:1200px;margin:auto;padding:24px 40px}nav{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{font-weight:850;letter-spacing:-1px;font-size:23px;text-decoration:none}.navlinks{display:flex;gap:24px;font-size:14px}.eyebrow{font:12px/1.5 ui-monospace,monospace;letter-spacing:2px;text-transform:uppercase;color:var(--muted)}.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:56px;align-items:center;padding:70px 0 60px}h1{font-size:clamp(44px,5.7vw,76px);line-height:1.04;letter-spacing:-4px;margin:20px 0 26px}h1 span{display:block;color:#65774d}h2{font-size:32px;line-height:1.2;letter-spacing:-1px}p{margin:12px 0}.lead{font-size:19px;color:var(--muted);max-width:510px}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.button{border:1px solid var(--ink);border-radius:8px;padding:12px 19px;text-decoration:none;background:transparent;display:inline-block;font-weight:600}.primary{background:var(--ink);color:white}.terminal{background:#142019;color:#e2ebdb;border-radius:16px;padding:26px;box-shadow:0 24px 50px #17281b18;min-width:0}.bar{display:flex;gap:6px;border-bottom:1px solid #ffffff20;padding-bottom:18px;margin-bottom:20px}.dot{height:7px;width:7px;background:#71856e;border-radius:50%}.bar span:last-child{margin-left:auto;font:11px ui-monospace,monospace;color:#99ad96}pre,code{font:13px/1.8 ui-monospace,SFMono-Regular,monospace}pre{white-space:pre-wrap;word-break:break-word;margin:12px 0}.green{color:var(--lime)}.terminal button{background:var(--lime);color:var(--ink);border:0;border-radius:6px;padding:10px 16px;font-weight:700;width:100%;margin:14px 0}.terminal button:disabled{opacity:.65}.fine{font-size:12px;color:var(--muted)}.terminal .fine{color:#9aaf99}.steps{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:26px 0;gap:24px}.step b{display:block;margin:10px 0 4px}.num{font:12px ui-monospace,monospace;color:#72865b}.step p{font-size:14px;color:var(--muted);margin:0}section{padding:52px 0}.heading{display:flex;justify-content:space-between;align-items:end;gap:24px}.heading p{max-width:380px;font-size:14px;color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:24px}.card{border:1px solid var(--line);border-radius:12px;padding:24px;background:#fafbf5;display:flex;flex-direction:column}.tag{font:11px ui-monospace,monospace;letter-spacing:1px;color:#637451;text-transform:uppercase}.card h3{font-size:23px;line-height:1.2;letter-spacing:-.5px;margin:18px 0 10px}.card p{font-size:14px;color:var(--muted)}.metric{display:flex;gap:22px;margin:20px 0}.metric strong{font-size:25px;line-height:1.2;display:block}.metric small{color:var(--muted);font-size:11px}.card a{margin-top:auto;font-size:13px}.note{padding:18px 20px;border-left:3px solid #9cb572;background:#eaf0e1;font-size:13px;margin-top:20px}.install{display:grid;grid-template-columns:1fr 1fr;gap:48px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.command{background:#e6ecdf;border:1px solid #d3ddc9;padding:16px;border-radius:8px;display:flex;align-items:center;gap:8px}.command code{flex:1;overflow-wrap:anywhere}.copy{border:0;background:var(--ink);color:white;padding:8px 12px;border-radius:5px}.truth{display:grid;grid-template-columns:1fr 1fr;gap:32px}.truth h3{font-size:17px}.truth p{color:var(--muted);font-size:14px}.status{border:1px solid var(--line);border-radius:10px;padding:20px;font-size:13px;overflow-wrap:anywhere}footer{border-top:1px solid var(--line);font-size:12px;color:var(--muted);display:flex;justify-content:space-between;gap:20px}button:focus-visible,a:focus-visible{outline:3px solid #77a83b;outline-offset:4px}@media(max-width:480px){.cards{grid-template-columns:1fr!important}.card{min-width:0}.metric{flex-wrap:wrap}.cards .card:last-child{grid-column:auto!important}}@media(max-width:760px){nav,main,footer{padding:20px}.navlinks{gap:12px}.navlinks a:first-child{display:none}.hero{grid-template-columns:1fr;padding:36px 0;gap:28px}h1{letter-spacing:-2px}.steps,.cards{grid-template-columns:1fr 1fr}.heading{display:block}.install,.truth{grid-template-columns:1fr;gap:20px}.cards .card:last-child{grid-column:1/-1}section{padding:32px 0}footer{flex-direction:column}}
|
| 3 |
+
.quote-form{display:flex;gap:20px;flex-wrap:wrap;align-items:end}.quote-form input{display:block;padding:12px;width:150px;font:inherit;border:1px solid #bac5af;border-radius:6px;background:#fffdf7;color:#202421}.quote-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:0;list-style:none}.quote-results li{border:1px solid var(--line);border-radius:10px;padding:18px;background:#fffdf7}.quote-results b{display:block;font-size:18px}.quote-results span{display:block;color:var(--muted);font-size:13px}.quote-results strong{display:block;margin:9px 0;font-size:22px}@media(max-width:600px){.quote-results{grid-template-columns:1fr}.quote-form input{width:130px}}</style></head><body><nav><a class="brand" href="https://cloudgpu.app">◈ CloudGPU</a><div class="navlinks"><a href="#evidence">Task evidence</a><a href="#install">Install</a><a href="https://cloudgpu.app/docs/agents">Docs ↗</a></div></nav><main><div class="hero"><div><div class="eyebrow">Agent Compute Lab / No account required</div><h1>Compute for agents.<span>Human control.</span></h1><p class="lead">Give your agent a path from “I need a GPU” to a bounded task, verified outputs and released compute.</p><div class="actions"><a class="button primary" href="#install">Install a skill ↗</a><a class="button" href="#evidence">Explore real test runs</a></div><p class="fine">MCP · REST · Agent Skills · explicit paid-work approval</p></div><div class="terminal"><div class="bar"><i class="dot"></i><i class="dot"></i><i class="dot"></i><span>read-only readiness check</span></div><pre><span class="green">$</span> GET /v1/public/agent-self-check</pre><pre id="result" aria-live="polite">No login. No API key. No allocation.
|
| 4 |
+
|
| 5 |
+
Check live capabilities, billing constraints,
|
| 6 |
+
supported task types and known issues.</pre><button id="check" type="button">Open anonymous self-check ↗</button><div class="fine" id="checked">This check spends $0 and operates no customer GPU. <a href="https://cloudgpu.app/v1/public/agent-self-check" target="_blank" rel="noopener">Open raw live check ↗</a></div></div></div><div class="steps"><div class="step"><span class="num">01 / DISCOVER</span><b>Check task fit</b><p>Read capabilities, inventory and limitations.</p></div><div class="step"><span class="num">02 / APPROVE</span><b>Set the boundaries</b><p>Owner connects and approves the actual quote.</p></div><div class="step"><span class="num">03 / RUN</span><b>Execute bounded work</b><p>Use time and spend caps. Reconcile uncertain starts.</p></div><div class="step"><span class="num">04 / VERIFY</span><b>Export and release</b><p>Check outputs and confirm compute is released.</p></div></div><section id="quote" style="border-top:1px solid var(--line)"><div class="heading"><div><div class="eyebrow">Live discovery / no account / no allocation</div><h2>Ask for a real task estimate.</h2></div><p>Browse minute-billed candidates. Quotes are estimates, not reservations or permission to spend. Whole-hour offers require a separate binding quote.</p></div><form id="quote-form" class="quote-form"><label>Minimum VRAM (GB)<input id="quote-vram" type="number" min="1" max="192" value="24" required></label><label>Runtime (minutes)<input id="quote-minutes" type="number" min="1" max="1440" value="15" required></label><label>GPU budget (USD)<input id="quote-budget" type="number" min="0.01" max="1000" step="0.01" value="2.00" required></label><button class="button primary" id="quote-submit" type="submit">Get live estimate →</button></form><p id="quote-status" class="fine" role="status" aria-live="polite">No key or payment required. This action creates no GPU.</p><ul id="quote-results" class="quote-results"></ul><p class="fine">Costs cover estimated GPU runtime; storage and transfer are separate. Account connection and explicit acceptance of a fresh binding quote are required before paid work. <a href="https://cloudgpu.app/docs/agents">Read task and billing requirements ↗</a></p></section><section id="calculator" style="background:#eaf0e1;padding:28px;border-radius:14px;margin-top:40px"><div class="heading"><div><div class="eyebrow">Interactive / local-only / no rental</div><h2>What does early stopping cost?</h2></div><p>A billing illustration, not a quote. Compare rounding before your agent allocates.</p></div><div style="display:flex;gap:24px;flex-wrap:wrap"><label>Runtime (minutes)<br><input id="minutes" type="number" min="1" max="10080" value="12" style="padding:12px;width:145px;font:inherit"></label><label>Example rate (USD/hour)<br><input id="rate" type="number" min="0.01" max="1000" step="0.01" value="0.40" style="padding:12px;width:160px;font:inherit"></label><div class="metric" aria-live="polite"><div><strong id="minuteFee">$0.08</strong><small>minute-billed source</small></div><div><strong id="hourFee">$0.40</strong><small>whole-hour source</small></div></div></div><p class="fine">GPU rates and supply are not fetched here. Storage and other charges are excluded. Actual start conditions and minimums come from the binding quote.</p></section><section id="evidence"><div class="heading"><div><div class="eyebrow">Evidence, not promises</div><h2>Three small tasks. Real measurements.</h2></div><p>Historical internal smoke tests. Fees and time below describe the successful attempt, not a price quote or production success rate.</p></div><div class="cards"><article class="card"><span class="tag">01 / Environment</span><h3>Check CUDA before committing.</h3><p>GPU environment inspection on an RTX 3090. A machine-readable environment report.</p><div class="metric"><div><strong>191s</strong><small>task elapsed</small></div><div><strong>$0.0048</strong><small>final GPU fee</small></div></div><a href="https://github.com/cloudgpu-app/cloudgpu-mcp/tree/main/examples/verified-tasks">Inspect runnable recipe ↗</a></article><article class="card"><span class="tag">02 / Video</span><h3>Generate a tiny Wan video.</h3><p>Wan2.1 1.3B in ComfyUI; 17 H.264 frames at 256 × 256. Development: 1 of 12 attempts succeeded; all attempts cost $0.8775.</p><div class="metric"><div><strong>1,064s</strong><small>task elapsed</small></div><div><strong>$0.1105</strong><small>successful GPU fee</small></div></div><a href="https://cloudgpu.app/agent-evidence.json">Read published evidence ↗</a></article><article class="card"><span class="tag">03 / LoRA</span><h3>Train a small language adapter.</h3><p>SmolLM2-135M causal-LM LoRA, 8 steps. Development: 1 of 4 attempts succeeded; all attempts cost $0.0339. Not image LoRA.</p><div class="metric"><div><strong>190s</strong><small>task elapsed</small></div><div><strong>$0.0097</strong><small>successful GPU fee</small></div></div><a href="https://github.com/cloudgpu-app/cloudgpu-mcp/tree/main/examples/verified-tasks">Inspect runnable recipe ↗</a></article></div><div class="note">These tests verify narrowly defined recipes, not arbitrary workflows or an SLA. Across the recorded acceptance session, all 19 allocated instances were confirmed released; one stock failure never allocated. This is internal evidence, not a customer reliability statistic.</div></section><section id="tour"><div class="eyebrow">A closer look / 20-second read-only UI tour</div><h2>Explore before connecting.</h2><video controls preload="metadata" poster="assets/banner.png" style="width:100%;border-radius:14px;background:#142019" aria-label="Read-only demonstration of the Compute Lab interface"><source src="assets/read-only-tour.mp4" type="video/mp4"><track kind="captions" src="assets/tour.vtt" srclang="en" label="English" default></video><p class="fine">Recorded UI tour. No paid GPU task is started in this video. <a href="assets/tour-transcript.txt">Read transcript</a> · <a href="task-budget.html">Technical guide: the hourly price is not your task budget</a></p></section><section class="install" id="install"><div><div class="eyebrow">Bring your own agent</div><h2>Install the playbook.<br>Keep spending explicit.</h2><p>Use the Agent Skills CLI, then configure CloudGPU MCP using your client's documentation. The owner signs in and approves connection limits; paid work still requires approval.</p><a href="https://cloudgpu.app/docs/mcp">MCP setup and authorization ↗</a></div><div><h3>Agent Skills</h3><div class="command"><code id="cmd">npx skills add cloudgpu-app/cloudgpu-agent-skills</code><button class="copy" id="copy" type="button">Copy</button></div><p class="fine">Choose your skills and client when prompted. Installation starts no GPU.</p><h3>Remote MCP</h3><div class="command"><code>https://cloudgpu.app/mcp</code></div><p class="fine">Streamable HTTP + OAuth for compatible clients. Local stdio: <code>npx -y cloudgpu-mcp</code>. Never paste API keys into chat.</p></div></section><section class="truth"><div><div class="eyebrow">Know before you run</div><h2>Billing follows the source.</h2><h3>Minutes or whole hours — check the quote.</h3><p>Minute-billed sources round partial minutes up. Whole-hour sources have a one-hour minimum and charge every started hour in full, even when stopped early. A GPU name alone does not determine billing.</p><h3>Results need a storage plan.</h3><p>Instance disks are erased on termination. Configure and verify Job outputs or Workspace storage. Capacity budgets, retention and transfer limits are separate from rental charges.</p><a href="https://cloudgpu.app/agent-contract.json">Machine-readable contract ↗</a></div><div><div class="eyebrow">Live limits / no hidden green lights</div><h2>Readiness is not an SLA.</h2><div class="status" id="limits">Open the live self-check to read current known issues and evidence availability. The check reports the control plane; it does not test model generation or guarantee upstream availability.</div><p class="fine">Read the <a href="https://cloudgpu.app/v1/public/agent-self-check">raw live endpoint</a>. We do not substitute cached results as a live pass.</p></div></section></main><footer><span>CloudGPU · Compute infrastructure for AI agents</span><span><a href="https://github.com/cloudgpu-app/cloudgpu-agent-skills">Source</a> · <a href="https://cloudgpu.app/terms">Eligibility & terms</a> · Developers outside mainland China</span></footer><script>
|
| 7 |
+
const calc=()=>{let m=Number(document.getElementById('minutes').value),r=Number(document.getElementById('rate').value);const ok=Number.isFinite(m)&&m>0&&m<=10080&&Number.isFinite(r)&&r>0&&r<=1000;document.getElementById('minuteFee').textContent=ok?'$'+(Math.ceil(m)*r/60).toFixed(2):'—';document.getElementById('hourFee').textContent=ok?'$'+(Math.ceil(m/60)*r).toFixed(2):'—'};['minutes','rate'].forEach(id=>document.getElementById(id).addEventListener('input',calc));document.getElementById('check').onclick=()=>{window.open('https://cloudgpu.app/v1/public/agent-self-check','_blank','noopener');document.getElementById('checked').textContent='Live JSON opens on cloudgpu.app. No allocation or paid work is performed.'};document.getElementById('copy').onclick=async function(){try{await navigator.clipboard.writeText(document.getElementById('cmd').textContent);this.textContent='Copied ✓'}catch{this.textContent='Select command above'}};
|
| 8 |
+
|
| 9 |
+
const quoteInputs=['quote-vram','quote-minutes','quote-budget'];
|
| 10 |
+
const incoming=new URLSearchParams(location.search);for(const id of quoteInputs){const x=incoming.get(id);if(x!==null&&Number.isFinite(Number(x)))document.getElementById(id).value=x}
|
| 11 |
+
const dollars=v=>{const n=Number(v);if(v===null||v===undefined||!Number.isFinite(n)||n<0)return 'Unavailable';return new Intl.NumberFormat('en-US',{style:'currency',currency:'USD',maximumFractionDigits:6}).format(n)};
|
| 12 |
+
document.getElementById('quote-form').onsubmit=async e=>{e.preventDefault();const [vram,minutes,budget]=quoteInputs.map(id=>Number(document.getElementById(id).value));const status=document.getElementById('quote-status'),list=document.getElementById('quote-results'),button=document.getElementById('quote-submit');list.replaceChildren();if(!Number.isInteger(vram)||vram<1||vram>192||!Number.isInteger(minutes)||minutes<1||minutes>1440||!Number.isFinite(budget)||budget<.01||budget>1000){status.textContent='Enter valid positive limits before requesting an estimate.';return}
|
| 13 |
+
if(!['cloudgpu.app','localhost','127.0.0.1'].includes(location.hostname)){const url=new URL('https://cloudgpu.app/agent-lab/index.html');quoteInputs.forEach((id,i)=>url.searchParams.set(id,[vram,minutes,budget][i]));url.hash='quote';window.open(url.toString(),'_blank','noopener');status.textContent='Live estimates open on CloudGPU with these inputs. No GPU is created.';const link=document.createElement('a');link.href=url.toString();link.target='_blank';link.rel='noopener';link.textContent=' Open live quote form ↗';status.append(link);return}
|
| 14 |
+
button.disabled=true;status.textContent='Requesting a live estimate…';try{const response=await fetch('/v1/quotes',{method:'POST',headers:{'Content-Type':'application/json'},credentials:'omit',body:JSON.stringify({requirements:{min_vram_gb:vram,gpu_count:1},estimated_duration_seconds:minutes*60,max_budget_usd:budget.toFixed(2)}),signal:AbortSignal.timeout(20000)});if(!response.ok)throw Error('HTTP '+response.status);const data=await response.json();if(data.object!=='compute.quote'||!Array.isArray(data.candidates)||data.price_guarantee!=='estimate')throw Error('Unexpected quote contract');if(data.candidates.length>100)throw Error('Unexpected candidate count');status.textContent=data.candidates.length?'Live estimate · valid until '+String(data.expires_at||'unavailable')+' · no GPU reserved.':'No matching candidates were returned. Adjust the requirements; no GPU was created.';for(const candidate of data.candidates){const item=document.createElement('li');const name=document.createElement('b');name.textContent=String(candidate.gpu_model||'Unnamed GPU');const price=document.createElement('strong');price.textContent=dollars(candidate.estimated_total_cost)+' estimated';const detail=document.createElement('span');const increment=Number(candidate.billing_increment_seconds);const minimum=Number(candidate.minimum_billed_seconds);detail.textContent=String(candidate.vram_gb??'?')+' GB · '+(increment===60?'minute billing':increment===3600?'whole-hour billing':'billing increment unavailable')+' · minimum '+(Number.isFinite(minimum)&&minimum>0?minimum+' seconds':'unavailable');const balance=document.createElement('span');balance.textContent='Balance needed to start: '+dollars(candidate.required_starting_balance)+' · '+(candidate.within_budget===true?'within planning budget':candidate.within_budget===false?'outside planning budget':'budget fit unverified')+' · '+(candidate.supports_jobs===true?'Job support reported':'Job support not confirmed');item.append(name,price,detail,balance);list.append(item)}}catch(error){status.textContent='Estimate unavailable ('+error.message+'). No GPU was created. Try again or check the live service status.'}finally{button.disabled=false}};
|
| 15 |
+
</script></body></html>
|
|
|
|
|
|
|
|
|
|
|
|
task-budget.html
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="canonical" href="https://cloudgpu.app/agent-lab/task-budget.html"><title>The hourly GPU price is not your agent’s task budget</title><meta name="description" content="A provider-neutral engineering guide to billing increments, explicit approval, uncertain allocations and output verification for GPU agents."><style>body{max-width:760px;margin:50px auto;padding:0 24px;font:18px/1.75 system-ui;background:#f5f5ed;color:#152219}h1{font-size:44px;line-height:1.1;letter-spacing:-1.8px}h2{line-height:1.25;margin-top:42px}pre{padding:22px;background:#142019;color:#e9f0df;border-radius:12px;overflow:auto;font-size:13px}code{font-family:ui-monospace,monospace}a{color:inherit}footer{border-top:1px solid #d9dfd2;margin-top:50px;padding:24px 0;font-size:13px;color:#647064}</style></head><body><h1>The hourly GPU price is not your agent's task budget</h1>
|
| 2 |
+
<p>An agent can find a cheap GPU and still make an expensive decision. The quoted hourly rate is only one input: billing increments, environment preparation, model download time, output persistence and uncertain startup results change what a task actually costs.</p>
|
| 3 |
+
<p>Here is a small, provider-neutral way to make that decision inspectable before an agent is allowed to spend.</p>
|
| 4 |
+
<h2>1. Represent the billing increment explicitly</h2>
|
| 5 |
+
<p>Two offers can advertise the same hourly rate but bill differently. At an illustrative $0.40/hour, a 12-minute task costs $0.08 on a source that bills whole minutes, and $0.40 on one with a one-hour minimum and whole-hour increments. An early stop does not erase the agreed minimum.</p>
|
| 6 |
+
<p>Use decimal arithmetic for money, and keep the minimum separate from the increment:</p>
|
| 7 |
+
<pre><code class="language-python">from decimal import Decimal, ROUND_CEILING
|
| 8 |
+
|
| 9 |
+
def estimate_compute_fee(seconds, hourly_usd, minimum_seconds, increment_seconds):
|
| 10 |
+
if seconds <= 0 or minimum_seconds <= 0 or increment_seconds <= 0:
|
| 11 |
+
raise ValueError("Durations and increments must be positive")
|
| 12 |
+
rate = Decimal(hourly_usd)
|
| 13 |
+
if not rate.is_finite() or rate < 0:
|
| 14 |
+
raise ValueError("Rate must be finite and nonnegative")
|
| 15 |
+
duration = Decimal(str(seconds))
|
| 16 |
+
units = (duration / Decimal(increment_seconds)).to_integral_value(
|
| 17 |
+
rounding=ROUND_CEILING
|
| 18 |
+
)
|
| 19 |
+
billed_seconds = max(Decimal(minimum_seconds), units * increment_seconds)
|
| 20 |
+
return rate * billed_seconds / Decimal(3600)
|
| 21 |
+
|
| 22 |
+
print(estimate_compute_fee(720, "0.40", 60, 60)) # 0.08
|
| 23 |
+
print(estimate_compute_fee(720, "0.40", 3600, 3600)) # 0.40
|
| 24 |
+
</code></pre>
|
| 25 |
+
<p>This is an estimate, not an invoice. Production integrations also need the provider's actual start condition, pricing expiry and finalized ledger. Do not round away the precision the ledger uses.</p>
|
| 26 |
+
<h2>2. Budget for preparation and persistence</h2>
|
| 27 |
+
<p>A duration estimate should include environment setup and model loading, not just the compute kernel. Downloading several gigabytes can take longer than a small generation task.</p>
|
| 28 |
+
<p>A useful planning decomposition is:</p>
|
| 29 |
+
<pre><code class="language-text">expected task cost =
|
| 30 |
+
billed compute(setup + download + execution + output collection)
|
| 31 |
+
+ applicable storage
|
| 32 |
+
+ applicable transfer
|
| 33 |
+
</code></pre>
|
| 34 |
+
<p>Each term needs a source and a timestamp. If transfer charges or storage retention are unknown, report that uncertainty instead of silently assigning zero. Record the successful attempt separately from the total cost of development retries.</p>
|
| 35 |
+
<h2>3. Make approval a specific contract</h2>
|
| 36 |
+
<p>An account connection grants access; it is not informed approval of every future action. Before allocation, show the selected offer, minimum charge, billing increment, estimated total, hard limits, data to upload and intended output location.</p>
|
| 37 |
+
<p>Bind that approval to a current quote. If an expired quote is replaced by a different source with a different minimum charge, obtain approval for the new terms. A GPU's model name does not imply a billing policy.</p>
|
| 38 |
+
<h2>4. Reconcile uncertain allocation instead of retrying blindly</h2>
|
| 39 |
+
<p>A timeout is not proof that allocation failed. Creating another instance can leave two billable resources.</p>
|
| 40 |
+
<p>Persist the request identity and inspect the existing resource state before retrying. Use documented idempotency semantics where supported; do not assume a create endpoint is idempotent because another endpoint accepts an idempotency key. If the result remains uncertain, surface that state for reconciliation rather than spawning a replacement.</p>
|
| 41 |
+
<h2>5. Treat output verification and release as part of success</h2>
|
| 42 |
+
<p>A process exit code of zero is insufficient when the disk will disappear on termination. A task acceptance record should capture:</p>
|
| 43 |
+
<ul>
|
| 44 |
+
<li>Workload and dependency revisions.</li>
|
| 45 |
+
<li>Execution status and exit code.</li>
|
| 46 |
+
<li>Output manifest, byte counts and checksums.</li>
|
| 47 |
+
<li>Finalized compute fees and separate storage or transfer charges.</li>
|
| 48 |
+
<li>Resource release confirmation, including whether that confirmation came from the upstream supplier.</li>
|
| 49 |
+
</ul>
|
| 50 |
+
<p>It is useful to expose a read-only discovery endpoint for agents that have no credentials yet. Return capabilities, billing rules, task limitations, known issues and sample sizes. If there is too little production data for a success rate, return <code>null</code> with an explanation. A failed discovery request should remain a failure, not be replaced with a cached green check.</p>
|
| 51 |
+
<p>The practical result is a better planning boundary: the agent can explain whether a workload fits before the human grants spending authority, and the final receipt describes an actual completed task rather than just an hourly price.</p>
|
| 52 |
+
<hr />
|
| 53 |
+
<p>Disclosure: this article was prepared with AI assistance and checked against implemented billing and task-control behavior. The examples are illustrative and do not invoke a GPU or any paid service.</p><footer>Technical note · 15 November 2026 · <a href="index.html">Compute Lab</a> · <a href="https://github.com/cloudgpu-app/cloudgpu-agent-skills/blob/main/distribution/devto/article.md">Source and disclosure</a></footer></body></html>
|