Core concepts
A short tour of the building blocks of Loach. Read this once and the rest of the docs will make a lot more sense.
Local-first
Loach is a desktop app, not a web service. There is no account, no telemetry, no required network access. Your chats and content live in a local SQLite file in your user data directory. API keys are kept in your operating system's credential manager, not in plain text on disk. See Storage & privacy for the full picture.
Providers
A provider is where Loach sends a request when you submit a prompt. Loach supports two kinds:
- Ollama — a local Ollama server running on your machine (or elsewhere on your network).
- OpenAI-compatible — any HTTP endpoint speaking the OpenAI Chat Completions protocol: OpenAI itself, llama.cpp, LM Studio, vLLM, LiteLLM, Groq, OpenRouter and so on.
Both are available side-by-side and you switch between them from the chat header. See Providers for setup details.
Chats
A chat is a single conversation. Chats appear in the sidebar and are persisted locally. Each chat remembers:
- The provider and model used.
- Per-chat sampling parameters (see below).
- Custom instructions, persona and tone.
- Any attachments and the assembled context.
Chats you no longer want in the sidebar can be moved to the archive — they're not deleted, just hidden until you bring them back.
Spaces
A Space is a folder of chats that share context — instructions, reference files and memory. Use a Space when several chats orbit the same topic: a codebase, a research question, an ongoing piece of writing.
Anything you set on the Space (system prompt, attached files, default model) becomes the starting point of every new chat created inside it. Individual chats can still override those values.
Snippets
A Snippet is a saved, reusable prompt. Optionally pin a model to it, then click Run to open a fresh chat pre-filled with the prompt and ready to send. Snippets are great for:
- Frequently used templates ("summarize this transcript", "review this diff").
- Multi-paragraph prompts you don't want to re-type.
- Bookmarking a prompt + model pair that gives consistently good results.
Per-chat parameters
Every chat exposes a parameter sidebar where you can override sampling and runtime settings without touching the model itself. The most useful ones:
| Parameter | What it does |
|---|---|
temperature | Randomness. Lower = more deterministic. |
top_k / top_p / min_p | Truncate the token distribution at sampling time. |
max_tokens | Cap on output length for this turn. |
context length | How much conversation history is sent on each request. |
| System prompt | Per-chat system message, layered over global instructions. |
Values are layered: a chat's value wins over a model default, which wins over the Modelfile default.
Personas and tones
A Persona is a role the model takes on — Code Reviewer, Translator, ELI5, and so on. A Tone is the delivery style — Direct, Detailed, Casual, Formal, Playful, Skeptical, Socratic, and more. Both are layered on top of your custom instructions and can be set globally or per-chat. See Personas and tones for details.
Custom instructions
Free-text instructions that get injected into the system prompt. Set them at three levels:
- Global — applied to every chat unless overridden.
- Space — applied to every chat in a Space.
- Chat — applied to this chat only.
Context
The "context" is the message history Loach sends to the model on each turn. You can:
- Export it to JSON or Markdown.
- Paste exported context — or any text — into a different chat to seed it.
- Attach URLs that get fetched and inlined (see Web fetch).
- Have current date, time, weekday and timezone injected automatically (see Temporal awareness).
MCP servers
Loach speaks the Model Context Protocol. You can register an MCP server (Streamable HTTP), test the handshake and inspect the tools it provides. Once registered, those tools become available to the model during a chat. See MCP support for the details.