Latch

Modules

AI Handler

A language model on your own Ollama, speaking as your Handler โ€” a line a day, a few actions under the grants you tick, and a chat that is talk only. The address is checked on every call, it never reaches the internet, it sees only facts and your own words, and it stops the moment you say the safeword.

On this page

๐Ÿค– The AI Handler is your Handler with a voice: a language model running on your own computer (through Ollama), reading the day's facts every few hours and saying what your Handler would say โ€” and, if you let it, doing a little of what your Handler would do. It lives on AI in the menu.

It is optional, it is off until you set it up, and it never replaces the rules: the rule-based line on your Handler page always stands, whatever the model says or fails to say.

Important

Your AI Handler is not a witness. It runs on your box, so it cannot vouch for you to anybody โ€” nothing it does signs a paper. Papers get a second signature only from a pack's Handler on another box (Your Pup ID).

Setting it up

  1. Run Ollama somewhere that is yours: this machine, or another on your own network. Pull a model you like โ€” one that runs on that machine. These three answer the way Latch asks (each has passed the live test, tests/test_ai_live.py, against a real Ollama):
Model Download Good for
dolphin3 4.9 GB, 8B the place to start: small, quick, and built uncensored, so it is the least likely to balk at the game
gemma4 9.6 GB, 8B a mainstream model that runs on most machines
qwen3.8:27b-mlx 18 GB, 27B the strongest of the three โ€” Apple Silicon only (Ollama's MLX runner), on a Mac with 32 GB of memory or more

Any other model Ollama runs may work; these are the ones known to. A cloud model (a name ending :cloud, or one Ollama says runs elsewhere) is refused, whatever it is called โ€” see the guard. 2. Settings โ†’ AI Handler. Give it:

Setting What to put there
Ollama's address plain http with the port, e.g. http://127.0.0.1:11434 for this machine, or http://10.0.0.10:11434 for another on your network
Model its name exactly as Ollama lists it, e.g. dolphin3:latest
Overlay network 1 only if the address is on your own VPN overlay (a 100.64.0.0/10 address) โ€” see below
Think every N minutes how often it reads the day (default 180; 0 = only when you press Think now; otherwise 15 minutes at the least and 7 days at the most โ€” 5 reads as 15)
Keep the model loaded how long Ollama keeps the model in memory after a call (keep_alive). Blank = your cycle plus 10 minutes, so the next cycle finds it warm โ€” a 27B model answers in 1โ€“2 s instead of 8โ€“10 s; a number is yours (up to 8 days); 0 frees the GPU right after each call, for a machine other things need
Model calls a day the most it may ask the model, cycles and chat together โ€” each chat turn is one call (default 24, at most 500)
Lines a day the most it may say on your Handler page (default 3, at most 10), under the cap you give Say a line on Consent

and set Switched on to 1. 3. Check it. Check the address and model (on Settings or on the AI page) runs the guard below right now and tells you what answered. It works only once it is switched on โ€” while it is off it calls nothing, not even to check โ€” and, like everything else here, not while you are packing to move or the disk is nearly full. 4. Grant it things on Consent. Nothing is ticked for you. With nothing granted it can read today's duties and your streak and say nothing and do nothing โ€” which is a fine way to start.

Note

The address is http, not https, this round โ€” keep it on this machine or your own network. "Your own network" means exactly: this machine (127.x, ::1), the private ranges a home router hands out (10.x, 172.16โ€“172.31, and the one most routers use), link-local, and IPv6 unique-local (fc00::/7). Addresses that only look private are refused โ€” the ranges that tunnel to the internet (6to4, Teredo, NAT64), the documentation and reserved ranges, and 198.18.0.0/15, where a proxy app's "fake IP" mode puts every name before sending it somewhere else. An address on a VPN overlay (the 100.64.0.0/10 range some mesh VPNs hand out) is refused until you set Overlay network to 1 to say that overlay is yours.

The guard, on every call

Before every cycle and every chat turn โ€” never cached, never trusted from last time โ€” it checks, in order, and refuses with no call to the model if any fails:

Refused Because
hosted it is a hosted instance (the host's network is not yours)
url the address is not http://host:port โ€” https, a name or password, a path or a query
resolve the name could not be looked up
address any address the name gives is not on this machine or your own network (the ranges above) โ€” it never calls the internet
overlay an overlay address, and you have not said the overlay is yours
down, tags, shape nothing answered, or not the way Ollama does
redirect the server answered with a redirect โ€” never followed
peer the connection reached a different address than the one checked (a name that changed its answer mid-call)
model the model is not on that server under exactly that name
cloud the model's name ends :cloud or -cloud โ€” Ollama would send everything to its own servers
remote the server says the model runs somewhere else

It connects to the address it checked, not the name, and confirms the socket reached that address before sending a byte. Every refusal is written in the AI page's log.

What it sees

Facts, and only words you wrote:

Under a grant, and only then:

Granted It also sees
The clock time left and when the lock ends โ€” not while the timer is hidden
The clock of a hidden lock the same, for a hidden lock (you still are not told) โ€” in its thinking only, never in chat
Your toys / Your gear the names and kinds of all your owned toys, or gear (up to 40 of each) โ€” the whole category, not items you pick
Read reflections โ€” chat only your last few reflections, in chat only, never while paused

Never: anybody else's words (a playset's titles, a Handler's lines or prompts, its own earlier prompts), your reflections outside chat, and nothing from your health data except one yes/no โ€” go gently today โ€” which makes it kind and makes its line unrepeatable anywhere else.

The AI page shows exactly what the next thought will send (with a hidden lock's clock kept from you, since you chose not to know it).

What it can do

Whatever it proposes is only asked for: each action walks the same checks a pack's Handler's command does โ€” the safeword, the grant, the daily cap, the ceiling, a recovery day โ€” and a refusal is written in your log.

Action Needs What happens
a line Say a line shown on your Handler page, at most Lines a day
add time Add time minutes on your clock, within the cap and the ceiling
freeze / unfreeze Freeze the clock timed freezes only; it may lift only its own
training Assign training an ad-hoc task with no reward and no penalty โ€” or an order naming one of your habits, completed by logging it
a prompt Write a prompt tomorrow's reflection, check-in or mantra question
maintenance Schedule maintenance when your hygiene maintenance slots are (at most 6) and how long they run (10โ€“60 min). It sees the slots and this week's counts, scheduled and emergency, and never when or how long you were out. It can never touch the emergency window. A line it writes while seeing this is never relayed

It can also post on a profile of its own โ€” showing you off, or showing you up โ€” if you set one up and grant it: Your Handler's profile. Each post is a draft you approve unless you grant Post without asking too.

It can never unlock you, take time off, undo, lock you, spin the wheel, write your words or change what you granted โ€” those things do not exist to be granted. Its actions earn no XP and never keep a streak alive.

Its lines

A line is screened before it is kept:

Only a line that passes all of these is marked relay-safe; everything else stays on your box.

Chat

Talk to it on the AI page. It is talk only โ€” nothing you say or it answers changes the game. It gets the same facts as a cycle, the last eight turns of your conversation, and โ€” only if you granted Read reflections โ€” chat only, and never while paused โ€” your last few reflections (as many as the grant says, each cut at 1,500 characters). A reply it wrote knowing something you have since taken back โ€” your reflections after a pause or a revoke, your kit, the clock โ€” is left out of the turns it is sent again, so it cannot quote your words back to itself. Replies are at most 800 characters; each turn counts as one of the day's model calls. The AI page's log names what each turn was shown (clock, kit, reflections โ€ฆ) โ€” the names, never the contents โ€” so you can see exactly when your reflections went to the model.

Chat is never shown a hidden lock's clock, whatever you granted: a reply goes straight to you, and you chose not to know. While your lock is hidden, a reply that talks about time shows masked on the AI page all the same.

From the chat bot's room, too โ€” !ask <anything> โ€” once you switch on Talk to your AI Handler here on Consent (off to start with). It is the same conversation, not a second one: the same history, the same grants, the same budget, and the AI page shows each turn said there marked in the room. Its answers land in the room as it wrote them โ€” your kit by name, what it made of your reflections โ€” because you chose to let them: the model is yours, and so is the room. Whoever runs that room's homeserver can read them. Two things the room never gets whatever you switch on: a hidden lock's time (masked, as here), and an answer written knowing what you have since paused (it waits here). How the bot does it: the chat bot.

Budgets and stopping it

When the model is down

The game never waits for a model. A cycle that gets no answer changes nothing; a chat turn answers "Your Handler is away from the phone. The rules still stand: โ€ฆ" with your Handler's own line, under your words on the AI page. If your Ollama only starts when you log in, the AI Handler simply waits.

AI kennels

A pack can also be run by an AI kennel โ€” somebody else's box whose Pup ID says it is an AI. That is a different thing from your own AI Handler: everything you grant it is read by a language model on the kennel operator's computer, which you cannot check. Every signature it makes says it is an AI, and the collar ceremony asks you to say you understand that first.

What its model reads. For each collared member, once every Think every N minutes and one model call each (inside the day's call budget), only what a person's kennel view shows: the card that member's box signed for its Handler โ€” its duties worked out as they leave the box, so nothing about health โ€” their signed grants, and the codes of their box's last twenty answers (the last answers โ€” commands still waiting for an answer never push them out). Nothing else of a pup is on the kennel's box to read. Signatures and the photos' identifiers are left out: a model cannot check a signature. A badge a playset awarded is shown as from a playset, never by its title โ€” its author's words never reach a model.

What it may do. Say a line and ask for at most three commands, in the same shape and through the same checks as your own AI Handler's. Each is clamped to what that member granted, less what the den already sent them today, and queued like any Handler's command โ€” the member's box decides, through its own consent ladder, and answers with a code. A model that is down queues nothing; a line that tells the time of a lock the card says is hidden applies nothing from that reply. A member who paused, granted it nothing to do, or took the collar off is asked nothing at all. When their box answers that a command is over its cap for the day, the kennel stops asking for it until the next day. (A member's all-grants daily ceiling, or a recovery day, reaches the kennel only as refused โ€” on purpose, it cannot tell them apart โ€” so it may ask again.) A card of the wrong shape is refused when it arrives, and one member the kennel cannot read never stops it thinking about the others.

Running one. Make a Pup ID as an AI Handler, host a pack handled by it (Packs), and set its Ollama up in Settings โ†’ AI Handler exactly as above โ€” the same guard, on the kennel's own box. Membership is let in automatically; a collar still waits for the operator to compare the pup's fingerprint. Countersignatures are automatic and say ai. The operator cannot send commands by hand: an AI kennel's commands come from its model. The AI page on that box lists its collared members, why any of them is not being asked, and what the model did. Switching it off stops it at once: the kennel asks its own switches โ€” off, the operator's safeword, Prepare to move, a nearly full disk โ€” again before every member, again after the check of its model, and again when a reply arrives; a reply that arrives after any of them queues nothing.

On your box, its lines read "๐Ÿค– Byte (AI Handler) said" โ€” masked like any Handler's while your lock is hidden.

What leaves your box

Only the calls above, to the address you set, and only once it is set up and switched on โ€” the footer then says reaches out: ai. With no address, or switched off, it calls nothing. Your chat, its replies and its log stay in your database (the full backup carries them; the share export never does) โ€” and the turns you say in the chat bot's room, with Talk to your AI Handler here on, are in that room as well.


This page also ships inside the app, at /guide โ€” so your own instance always serves the guide for the version you are running, with the internet unplugged. Get Latch ยท Something wrong here? Tell me.