Built a lightweight Python framework for local LLM roleplay (Ollama/Phi-3) to stop context drift. Looking for feedback.
Summary
A lightweight Python framework for local LLM roleplay using Ollama and Phi-3, featuring context preservation and native streaming to prevent character drift.
Similar Articles
I’ve been experimenting with making a local LLM feel like it actually lives on the machine
Neco is a local AI project built on Ollama and Open WebUI that treats the LLM as a persistent presence on the host machine, with read-only system awareness, a background daemon that generates idle thoughts, and experiments in episodic memory and evolving state.
Lesson learned: Ollama's per-request context window was a trap. Switching to llama.cpp made my local D&D-style AI RPG up to 13× faster
A developer of the local AI RPG 'Warrior Quest' replaced Ollama with llama.cpp's llama-server, cutting time-to-first-token by up to 13× by using per-stage prompt cache slots instead of Ollama's per-request context window, which forced costly model reloads.
Olla v0.1.0 - Lightweight open-source LLM proxy for homelabs & on-prem inference (Ollama, vLLM, SGLang, llama.cpp, oMLX with failover, sticky sessions & load balancing)
Olla v0.1.0 releases a lightweight open-source Go proxy that unifies multiple local LLM inference runtimes (Ollama, vLLM, SGLang, llama.cpp, MLX, etc.) behind a single endpoint with model-aware routing, load balancing, failover, sticky sessions, and OpenAI/Anthropic-compatible APIs. The update adds Hugging Face TEI support, a reworked dashboard, configurable retry behavior, and improved model capability detection.
I built a local LLM NPC backend focused on NPC-to-NPC conversations
The author built a locally running LLM backend that enables NPCs in games to engage in context-aware conversations autonomously, with support for memory and player-triggered mechanisms, without requiring pre-scripted dialogue.
Running local LLM's as agents in Claude Code
This article presents a custom MCP setup that enables offloading coding tasks from Anthropic's Claude models to local Qwen3.8-27B models within the same session, using tools like llama.cpp.