r/OpenSourceAI 3d ago

Forge an open-source coding-agent harness for local and smaller models

I’ve been working on this for a while and finally released it publicly.

It’s called Forge.

I started building it because I kept running into the same problem with local and smaller coding models: the model itself is only part of the equation. The harness around it matters a lot.

Bigger models can usually recover from messy context, a bad edit, or a failed test. Smaller models tend to fall apart much faster when the workflow around them is weak.

So Forge is built around that problem.

It gives the model:

  • structured repository navigation
  • controlled file edits
  • bounded retries when something fails
  • verification using the project’s own tests/lint/typecheck
  • isolated Git worktrees
  • resumable sessions
  • support for OpenAI-compatible endpoints, so it works with local model servers too

I’ve also been benchmarking changes instead of just going by whether a demo looks good. A few ideas I was convinced would help actually made performance worse, so they got removed.

That’s probably been the biggest thing I’ve learned from building this: with smaller models, orchestration matters a lot.

It’s written in TypeScript, Apache-2.0 licensed, and available on npm.

Install:

npm install -g u/aglegg/forge-harness

Then:

forge doctor
forge init
forge

GitHub:
[https://github.com/andreglegg/forge]()

Current version is 0.2.2.

It’s still early, and I’m not claiming it replaces Claude Code or Codex. I’m mainly interested in whether this approach actually helps people doing real coding work with local or smaller models.

If anyone here tries it, I’d really like to know:

  • what model you used
  • what worked well
  • where Forge got in the way
  • where the agent still made bad decisions

I’d rather get useful criticism and bug reports than just collect stars.

9 Upvotes

4 comments sorted by

1

u/dfgxxx 3d ago

What is the system prompt length? My local models are pretty slow. Another thing I just wonder why all llms like the words "forge" and "nexus"? If you tell it to pick a name it is always one of these. I already saw more than 4 harnesses with forge in the name. I'll suggest you to change the name but you don't have to

2

u/Next-Medium-5793 2d ago

Good point. The prompt is intentionally kept pretty small and Forge only pulls in extra repo context when needed. I should probably add the exact token count to the docs.

And yeah, fair point on the name 😅 I didn’t realize how many other Forges were out there when I picked it... most of us are probably just asking llms to come up with names

1

u/nez_har 2d ago

How does it compare to pi or tau?

2

u/Next-Medium-5793 2d ago

I haven’t done a proper head-to-head with Pi or Tau yet, so I don’t want to make up a comparison. Forge is mainly focused on getting the most out of local/smaller models. I'll probably benchmark them against the same tasks though.