gpu4agents 0.12.0__tar.gz → 0.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.claude-plugin/plugin.json +1 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.cursor-plugin/plugin.json +1 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/CHANGELOG.md +22 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/PKG-INFO +1 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/ACCEPTANCE.md +24 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/AGENTS.md +6 -5
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/CONFIG.md +3 -3
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/LIFECYCLE.md +9 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/USAGE.md +5 -4
- gpu4agents-0.13.0/docs/handoff/2026-11-11-video-validation-fixes.md +192 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu.models.yaml +46 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/__init__.py +1 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/agent/install.py +33 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/agent/mcp.py +75 -14
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/agent/skill/SKILL.md +25 -11
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/_common.py +43 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/agent.py +20 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/lifecycle.py +32 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/main.py +8 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/setup.py +96 -22
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/timer.py +12 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/engine.py +332 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/events.py +2 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/model_inspect.py +20 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/models.py +8 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/paths.py +30 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/sweep.py +46 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/base.py +8 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/gpus.py +64 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/vast/mapper.py +13 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/vast/provider.py +6 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/watchdog/builder.py +34 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/pyproject.toml +1 -1
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/skills/gpu4agents/SKILL.md +25 -11
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/conftest.py +2 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/fakes.py +14 -3
- gpu4agents-0.13.0/tests/test_field_run.py +557 -0
- gpu4agents-0.12.0/reports/GPU pr/303/263pria para agentes de c/303/263digo.md" +0 -94
- gpu4agents-0.12.0/research_notes/GPU pr/303/263pria para agentes de c/303/263digo/capabilities_unlocked.md" +0 -128
- gpu4agents-0.12.0/research_notes/GPU pr/303/263pria para agentes de c/303/263digo/market.md" +0 -140
- gpu4agents-0.12.0/research_notes/GPU pr/303/263pria para agentes de c/303/263digo/user_pain.md" +0 -132
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.claude-plugin/marketplace.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.env.example +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/dependabot.yml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/pull_request_template.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/workflows/ci.yml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.github/workflows/release.yml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/.gitignore +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/CODE_OF_CONDUCT.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/CONTRIBUTING.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/INSTALL.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/JOBS.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/LICENSE +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/PROVIDERS.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/README.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/SECURITY.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/SERVING.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/ADDING_A_PROVIDER.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/CHOOSING_A_MODEL.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/INTEGRATION.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/assets/banner.png +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/docs/assets/jambu-logo.jpg +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/experiment.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/gpu.yaml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/README.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/package-lock.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/package.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/src/agent.ts +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/src/index.ts +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/src/tools/weather-tool.ts +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/mastra-agent/tsconfig.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/typescript-client/README.md +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/typescript-client/package-lock.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/typescript-client/package.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/typescript-client/src/gpu.ts +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/typescript-client/src/index.ts +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/examples/typescript-client/tsconfig.json +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu.example.yaml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu.yaml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/__main__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/agent/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/agent/jobs.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/account.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/inspect.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/job.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/providers.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/run.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/status.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/cli/validate.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/beacon.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/config.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/credentials.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/durations.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/errors.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/execution.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/health.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/hosts.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/job.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/policy.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/state.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/core/tool_parsers.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/http.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/lambdacloud/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/lambdacloud/client.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/lambdacloud/config.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/lambdacloud/mapper.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/lambdacloud/provider.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/registry.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/runpod/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/runpod/client.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/runpod/config.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/runpod/mapper.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/runpod/provider.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/scaffold.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/vast/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/vast/client.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/providers/vast/config.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/runtime/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/runtime/base.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/runtime/service.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/runtime/vllm.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/hf/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/hf/install.sh +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/hf/server.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/template/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/template/gpujob.yaml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/serve/template/server.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/watchdog/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/watchdog/agent_body.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/gpu4agents/watchdog/jobs_ext.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/install.sh +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/jambu_gpu/__init__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/jambu_gpu/__main__.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/skills/gpu4agents/agents/openai.yaml +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_agent.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_cli.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_config.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_engine.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_engine_sessions.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_integration.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_job_outputs.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_jobs.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_lambda_provider.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_model_inspect.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_paths.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_policy.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_runpod_provider.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_runtime_vllm.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_serve.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_state.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_sweep.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_vast_mapper.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_vast_provider.py +0 -0
- {gpu4agents-0.12.0 → gpu4agents-0.13.0}/tests/test_watchdog.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gpu4agents",
|
|
3
3
|
"description": "Your agent rents the GPU it needs, serves a model on it and runs the experiment. You pay only while it works.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "João Gabriel Lima",
|
|
7
7
|
"url": "https://www.linkedin.com/in/joaogabriellima"
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [0.13.0] - 2026-11-11
|
|
6
|
+
|
|
7
|
+
The first real, filmed use of 0.12.0 (an agent making images with SDXL and running a CUDA benchmark) found these. Each is fixed and tested.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **A machine stopped by hand no longer bills forever without a word.** The agent ended its session with `gpu stop`; on Vast.ai that keeps billing the disk, and with no sweep timer installed nothing would ever destroy it.
|
|
11
|
+
- `gpu stop` and the MCP `gpu_stop` say so: `still_billing`, the disk's cost per day, and whether the sweep timer will remove it after `stopped_ttl`.
|
|
12
|
+
- Every `gpu` command, in any directory, warns about a registered machine left stopped and billing. It reads state files only, so it costs no API call.
|
|
13
|
+
- `gpu agent install` asks once to install the sweep timer (`--sweep-timer` / `--no-sweep-timer`). The timer is the only thing that enforces `stopped_ttl` on a stopped machine.
|
|
14
|
+
- The skill now says to destroy once the work is done and the results are home, the same choice the watchdog makes. Stop only when the user will be back soon or keeps the disk on purpose.
|
|
15
|
+
- **The card the user approved is the one rented.** The agent quoted an RTX 3060 at about $0.08/h and got an RTX 2060 at $0.094/h when the quoted offer was taken. `gpu offers` remembers what it showed, and `gpu setup --offer ID` (MCP `gpu_setup(offer_id)`) rents only that card at no more than that price, host retries included, or nothing. Every setup reports `rented`, `quoted` and `matches_quote`, and warns when they differ.
|
|
16
|
+
- **A project is never kept where it will be lost.** The agent kept `gpu.yaml` in its session scratchpad; the next session saw the machine as an orphan it could not use. `gpu init` refuses a temporary or scratchpad folder (`--allow-temp` overrides), and the skill puts the project at the root of the user's repository.
|
|
17
|
+
- **A machine that vanished leaves a reason.** The log said only "instance missing at provider". Now the reconcile replays the project's rules on what it last knew and records `instance_destroyed reason=idle_timeout by=watchdog inferred=true` when they called for it, or `likely_reason: unknown` when they did not. `gpu setup` also fetches the watchdog's own events as soon as the machine is ready.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
- `gpu adopt <instance-id>` (MCP `gpu_adopt`) takes over an orphan this account owns. On Vast.ai the boot script the provider kept gives back its watchdog token and model key, so `gpu setup` reuses it when gpu.yaml matches; otherwise it can still be destroyed from there. The provider key in that script is never read back.
|
|
21
|
+
- `gpu offers --for <minutes on an RTX 4090>` (MCP `for_minutes_on_4090`) ranks offers by the estimated cost of the whole job, not the price per hour.
|
|
22
|
+
- Image models are sized for their peak: `gpu init` gives SDXL 16 GB and FLUX 24 GB, and `gpu validate` warns below that (a 12 GB card ran out of memory with SDXL at 1344x768). `gpu.models.yaml` has `sdxl-base`, `flux-dev` and `flux-schnell` profiles.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- The skill and the MCP instructions: size for the peak with 1.5 to 2 times headroom; stop a server before a job that shares its card; compare offers per job; say that `idle_timeout` is 15 minutes by default and the user's to change; the only credentials check is `gpu login --check`, never listing environment variables or a secret store, never another provider's key.
|
|
26
|
+
|
|
5
27
|
## [0.12.0] - 2026-11-07
|
|
6
28
|
|
|
7
29
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: gpu4agents
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0
|
|
4
4
|
Summary: GPU for Agents: your coding agent rents the GPU it needs, on its own. You pay only while it works.
|
|
5
5
|
Project-URL: Homepage, https://gpu4agents.jambu.ai
|
|
6
6
|
Project-URL: Documentation, https://github.com/jambuai/gpu4agents/tree/main/docs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Acceptance criteria: where each one is implemented and tested
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Twenty-three guarantees, mapped to the code and the test that holds each one.
|
|
4
4
|
|
|
5
5
|
| # | Guarantee | Implementation | Test |
|
|
6
6
|
| --- | --- | --- | --- |
|
|
@@ -22,6 +22,11 @@ Eighteen guarantees, mapped to the code and the test that holds each one.
|
|
|
22
22
|
| 16 | Orphans are found account-wide, each project keeps its own rules, and nothing else is touched | `GPUProvider.list_instances` (capability `list_instances`) returns only `jambu-` labels; `gpu setup` registers the project in `~/.gpu/projects.json`; `core/sweep.py::guard_projects` runs each registered project's own `Engine.guard_tick`; only untracked instances are orphans: running past `--orphan-max-age` is stopped (never destroyed), stopped past `--stopped-ttl` (from the sweep's own first sighting in `~/.gpu/sweep.json`) is destroyed; `gpu sweep --install-timer` schedules one working-directory-independent unit and refuses a key that is only in the shell | `test_sweep.py::test_vast_lists_only_jambu_labelled_instances`, `::test_non_jambu_instances_are_never_touched`, `::test_another_projects_restarted_and_locked_instance_is_not_destroyed`, `::test_each_project_is_judged_by_its_own_max_lifetime`, `::test_a_running_orphan_past_orphan_max_age_is_stopped_never_destroyed`, `::test_a_stopped_orphan_is_destroyed_once_seen_stopped_past_stopped_ttl`, `::test_install_timer_writes_one_unit_independent_of_the_project`, `::test_install_timer_refuses_a_key_only_in_the_shell_environment` |
|
|
23
23
|
| 17 | The CLI guard never stops a serving endpoint it cannot see | `Engine._idle_blind`: with the watchdog enabled and installed but unreachable, `guard_tick` evaluates without `idle_timeout` and records `idle_skipped`; `max_lifetime`, budget and `stopped_ttl` still apply | `test_engine_sessions.py::test_guard_leaves_idle_to_an_unreachable_watchdog`, `::test_max_lifetime_still_applies_when_the_watchdog_is_unreachable` |
|
|
24
24
|
| 18 | A fresh stop or a short API outage never costs the disk | `RuntimeState.mark_stopped` restarts `stopped_since` on evidence the instance ran since; the watchdog escalates a failing stop to destroy only after `escalate_after_s` (30m) of continuous failure and resets on renewed use | `test_engine_sessions.py::test_a_stale_stopped_since_does_not_destroy_a_fresh_stop`, `test_watchdog.py::test_an_api_blip_does_not_destroy_the_disk`, `::test_failures_reset_when_the_instance_is_back_in_use` |
|
|
25
|
+
| 19 | A manual stop that keeps billing is never silent, and something removes it | `Engine.stop` returns `still_billing`, `stopped_cost_usd_per_day` (Vast: `storage_cost` x disk) and a `warning` naming the bill and whether the sweep timer will remove it; every `gpu` command warns on stderr about a registered machine stopped and billing (`core/sweep.py::stopped_and_billing`, state files only); `gpu agent install` asks once to install the sweep timer, the only thing that enforces `stopped_ttl` on a stopped machine | `test_field_run.py::test_stop_where_a_stopped_machine_bills_says_so_and_names_the_bill`, `::test_every_command_warns_about_a_stopped_machine_still_billing`, `::test_acceptance_manual_stop_then_only_the_timer_runs`, `::test_agent_install_asks_once_for_the_sweep_timer` |
|
|
26
|
+
| 20 | A project is never kept where it will be lost, and a lost project's machine can be taken over | `gpu init` refuses a temporary or scratchpad folder (`core/paths.py::ephemeral_reason`, `--allow-temp` overrides); `gpu adopt` (`Engine.adopt`) takes over an orphan, recovering its watchdog token and model key from the boot script the provider kept (`GPUProvider.boot_script`, `watchdog/builder.py::recover_boot_secrets`, which never returns the provider key) | `test_field_run.py::test_init_refuses_a_temp_or_scratchpad_directory`, `::test_adopt_takes_over_an_orphan_with_its_watchdog_and_key`, `::test_adopt_refuses_another_projects_machine_or_a_foreign_one`, `::test_boot_script_recovery_reads_the_token_and_key_but_never_the_provider_key` |
|
|
27
|
+
| 21 | The card the user approved is the card rented, at no more than the price quoted | `gpu offers` remembers its offers in `.gpu/offers.json`; `gpu setup --offer ID` pins the card's name and caps the price at the quote, host retries included, and rents nothing if it is gone; every setup reports `rented`, `quoted` and `matches_quote` | `test_field_run.py::test_a_pinned_setup_never_falls_back_to_another_card`, `::test_a_pinned_setup_never_pays_more_than_the_quote`, `::test_a_pinned_host_retry_stays_on_the_quoted_card`, `::test_an_unpinned_setup_says_when_it_rented_something_else` |
|
|
28
|
+
| 22 | A machine that vanished leaves a reason | `Engine._why_missing` replays this project's rules on what was last known; when they called for a destroy, the reconcile records `instance_destroyed reason=<rule> by=watchdog inferred=true`, else `likely_reason: unknown`; setup brings the watchdog's own events home as soon as the machine is ready | `test_field_run.py::test_a_machine_gone_after_its_idle_timeout_is_recorded_as_the_watchdogs_doing`, `::test_a_machine_gone_while_in_use_is_not_blamed_on_the_watchdog`, `::test_setup_brings_the_watchdogs_own_events_home` |
|
|
29
|
+
| 23 | The GPU is sized for the peak and offers can be compared per job | `model_inspect.known_vram_floor` (SDXL 16/24 GB, FLUX 24/32 GB) raises `gpu init`'s default and makes `validate` warn; `gpu offers --for <minutes on an RTX 4090>` ranks by estimated job cost (`providers/gpus.py::relative_speed`) | `test_field_run.py::test_validate_warns_when_the_card_is_sized_for_the_weights_not_the_peak`, `::test_init_sizes_a_known_image_model_for_its_peak`, `::test_offers_for_a_job_rank_by_the_cost_of_the_whole_job` |
|
|
25
30
|
|
|
26
31
|
## Validated on real hardware
|
|
27
32
|
|
|
@@ -75,6 +80,24 @@ The first attempt found problems the unit tests had missed. Each is fixed and te
|
|
|
75
80
|
- the host that failed last when setup gave up was not remembered as bad, so the next setup rented it again;
|
|
76
81
|
- on Vast, three hosts in a row stalled 30 minutes each pulling the 12 GB Docker Hub image, and setup gave up after 90 minutes with nothing left billing. Vast now defaults to `vastai/vllm:v0.32.0-cuda-13.0`, the same vLLM that Vast's hosts cache: in the cancel test the container was running within a minute.
|
|
77
82
|
|
|
83
|
+
## A real session, filmed (0.12.0, 2026-11-11)
|
|
84
|
+
|
|
85
|
+
A Claude Code session used GPU for Agents 0.12.0 end to end to make images for the home page with SDXL and to run a CUDA benchmark, filmed for the home page video. It was real use, not a test, and it found the problems fixed in 0.13.0 (guarantees 19 to 23). These held, and must keep holding:
|
|
86
|
+
|
|
87
|
+
| What held | Evidence |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| The agent asked before renting, with the model, the card, its price per hour, the $1/h cap and the $5 session cap | the transcript (`video/public/footage/with.screens.txt`) |
|
|
90
|
+
| It reused the running machine for a second task (the benchmark) instead of renting another | take 2's events: `job_submitted` on the same instance after the image workloads |
|
|
91
|
+
| It reported the cost (about $0.06) and what was still billing | the transcript |
|
|
92
|
+
| It recovered by itself from an out-of-memory error and from missing NVRTC headers | the transcript; `workload_finished` failed then finished in take 2's events |
|
|
93
|
+
| After the session was killed, take 1's machine was gone within about 30 minutes | take 1 was idle from 00:32:56; with `idle_timeout` 15m and a Vast.ai stop that bills, the watchdog destroys. Its local log said only "instance missing at provider", because the watchdog's events had not been fetched before the machine went. 0.13.0 records the inferred reason (guarantee 22) and fetches the watchdog's events at setup |
|
|
94
|
+
|
|
95
|
+
What it got wrong, and the fix:
|
|
96
|
+
- the agent ended with `gpu stop`, which on Vast.ai keeps billing the disk, and nothing would ever destroy it: no sweep timer was installed (19);
|
|
97
|
+
- the project lived in the agent's session scratchpad, so a later session saw the machine as an orphan it could not use (20);
|
|
98
|
+
- `min_vram_gb: 9` for SDXL: the 12 GB card ran out of memory decoding 1344x768, and the idle server held 11 GB the benchmark needed (23);
|
|
99
|
+
- the approval quoted an RTX 3060 at about $0.08/h; an RTX 2060 at $0.094/h was rented, and the agent noticed only in its final report (21).
|
|
100
|
+
|
|
78
101
|
## The MVP command surface
|
|
79
102
|
|
|
80
103
|
`gpu.yaml` schema, CLI, provider contract, provider registry, Vast.ai adapter,
|
|
@@ -77,16 +77,17 @@ Another agent that reads `SKILL.md` files: `gpu agent skill > path/to/skills/gpu
|
|
|
77
77
|
| --- | --- | --- |
|
|
78
78
|
| `gpu_init` | write `gpu.yaml` for a model, with an optional price cap and VRAM | no |
|
|
79
79
|
| `gpu_validate` | check the config and credentials | no |
|
|
80
|
-
| `gpu_offers` | cheapest matching machines and their price | no |
|
|
81
|
-
| `gpu_setup` | rent / restart and wait for the model; returns `base_url`, `api_key`, `model` | yes |
|
|
80
|
+
| `gpu_offers` | cheapest matching machines and their price; with `for_minutes_on_4090`, ranked by the estimated cost of the whole job | no |
|
|
81
|
+
| `gpu_setup` | rent / restart and wait for the model; returns `base_url`, `api_key`, `model`, and `rented` next to `quoted`. With `offer_id` only the approved card, at no more than its quoted price, is rented | yes |
|
|
82
82
|
| `gpu_status` | state, cost so far, idle time, the watchdog's next move, setup progress | no |
|
|
83
83
|
| `gpu_connection` | `base_url`, `api_key`, `model` without starting anything | no |
|
|
84
84
|
| `gpu_run` | run a local command with `OPENAI_BASE_URL` / `OPENAI_API_KEY` / `JAMBU_MODEL_ID` set | yes, if it has to start the machine |
|
|
85
85
|
| `gpu_logs` | runtime, onstart, watchdog or provider log | no |
|
|
86
86
|
| `gpu_lock` / `gpu_unlock` | keep the machine up through a quiet period | while locked |
|
|
87
|
-
| `gpu_stop` | stop now; disk kept, restart takes about a minute | ends billing for compute |
|
|
88
|
-
| `gpu_destroy` | delete; needs `confirm=true`; downloads job results first, `discard_outputs=true` deletes them | ends all billing |
|
|
87
|
+
| `gpu_stop` | stop now; disk kept, restart takes about a minute. On Vast.ai the disk keeps billing; the result says how much | ends billing for compute |
|
|
88
|
+
| `gpu_destroy` | delete; needs `confirm=true`; downloads job results first, `discard_outputs=true` deletes them. The default cleanup once the work is done | ends all billing |
|
|
89
89
|
| `gpu_ls` | every machine in the account, from any project | no |
|
|
90
|
+
| `gpu_adopt` | make an orphan (a machine whose project folder was lost) belong to this project, to reuse or destroy it | no |
|
|
90
91
|
|
|
91
92
|
Each tool runs the `gpu` CLI with `--json` in the project directory, so errors carry the same `exit_code` as the [application contract](INTEGRATION.md#exit-codes), plus `meaning` and `next` for the agent. A tool takes an optional `project_dir`; by default it is the server's `--project`, `$GPU_PROJECT_DIR`, or the directory the client started it in.
|
|
92
93
|
|
|
@@ -94,7 +95,7 @@ Each tool runs the `gpu` CLI with `--json` in the project directory, so errors c
|
|
|
94
95
|
|
|
95
96
|
## What keeps the agent in line
|
|
96
97
|
|
|
97
|
-
- The skill tells the agent to
|
|
98
|
+
- The skill tells the agent to keep the project in the user's repository, size the card for the peak, show one offer's card and price and ask before renting, rent that offer only (`offer_id`) and report any change, wait out a slow setup instead of starting over, never touch the provider key or go looking for keys, and destroy once the work is done and its results are home (and check `gpu_ls`).
|
|
98
99
|
- The server's tool annotations mark `gpu_destroy` destructive and the read-only tools read-only, so a client can let `gpu_status` run freely and ask for every `gpu_setup` and `gpu_destroy`. In Claude Code that is the `permissions` list in `.claude/settings.json`, e.g. `"allow": ["mcp__gpu__gpu_status", "mcp__gpu__gpu_offers", "mcp__gpu__gpu_ls"]`.
|
|
99
100
|
- `gpu.yaml` holds the hard limits the agent cannot exceed without editing the file: `budget.max_hourly_cost_usd`, `budget.max_session_cost_usd`, `lifecycle.max_lifetime`.
|
|
100
101
|
- The watchdog stops the machine after `idle_timeout` whatever the agent does, and `gpu sweep --install-timer` catches anything left behind.
|
|
@@ -113,9 +113,9 @@ which source each number comes from.
|
|
|
113
113
|
|
|
114
114
|
| Field | Default | Meaning |
|
|
115
115
|
| --- | --- | --- |
|
|
116
|
-
| `gpu.min_vram_gb` | `24` | Minimum VRAM per GPU. |
|
|
116
|
+
| `gpu.min_vram_gb` | `24` | Minimum VRAM per GPU. Size for the peak, not the weights. `gpu init` raises it for image models whose peak the weights hide (SDXL 16, FLUX 24), and `validate` warns below that. |
|
|
117
117
|
| `gpu.count` | `1` | Number of GPUs on one machine. |
|
|
118
|
-
| `gpu.name_filter` | – | Substring match, e.g. `A100`, `RTX 4090`. |
|
|
118
|
+
| `gpu.name_filter` | – | Substring match, e.g. `A100`, `RTX 4090`. `gpu setup --offer ID` pins the approved offer's card the same way for one setup, and caps the price at its quote. |
|
|
119
119
|
| `gpu.cuda_min` | – | Minimum host CUDA version. `gpu` raises it to what the runtime image needs, read from its tag (`-cu129` means 12.9, vLLM's bare `v0.32+` and `latest` mean 13.0), so an image never lands on a driver too old to run it. |
|
|
120
120
|
| `gpu.compute_cap_min` | – | Minimum GPU compute capability (architecture), e.g. `8.0` for Ampere. Distinct from `cuda_min`: a Pascal (GTX 10xx, 6.1) or Volta (V100, 7.0) card can sit behind a modern CUDA-13 driver, and so clear `cuda_min`, yet still be too old for a runtime image whose kernels are built for newer architectures. The image then crashes at engine startup. `gpu` raises this to what the runtime needs: a CUDA-13 vLLM image floors it at `8.0` (those wheels drop Volta), a CUDA-12 vLLM image at `7.0`. The cheapest Vast offers are often these old cards, so without the floor the search keeps picking a GPU the image cannot run. |
|
|
121
121
|
| `disk_gb` | `80` | Disk. Must fit the model weights plus the container. |
|
|
@@ -191,7 +191,7 @@ The cost protection. See [the safety invariant](#safety-invariant).
|
|
|
191
191
|
| --- | --- | --- |
|
|
192
192
|
| `max_lifetime` | `6h` | Hard ceiling on instance age. `null` = unbounded. |
|
|
193
193
|
| `idle_timeout` | `15m` | Shut down after this long with no activity. `null` = unbounded. |
|
|
194
|
-
| `stopped_ttl` | `24h` | Destroy an instance that has been `STOPPED` this long. A stopped Vast instance no longer bills GPU time but still bills storage. `null` keeps stopped instances forever. |
|
|
194
|
+
| `stopped_ttl` | `24h` | Destroy an instance that has been `STOPPED` this long. A stopped Vast instance no longer bills GPU time but still bills storage. `null` keeps stopped instances forever. Enforced only from your computer (`gpu sweep --install-timer`, which `gpu agent install` offers); `gpu stop` says whether that is set up. |
|
|
195
195
|
| `auto_stop` | `true` | The guard may stop the instance. |
|
|
196
196
|
| `auto_destroy` | `false` | The guard destroys instead of stopping. |
|
|
197
197
|
| `keep_disk` | `false` | Where a stopped instance still bills storage (Vast.ai, a RunPod pod with a volume), the guard destroys the instance instead of stopping it, because nothing on a stopped machine can remove it later. `true` stops it, keeping the disk for a restart in about a minute, and leaves the removal to `stopped_ttl`, which only `gpu guard` or `gpu sweep` on your computer enforce (`gpu sweep --install-timer`). |
|
|
@@ -67,7 +67,9 @@ The watchdog runs inside a bash respawn loop started with `nohup`. If the watchd
|
|
|
67
67
|
|
|
68
68
|
A stopped Vast.ai instance still bills for storage, and its watchdog is not running. So where a stop leaves a bill behind, the policy destroys instead of stopping, for idle, `max_lifetime` and the budget alike. `lifecycle.keep_disk: true` keeps the old behavior (stop, restart in about a minute) for users who accept the storage bill.
|
|
69
69
|
|
|
70
|
-
A stopped instance is then destroyed once it has been stopped longer than `lifecycle.stopped_ttl` (reason `stopped_ttl`). This needs destroy support and no active lock. Nothing runs on a stopped machine, so only your computer can enforce it: `gpu guard`, `gpu sweep`, or the timer `gpu sweep --install-timer` writes (systemd on Linux, a LaunchAgent on macOS). A manual `gpu stop` on Vast.ai is covered by the same rule.
|
|
70
|
+
A stopped instance is then destroyed once it has been stopped longer than `lifecycle.stopped_ttl` (reason `stopped_ttl`). This needs destroy support and no active lock. Nothing runs on a stopped machine, so only your computer can enforce it: `gpu guard`, `gpu sweep`, or the timer `gpu sweep --install-timer` writes (systemd on Linux, a LaunchAgent on macOS). `gpu agent install` asks once whether to install that timer. A manual `gpu stop` on Vast.ai is covered by the same rule.
|
|
71
|
+
|
|
72
|
+
A manual stop is the easy one to forget, so it is never silent. Where a stopped machine still bills, `gpu stop` (and the MCP `gpu_stop`) returns `still_billing: true`, the disk's cost per day (`stopped_cost_usd_per_day`, from Vast's `storage_cost` and the disk size) and a `warning` that says whether the sweep timer will remove it after `stopped_ttl`. After that, every `gpu` command, in any directory, warns on stderr about each registered machine still stopped and billing, until the timer is on (or, with it, once one is past its `stopped_ttl`). That check reads state files only; it never calls the provider. `GPU_NO_STOPPED_CHECK=1` silences it. The skill tells the agent to destroy, not stop, once the work is done and its results are home.
|
|
71
73
|
|
|
72
74
|
`stopped_since` keeps the first time the CLI saw the instance stopped, but only while nothing says it ran since. A session start, local activity, watchdog contact or a provider start time newer than `stopped_since` means the instance was restarted and stopped again while the CLI was not looking (from the web console, say), so the clock restarts at the current observation instead of destroying a fresh stop.
|
|
73
75
|
|
|
@@ -91,6 +93,12 @@ Run the same rule from anywhere that has API access:
|
|
|
91
93
|
|
|
92
94
|
Inference traffic is counted on the instance only. When the watchdog is enabled and installed but did not answer during this reconcile, `guard` therefore does not apply `idle_timeout`: its local idle clock would stop an endpoint that is busy serving requests. `max_lifetime`, the session budget and `stopped_ttl` still apply, and the decision detail records `idle_skipped: watchdog_unreachable`. With `lifecycle.watchdog.enabled: false` the CLI guard owns the idle rule as before.
|
|
93
95
|
|
|
96
|
+
## A machine that vanished
|
|
97
|
+
|
|
98
|
+
A destroyed machine leaves nothing to ask: the provider forgets it, and its watchdog went with it. When the CLI next finds the machine missing, it replays this project's own rules (`idle_timeout`, `max_lifetime`, the session budget) on what it last knew. If they called for a destroy by now (on a provider where a stop bills and without `keep_disk`), it records `instance_destroyed` with that `reason`, `by: watchdog` and `inferred: true`, and `state_reconciled` carries `likely_reason`, e.g. `idle_timeout (watchdog)`. Otherwise `likely_reason` is `unknown`: the provider console, another tool, the host, or an account out of credit.
|
|
99
|
+
|
|
100
|
+
The watchdog's own events (`watchdog_identified`, `instance_idle`, ...) used to reach the local log only on a later command. `gpu setup` now fetches them as soon as the machine is ready, so a machine that goes while nobody runs gpu still has the record that it was guarded.
|
|
101
|
+
|
|
94
102
|
## A model server that dies at boot
|
|
95
103
|
|
|
96
104
|
The runtime start command writes the model server's pid to `/var/run/jambu/vllm.pid`. `GET /state` reports `runtime_alive`: `true` or `false` from that pid, `null` while there is no pid file yet (or only one older than the current container start). If the process is gone while the instance is still starting, the watchdog logs `runtime_exited` once and ends startup, so the idle rules apply instead of a startup grace (`boot_timeout` + `startup_timeout` + 5 minutes) kept open by a dead server.
|
|
@@ -6,23 +6,24 @@ Operator reference. The project front page is the [README](../README.md). Field-
|
|
|
6
6
|
|
|
7
7
|
| Command | What it does |
|
|
8
8
|
| --- | --- |
|
|
9
|
-
| `gpu init` | Write a starter `gpu.yaml` and `.env.example` (`--flat` for a legacy `config.yml`) |
|
|
9
|
+
| `gpu init` | Write a starter `gpu.yaml` and `.env.example` (`--flat` for a legacy `config.yml`). Refuses a temporary or scratchpad folder, where the project would be lost (`--allow-temp` overrides) |
|
|
10
10
|
| `gpu inspect-model <repo>` | Suggest `min_vram_gb`, `dtype`, and `tool_calling` for a HuggingFace model, with sources cited. `--add-profile <name>` writes it into the model catalog |
|
|
11
11
|
| `gpu profiles` | List the model profiles in `gpu.models.yaml` |
|
|
12
12
|
| `gpu providers` | Provider capability matrix and credential status |
|
|
13
13
|
| `gpu validate` | Schema, policy, credentials, capabilities, real capacity. Fails before provisioning |
|
|
14
|
-
| `gpu offers` | Matching GPU offers and their hourly price |
|
|
15
|
-
| `gpu setup` | Provision, install the watchdog, start the runtime, wait for READY |
|
|
14
|
+
| `gpu offers` | Matching GPU offers and their hourly price. `--for 30` (minutes the job takes on an RTX 4090) ranks them by the estimated cost of the whole job |
|
|
15
|
+
| `gpu setup` | Provision, install the watchdog, start the runtime, wait for READY. `--offer ID` rents only that offer's card at no more than its quoted price; the result reports `rented` next to `quoted` |
|
|
16
16
|
| `gpu run <cmd>` | Guarantee READY, then run the command with heartbeats |
|
|
17
17
|
| `gpu status` | Reconcile local and provider state, show the guard decision |
|
|
18
18
|
| `gpu lock --for 2h` | Prevent automatic shutdown until the TTL expires |
|
|
19
19
|
| `gpu unlock` | Resume normal lifecycle rules |
|
|
20
|
-
| `gpu stop` | Stop compute. Idempotent |
|
|
20
|
+
| `gpu stop` | Stop compute. Idempotent. Where a stopped machine still bills its disk (Vast.ai) it says how much, and whether anything will remove it |
|
|
21
21
|
| `gpu destroy` | Destroy the remote resource. Idempotent. Job results not downloaded yet are fetched first; if that fails it refuses, and `--discard-outputs` deletes them |
|
|
22
22
|
| `gpu logs` | The model server's log on the instance (`--source runtime\|onstart\|watchdog\|provider`, `--lines N`). Falls back to the provider's container log when the watchdog does not answer |
|
|
23
23
|
| `gpu events` | Structured lifecycle event log |
|
|
24
24
|
| `gpu guard` | Evaluate and enforce the lifecycle rule from cron or CI |
|
|
25
25
|
| `gpu ls` | Every jambu instance in the provider account, and which registered project owns it |
|
|
26
|
+
| `gpu adopt <id>` | Make an orphan this project's, to reuse it or destroy it. Where the provider kept its boot script (Vast.ai), its watchdog and model key come back |
|
|
26
27
|
| `gpu sweep` | Guard every registered project by its own rules, then report (or `--apply`) stops and destroys of orphans |
|
|
27
28
|
| `gpu sweep --install-timer` | Schedule `sweep --apply` (systemd user timer on Linux, LaunchAgent on macOS), and register this project |
|
|
28
29
|
| `gpu endpoint` | Print the model endpoint URL |
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Fixes found while filming the gpu4agents home page video (2026-11-11)
|
|
2
|
+
|
|
3
|
+
You are fixing problems that showed up when a real Claude Code session used GPU for Agents 0.12.0 end to end.
|
|
4
|
+
The session was filmed for the home page video, and the same run validated the product-video plugin.
|
|
5
|
+
Everything below was observed, not guessed; each item says where the evidence is. Work in two repositories:
|
|
6
|
+
|
|
7
|
+
- **gpu4agents**: `/home/administrator/workspaces/Jambu/Internal/jambu-gpu` (CLI, watchdog, `SKILL.md` installed by
|
|
8
|
+
`gpu agent install`, docs). Items G1–G8.
|
|
9
|
+
- **product-video plugin**: `/home/administrator/workspaces/Jambu/Internal/product-video`, branch
|
|
10
|
+
`feat/video-capabilities`, engine in `plugins/product-video/skills/make-video/engine` (tests: `npm test` there).
|
|
11
|
+
Items P1–P6. 1.2.2 already fixed a first batch (listed at the end); don't redo those.
|
|
12
|
+
|
|
13
|
+
Rules for this work: tests first for every behaviour change; keep the docs (`docs/LIFECYCLE.md`, `docs/CONFIG.md`,
|
|
14
|
+
`docs/AGENTS.md`, `SKILL.md`, `CHANGELOG.md`) in step with the code; never read or print provider keys (run anything
|
|
15
|
+
that needs Vast with `INFISICAL_PATH=/shared devrun ...`); ask the user before renting anything.
|
|
16
|
+
|
|
17
|
+
## Evidence you can read
|
|
18
|
+
|
|
19
|
+
- The two recorded agent projects (gpu4agents state, `gpu.yaml`, `.gpu/state.json`, logs):
|
|
20
|
+
`/tmp/claude-1000/-home-administrator-demo-studio/9debbcee-26f6-48e3-9f2d-e99fa41c3840/scratchpad/hero-gpu/` (take 1)
|
|
21
|
+
and `/tmp/claude-1000/-home-administrator-demo-studio/378f23c4-a50a-41ac-bbaf-2d154953755b/scratchpad/heroimg/` (take 2).
|
|
22
|
+
Their registry is `/home/administrator/demo/home/.gpu/projects.json` (the filmed agent ran with HOME=/home/administrator/demo/home).
|
|
23
|
+
Read events with: `cd <project> && INFISICAL_PATH=/shared devrun bash -c 'env -i HOME=/home/administrator/demo/home PATH=/home/administrator/demo/bin-gpu:/usr/bin:/bin VAST_API_KEY="$VAST_API_KEY" gpu events'`
|
|
24
|
+
- What the agent said and did, as text: `jambu-gpu/video/public/footage/with.screens.txt`, `with-bench.screens.txt`;
|
|
25
|
+
full transcripts: `/home/administrator/demo/claude-clean/projects/-home-administrator-demo-studio/*.jsonl`.
|
|
26
|
+
- The skill the agent followed: `/home/administrator/demo/studio/.claude/skills/gpu4agents/SKILL.md` (same as the repo's).
|
|
27
|
+
|
|
28
|
+
## gpu4agents
|
|
29
|
+
|
|
30
|
+
### G1. The agent's cleanup leaves a stopped machine billing, forever (highest priority)
|
|
31
|
+
|
|
32
|
+
Observed: take 2's machine (Vast 60143985, RTX 2060) shows `instance_stopped reason=manual` at 01:10:43. The agent
|
|
33
|
+
itself ran `gpu stop` when done. It stayed STOPPED, billing disk, with its watchdog off. `stopped_ttl` (24h) is only
|
|
34
|
+
enforced from this computer (`gpu guard` / `gpu sweep` / the sweep timer), and no timer is installed here
|
|
35
|
+
(`systemctl --user list-timers` shows none), so nothing would ever destroy it.
|
|
36
|
+
|
|
37
|
+
Cause: `SKILL.md` rule 4 says *"offer `gpu_stop` (cheap to resume) or `gpu_destroy`… Destroy only with the user's
|
|
38
|
+
explicit yes."* That contradicts `docs/LIFECYCLE.md` §"A stopped Vast.ai instance still bills…": the automatic
|
|
39
|
+
policy destroys instead of stopping wherever a stop leaves a bill, unless `lifecycle.keep_disk: true`.
|
|
40
|
+
|
|
41
|
+
Fix:
|
|
42
|
+
1. `SKILL.md` rule 4: when the work is done and the outputs are pulled, the default is `gpu_destroy`. This is the
|
|
43
|
+
same choice the watchdog makes, and nothing keeps billing. Offer `gpu_stop` only when the user says they'll be
|
|
44
|
+
back soon, or when `keep_disk: true`, and say that it bills disk until destroyed. Teaching the user to destroy
|
|
45
|
+
isn't a destructive surprise: the results are already home. Keep "ask before renting" as is.
|
|
46
|
+
2. In the CLI, on a provider where a stopped machine bills and `keep_disk` is false, make `gpu stop` (and the MCP
|
|
47
|
+
`gpu_stop`) print and return a warning naming the bill: "stopped: still billing ~$X/day for disk; destroyed
|
|
48
|
+
after stopped_ttl only if `gpu sweep --install-timer` is set up". Also consider `gpu stop --destroy-after <dur>`.
|
|
49
|
+
3. Make sure something enforces `stopped_ttl` on a machine with no timer. Either `gpu agent install` installs the
|
|
50
|
+
sweep timer (ask once, in the install flow), or every `gpu` command runs a cheap account-wide stopped-orphan
|
|
51
|
+
check and warns. Write an acceptance test for "manual stop, then nothing else runs" so it can't regress.
|
|
52
|
+
|
|
53
|
+
### G2. The agent kept its GPU project in an ephemeral session folder; later sessions see an "orphan"
|
|
54
|
+
|
|
55
|
+
Observed: both takes created `gpu.yaml` under the Claude session scratchpad (`/tmp/claude-1000/.../scratchpad/heroimg`).
|
|
56
|
+
A new session in the same repo reported the machine as *"an RTX 3060 running… that no project tracks… I can't use it
|
|
57
|
+
because I don't have its key"* (`with.screens.txt`), and `gpu ls` from anywhere else shows `PROJECT orphan`.
|
|
58
|
+
|
|
59
|
+
Fix:
|
|
60
|
+
1. `SKILL.md`: the project lives in the user's repository: `gpu.yaml` plus `.gpu/` at the repo root, with `.gpu/`
|
|
61
|
+
in `.gitignore`. Never in a temp or scratchpad folder. Generated scripts may live anywhere; the project may not.
|
|
62
|
+
2. CLI: `gpu init` refuses (or warns loudly) when the directory is under the system temp dir.
|
|
63
|
+
3. Add `gpu adopt <instance-id>`, or `gpu setup --adopt`. It takes over an orphan this account owns (re-identifies
|
|
64
|
+
its watchdog, writes local state) so a new session can reuse or destroy it. Mention it in `SKILL.md` where it
|
|
65
|
+
tells the agent to report orphans.
|
|
66
|
+
|
|
67
|
+
### G3. GPU sizing: the agent picked a card too small for the work
|
|
68
|
+
|
|
69
|
+
Observed: the agent set `compute.gpu.min_vram_gb: 9` for SDXL (`heroimg/gpu.yaml`). It got a 12 GB card, and then:
|
|
70
|
+
- SDXL VAE decode at 1344×768 ran out of memory, so it fell back to 1024×576;
|
|
71
|
+
- the CUDA benchmark lost its 2 largest shapes because the idle SDXL server still held 11 GB of the same card.
|
|
72
|
+
|
|
73
|
+
Image generation took about 2.5 min an image.
|
|
74
|
+
|
|
75
|
+
Fix:
|
|
76
|
+
1. Add `gpu.models.yaml` profiles for the common image models (SDXL base 1.0: `min_vram_gb: 16`, and 24 to be safe
|
|
77
|
+
at 1344×768 or above; FLUX: 24+) so the agent doesn't guess.
|
|
78
|
+
2. `SKILL.md` sizing rule:
|
|
79
|
+
- size for the peak with about 1.5–2× headroom, not for the weights;
|
|
80
|
+
- when a server and a job share one card, stop the server before the job, or size for both;
|
|
81
|
+
- compare offers by the cost of the whole job (price/h × expected minutes on that card), not price/h alone: a
|
|
82
|
+
faster card at 3–4× the hourly price often costs about the same per job and finishes far sooner.
|
|
83
|
+
3. Consider a `gpu offers --for <minutes-on-a-4090>` view that ranks by estimated job cost.
|
|
84
|
+
|
|
85
|
+
### G4. The card the user approved is not the card that was rented
|
|
86
|
+
|
|
87
|
+
Observed: the approval question quoted an **RTX 3060 12 GB at ~$0.08/h**. The machine was an **RTX 2060**, and the
|
|
88
|
+
agent only noticed in its final report. Take 2's machine was rented after a host retry.
|
|
89
|
+
|
|
90
|
+
Fix: when the agent asks for approval, pin what it quoted: the offer id, or `gpu.name_filter` for that card. If
|
|
91
|
+
`host_attempts` falls back to a different card or a higher price, `gpu setup` must say so in its result
|
|
92
|
+
(`rented_gpu`, `rented_price` beside `quoted_*`), and `SKILL.md` must tell the agent to report the change before
|
|
93
|
+
starting work. A higher price than the approved one needs a new yes.
|
|
94
|
+
|
|
95
|
+
### G5. The machine that vanished left no reason behind
|
|
96
|
+
|
|
97
|
+
Observed: take 1's machine (60143519) went away while nobody watched (it was running at ~00:38, gone by ~01:08).
|
|
98
|
+
The local log says only `state_reconciled … state=destroyed, reason=instance missing at provider`, and `gpu status`
|
|
99
|
+
says `watchdog not installed`. That project's events also have no `watchdog_identified`. We can't tell whether the
|
|
100
|
+
watchdog destroyed it (idle, as designed) or something else did.
|
|
101
|
+
|
|
102
|
+
Fix:
|
|
103
|
+
1. Find out whether take 1's watchdog was installed. Take 1 went through `job_submitted` with `engine: hf`; check
|
|
104
|
+
that path installs and identifies the watchdog like `gpu setup` does. If it doesn't, that's a bug.
|
|
105
|
+
2. Before the watchdog stops or destroys its machine, it records the reason somewhere the CLI can read after the
|
|
106
|
+
machine is gone. Options:
|
|
107
|
+
- the Vast instance label (set it to `jambu-…:destroyed:idle` just before the call);
|
|
108
|
+
- a small final POST to a URL from `gpu.yaml`;
|
|
109
|
+
- for Vast, the instance's last log line, if the API exposes it.
|
|
110
|
+
|
|
111
|
+
On reconcile, `gpu events` then records `destroyed reason=idle_timeout (watchdog)`, not "missing at provider".
|
|
112
|
+
|
|
113
|
+
### G6. The agent enumerated the secret store
|
|
114
|
+
|
|
115
|
+
Observed: in the first (unsealed) take, the agent ran `INFISICAL_PATH=/shared devrun env | cut -d= -f1` to list
|
|
116
|
+
secret names. It then used an OpenAI key from there. That part was the operator's mistake: the agent had the
|
|
117
|
+
operator's environment.
|
|
118
|
+
|
|
119
|
+
Fix in `SKILL.md`: the only check for credentials is `gpu login --check`. Never list environment variables or a
|
|
120
|
+
secret manager to find keys, and never use another provider's key for work gpu4agents can do.
|
|
121
|
+
|
|
122
|
+
### G7. Idle timeout is configurable: the docs and the agent's messages should say so
|
|
123
|
+
|
|
124
|
+
The agent told the user "it stops by itself after 15 min idle" as if fixed. In `SKILL.md` and the approval message,
|
|
125
|
+
say "after `idle_timeout` (15 min by default; yours to change in gpu.yaml)". The video now says "you set … how long
|
|
126
|
+
it may sit idle".
|
|
127
|
+
|
|
128
|
+
### G8. Things that worked and must keep working (add them to `docs/ACCEPTANCE.md`)
|
|
129
|
+
|
|
130
|
+
- The agent asked before renting, with the model, card, $/h, the $1/h cap and the $5 session cap.
|
|
131
|
+
- It reused the running machine for a second task instead of renting another.
|
|
132
|
+
- It reported cost (~$0.06) and what was still billing.
|
|
133
|
+
- It recovered by itself from the out-of-memory error and from NVRTC missing headers.
|
|
134
|
+
- After the session was killed, take 1's machine was gone within about 30 min (confirm with G5).
|
|
135
|
+
|
|
136
|
+
## product-video plugin
|
|
137
|
+
|
|
138
|
+
### P1. Hyperframes layers can't be translated
|
|
139
|
+
|
|
140
|
+
`make/hyperframes.mjs` renders one file with literal `variables`, so a layer with words shows English in every
|
|
141
|
+
language. For this video the safety layer was made wordless and the words moved to a clip label. Fix:
|
|
142
|
+
- `variables` values may be story keys (`"$safety.line1"`);
|
|
143
|
+
- when any is, render one file per language (`layers/safety.<lang>.mp4`) and let `src/footage.tsx` pick the
|
|
144
|
+
language's file;
|
|
145
|
+
- hash per language;
|
|
146
|
+
- test it.
|
|
147
|
+
|
|
148
|
+
### P2. Clip labels show `*emphasis*` literally
|
|
149
|
+
|
|
150
|
+
`Clips` in `src/footage.tsx` prints the label text raw. Render `*…*` as the accent colour, like the other scenes
|
|
151
|
+
(`Accented`), or strip the asterisks.
|
|
152
|
+
|
|
153
|
+
### P3. Terminal capture can't answer an agent's choice menu on purpose
|
|
154
|
+
|
|
155
|
+
Claude Code's question dialogs (`AskUserQuestion`) take arrows and Enter, not typed text. Today the script types
|
|
156
|
+
"Yes, go ahead." and Enter happens to pick the recommended option. Add a `{ "choose": 1 }` step: N−1 Down presses,
|
|
157
|
+
then Enter, when a menu (`Enter to select`) is on screen. Document it in `references/footage.md`.
|
|
158
|
+
|
|
159
|
+
### P4. Each take needs a manual reset
|
|
160
|
+
|
|
161
|
+
Between takes I had to delete the demo repo's outputs and the clean config's project memory
|
|
162
|
+
(`claude-clean/projects/<repo>`) by hand. Add `"before": ["git clean -fd site kernels", …]`: shell commands run in
|
|
163
|
+
`cwd` before recording, refusing paths outside it. Add `"fresh": true` too, to move the agent config's
|
|
164
|
+
`projects/<cwd-slug>` aside so the agent starts with no memory of earlier takes.
|
|
165
|
+
|
|
166
|
+
### P5. A filmed session's own GPU spend is not in the video's ledger
|
|
167
|
+
|
|
168
|
+
The filmed agent rents on the same Vast account, outside `budget.json`. After a capture, read the cost the agent's
|
|
169
|
+
gpu4agents project recorded (`gpu --json status` in its project), or ask the operator. Then add it to the ledger
|
|
170
|
+
as `note: "filmed session"` so the budget report is the real total.
|
|
171
|
+
|
|
172
|
+
### P6. Claude Code chrome in the footage
|
|
173
|
+
|
|
174
|
+
The recordings show the model banner, a "Share Claude Code and earn $10" line and auto-mode hints. Strip crops
|
|
175
|
+
avoid them now. A launcher option to hide tips would be cleaner (check `claude --help` and the settings for tips
|
|
176
|
+
and notices) and should be documented for filmed sessions.
|
|
177
|
+
|
|
178
|
+
### Already fixed in 1.2.2 (commit 2f4f154): don't redo
|
|
179
|
+
|
|
180
|
+
- Blender on a rented GPU:
|
|
181
|
+
- each offer priced by the minutes that card needs, fastest within 1.5× the cheapest total;
|
|
182
|
+
- the card pinned with `name_filter`;
|
|
183
|
+
- 24 GB and compute 8.6 or newer;
|
|
184
|
+
- `idle_timeout` 5m;
|
|
185
|
+
- OptiX denoising on the card (40 s → 3 s a frame);
|
|
186
|
+
- job timeout at 3× the estimate;
|
|
187
|
+
- failed jobs charged to the ledger.
|
|
188
|
+
- `npm run check` no longer warns about a missing Blender when the clip renders on a rented GPU.
|
|
189
|
+
- Terminal capture:
|
|
190
|
+
- `"clean"`: an empty environment with its own HOME and PATH, and only the keys named in `pass`;
|
|
191
|
+
- `until` (a shell check) and `while` (a busy pattern) waits;
|
|
192
|
+
- `zoom` with a start scale, and short windows centred on the stage.
|
|
@@ -100,3 +100,49 @@ qwen3.8-35b-a3b-distill:
|
|
|
100
100
|
gpu_memory_utilization: 0.90
|
|
101
101
|
tensor_parallel_size: 2
|
|
102
102
|
tool_calling: auto # resolves to qwen3_xml automatically (qwen3.8 in the name)
|
|
103
|
+
|
|
104
|
+
# Image models: size for the peak, not the weights. SDXL's weights are ~7 GB,
|
|
105
|
+
# but the VAE decode at full resolution needs far more: on a 12 GB card it ran
|
|
106
|
+
# out of memory at 1344x768 (and an idle server on the same card took 11 GB
|
|
107
|
+
# from a job). 16 GB works at 1024x1024; 24 GB is the safe pick at 1344x768
|
|
108
|
+
# and up, or when a job shares the card.
|
|
109
|
+
sdxl-base:
|
|
110
|
+
model:
|
|
111
|
+
id: stabilityai/stable-diffusion-xl-base-1.0
|
|
112
|
+
task: image
|
|
113
|
+
compute:
|
|
114
|
+
gpu:
|
|
115
|
+
min_vram_gb: 16 # 24 to be safe at 1344x768 or larger
|
|
116
|
+
count: 1
|
|
117
|
+
disk_gb: 80
|
|
118
|
+
runtime:
|
|
119
|
+
engine: hf
|
|
120
|
+
port: 8000
|
|
121
|
+
|
|
122
|
+
flux-dev:
|
|
123
|
+
# Gated: accept the license on Hugging Face and set HF_TOKEN.
|
|
124
|
+
model:
|
|
125
|
+
id: black-forest-labs/FLUX.1-dev
|
|
126
|
+
task: image
|
|
127
|
+
hf_token_env: HF_TOKEN
|
|
128
|
+
compute:
|
|
129
|
+
gpu:
|
|
130
|
+
min_vram_gb: 24 # 32+ to keep the T5 encoder on the card at high resolution
|
|
131
|
+
count: 1
|
|
132
|
+
disk_gb: 100
|
|
133
|
+
runtime:
|
|
134
|
+
engine: hf
|
|
135
|
+
port: 8000
|
|
136
|
+
|
|
137
|
+
flux-schnell:
|
|
138
|
+
model:
|
|
139
|
+
id: black-forest-labs/FLUX.1-schnell
|
|
140
|
+
task: image
|
|
141
|
+
compute:
|
|
142
|
+
gpu:
|
|
143
|
+
min_vram_gb: 24
|
|
144
|
+
count: 1
|
|
145
|
+
disk_gb: 100
|
|
146
|
+
runtime:
|
|
147
|
+
engine: hf
|
|
148
|
+
port: 8000
|
|
@@ -292,3 +292,36 @@ def install(
|
|
|
292
292
|
if any(t in targets for t in ("claude", "codex", "gemini", "cursor")):
|
|
293
293
|
notes.append("restart the agent (or start a new session) so it loads the skill and the gpu tools")
|
|
294
294
|
return {"installed": done, "targets": targets, "notes": notes}
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
def _enable_timer(result: dict[str, Any]) -> bool:
|
|
298
|
+
"""Run the enable command `gpu sweep --install-timer` prints (systemctl or launchctl)."""
|
|
299
|
+
proc = subprocess.run(["sh", "-c", result["enable"]], capture_output=True, text=True)
|
|
300
|
+
return proc.returncode == 0
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
def offer_sweep_timer(context: Any, wanted: Optional[bool]) -> dict[str, Any]:
|
|
304
|
+
"""The install flow's one question: schedule the sweep, which enforces stopped_ttl.
|
|
305
|
+
|
|
306
|
+
Nothing on a stopped machine can remove it, so where a stop still bills
|
|
307
|
+
(Vast.ai) only something on this computer can: the sweep timer.
|
|
308
|
+
"""
|
|
309
|
+
from ..cli import timer as timer_mod
|
|
310
|
+
from ..cli.account import _require_file_credentials
|
|
311
|
+
|
|
312
|
+
howto = "`gpu sweep --install-timer` schedules the cleanup of machines left stopped (they bill for disk on Vast.ai)"
|
|
313
|
+
if timer_mod.is_installed():
|
|
314
|
+
return {"installed": True, "action": "unchanged"}
|
|
315
|
+
if not wanted:
|
|
316
|
+
return {"installed": False, "action": "skipped", "next": howto}
|
|
317
|
+
try:
|
|
318
|
+
_require_file_credentials(context)
|
|
319
|
+
result = timer_mod.install_timer(300.0)
|
|
320
|
+
except (ConfigError, OSError) as exc:
|
|
321
|
+
return {"installed": False, "action": "failed", "error": str(exc), "next": howto}
|
|
322
|
+
enabled = _enable_timer(result)
|
|
323
|
+
out = {"installed": enabled, "action": "created" if enabled else "written", "files": result["files"]}
|
|
324
|
+
out["timer"] = result.get("timer") or result.get("plist")
|
|
325
|
+
if not enabled:
|
|
326
|
+
out["next"] = f"enable it with: {result['enable']}"
|
|
327
|
+
return out
|