138

Show HN: LocalGPT – A local-first AI assistant in Rust with persistent memory

I built LocalGPT over 4 nights as a Rust reimagining of the OpenClaw assistant pattern (markdown-based persistent memory, autonomous heartbeat tasks, skills system).

It compiles to a single ~27MB binary — no Node.js, Docker, or Python required.

Key features:

- Persistent memory via markdown files (MEMORY, HEARTBEAT, SOUL markdown files) — compatible with OpenClaw's format - Full-text search (SQLite FTS5) + semantic search (local embeddings, no API key needed) - Autonomous heartbeat runner that checks tasks on a configurable interval - CLI + web interface + desktop GUI - Multi-provider: Anthropic, OpenAI, Ollama etc - Apache 2.0

Install: `cargo install localgpt`

I use it daily as a knowledge accumulator, research assistant, and autonomous task runner for my side projects. The memory compounds — every session makes the next one better.

GitHub: https://github.com/localgpt-app/localgpt Website: https://localgpt.app

Would love feedback on the architecture or feature ideas.

So weird/cool/interesting/cyberpunk that we have stuff like this in the year of our Lord 2026:

   ├── MEMORY.md            # Long-term knowledge (auto-loaded each session)
   ├── HEARTBEAT.md         # Autonomous task queue
   ├── SOUL.md              # Personality and behavioral guidance
Say what you will, but AI really does feel like living in the future. As far as the project is concerned, pretty neat, but I'm not really sure about calling it "local-first" as it's still reliant on an `ANTHROPIC_API_KEY`.

I do think that local-first will end up being the future long-term though. I built something similar last year (unreleased) also in Rust, but it was also running the model locally (you can see how slow/fast it is here[1], keeping in mind I have a 3080Ti and was running Mistral-Instruct).

I need to re-visit this project and release it, but building in the context of the OS is pretty mindblowing, so kudos to you. I think that the paradigm of how we interact with our devices will fundamentally shift in the next 5-10 years.

[1] https://www.youtube.com/watch?v=tRrKQl0kzvQ

4 hours agodvt

You absolutely do not have to use a third party llm. You can point it to any openai/anthropic compatible endpoint. It can even be on localhost.

3 hours agohalJordan

Ah true, missed that! Still a bit cumbersome & lazy imo, I'm a fan of just shipping with that capability out-of-the-box (Huggingface's Candle is fantastic for downloading/syncing/running models locally).

3 hours agodvt

Ah come on, lazy? As long as it works with the runtime you wanna use, instead of hardcoding their own solution, should work fine. If you want to use Candle and have to implement new architectures with it to be able to use it, you still can, just expose it over HTTP.

3 hours agoembedding-shape

I think one of the major problems with the current incarnation of AI solutions is that they're extremely brittle and hacked-together. It's a fun exciting time, especially for us technical people, but normies just want stuff to "work."

Even copy-pasting an API key is probably too much of a hurdle for regular folks, let alone running a local ollama server in a Docker container.

an hour agodvt

> but I'm not really sure about calling it "local-first" as it's still reliant on an `ANTHROPIC_API_KEY`.

See here:

https://github.com/localgpt-app/localgpt/blob/main/src%2Fage...

3 hours agoatmanactive

What reasonable comparable model can be run locally on say 16GB of video memory compared to Opus 4.6? As far as I know Kimi (while good) needs serious GPUs GTX 6000 Ada minimum. More likely H100 or H200.

8 minutes agonodesocket

> Say what you will, but AI really does feel like living in the future.

Love or hate it, the amount of money being put into AI really is our generation's equivalent of the Apollo program. Over the next few years there are over 100 gigawatt scale data centres planned to come online.

At least it's a better use than money going into the military industry.

31 minutes agofy20

LoL, don't worry they are getting their dose of the snakeoil too

15 minutes agopwndByDeath

[dead]

an hour agoIhateAI

Pro tip (sorry if these comments are overdone), write your posts and docs yourself (or at least edit them).

Your docs and this post is all written by an LLM, which doesn't reflect much effort.

4 hours agoramon156

counterargument: I always hated writing docs and therefore most of thing that I done at my day job didn't had any and it made using it more difficult for others.

I was also burnt many times where some software docs said one thing and after many hours of debugging I found out that code does something different.

LLMs are so good at creating decent descriptions and keeping them up to date that I believe docs are the number one thing to use them for. yes, you can tell human didn't write them, so what? if they are correct I see no issue at all.

2 hours agoSzpadel

> if they are correct I see no issue at all.

Indeed. Are you verifying that they are correct, or are you glancing at the output and seeing something that seems plausible enough and then not really scrutinizing? Because the latter is how LLMs often propagate errors: through humans choosing to trust the fancy predictive text engine, abdicating their own responsibility in the process.

As a consumer of an API, I would much rather have static types and nothing else than incorrect LLM-generated prosaic documentation.

2 hours agoDonaldPShimoda

Can you provide examples in the wild of LLMs creating bad descriptions of code? Has it ever happened to you?

Somehow I doubt at this point in time they can even fail at something so simple.

Like at some point, for some stuff we have to trust LLMs to be correct 99% of the time. I believe summaries, translate, code docs are in that category

2 hours agojack_pp

