Inspiration

Imagine working at 2 am and seeing a huge block of code that has many redundancies. What happens if you hand this off to a pipeline of specialist AI agents instead of one generalist, how much smaller and safer can the output get?

What it does

You paste in a Java class (or pick a canned sample), and it's run through three chained AI agents:

Translator — an agent that preserves the original logic of the java code Slimmer — strips redundancies: BoxLang default equals/hashCode/toString, .map()/.reduce() instead of manual loops, and drops explicit types/public where BoxLang doesn't need them. Auditor — diffs the original Java against the slimmed BoxLang and outputs a JSON parity-risk report with a confidence score. LineStats — a non-AI pass that counts non-blank/non-comment lines on both sides and reports the line reduction and percent — the headline metric the demo centers on.

How we built it

BoxLang as the runtime, served locally via boxlang-miniserver. Groq as the LLM backend, called via aiChat() and aiAgent(). Model defaults to openai/gpt-oss-120b (with gwen/qwen3.8-26b also referenced). The architecture is a straightforward three-stage pipeline (ConversionPipeline.bx) that runs and times each agent in sequence, with a line-diff/count step (LineStats.bx) layered on top for the trustworthy, non-hallucinated number.

Challenges we ran into

Groq's free-tier rate limit (~8k tokens/min): three sequential LLM calls per conversion can trip it, so the wrapper had to implement backoff/retry logic that parses Groq's "try again in Ns" messages.

Failures from reasoning models: gpt-oss models would return empty completions if left to reason freely, requiring explicit reasoning_effort: "low" tuning.

Accomplishments that we're proud of

A working three-agent pipeline where each agent has a distinct, non-overlapping job rather than one prompt doing everything.

A live diff UI with real-time agent status and a reduction counter that makes the abstract "AI slims your code" pitch concrete and demoable in seconds.

Getting solid, visible results on boilerplate-heavy code.

What we learned

Chaining agents produces more reliable results than one broad "convert this" prompt. Given the materials, maximize every resources. Free-tier rate limits are a real constraint on multi-agent pipelines and need to be designed around from the start, not patched in afterward.

What's next for m0dern1zeIt

Expanding beyond a single Java class at a time. Expanding to workspace migrations that can be utilized in real-world.

Built With

  • boxlang
  • boxlangai
  • gpt-oss-120b
  • groq
  • qwen
Share this project:

Updates

Submission history