Products Open Source Blog About Us Contact Us Sign in
lac agent: The Coding Assistant That Remembers Your Project

lac agent: The Coding Assistant That Remembers Your Project

Most AI coding assistants forget everything the moment you close the chat. lac agent doesn't — it keeps a live memory of your project and lets you undo any change with a full diff preview.

The problem with stateless AI assistants

Every time you start a new chat with a generic AI coding tool, you're back to square one. You paste your schema, re-explain your folder structure, remind it which framework you're using, and hope it doesn't contradict what it said twenty minutes ago in a different tab. It's exhausting, and it burns tokens on context that shouldn't need repeating.

I spent way too long doing that before I switched to lac agent full-time. The difference isn't just speed — it's that the agent actually knows what it's working on.

What lac agent actually is

lac agent is the agentic coding assistant inside lac-cli. You run it from your terminal inside any project directory and it can read files, write files, run HTTP requests, track tasks, and remember context between sessions. It's not a chat window bolted onto a file browser — it operates directly in your project the way a junior dev sitting next to you would.

To start it, just run:

lac agent

It spins up in your current directory. From there you can ask it to build a feature, fix a bug, generate an endpoint, or plan out a refactor — in plain English.

Project memory: .lac-memory.json

The first time lac agent runs in a project, it creates a .lac-memory.json file at the root. This is where it stores persistent context — the stuff it's learned about your project that it should carry into future sessions.

Things that end up in memory include the tech stack it detected, architectural decisions you've discussed, file paths it's touched, and task history. You can open the file and read it yourself — it's plain JSON, not some opaque binary blob. You can also edit it manually if you want to correct something or add a note you know will be useful later.

What this means in practice: when you come back the next morning and run lac agent again, it already knows you're on a Django project with a PostgreSQL backend, that the auth module lives in apps/users/, and that you're halfway through adding a rate-limiting middleware. You don't re-explain any of that.

It sounds like a small thing. It's not. The context bootstrapping alone probably saves me 10–15 minutes on every session where I'm picking up mid-task work.

PlanMode: think before you touch anything

One thing I learned to use early on is PlanMode. Before the agent writes a single file, you can tell it to plan first:

Plan: add a password reset flow with email token verification

The agent lays out what it intends to do — which files it'll create, which it'll modify, what the logic will look like. You review the plan, push back on anything that looks wrong, and only then tell it to proceed.

This matters more than it sounds. AI agents that just start writing can go off in the wrong direction for three or four files before you notice something's off. PlanMode makes it a two-step process: think, then act. You catch bad assumptions before they propagate.

I always use PlanMode for anything that touches more than one file. For small, isolated changes I'll skip it, but for features that span models, routes, and tests — always plan first.

Undo/redo with diff preview

This is the feature that stopped me from being nervous about letting the agent write to real files.

Every change lac agent makes is tracked. If you don't like what it did, you type /undo and it shows you a full diff of what's about to be reverted before it does anything. You can review the exact lines being removed and restored, confirm, and the files go back to their previous state.

There's also /redo if you undo something and change your mind. The whole system works like a lightweight local version history that's scoped specifically to what the agent touched — not your full git history, just the agent's actions in that session.

Before this existed, I was committing before every agent session just so I had a clean restore point. Now I don't have to do that paranoid commit dance. The undo system handles it.

HTTP request runner and task tracking

Two other things worth knowing about that don't get talked about enough:

  • HTTP request runner: you can ask the agent to hit an endpoint directly from the session — useful for testing what it just built without switching to Postman or curl. It shows you the response inline.
  • Task tracking: you can give it a list of things to do and it tracks progress through them. Useful when you're building something with multiple moving parts and want to keep the agent focused.

Choosing your model

lac agent works with Claude, OpenAI, or a local Ollama model — your choice. Config lives in ~/.lac/config.json. I run Claude for complex refactors and a local Ollama model when I'm on a plane or want to keep things private. The switch is a one-line config change, no reinstall needed.

A practical starting workflow

Here's how I open every new feature session:

  • Navigate to my project root
  • Run lac agent
  • Start with a plan: "Plan: [describe the feature]"
  • Review the plan, ask questions if anything looks off
  • Say "proceed" and watch it write
  • Use /undo if anything goes sideways

That's it. The memory means I skip the setup preamble. The plan step means I'm not chasing a runaway agent. The undo means I'm not scared to let it work on real files.

If you haven't installed lac-cli yet, pip install lac-cli gets you there in about 30 seconds. The agent is the part I use every single day — more than any other tool in the suite.

We use cookies to keep you signed in and to serve ads via Google AdSense. By continuing to use this site you agree to our Privacy Policy.