This happens to me all the time. I always ask claude to re-check the generated docs and test each example/snippet, sometimes more than once; more often than not, there are issues.

19 minutes agoaforwardslash

> Can you provide examples in the wild of LLMs creating bad descriptions of code? Has it ever happened to you?

Yes. Docs it produces are generally very generic, like it could be the docs for anything, with project-specifics sprinkled in, and pieces that are definitely incorrect about how the code works.

> for some stuff we have to trust LLMs to be correct 99% of the time

No. We don’t.

an hour agohalfcat

> which doesn't reflect much effort.

I wish this was an effective deterrent against posting low effort slop, but it isn't. Vibe coders are actively proud of the fact that they don't put any effort into the things they claim to have created.

3 hours agobakugo

Github repo that is nothing but forks of others projects and some 4chan utilities.

Professional codependent leveraging anonymity to target others. The internet is a mediocrity factory.

3 hours agog0h0m3

The masses yearn for slop.

an hour agoIhateAI_6

[flagged]

3 hours agoproblynought

EE with decades of experience here. You have valid points (SWE tedium, LLMs allowing adjacent technical fields to access SW/FW work without involving SWEs) that are completely lost because you're being an asshole for no good reason.

3 hours ago0_____0

Awwww...

A look at OPs post-history, projection back of the low-effort they give seems pretty reasonable.

5 minutes agoy4wn0KMurica

People have already fried that part of their brain, the idea of writing more than a couple sentences is out of the question to many now.

These plagiarism laundering machines are giving people a brain disease that we haven't even named yet.

an hour agoIhateAI_6

Oh cmon, at least try to signal like you're interested in a good-faith debate by posting with your main account. Intentionally ignoring the rules of HN only ensures nobody will get closer to your belief system.

an hour agoSeanAnderson

Can someone explain to me why this needs to connect to LLM providers like OpenAI or Anthropic? I thought it was meant to be a local GPT. Sorry if i misunderstood what this project is trying to do.

Does this mean the inference is remote and only context is local?

3 hours agoapplesauce004

It doesn't. It has to connect to SOME LLM provider, but that CAN also be local Ollama server (running instance). The choice ALWAYS need to be present since, depending on your use case, Ollama (local machine LLM) could be just right, or it could be completely unusable, in which case you can always switch to data center size LLMs.

The ReadMe gives only a Antropic version example, but, judging by the source code [1], you can use other providers, including Ollama, just by changing the syntax of that one config file line.

[1] https://github.com/localgpt-app/localgpt/blob/main/src%2Fage...

3 hours agoatmanactive

It doesn't need to

3 hours agohalJordan

Fails to build

"cargo install localgpt" under Linux Mint.

Git clone and change Cargo.toml by adding

"""rust

# Desktop GUI

eframe = { version = "0.30", default-features = false,

features = [ "default_fonts", "glow", "persistence", "x11", ] }

"""

That is add "x11"

Then cargo build --release succeeds.

I am not a Rust programmer.

3 hours agothcuk

Did you consider adding cron jobs or similar or just sticking to the heartbeat? I ask because the cron system on openclaw feels very complex and unreliable.

36 minutes agoraybb

You too are going to have to change the name! Walked right into that one

20 minutes agoripped_britches

Made a quick bot app (OC clone). For me I just want to iMessage it - but do not want to give Full Disk rights to terminal (to read the imessage db).

Uses Mlx for local llm on apple silicon. Performance has been pretty good for a basic spec M4 mini.

Nor install the little apps that I don't know what they're doing and reading my chat history and mac system folders.

What I did was create a shortcut on my iphone to write imessages to an iCloud file, which syncs to my mac mini (quick) - and the script loop on the mini to process my messages. It works.

Wonder if others have ideas so I can iMessage the bot, im in iMessage and don't really want to use another app.

3 hours agodpweb

Beeper API

2 hours agobravura

I am excited to see more competitors in this space. Openclaw feels like a hot mess with poor abstractions. I got bit by a race condition for the past 36 hours that skipped all of my cron jobs, as did many others before getting fixed. The CLI is also painfully slow for no reason other than it was vibe coded in typescript. And the errors messages are poor and hidden and the TUIs are broken… and the CLI has bad path conventions. All I really want is a nice way to authenticate between various APIs and then let the agent build and manage the rest of its own infrastructure.

4 hours agotheParadox42

Given the fact that it is only a couple of months old, one can assume things would break over here and there for some time before investing heavily.

37 minutes agodbacar

Non-tech guy here. How much RAM & CPU will it consume? I have 2 laptops - one with Windows 11 and another with Linux Mint.

Can it run on these two OS? How to install it in a simple way?

an hour agomkbkn

I love how you used SQLite (FTS5 + sqlite-vec)

Its fast and amazing for generating embedding and lookups

3 hours agomraza007

It doesn't build for me unfortunately. I'm using Ubuntu Linux, nothing special.

2 hours agoDetroitThrow

edit cargo.toml and add "x11" to eframe.

See my post above.

an hour agothcuk

I’m am playing with Apple Foundation Models.

3 hours agodalemhurley

Properly local too with the llama and onnx format models available! Awesome

I assume I could just adjust the toml to point to deep seek API locally hosted right?