Skip to main content
This notebook demonstrates how to run the Kilo CLI coding agent on ZeroGPU and ship a real multi-file feature with it. You start with Marquee, a dark, poster-driven movie-night app whose heart buttons and Watchlist button don’t do anything yet, connect your ZeroGPU key in Kilo, pick DeepSeek V4.1 Flash, and describe the feature in one sentence. The agent reads the app, creates a localStorage hook, wires up three components, checks its own build, and the app updates in your browser, in about 23 seconds and for about half a cent. By combining Kilo CLI and ZeroGPU, this notebook walks you through a practical pattern for handing everyday feature work to a coding agent on a low-cost model provider, with no provider configuration at all because ZeroGPU is listed on models.dev. For the full reference, see the Kilo CLI integration guide. For how ZeroGPU’s listing works and which other tools read it, see the Models.dev integration guide. In this notebook, you’ll explore:
  • Kilo CLI: The terminal edition of Kilo Code, an open-source coding agent that reads your code, edits files, and runs commands. It’s a fork of OpenCode and builds its provider list from models.dev, so ZeroGPU shows up in /connect and /models with no extra setup. Here it reads the app, writes the watchlist feature across four files, and builds the project to check its work.
  • ZeroGPU: A compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live.
  • Models.dev: An open-source database of AI model specifications, pricing, and capabilities that Kilo reads its providers from. ZeroGPU’s listing supplies the endpoint, the API key variable, and the nine chat models you’ll pick from.
This setup not only demonstrates a practical application of agentic feature work on a low-cost model, but also provides a flexible framework that can be adapted to other real-world scenarios requiring fast, inexpensive, multi-file code changes driven by plain-language requests.

🎥 Watch the Video Guide

If you prefer a visual walkthrough, check out the accompanying video guide below:

📦 Installation

First, install the Kilo CLI:
Prefer another installer? curl -fsSL https://kilo.ai/cli/install | bash or brew install Kilo-Org/tap/kilo installs the same kilo command. ZeroGPU needs no SDK here. Kilo already knows ZeroGPU’s endpoint and models from models.dev, so all it needs is your key. You’ll also need Node.js 20 or newer for the app, plus jq for one optional catalog lookup. See the Kilo CLI integration guide for every way to connect.

🔑 Setting Up API Keys

You’ll need to set up your API key for ZeroGPU. This ensures that Kilo can reach ZeroGPU’s models securely. You can go to here to get an API key from ZeroGPU. The key starts with zgpu-api-. Copy the key now; you’ll paste it into Kilo’s /connect in a moment, which stores it for every Kilo session on your machine. Kilo shows the key in plain text while you paste it there, so if you’re recording or sharing your screen, store it from a shell instead, where it’s masked:
If you’d rather keep the key in your environment, export it under the name models.dev lists for ZeroGPU, then start Kilo from the same shell:

🗂️ Finding ZeroGPU on Models.dev

Kilo doesn’t ship a hard-coded ZeroGPU integration. It reads ZeroGPU’s entry from the models.dev catalog, which you can browse at models.dev/providers/zerogpu or query directly:
That’s the whole integration: the endpoint Kilo will call, the variable it checks for a key, and the nine models it will offer. You’ll use deepseek-v4.1-flash, listed at $0.30 per 1M input tokens, $1.20 per 1M output tokens, and $0.003 per 1M cached input tokens, with a 1,048,576-token context window. That last price matters for a coding agent, as you’ll see in the cost breakdown below.

🍿 Building the Marquee Starter

Marquee is a Vite, React, TypeScript, and Tailwind app with a sticky header, a hero, and a grid of ten film posters. Each poster has a heart button, and the header has a Watchlist button with a count, but none of them do anything yet. Create the project and install its dependencies:
Add the build configuration:
vite.config.ts
tsconfig.json
index.html
Now the app itself. src/index.css pulls in Tailwind, and src/main.tsx mounts the app:
src/index.css
src/main.tsx
The film data is what the watchlist will save. Each film has an id, which is what the agent will store:
src/data/films.ts
Drop ten portrait (3:4) images into public/posters/ with the file names above. The films are made up, and the posters in the video are original AI-generated key art, but any images work. The app runs fine without them too: each card falls back to a dark tile with the title on top. Two components render the header and each film card. Note the heart button and the Watchlist button with its hard-coded 0:
src/components/Header.tsx
src/components/FilmCard.tsx
And src/App.tsx puts it together. The agent will change this file and both components:
src/App.tsx
Last, give the agent two facts about the project in an AGENTS.md, which Kilo reads automatically. Without it, an agent that wants to check its work may try to start its own server or open a browser, which stops to ask for permission:
AGENTS.md
Commit the starter so you can see exactly what the agent changes, and reset between runs:
Finally, start the dev server in a second terminal and open http://localhost:5174. Keep it running: Vite reloads the page by itself whenever the agent saves a file.
You should see the header with ♡ Watchlist 0, “Movie night, sorted.”, and ten film posters. Click a heart: nothing happens yet.

🔌 Access Agentic Coding with ZeroGPU

