I Integrated Local AI into Spacemacs — Here's How It Works

A month and a half ago, I barely knew anything about AI. Now I’ve got Mythomax, LLaMA 3, and OpenHermes all running locally — fully integrated into my Spacemacs workflow. This isn’t just a fun experiment. It’s a working system. I use it to think, write, develop ideas, and build a movie script — all without relying on cloud-based tools, locked-down chatbots, or terms of service I didn’t agree to. And no — I don’t have a \$10,000 workstation. This setup runs on a single GPU. And it works. 1. My Setup Machine specs: 32GB RAM RTX 3070 Linux Mint Local AI stack: Ollama (model runner) Mythomax, LLaMA 3, OpenHermes Spacemacs (Emacs + Vim hybrid) This isn’t a multi-GPU monster rig. It’s a reasonably powerful desktop — and it runs 13B parameter models just fine. It’s not blazing fast, but it’s fast enough to work with, think with, and produce results that matter. Why go local? Ownership — I control the model, the interface, and the process. Privacy — Nothing goes to OpenAI, Meta, or anyone else. Speed — No API latency. No server load balancing. Just raw inference — consistent and responsive on my own machine. It’s not magic. It’s software. And it’s mine. 2. Prompting Like a Poweruser This is where Spacemacs shines. I don’t switch tabs, copy-paste between apps, or rely on some remote API with hidden behavior. I hit a keybinding — SPC a i. (Space A I) And if you’ve never thought about where the “space” in Spacemacs came from… Here’s what that combo unlocks: Context injection — The entire buffer becomes part of the prompt. System prompt loading — Personas are defined locally in ~/.config/ai-profile.el. What’s a persona? It’s a way of setting the system prompt — the initial instructions that guide how the model responds. Not a gimmick, not a character overlay — just a clear set of behavioral rules. A persona defines the model’s tone, priorities, and working style. Editor. Analyst. Writing coach. Dry humorist. You decide what role it should take, and the model follows your lead. Here’s an example: (setq ai/system-prompt "You are a blunt, concise editor. Prioritize clarity. Avoid filler.") This tells the model: tight answers, no fluff, focus on clarity. Change the file, reload the prompt, and the behavior shifts. No retraining. No restart. The user determines the rules. Not the platform. Not the vendor. You. Output insertion — Replies appear in the document, clearly marked. Prompt logging — Stored in ~/.ai_prompt_history.org, trimmed to the last 50 entries. It doesn’t connect to the internet. Not now, and probably never. I’m not trying to shut down OpenAI or fight the future. But if anyone’s worried about AI becoming sentient and taking over the world, I’m doing my part to make that less likely — by keeping it small, local, and fully under control. And if my machine ever does start threatening to expose my secrets — (as if I had any) — I’ll just shut it down. Simple. 3. Every File Is a Chat — and That Changes Everything In most online AI setups, you’re typing into a temporary interface — a web chat, maybe a floating history. It’s session-based, abstract, and mostly out of your hands. In my system? Every file is a conversation. A screenplay draft. A research outline. A strategy doc. Each becomes a persistent, editable dialogue between me and the model — one I control line by line. Want to cut a bad reply? Delete it. Want to shift tone? Rewrite the lead-in. Want to explore a new idea? Just type and prompt again. I don’t “clear chat history.” I edit the memory. And I mean that literally. The file I’m working on is the memory. Not some invisible context window. Not a server-side buffer. Just text. On my screen. In my hands. What the model sees next is based entirely on what I’ve written — and what I’ve left out. If I don’t want it to remember something, I delete it. If I want it to focus on something, I move that part closer. If I want to shift the tone or direction, I revise the surrounding lines. That’s a new concept for everyone. And it changes everything. There’s more to be discovered — I’m sure of it. But this much is clear already: More people need to start using AI this way. Locally. User-controlled. With a purpose. Not as entertainment. Not as a chatbot. As a tool you shape — not something that shapes you. And of course, with any use of AI, anywhere, for any reason: Watch the OUTPUT! This is why you see so much “AI writing” that is obviously AI writing. Why so many meme-style ideas feel half-baked — like they almost work, but not quite. It’s the uncanny valley of thought. Poor artistry. Cut corners. Prompts written by people who want to be writers but have never written anything. The tool isn’t the problem. It’s the lack of craft. 4. The Editable Mind: Writable Memory and Swappable Personas Local AI doesn’t have memory — unless you give it one. And that’s the advantage. The file is the memor

May 11, 2025 - 23:26
 0
I Integrated Local AI into Spacemacs — Here's How It Works

A month and a half ago, I barely knew anything about AI. Now I’ve got Mythomax, LLaMA 3, and OpenHermes all running locally — fully integrated into my Spacemacs workflow.

This isn’t just a fun experiment. It’s a working system. I use it to think, write, develop ideas, and build a movie script — all without relying on cloud-based tools, locked-down chatbots, or terms of service I didn’t agree to.

And no — I don’t have a \$10,000 workstation.
This setup runs on a single GPU. And it works.

1. My Setup

Machine specs:

  • 32GB RAM
  • RTX 3070
  • Linux Mint

Local AI stack:

  • Ollama (model runner)
  • Mythomax, LLaMA 3, OpenHermes
  • Spacemacs (Emacs + Vim hybrid)

This isn’t a multi-GPU monster rig.
It’s a reasonably powerful desktop — and it runs 13B parameter models just fine. It’s not blazing fast, but it’s fast enough to work with, think with, and produce results that matter.

Why go local?

  • Ownership — I control the model, the interface, and the process.
  • Privacy — Nothing goes to OpenAI, Meta, or anyone else.
  • Speed — No API latency. No server load balancing. Just raw inference — consistent and responsive on my own machine.

It’s not magic. It’s software. And it’s mine.

2. Prompting Like a Poweruser

This is where Spacemacs shines.

I don’t switch tabs, copy-paste between apps, or rely on some remote API with hidden behavior. I hit a keybinding — SPC a i.

(Space A I)

And if you’ve never thought about where the “space” in Spacemacs came from…

Here’s what that combo unlocks:

  • Context injection — The entire buffer becomes part of the prompt.
  • System prompt loadingPersonas are defined locally in ~/.config/ai-profile.el.

What’s a persona?
It’s a way of setting the system prompt — the initial instructions that guide how the model responds. Not a gimmick, not a character overlay — just a clear set of behavioral rules.

A persona defines the model’s tone, priorities, and working style. Editor. Analyst. Writing coach. Dry humorist. You decide what role it should take, and the model follows your lead.

Here’s an example:

(setq ai/system-prompt
  "You are a blunt, concise editor. Prioritize clarity. Avoid filler.")

This tells the model: tight answers, no fluff, focus on clarity.

Change the file, reload the prompt, and the behavior shifts. No retraining. No restart.
The user determines the rules.
Not the platform. Not the vendor. You.

  • Output insertion — Replies appear in the document, clearly marked.
  • Prompt logging — Stored in ~/.ai_prompt_history.org, trimmed to the last 50 entries.

It doesn’t connect to the internet.
Not now, and probably never.

I’m not trying to shut down OpenAI or fight the future. But if anyone’s worried about AI becoming sentient and taking over the world, I’m doing my part to make that less likely — by keeping it small, local, and fully under control.

And if my machine ever does start threatening to expose my secrets —
(as if I had any) —
I’ll just shut it down.

Simple.

3. Every File Is a Chat — and That Changes Everything

In most online AI setups, you’re typing into a temporary interface — a web chat, maybe a floating history. It’s session-based, abstract, and mostly out of your hands.

In my system?

Every file is a conversation.

A screenplay draft. A research outline. A strategy doc.
Each becomes a persistent, editable dialogue between me and the model — one I control line by line.

  • Want to cut a bad reply? Delete it.
  • Want to shift tone? Rewrite the lead-in.
  • Want to explore a new idea? Just type and prompt again.

I don’t “clear chat history.”
I edit the memory.

And I mean that literally.

The file I’m working on is the memory.
Not some invisible context window. Not a server-side buffer.
Just text. On my screen. In my hands.

What the model sees next is based entirely on what I’ve written — and what I’ve left out.
If I don’t want it to remember something, I delete it.
If I want it to focus on something, I move that part closer.
If I want to shift the tone or direction, I revise the surrounding lines.

That’s a new concept for everyone.

And it changes everything.

There’s more to be discovered — I’m sure of it. But this much is clear already:

More people need to start using AI this way.
Locally. User-controlled. With a purpose.

Not as entertainment. Not as a chatbot.
As a tool you shape — not something that shapes you.

And of course, with any use of AI, anywhere, for any reason:

Watch the OUTPUT!

This is why you see so much “AI writing” that is obviously AI writing.
Why so many meme-style ideas feel half-baked — like they almost work, but not quite.
It’s the uncanny valley of thought. Poor artistry. Cut corners. Prompts written by people who want to be writers but have never written anything.

The tool isn’t the problem.
It’s the lack of craft.

4. The Editable Mind: Writable Memory and Swappable Personas

Local AI doesn’t have memory — unless you give it one.
And that’s the advantage.

The file is the memory. You control what it sees by controlling what you keep, what you move, and what you prompt with.

Even better — I can load personas from a simple Elisp file:

;; ~/.config/ai-profile.el
(setq ai/system-prompt
  "You are a blunt, concise editor. Prioritize clarity. Avoid filler.")

Switch the file — switch the role.
Logical analyst, narrative partner, dry humorist — whatever I need.

This isn’t role-play. This is functional character shaping — defined by you, not by the provider.

The difference is subtle, but powerful:
I'm not asking the AI to pretend it's someone.
I'm telling it how to behave, what to prioritize, and why it's here.

And no matter who the persona is, or how creative the task becomes:

Watch the OUTPUT!

Because the model still doesn’t know what matters — you do.

5. A Million Words, Finally the Right Tools

I’m a writer. I’ve written over a million words — mostly emails, sure, but a million words is a million words.

I’ve spent years looking for a writing environment I could be happy with. I experimented with Spacemacs years ago — the power was obvious, but the complexity kept me at a distance. I’m not a developer. I never learned to code. I’m technically minded, but I speak editor, not engineer.

Then AI entered the picture.

I saw that ChatGPT-4o could put text into images and thought, maybe I could make cartoons? Or something like that. And from there, I went a little nuts. I dove deeper. I wasn’t just playing with prompts — I was chasing possibilities.

I’m still not a coder.
But I’ve been a Linux-on-the-desktop guy for over 20 years — and I believe in freedom.

And slowly, I started to dream.
Dream about AI on the desktop.
Independent. Local. User-controlled.
No telemetry. No corporate agenda. No API watching over my shoulder.

I’d started writing about local AI — about how it’s just software. About how we need to stop hallucinating, not just in what the models output, but in how we think about them. We don’t need AI gods. We need good tools. Tools we can run, understand, and walk away from.

That’s what Spacemacs became for me — once I wired in Mythomax. Not just an editor. Not just a playground. A place where I could think. Build. Write.

Now I’m using it to write a movie — scene by scene, buffer by buffer. AI helps. But it doesn’t decide.

And when it spits out something off?

I watch the output.
I cut it.
I move on.

Because that’s what this is.
My machine.
My tools.
My work.

6. Final Word

We don’t need AI gods.
As if that’s even possible.

AI is not alive. It’s not sentient. It’s just code.
And yeah — intelligence is something.
But it’s definitely not everything.

Ask your mom.

7. After Word

(put this in the document literally i'll fill it in later)

And, here I am filling it in, so yeah, an AI did that ALL for me...

How?
I don't know, you tell me?
Can an AI just "write" anything, without user feedback?

"Watch the Output!" should be the directive and the critism of any AI work, if you can tell it was created by an AI then it was - too much of it was anyway.

ChatGPT "helped" me with this piece and that is all.

And, that is it for for ChatGPt.

For me.

I gotta stand by my plan, and that is to focus on locally powered AI!

You may not believe me when I say this, and I wouldn't blame you if you didn't, but I literally cancelled my subscription to ChatGPT within minutes of completing this,

I'm going to miss it, but there's so much to discover with local AI, I have to focus on that for now.

And, I'm NOT going to be the one who releases SKYNET on the world!