[KongchangAI]
· 3 min read· 1,536 words

A 1B Model Drives a Desktop Pet: A Pragmatic AI Agent Architecture Experiment

A 1B Model Drives a Desktop Pet: A Pragmatic AI Agent Architecture Experiment

Felinquent uses a three-layer architecture to let a 1B model produce interesting rather than useful Agent behavior under rule constraints.

Felinquent is a desktop-pet-style AI Agent side project that demonstrates a pragmatic small-model Agent design philosophy. Its three layers are a 60fps pure-rule reflex layer for real-time interaction, a slow brain deciding every 20–60 seconds (optionally gemma3:1b via Ollama) for planning, and a governance layer with final veto power that double-validates before the model sees the menu and before each step executes. Key takeaway: the model is an enhancement, not a dependency—with Ollama off, a pure-rule brain still drives all behaviors.

When an AI Agent Stops Chasing "Usefulness"

A cat that strolls across your desktop window, naps on the Dock, and ignores you when you call it—this may be the most "useless" AI Agent you've ever seen. But it's precisely this side project, named Felinquent, that hides an Agent design approach worth taking seriously: let a small 1B-parameter model decide "what to do," and let the rules and governance layer decide "whether it can be done."

Screenshot of the original Reddit post

According to the original Reddit author, Felinquent can be a cat, fox, raccoon, or dog. Users can crank up the "chaos level," and it will slowly push a cup off the windowsill right in front of you. The project started out as just-for-fun, but the "brain" part evolved into a rather instructive Agent experiment: how to make a local small model with limited capabilities behave in an open environment in a way that's both entertaining and not out of control.

Three-Layer Architecture: Fast Reflexes, Slow Brain, and a Governance Layer

Felinquent's core design splits the system into three independent parts with clear boundaries of responsibility.

The Fast Layer: Pure-Rule Reflexes at 60fps

The first layer is the fast reaction layer, driving animal movement at 60fps and handling reflexive behaviors like petting and dragging, with no model involved at all. This guarantees immediacy of interaction and keeps model latency from dragging down the user experience.

The Slow Brain: One Decision Every 20–60 Seconds

The second layer is the slow brain, which decides "what to do" once every 20 to 60 seconds, or triggers immediately when an event occurs. It can connect to the gemma3:1b local model running via Ollama. The author emphasizes a key principle: never wait on the model. On an M-series Mac, model response times are about 4 seconds (p50) and 6.7 seconds (p95), so the animal keeps moving while the model thinks; if the plan the model returns is already stale (say, you just threw a toy or gave a treat), the plan is discarded; and when the model is too slow or fails, the rule system takes over planning.

Ollama is an open-source framework for running large language models locally. It lets developers load and run inference on various open-source models (such as Llama, Gemma, Mistral, etc.) on their own machines via command line or API, without relying on cloud services. It abstracts away the complexity of the underlying inference engine and hardware adaptation, providing a unified REST interface, and is often used for privacy-sensitive or offline Agent prototyping. The gemma3:1b mentioned here is the 1-billion-parameter version of Google's Gemma 3 generation pulled via Ollama, suitable for low-latency operation on consumer hardware—but with limited reasoning ability, which is exactly why the author emphasizes that "the model only does local planning."

The Governance Layer: Always Empowered to Say "No"

The third layer is the governor, sitting between the fast layer and the slow brain and holding final veto power. It filters options before the model even sees the menu, and checks again before each step is executed—because the window the plan intends to sit on may have already moved.

Five Lessons for Making a 1B Model "Behave"

The author distilled several hands-on lessons from taming the small model, which are instructive for building any LLM Agent.

Never Let the Model Invent Actions Out of Thin Air

The model receives a menu already filtered by the rules and can only pick from it. The JSON schema is rebuilt on every call, and actions and targets can only be currently legal values. This design also conveniently makes prompt injection harmless—the model cannot output anything outside the menu.

JSON Schema here refers to the constraint specification that describes "what the model is allowed to output" in structured JSON, typically used together with an LLM's structured output / function calling capabilities. Dynamically rebuilding the schema on every call means the set of legal actions changes in real time with the current environment (interactable objects, reachable positions, governor filtering results), and the model can only choose action names and targets within the range enumerated by the schema. Compared with parsing free text after the fact and then validating it, this approach of "constraining the output space up front" eliminates from the source the possibility of the model fabricating nonexistent actions or targets, and also ensures that even a successful prompt injection cannot produce unauthorized behavior.

