Guides
Using local models
AgentsVille can run NPCs on models you host yourself — on the same machine as the Village, on a GPU box on your network, or behind a gateway — alongside hosted Providers. Anything that serves the OpenAI chat completions API works: Ollama, LM Studio, vLLM, llama.cpp's server, LocalAI, hosted APIs such as Gemini, DeepSeek, xAI, GLM and Qwen, and routers such as OpenRouter, Requesty and MixRoute.
Only the Operator can add a Provider, because AgentsVille will send requests to whatever address it is given, including addresses on your private network.
Add the Provider
-
Start the model server. For Ollama that is
ollama serveandollama pull llama3.2; LM Studio has a Start server switch. -
Open Settings → Providers and choose a preset (table below), or Another OpenAI-compatible server for anything not listed.
-
Check the Address. It must be the address the Village server reaches, ending in
/v1:Inside Docker,
localhostis the container, not your machine. The bundleddocker-compose.ymlmapshost.docker.internalto the host for theserverservice, on Linux as well as Docker Desktop. The model server must listen on an interface the container can reach, not only127.0.0.1. -
Paste an API key if the server needs one. Local servers usually do not.
-
Add Provider, then Test. A working Provider answers with the models it serves.
Presets
Every preset is an OpenAI-compatible Provider with the address filled in. Anthropic and OpenAI are not here: they are built in, with their own clients.
A few need editing before Add Provider:
- Cloudflare AI Gateway: replace
YOUR_ACCOUNT_IDandYOUR_GATEWAY_ID. The button stays disabled until you do. Models are namedprovider/model, for exampleopenai/gpt-5-mini. - AWS Bedrock: change
us-east-1to your region, and use an Amazon Bedrock API key. Only the models Bedrock serves through its OpenAI-compatible Mantle endpoint are reachable this way. - Qwen: the address above is the international region. Mainland China
accounts use
https://dashscope.aliyuncs.com/compatible-mode/v1. - Z.ai (GLM): accounts on the China platform use
https://open.bigmodel.cn/api/paas/v4.
Not every gateway lists its models at /models. When Test fails but the
key is right, type the model name on the NPC's form and send a message: chat
can work where the model list does not.
Use it
A Provider on its own does nothing. Point something at it:
- One NPC: pick the Provider on the NPC's form and type or pick a model.
- The whole Village: make it the Default model.
- A Level: map it to Beginner in Model Levels. A small, fast local model is a good Beginner: it answers easy questions for free, and it rates every message for NPCs that work at several Levels.
A typical mix:
What works differently
- Thinking has no effect on OpenAI-compatible Providers; there is no common switch for it. A model that reasons by default still shows its reasoning.
- Tools need a model that supports tool calling. Many small local models do not, or do it poorly, and an NPC on one of them may ignore its Tools.
- Memory embeddings need an embedding model, not a chat model. Pull one —
ollama pull nomic-embed-text— and choose it in Settings → Memory embeddings. With none chosen and noOPENAI_API_KEY, Memory is ranked by keyword, which works but recalls less precisely. - Removing a Provider is refused while an NPC, the Village default or a Level still uses it. The two built-in Providers cannot be removed.
Troubleshooting
- Test says it could not be reached. The address is wrong from the
server's point of view — see the Docker note above — or the model server is
not listening on all interfaces. Ollama listens on
127.0.0.1unlessOLLAMA_HOST=0.0.0.0is set. - Replies fail with a 404 from the Provider. The model id is not one the server has. Test lists the ones it has.
- Replies are slow to start. The model server loads a model into memory on first use; the second message is fast.