agent-web

A tool-calling agent loop for Qwen2.5-Instruct models, running on the lean inference engine.

lean runs the model, text in and text out, on a backend it picks by capability. This repository holds what an agent adds on top: it renders each step’s prompt with the model’s own chat template and the tools, parses the model’s tool calls out of its raw output, regenerates when a reply is malformed, calls an unknown tool or repeats a call, and repeats until the model gives a final text answer. It also holds an offline eval harness that scores runs against a set of speaker-control requests. The loop reaches the model through one small trait, so any engine that completes text can drive it. A wasm package runs the agent in a Web Worker.

Runs
browser, WASM, WebGPU, native
Model
Qwen/Qwen2.5-3B-Instruct, 3B params (Q4_0 GGUF), model licence Apache-2.0; code licence MIT
Source
idle-intelligence/agent-web
Status
experiment

← Home