<

The Local First Movement And AI

Published: 2024-06-17

The current state of AI in 2024 is, simply put, autocompletion. Coding agents are still relatively useful, but they cannot manage a repository on their own. They are great at small code segments and DSA though. So, could this be the end of LeetCode? I'm only half joking.

I think the more interesting question is what these agents will need once they get better. And that's where local-first comes in.

What agents will want to see

In the future, AI will be able to look at its own logs and outputs. Not just the final answer, but every step it took to get there: the failed tool calls, the files it opened, the errors it hit, the user who said "no, do it again."

Right now, setting everything on the cloud makes that hard for an agent to manage. The state it needs is scattered across services, each with its own API, its own auth, and its own weird little quirks. An agent trying to reason about a system it can only see through a dozen dashboards is basically a person debugging with one eye closed.

Local-first as an abstraction

So why local-first? Because the abstraction of local-first, or an on-premise machine, makes it easier for an agent to reason about. Everything is in one place. The files are files. The logs are logs. The process is a process you can actually inspect.

Local-first isn't a new term. Martin Kleppmann and colleagues at Ink & Switch laid out the principles back in 2019: software that gives you both collaboration and ownership, with seven ideals like working offline, lasting a long time, keeping your data private, and staying under your control. Their sharpest observation is that in a cloud app, the server holds the authoritative copy and your local copy is just a cache. If a change never reaches the server, it "didn't happen." That's a strange world to ask an agent to reason in.

The AI could simply develop in the local environment without worrying about the abstraction of the cloud when everything is basically synced anyway. Local-first software already assumes that data lives with you and syncs when it can. That's a much simpler world model than "the data lives in six regions and four queues and might be eventually consistent." The Ink & Switch paper points to CRDTs, conflict-free replicated data types, as the foundation for making that sync story work. From an agent's perspective, that's a big deal: the sync is boring and deterministic, so the agent can spend its context on the task instead of on reconciling state.

This is already an issue for current AI: state between too many things is hard for them to keep up with. Give a human a messy distributed system and they'll muddle through with intuition. Give a model the same system and every hidden state is another thing it has to hold in context. Every layer of abstraction you add is another thing the agent has to guess.

I'm not saying the cloud is going away. I'm saying that as models get better at writing code, the best place for them to write it might be the simplest place: a machine where everything is local, visible, and synced. Sometimes the boring answer is the future.

References