Skip to main content

Installer and CLI for the local DiffusionGemma coding agent runtime

Project description

DiffusionGemma Agent

Turn a single 16 GB NVIDIA GPU into a local, repository-aware DiffusionGemma coding agent. This package provides the complete matched stack: an IQ3 26B-A4B model, custom full-GPU llama.cpp/CUDA backend, bounded repository retrieval, Aider-compatible editing, automatic tests, and rollback on failed sessions.

Unlike a standalone GGUF, it does not stop at model weights. The versioned runtime includes the backend, CUDA libraries, launch profile, localhost API, and agent workflow needed to install the system on Windows + WSL2 and run a focused repository task without compiling or wiring those components by hand.

Alpha software. This is a hardware-specific experimental runtime, not an official Google, NVIDIA, Hugging Face, Aider, or llama.cpp distribution.

What it does

  • searches a repository with bounded rg/RAG context instead of sending the whole project to the model;
  • asks the local model to plan and edit a focused working set;
  • runs repository tests when it can identify them;
  • records session artifacts and a final diff;
  • rolls back the session when validation fails;
  • exposes a localhost OpenAI-compatible gateway for supported agent clients.

It is best suited to concrete file-level tasks such as fixing a known bug, updating a small feature, or adding focused tests. It is not a replacement for a large-context cloud agent on broad, ambiguous repository-wide work.

Easiest Windows setup

No Python, CUDA Toolkit, compiler, or command line is required.

  1. Download DiffusionGemmaAgentSetup-0.1.1.exe.
  2. Open the installer, then launch DiffusionGemma Agent.
  3. The app checks Windows, WSL2, the NVIDIA GPU, VRAM, disk space, and runtime access automatically.
  4. Review the model and CUDA licenses, click Download and install, then choose a Git repository and describe the change you want.

The Windows app includes its own Python runtime. Setup automatically reuses a compatible runtime or IQ3 GGUF already present in common download and Hugging Face cache folders. Otherwise it downloads approximately 13.2 GB of model and CUDA files; plan for at least 30 GiB of free disk space. The current alpha installer is not code-signed, so Windows may display an unknown-publisher warning. Its checksum is published with the GitHub release.

See the desktop guide for the complete visual workflow.

Command-line alternative

Run these commands in PowerShell:

python -m pip install --upgrade diffusiongemma-agent
dg-agent doctor
dg-agent install --accept-licenses
dg-agent status

The CLI installs the same runtime as the desktop app.

Run a task against a clean Git worktree:

dg-agent run --repo C:\work\my-project --task "Fix the null handling bug in src/parser.py and run the parser tests" --file src/parser.py

Stop the service and release GPU memory when finished:

dg-agent stop

Requirements

Requirement Supported configuration
OS Windows 10/11 x64
Linux layer Initialized WSL2 Ubuntu distribution
GPU NVIDIA GPU visible inside WSL2
VRAM 16 GB minimum; the tested GPU is an RTX 3080 Laptop 16 GB
Driver Current NVIDIA Windows driver with WSL CUDA support
Disk 15 GiB hard minimum for download; 30 GiB recommended for download + WSL copy
Python Not required by the desktop app; Python 3.10+ for CLI installation
Network Required for PyPI, Hugging Face, and WSL Python dependencies during install

CPU-only execution, native Linux installation, macOS, AMD GPUs, and GPUs below 16 GB VRAM are not supported by release 0.1.1.

What installation changes

dg-agent install performs the following actions:

  1. downloads the immutable runtime tag from Hugging Face;
  2. verifies the expected model size and shared-library dependencies;
  3. copies the model, backend, and agent scripts into ~/.local/share/diffusiongemma-agent inside WSL by default;
  4. creates a private Python virtual environment inside that directory;
  5. installs FastAPI, Aider, Haystack, and runtime dependencies;
  6. starts the model backend on 127.0.0.1:4100 and the safe gateway on 127.0.0.1:8090 unless --no-start is used.

Run dg-agent doctor before installation to check Windows, WSL2, GPU/VRAM, disk space, and access to the pinned runtime revision.

Typical workflow

> dg-agent run --repo C:\work\my-project --task "Fix parser.py and run tests" --file src/parser.py

repository context -> bounded retrieval
editing route       -> checkpointed Aider session
validation          -> detected focused tests
result              -> final diff and session artifacts
failure             -> working tree restored to the session checkpoint