ZeroGPU is a compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live. In this section, we will connect ZeroGPU in Kilo, pick DeepSeek V4.1 Flash, and ask it one question about the app as an example. Start Kilo in the marquee folder:
Connect ZeroGPU. Type /connect, press Enter, type zero, and press Enter on ZeroGPU. Paste your key and press Enter. (Skip this if you stored the key with kilo auth login or exported ZEROGPU_API_KEY.)
Now pick the model. Type /models, press Enter, and type zerogpu: Kilo lists ZeroGPU’s nine models under a ZeroGPU header, with a panel showing each model’s prices and context window. Press ↑ once to land on DeepSeek V4.1 Flash, press Enter, then press Enter again on Default when Kilo asks for a variant. (Typing deepseek instead lists Kilo Gateway’s DeepSeek models first, so filter by zerogpu.)
The footer under the input box now reads Code · DeepSeek V4.1 Flash ZeroGPU. Every ZeroGPU model in this list supports the tool calling Kilo needs. To confirm they all answer, run a roll call from a shell:
Check the connection with a quick question. You can type it into the session, or run it from a shell with kilo run:
🎉 ZeroGPU effortlessly plugs into Kilo CLI straight from its models.dev listing, providing a no-config, low-cost model provider for AI integration!

🎬 Building the Watchlist with Kilo CLI

This section asks the agent for a real multi-file feature in one sentence. Kilo does the reading, editing, and checking, and every model call behind it runs on ZeroGPU. Lay out your screen so you can watch it happen: Kilo in a terminal, src/App.tsx open in your editor above it, and the app in your browser. Give the terminal at least 125 columns so Kilo can show its sidebar with the session’s cost.

Step 1: Ask for the feature

Type this prompt into the Kilo session and press Enter. Then keep your hands off for about 25 seconds:

Step 2: Watch the agent work

Kilo reads the app, the film data, and both components, writes a new src/hooks/useWatchlist.ts, and rewrites App.tsx, Header.tsx, and FilmCard.tsx, so you’ll see the files change in your editor. Kilo’s default Code agent is allowed to edit files and run commands, so there’s nothing to approve. Before it replies, the agent runs npm run build to check its work, as AGENTS.md asked. That’s expected; let it finish. When the reply lands, the line under it reads Code · DeepSeek V4.1 Flash with the time the turn took. Here’s the change from the run in the video, from git diff (with the new hook file included):
The agent pulled the watchlist into a useWatchlist hook that loads saved film IDs from localStorage (ignoring anything malformed), writes them back on every change, and exposes toggle and has. It lifted the state into App, filtered the grid when the saved view is on, swapped the heading, and added an empty state. The heart got a filled, rose-colored ♥ with aria-pressed and a matching label, and the header button got the live count and a highlighted “Saved” state. The exact structure, styling, and wording change from run to run (sometimes the hook lives inside App.tsx, sometimes the button reads “All films”), but the behavior was the same in every test.

Step 3: Check the cost

Look at the sidebar for the session’s cost. It reads $0.01, because Kilo rounds to the cent. The run in the video took 23.1 seconds and cost $0.0056. To see the exact figure for your own runs, use kilo stats:
Here’s where the half cent came from. A coding agent resends its system prompt and the conversation on every step, so most of its input is a prefix ZeroGPU has already seen, billed at the cached rate:
Without caching, those 175,232 tokens would have cost $0.0526 on their own, about ten times the whole run. Across four more runs of the same prompt from a shell, the feature took 22 to 62 seconds and cost $0.0045 to $0.0105.

Step 4: Try the watchlist

Switch to the browser. There’s no need to refresh: Vite already reloaded the page when the agent saved. Then:

Step 5: Run it again headlessly (optional)

To try the same task from a script, reset the app and hand the prompt to kilo run. This is the same run without the interface, which is how you’d use it in CI:
Each run costs about a cent or less. Add --auto when running unattended: kilo run can’t stop to ask for permission, so anything that would normally ask, such as reading files outside the project, ends the run unless you allow it. 🎉 From a single sentence, Kilo CLI on ZeroGPU read the app, built a complete watchlist across four files, checked its own build, and shipped it to your browser in about 23 seconds, for about half a cent. Your key stays saved in Kilo, so every future session can pick a ZeroGPU model straight from /models.

🌟 Highlights

This notebook has guided you through setting up and running a Kilo CLI workflow with ZeroGPU for building a watchlist feature in a React movie app. You can adapt and expand this example for various other scenarios requiring fast, inexpensive, multi-file code changes driven by plain-language requests. Key tools utilized in this notebook include:
  • Kilo CLI: The terminal edition of Kilo Code, an open-source coding agent that reads your code, edits files, and runs commands. It’s a fork of OpenCode and builds its provider list from models.dev, so ZeroGPU shows up in /connect and /models with no extra setup. Here it reads the app, writes the watchlist feature across four files, and builds the project to check its work.
  • ZeroGPU: A compute-efficient inference provider for apps and agents. We run purpose-built small and nano language models across an edge network for the high-volume tasks you run constantly - classification, extraction, moderation, routing, summarization - at ~10x lower latency and 50%+ lower cost than frontier-model workflows. Auto-scaling, with zero GPU infrastructure to manage. Plug in and you’re live.
  • Models.dev: An open-source database of AI model specifications, pricing, and capabilities that Kilo reads its providers from. ZeroGPU’s listing supplies the endpoint, the API key variable, and the nine chat models you’ll pick from.
This comprehensive setup allows you to adapt and expand the example for various scenarios requiring fast, inexpensive, multi-file code changes driven by plain-language requests.