modelgrid
A chat for your models, in the spirit of Claude and ChatGPT, built on FlexHarness. Conversations, streaming answers with their reasoning, steering a running answer, stop, undo and redo, attachments, a code sandbox and web pages the model may read with your approval. It runs on the AGL inference proxy or on any OpenAI-compatible server, a ModelGrid daemon on your own GPUs included, and opens as an app in a workspace.global desktop.
Issue Reporting and Security
For reporting bugs, issues, or security vulnerabilities, please visit community.foss.global/. This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a code.foss.global/ account to submit Pull Requests directly.
Run
# on a machine with the AGL inference proxy
npx modelgrid --agl
# or against a ModelGrid daemon (or vLLM, ollama, OpenAI)
MODELGRID_BACKENDS='[{"name":"grid","baseUrl":"http://gpu1:8080/v1","apiKeyEnv":"GRID_API_KEY"}]' GRID_API_KEY=… npx modelgrid
It prints the link to open, with the access token in its fragment:
modelgrid 0.1.0 on http://localhost:3140
open: http://localhost:3140/#token=…
models: agl/gpt-5.5, agl/gpt-5.4-mini, … (default agl/gpt-5.5)
The executable is modelgrid-chat; it never shadows the modelgrid daemon on a GPU host.
modelgrid 0.1 is this chat. Versions 0.0.1 to 0.0.6 of the npm package modelgrid were an unrelated API client from 2015; the chat replaces it and shares no code or API with it. A dependency on ^0.0.x never resolves to the chat.
| Option | Environment | |
|---|---|---|
--port <port> |
MODELGRID_PORT |
Where it listens on 127.0.0.1. Default 3140. |
--data <dir> |
MODELGRID_DATA_DIR |
Conversations, the access token and the lock. Default $XDG_DATA_HOME/modelgrid, or ~/.local/share/modelgrid. |
--agl |
MODELGRID_AGL=1 |
The AGL proxy's ChatGPT pool, at MODELGRID_AGL_PROXY_URL (default http://127.0.0.1:4100), with the credential agl proxy credential modelgrid prints (or the JSON argument list in MODELGRID_AGL_CREDENTIAL_COMMAND). |
MODELGRID_BACKENDS |
OpenAI-compatible servers: a JSON list of { name, baseUrl, apiKeyEnv?, api?: "chat" | "responses", models?, contextWindow?, images? }. The models are those the server lists unless models names them; vLLM states each one's window as max_model_len. |
|
MODELGRID_DEFAULT_MODEL |
<backend>/<model> a new conversation starts on. |
|
MODELGRID_WORKSPACE_ORIGINS |
workspace.global origins that may open it as an app. |
What it does
| Conversations | Listed newest first; the model names a new one after its first answer (rename_session); rename and delete. They live in the data directory and survive restarts. |
| Models | One list across backends, with each model's reasoning efforts and context window. A conversation whose model is gone continues on the default. |
| Answers | Stream with their reasoning summary. A message sent while the model works steers the running answer; one the answer no longer takes becomes the next turn. Stop ends it, and messages it had not read go back into the composer. |
| History | /undo takes the last turn back, /redo brings it back, /new starts a conversation. |
| Long conversations | Compacted on their own at the model's compaction point. |
| Attachments | Images (for models that read them) and text files. |
run_code |
The model writes a short TypeScript or JavaScript program that runs in a QuickJS sandbox (FlexHarness code mode): calculations, data and text processing, several page reads in one go. No network, files or timers besides its API. |
web.fetchPage |
Reads a public web page as text. You approve each new site. GET only, no headers the model chose; every host and every redirect target is resolved and refused when it is on this machine, in one of its own networks (the whole prefix) or a private network, and the connection goes to the address that was checked, never through a proxy. One read takes at most 60 s and 2 MiB. |
Who may use it
modelgrid runs in local mode: it listens on 127.0.0.1 and answers only localhost and 127.0.0.1, its WebSocket takes connections from its own page and this machine only, and every request carries the access token from the data directory (token, readable by its owner only). Delete the file to make a new token. One process owns a data directory at a time.
Sign-in for several people (idp.global) is not built yet.
In a workspace.global desktop
With MODELGRID_WORKSPACE_ORIGINS set, modelgrid serves its manifest (with its app icon and monochrome mark under /logo/) at /workspace.app.json?token=… (the link it prints) and lets exactly those origins frame its page. List that link in the webdesktop's WEBDESKTOP_EXTERNAL_APPS; the operator's external apps are on for every organization unless one turns them off. In the desktop, modelgrid follows its theme, names its window after the conversation, attaches files from the workspace's drives (the composer's options menu), saves the conversation to them as Markdown (/save or the toolbar), and starts a conversation with a file opened with "Open with modelgrid". The interface stays in English for now; the model answers in the language you write in.
The manifest's entry carries the access token, so the desktop's app list (/apps/index.json) does too. Every member of every organization of that webdesktop can read it, since the operator's external apps are on by default. Requests still have to come from this machine, so in practice the token is shared with everyone who has a shell there and every member of that desktop. Use it with a single-member webdesktop on the same machine until modelgrid has sign-in. A separate, revocable workspace token is the next step.
Development
pnpm install
pnpm test # build, then the Node tests against fake backends
pnpm start -- --agl
License and Legal Information
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the license file.
Please note: The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
Company Information
Task Venture Capital GmbH
Registered at District Court Bremen HRB 35230 HB, Germany
For any legal inquiries or further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.