the browser runtime for local intelligence
Install the npm package (alpha) to load GGUF models, run chat, and keep inference local in the browser. WebGPU native, with shared GPU buffers and direct support for three.js.
v0.0.9 Alpha npm package. APIs and behavior may change before 1.0.
import { CogentEngine } from 'cogentlm';
const engine = await CogentEngine.create();
await engine.models.load('https://example.com/model.gguf');
const answer = await engine.chat([
{ role: 'user', content: 'Explain browser-hosted inference in one paragraph.' },
]);
console.log(answer);live demo
Open Banana Dash, a browser simulation where four CogentLM agents and one judge compete for bananas in real time. It demonstrates low-latency local inference, multi-agent decisions, and UI integration from the same runtime developers install with npm.
Banana Dash: 4 brains, 1 judge, local browser inference.
Open demoFour browser-run agents make decisions near the interface instead of waiting on a remote loop.
Agents sense the arena, react to bananas, and keep the simulation responsive as the game state changes.
A judge, scoreboards, and activity traces show how model calls shape a live interactive system.