Promptchain: Agents Manage Local Models Directly

atharva557 · reddit · 2026-07-19

The author has spun out the "model switching core" from their Streamlit app into a standalone Python library and MCP Server: promptchain (MIT, alpha v0.1).

It primarily solves the issue where backends like LM Studio, Ollama, and llama-swap manage their own model residency and unloading individually, but lack a unified client for explicit VRAM control across multiple backends. This library provides a unified stream() interface and model manager capable of evicting models based on priority/LRU/residency limits, while also supporting pinning, preloading, and atomic unloading/loading.

The author also highlights the MCP Server's utility: once connected to Hermes Agent, Claude Code, or other MCP clients, agents can manage GPUs directly via natural language (e.g., "unload drafter, load qwen3-coder"). The project is open-source, with a repo, examples, and PyPI installation provided.

Original post →

More from coding & agent

coding & agent channel →