Gemma 4 E2B as a multi-agent coordinator: task decomposition, tool-calling, multi-turn — it works

Reddit r/LocalLLaMA / 4/3/2026

💬 OpinionDeveloper Stack & InfrastructureSignals & Early TrendsTools & Practical UsageModels & Research

Key Points

  • A Reddit post reports that Gemma 4 E2B can function as a multi-agent “coordinator,” successfully handling end-to-end workflows like goal decomposition, task-graph creation, agent assignment, tool-calling, and result synthesis.
  • The author tested a framework (open-multi-agent, TypeScript) using an Ollama setup via an OpenAI-compatible API, where the coordinator outputs a JSON task array with dependencies and each agent performs tool-based actions (e.g., bash commands and file read/write).
  • In a concrete example (collecting Node.js/npm/OS info and writing a Markdown report to /tmp/report.md), the system correctly generated dependent tasks, invoked tools, and produced the final consolidated output.
  • Two execution modes were compared: an explicit pipeline (runTasks) completed in ~80 seconds, while an autonomous planning approach (runTeam) took ~3.5 minutes due to additional coordinator planning and synthesis work.
  • The main constraint noted is the need for strict, schema-compliant JSON outputs from the coordinator, which can be a failure point if the model deviates from the required format.
Gemma 4 E2B as a multi-agent coordinator: task decomposition, tool-calling, multi-turn — it works

Wanted to see if Gemma 4 E2B could handle the coordinator role in a multi-agent setup — not just chat, but the actual hard part: take a goal, break it into a task graph, assign agents, call tools, and stitch results together.

Short answer: it works. Tested with my framework open-multi-agent (TypeScript, open-source, Ollama via OpenAI-compatible API).

What the coordinator has to do:

  1. Receive a natural language goal + agent roster
  2. Output a JSON task array (title, description, assignee, dependencies)
  3. Each agent executes with tool-calling (bash, file read/write)
  4. Coordinator synthesizes all results

Quick note on E2B: "Effective 2B" — 2.3B effective params, 5.1B total. The extra ~2.8B is the embedding layer for 140+ language / multimodal support. So the actual compute is 2.3B.

What I tested:

Gave it this goal:

"Check this machine's Node.js version, npm version, and OS info, then write a short Markdown summary report to /tmp/report.md" 

E2B correctly:

  • Broke it into 2 tasks with a dependency (researcher → summarizer)
  • Assigned each to the right agent
  • Used bash to run system commands
  • Used file_write to save the report
  • Synthesized the final output

Both runTasks() (explicit pipeline) and runTeam() (model plans everything autonomously) worked.

Performance on M1 16GB:

https://preview.redd.it/y3cs90pbzysg1.png?width=1040&format=png&auto=webp&s=2f8169affe76ea5018fc9fb7e2286e00ead6e224

runTasks() (explicit pipeline) finished in ~80s. runTeam() (model plans everything) took ~3.5 min — the extra time is the coordinator planning the task graph and synthesizing results at the end. The model is 7.2 GB on disk — fits on 16 GB but doesn't leave a ton of headroom.

Haven't tested e4b or 26B yet — went with the smallest variant first to find the floor.

What held up, what didn't:

  • JSON output — coordinator needs to produce a specific schema for task decomposition. E2B got it right in my runs. The framework does have tolerant parsing (tries fenced block first, falls back to bare array extraction), so that helps too.
  • Tool-calling — works through the OpenAI-compatible endpoint. Correctly decides when to call, parses args, handles multi-turn results.
  • Output quality — it works, but you can tell it's a 2.3B model. The task decomposition and tool use are solid, but the prose in the final synthesis is noticeably weaker than what you'd get form a larger model. Functional, not polished.

Reproduce it:

ollama pull gemma4:e2b git clone https://github.com/JackChen-me/open-multi-agent cd open-multi-agent && npm install no_proxy=localhost npx tsx examples/08-gemma4-local.ts 

~190 lines, full source: examples/08-gemma4-local.ts

(no_proxy=localhost only needed if you have an HTTP proxy configured)

submitted by /u/JackChen02
[link] [comments]