The exact output depends on the repository. Review the resulting diff and test output before committing it.

Commands

Command Purpose
dg-agent doctor Check WSL2, NVIDIA GPU/VRAM, disk, network, and install state
dg-agent discover Find a compatible runtime or IQ3 GGUF already on disk
dg-agent install --accept-licenses Download and install the pinned runtime
dg-agent status Show package, runtime revision, backend, and gateway state
dg-agent start Start the backend and gateway
dg-agent run --repo PATH --task TEXT Run one checkpointed coding task
dg-agent logs Show recent backend and gateway logs
dg-agent stop Stop services and release GPU memory
dg-agent update --accept-licenses Update the existing installation to the package default revision
dg-agent uninstall --yes Remove the WSL runtime but keep the Windows download cache
dg-agent uninstall --yes --remove-download Remove the WSL runtime, cache, and local configuration

Use dg-agent COMMAND --help for all options. The launcher-independent form is python -m diffusiongemma_agent.

Model and performance limits

  • Base model: google/diffusiongemma-26B-A4B-it.
  • Runtime quantization: IQ3 GGUF.
  • Execution profile: full GPU, batch size 1, custom CUDA 13 runtime.
  • Effective agent context: 768 input tokens with up to 256 output tokens; repository retrieval is used to keep the working set bounded.
  • A short warmed probe reached approximately 19.6 words/s on the tested RTX 3080 Laptop 16 GB. End-to-end agent tasks are slower because retrieval, diffusion passes, editing, and tests add latency.
  • Quality is below the original higher-precision model because of IQ3 quantization. Always review generated changes.

These are measurements from one machine, not a general performance guarantee.

Safety model

The agent modifies files and can execute repository tests and bounded local commands. Checkpoints and rollback reduce accidental damage, but they are not a security sandbox. Use a clean Git worktree, inspect diffs, and do not run the agent on untrusted repositories with sensitive credentials available.

Native model-selected tool calls are disabled in the default route. Tool use is mediated by the local gateway and deterministic supervisor. Services bind to localhost by default.

See the security policy before using the agent on important code.

Troubleshooting

Start with:

dg-agent doctor
dg-agent status
dg-agent logs --lines 120

Common fixes:

  • WSL missing: run wsl --install, reboot, and initialize Ubuntu once.
  • GPU missing in WSL: update the NVIDIA Windows driver and confirm /usr/lib/wsl/lib/nvidia-smi works.
  • Backend fails to start: stop other GPU workloads and inspect dg-agent logs.
  • Download interrupted: rerun dg-agent install --accept-licenses; Hugging Face resumes cached files.
  • Windows Application Control blocks Python launchers: use python -m diffusiongemma_agent or allow the Python installation.
  • Display resets or the machine powers off under load: stop the service and diagnose power delivery, thermals, and GPU stability before retrying.

Detailed diagnostics are in the troubleshooting guide.

Source and reproducibility

The PyPI wheel contains only the installer CLI. The 13.2 GB model and runtime are versioned separately so PyPI installation remains small and inspectable.

Licenses

The Python package is Apache-2.0. The runtime includes separately licensed components: the DiffusionGemma-derived weights, the MIT-licensed llama.cpp fork, and NVIDIA CUDA redistributable libraries governed by the NVIDIA EULA. Review the complete notices in the Hugging Face LICENSES/ directory before installation or redistribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diffusiongemma_agent-0.1.2.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffusiongemma_agent-0.1.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file diffusiongemma_agent-0.1.2.tar.gz.

File metadata

  • Download URL: diffusiongemma_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for diffusiongemma_agent-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9cc7ae718850b19aac6f20aba52762c606d5ce007fc22509af72b1c4de6d4789
MD5 439faff3a1e25d6cc7e7d9a0bb6fc3c6
BLAKE2b-256 c0363c35e476c7c4b62f702fb1c1e3baa41638dc360122d2690ded8216d15267

See more details on using hashes here.

File details

Details for the file diffusiongemma_agent-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for diffusiongemma_agent-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04a2afa10c70496ad5a25060a3d561a13ae9a567c5ef019aa4eb6eb5b5479299
MD5 aa0c825ca6538aa95e5559471aa25689
BLAKE2b-256 b0eec14487f72700f70ef03c7473ee05ee9ccb824bb6b58f7e8c39564c85cf39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page