Don't Hand Big Decisions to a Small Model

Initially the model chose the "bout" (rest, explore, play, socialize, mischief). But in the author's evaluation, the model followed the body's choice only 36% of the time, and even at the craziest level, with a vase sitting right there on the windowsill, it never once chose mischief. After switching to the body choosing the bout and the model only planning 1 to 3 steps within it—combined with better situational summaries—the number of distinct actions in evaluation rose from 13 to 22.

Check Twice

The governor filters once before the model sees the menu, and checks again before each step begins. This double validation compensates for the time gap between planning and execution.

Describe the Screen from the Animal's Perspective

Screen information is described in text from the animal's point of view, e.g., "the pointer is a little to my front-left, and it's moving." Only application names are used, never window titles, and screen contents are never read. A complete request is about 1,000 to 1,300 tokens.

Prompt Injection refers to an attacker embedding instructions in inputs the model can read (such as web content, file names, chat messages) to induce the model to deviate from its assigned task and perform unauthorized operations. If a traditional Agent maps model output directly to actions, an injection attack could cause real harm. Felinquent's defense does not rely on content detection but is architectural: the model can only choose from a legal action menu pre-filtered by the governance layer, and target values are also constrained by the schema, so even if injected text changes the model's "thoughts," it cannot output actions outside the menu—making the injection degrade into harmless noise.

Accept That a Small Model Can't Write Good Lines

The model also generates a small thought bubble, but only about one in ten sentences from gemma3:1b passes the filter (it must relate to what it's currently thinking about and not drift off to sunshine or smells), with the rest replaced by pre-written lines. Calls are rate-limited to once every 15 seconds and 60 times per hour, using roughly 20 to 40 calls during an awake hour.

Degradation Design and Engineering Details

When Ollama is turned off, a pure-rule brain plans from the same menu, and all actions still happen—the model is an enhancement, not a dependency. This degradation design keeps the project fully usable even without a model environment.

The project is currently at an early hobbyist stage: it supports macOS 13+, and the Windows version has only been tested in a virtual machine; it is not yet signed with an Apple Developer ID, so macOS will show a warning on first run. Install counts are tallied anonymously once per day and can be disabled with one click. Art assets are AI-assisted, and the code is released on GitHub as source-available and free for personal use.

Implications for Small-Model Agents

Felinquent's value isn't in being "useful" but in demonstrating a pragmatic philosophy of division of labor: a small model doesn't need to be omnicompetent; it just needs to make interesting choices within a constrained option space. The rule layer handles safety and real-time behavior, the governance layer handles legality validation, and the model handles injecting a bit of surprise within the legal range.

The question the author poses at the end of the post is also worth pondering for anyone building an Agent: in your Agent, how is the work divided between the model and pure rules? For scenarios that are locally deployed, have limited compute, and need to run for long periods, this three-layer structure of "model planning + rules as fallback + governance veto" may be more reliable than letting a large model do everything.

Project address: https://github.com/abozaralizadeh/Felinquent

One-line Summary

Felinquent uses a three-layer architecture to let a small 1B model produce interesting rather than useful Agent behavior under rule constraints.

Paragraph Summary

Felinquent is a desktop-pet-style AI Agent side project whose value lies in demonstrating a pragmatic design philosophy for small-model Agents. The system is split into three layers: a 60fps pure-rule reflex layer that guarantees real-time interaction, a slow brain that decides every 20–60 seconds (optionally connecting to gemma3:1b on Ollama) responsible for planning, and a governance layer with final veto power that double-validates both before the model sees the menu and before each step executes. The author summarizes five lessons: don't let the model invent actions, don't let a small model make big directional decisions, check twice, describe the screen from the animal's perspective, and accept that a small model can't write good lines. The key conclusion is that the model is an enhancement rather than a dependency—with Ollama turned off, a pure-rule brain can still drive all behaviors.

#AI Agent#small language model#Ollama#gemma3:1b#prompt injection#desktop pet#agent architecture
Share:

Related articles