The read-plan-approve-execute loop

Key facts

Fact Detail
Question answered How do AI agents work with my local files?
Short answer AI agents work with local files through a permission-based tool loop: the agent lists and reads files relevant to your task, plans the changes, shows you a proposed diff or action list, and executes only after…
Reading time ~2 min

First the agent explores: what files exist, what is relevant. Then it plans concrete actions. You approve. Then it executes and reports. This loop is what makes agents safe enough to trust with real work.

What data leaves your machine

Only the task context — the files and commands relevant to what you asked — is sent to the AI service. Everything else stays local. For privacy-sensitive work, desktop clients like MOOGH keep processing on your side wherever possible.

Reviewing what changed

After execution, the agent summarizes the changes and the results. You can ask it to adjust, revert specific actions, or continue — the history is always available.

Related reading: