Hi r/LocalLLaMA!! I'm the developer of Alpine Code, an MIT-licensed desktop coding agent. https://preview.redd.it/6sojix81f2uh1.png?width=3104&format=png&auto=webp&s=5cc5d899ca6c79ad10b454e4243f02c0fc5c3ac5 You can connect a local model, open a project folder, and ask it to work on your code. The app shows proposed edits and commands for approval, along with the changes it made. GitHub, demo, and screenshots: https://github.com/TGoddessana/alpine-code Why I built it?! there are claude code, codex, opencode, pi ... I wanted control over the harness all the way down: the agent loop, the tools exposed to the model, how tool calls execute, and when the agent asks for permission. I also wanted a desktop app where I could inspect tools, test them, review edits, and use the agent without working through a terminal. Here's the actual coding loop from the project: @loop(until=is_answered, limit=TURN_LIMIT) async def coding(agent: Agent, state: State) -> None: await acompact_if_full(agent, state) await agent.athink(state) if state.pending_calls: await agent.ause_tools(state) Each turn compacts the context if needed, calls the model, and executes any pending tool calls. It stops when the model returns an answer without tool calls, with a limit of 200 turns. Permission checks happen during tool execution. This uses alpineagents, the library Alpine Code is built on. The loop is short because those operations live in the library. Both projects are open source, so you can follow the implementation further down. Tools are Python functions You can write custom tools in the desktop app. The function name, type hints, and docstring define the interface the model sees. For example, a desktop mouse-click tool can look like this: # /// script # dependencies = ["pyautogui"] # /// from alpineagents import tool @tool(read_only=False, open_world=True) def computer_click(x: int, y: int) -> str: """Click a position on the desktop. Args: x: Horizontal screen coordinate in pixels. y: Vertical screen coordinate in pixels. """ import pyautogui pyautogui.click(x, y) return f"Clicked at ({x}, {y})" This adds a mouse-click action. A computer-use setup also needs tools for observing the screen, typing, and pressing keys. On macOS, desktop automation requires the relevant system permissions. The tool editor lets you inspect what the model will see and try the tool before saving it. Dependencies are declared in the same file using PEP 723 inline metadata. You can add tools for your own applications and workflows this way. Local models and tool profiles Alpine Code supports Ollama, LM Studio, vLLM, and other OpenAI-compatible endpoints. You can switch models during a conversation. Tool profiles let you choose which tools each model and project gets. You can experiment with a focused tool set for a smaller local model or enable desktop automation for a particular project. I'd be interested in hearing which tool configurations work well with the local models people use here. The desktop app Open a project folder and describe a task. The agent can read files, edit code, and run commands to check its work. The app asks for approval before edits and commands, displays file diffs and command history, and reads AGENTS.md or CLAUDE.md for project instructions. Conversations and model credentials are stored on your computer. Requests go directly to your configured endpoint. Alpine Code doesn't require an account or route requests through its own backend. The desktop app and agent core are both available under the MIT license. Download https://github.com/TGoddessana/alpine-code/releases/latest The desktop app currently supports Apple-silicon Macs running macOS 11 or later. Windows support is planned. If you try it with a local model, I'd appreciate feedback on tool-calling reliability, useful custom tools, and reproducible failures. Please include the model and server you're using. English isn't my first language, so I used a GPT model to translate this post. Any feedback is welcome!! thanks!   submitted by   /u/TGoddessana [link]   [comments]