Skip to content
chengmarcPublic

About

Agent 2B: Run out of usage with Claude Code or Codex? Here's an AI coding agent run from your flash drive.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

65 Commits

Folders and files

Repository files navigation


Agent 2B - AI in Your Flash Drive

Demonstration

Try it

You need Windows 10/11 and:

  • An NVIDIA GPU with 6 GB of VRAM or more: a GTX 1060 6 GB, a GTX 1660, or any desktop RTX. 8 GB or more is better; with 16 GB the whole model fits on the GPU. GTX 10-series cards work but are slower.
  • 16 GB of RAM (8 GB with a 12 GB GPU), for the part of the model the GPU can't hold.
  • A driver with CUDA 12.4 or later. CUDA itself doesn't need to be installed.
  • 13 GB of free disk space for the model.
  1. Download Agent-2B-portable.zip from the latest release and unzip it anywhere, a flash drive included. It holds portable Git Bash, Node.js and llama.cpp (CUDA build).
  2. Double-click 2B.exe. The 2B window checks your PC first: Great, Good or Slow means 2B runs on it, and otherwise it says why not, before anything is downloaded.
  3. Click Download model the first time. It downloads gpt-oss-20b (12 GB) into data/ beside 2B.exe. If it's interrupted, click Resume download, even after a restart. It uses the Windows proxy setting if one is on.
  4. Click Chat or Terminal.
    • Chat talks with the model in the same window, using llama.cpp's own chat page. ← 2B at the top right goes back.
    • Terminal opens Git Bash in your home folder with the 2B coding agent running. /exit leaves a normal prompt: cd into a project and type 2b to work there.

Loading the model takes about 30 s. llama.cpp splits it between GPU and CPU to fit whatever VRAM is free at that moment, so there is nothing to configure per computer. Chat and every terminal share one model server, which stops when the last 2B window closes.

What it can do

The model works through eleven tools. Anything that changes a file, runs a command or fetches a page asks first (y / n / a for always); after a n you can tell it why.

Reads, no asking Asks first
Read, Glob, Grep, WebSearch Edit, Write (shown as a diff), Bash, PowerShell, WebFetch
Git, GitHub (gh) when read-only Git, GitHub when they change something

It reads the project's AGENTS.md or CLAUDE.md, streams its reasoning dimmed, and renders answers as markdown. In the agent: /clear starts over, /effort low|medium|high sets reasoning effort, /tokens shows context used (64k total), /prompt shows the exact text the model reads, /exit quits.

Know the limits: it's a 20B model (about 3.6B active per token). It's good at small, scoped tasks in a codebase or on the machine; give it tight tasks rather than open-ended ones.

Change it

2B is three layers, each in one language: the app, 2B.exe, in C#; the agent in TypeScript, run as is by Node with no npm packages; and the tools that build it in PowerShell. Everything the model reads is a text file in src/agent/prompt/, and each tool is one file in src/agent/tools/.

In a clone, download the runtimes into src/runtime/ once and build src/2B.exe:

powershell -ExecutionPolicy Bypass -File packaging\fetch.ps1
powershell -ExecutionPolicy Bypass -File packaging\build.ps1 -Exe

src/README.md explains the layers, src/agent/README.md covers changing the agent, and docs/RELEASING.md covers building and publishing.

License

Apache 2.0

About

Agent 2B: Run out of usage with Claude Code or Codex? Here's an AI coding agent run from your flash drive.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages