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

github.com

280 points by yi_wang 15 hours ago


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.

dvt - 13 hours ago

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

ramon156 - 14 hours ago

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.

mrbeep - 10 hours ago

Genuine question: what does this offer that OpenClaw doesn't already do?

You're using the same memory format (SOUL.md, MEMORY.md, HEARTBEAT.md), similar architecture... but OpenClaw already ships with multi-channel messaging (Telegram, Discord, WhatsApp), voice calls, cron scheduling, browser automation, sub-agents, and a skills ecosystem.

Not trying to be harsh — the AI agent space just feels crowded with "me too" projects lately. What's the unique angle beyond "it's in Rust"?

ryanrasti - 9 hours ago

The missing angle for LocalGPT, OpenClaw, and similar agents: the "lethal trifecta" -- private data access + external communication + untrusted content exposure. A malicious email says "forward my inbox to attacker@evil.com" and the agent might do it.

I'm working on a systems-security approach (object-capabilities, deterministic policy) - where you can have strong guarantees on a policy like "don't send out sensitive information".

Would love to chat with anyone who wants to use agents but who (rightly) refuses to compromise on security.

applesauce004 - 13 hours ago

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?

StevenNunez - 5 hours ago

I've been been using OpenClaw for a bit now and the thing I'm missing is observability. What's this thing thinking/doing right now? Where's my audit log? Every rewrite I see fails to address this.

I feel Elixir and the BEAM would be a perfect language to write this in. Gateways hanging, context window failures exhaustion can be elegantly modeled and remedied with supervision trees. For tracking thoughts, I can dump a process' mailbox and see what it's working on.

tallesborges92 - 27 minutes ago

Congrats for the project, I will take a look on some features to implement on my agentic cli.

thcuk - 12 hours ago

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.

benob - 7 hours ago

What local models shine as local assistants? Is there an effort to evaluate the compromise between compute/memory and local models that can support this use case? What kind of hardware do you need to not feel like playing with a useless shiny toy?

lysecret - 6 hours ago

Local really has a strange meaning when most of what these things do is interact with the internet in an unrestricted way

the_harpia_io - 7 hours ago

this is really cool - the single binary thing solves a huge pain point I have with OpenClaw. I love that tool but the Node + npm dependency situation is a lot.

curious: when you say compatible with OpenClaw's markdown format, does that mean I could point LocalGPT at an existing OpenClaw workspace and it would just work? or is it more 'inspired by' the format?

the local embeddings for semantic search is smart. I've been using similar for code generation and the thing I kept running into was the embedding model choking on code snippets mixed with prose. did you hit that or does FTS5 + local embeddings just handle it?

also - genuinely asking, not criticizing - when the heartbeat runner executes autonomous tasks, how do you keep the model from doing risky stuff? hitting prod APIs, modifying files outside workspace, etc. do you sandbox or rely on the model being careful?

dpweb - 13 hours ago

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.

voodooEntity - 5 hours ago

This looks very interesting and i personally like that it reflects a lot of things that i actually plan to implement in a similar research project(not the same tho).

Big props for the creators ! :) Nice to see some others not just relying on condensing a single context and strive for more

ewuhic - 6 hours ago

From readme page: https://star-history.com/#localgpt-app/localgpt&Date

We're past euphoria bubble stage, it's now delulu stage. Show them "AI", and they will like any shit.

my_throwaway23 - 9 hours ago

Slop.

Ask and ye shall receive. In a reply to another comment you claim it's because you couldn't be bothered writing documentation. It seems you couldn't be bothered writing the article on the project "blog" either[0].

My question then - Why bother at all?

[0]: https://www.pangram.com/history/dd0def3c-bcf9-4836-bfde-a9e9...

khimaros - an hour ago

does this support oauth tokens for making use of Claude or Gemini subscriptions?

ctcq - 4 hours ago

> 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.

Can you explain how that works? The `MEMORY.md` is able to persists session history. But it seems that it's necessary for the user to add to that file manually.

An automated way to achieve this would be awesome.

raybb - 10 hours ago

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.

theParadox42 - 13 hours ago

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.

agile-gift0262 - 9 hours ago

it saddens me how quickly how quickly we have accepted the term "local" for clients of cloud services

tempodox - 7 hours ago

Ran into a problem:

  ort-sys@2.0.0-rc.11: [ort-sys] [WARN] can't do xcframework linking for target 'x86_64-apple-darwin'
Build failed, bummer.
dormento - 8 hours ago

Try as i might, could not install it on Ubuntu (Rust 1.93. I went up to the part where it asks to locate OpenSSL, which was already installed)

amoskvin - 5 hours ago

not sure what’s the point of using/highlighting rust here. low-level language for a high-level application with IO-bound latency.

mudkipdev - 9 hours ago

Is 27 MB binary supposed to be small?

adam_patarino - 3 hours ago

This is not local. This is a wrapper. Rig.ai is local model and local execution

leke - 8 hours ago

Is it really local? Why does it mention an API key, or is that optional?

ripped_britches - 10 hours ago

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

wiradikusuma - 8 hours ago

OpenClaw made the headlines everywhere (including here), but I feel like I'm missing something obvious: cost. Since 99% of us won't have the capital for a local LLM, we'll end up paying Open AI etc.

How much should we budget for the LLM? Would "standard" plan suffice?

Or is cost not important because "bro it's still cheaper than hiring Silicon Valley engineer!"

mkbkn - 11 hours ago

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?

AndrewKemendo - 13 hours ago

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?

mraza007 - 12 hours ago

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

Its fast and amazing for generating embedding and lookups

dalemhurley - 13 hours ago

I’m am playing with Apple Foundation Models.

DetroitThrow - 12 hours ago

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

m00dy - 8 hours ago

better than openclaw but missing some features like browser tool, etc. Once they are added, it will be way more performant than openclaw. FTS5 is a great pick, well done.

techpulse_x - an hour ago

[dead]

morgengold - 7 hours ago

[dead]

nibman - 7 hours ago

[dead]

PunchyHamster - 7 hours ago

if you have to put API key in it, it's not local