LocalAgent is a local-first agent runtime for connecting on-machine LLMs to MCP tools with explicit safety controls, replayable artifacts for persistent workflows, and a guided path to first success.
It is built for the hard part of local agents: getting from curiosity to a working workflow without fighting provider setup, unsafe defaults, or opaque failures.
Use it to inspect a repo, summarize files, call MCP tools with approvals, and review resulting artifacts locally when you use persistent state.
Most friction in local agents is operational.
People are curious about local models, tool calling, MCP, coding workflows, and agent loops, but the path from interest to a successful run is still brittle. Provider setup is inconsistent. Tool permissions are easy to misconfigure. Trust boundaries are often unclear. When runs fail, it is often hard to tell what happened or why.
LocalAgent narrows that gap with a guided local-first runtime that keeps side effects explicit, runtime behavior visible, and persistent runs inspectable, while still supporting serious MCP-based workflows.
As of v0.5.0, the core runtime is materially stronger for coding workflows: completion and validation behavior are more runtime-owned, one-shot runs default to isolated ephemeral state unless you opt into persistence, and the repo includes broader eval and local-model investigation surfaces for measuring coding-task reliability.
What you get:
Start a supported local provider first, then run LocalAgent in the project directory you want to work in.
# 1) Install from the repo root
cargo install --path . --force
# 2) Launch LocalAgent in the workspace you want to work in
localagent
State behavior depends on the command path:
.localagent/ under the workdirrun / exec default to an ephemeral temp state dir whenever you do not set --state-dirrun / exec also default to --no-session unless you pass session-related settings explicitlyIf you want persistent artifacts for one-shot runs, pass --state-dir <path> explicitly.
If your provider starts after LocalAgent is already open, press R in the startup screen to refresh provider detection.
Global flags come before subcommands.
localagent --provider ollama --model llama3.2 --prompt "Summarize src/main.rs" run
localagent --provider ollama --model llama3.2 chat --tui
localagent --provider ollama --model llama3.2 --prompt "Summarize src/main.rs" run
localagent --provider ollama --model llama3.2 chat --tui
localagent doctor --provider ollama
localagent doctor --provider lmstudio
localagent doctor --provider llamacpp
localagent --trust on --provider ollama --model llama3.2 chat --tui
Enable shell and write tools only when you intentionally want side effects.
LocalAgent is designed to make side effects explicit.
--allow-shell-in-workdir is a narrower shell mode than --allow-shell: it allows shell only with a cwd that stays under the current workdirrun / exec keep artifacts only when you pass --state-dirThe goal is not to remove every restriction. It is to make local agents usable without hiding risk.
You want a safe, guided way to learn how local providers, tools, MCP, approvals, and runtime loops fit together.
You want to prototype MCP-powered workflows on your own machine without starting in a large framework.
You want explicit trust controls, replayable runs, evals, and operational clarity while iterating on serious agent workflows.
Before running LocalAgent, start your provider and make sure a model is available.
http://localhost:11434http://localhost:1234/v1llama-server with a loaded modelhttp://localhost:8080/v1cargo build --release
Binary output:
target/release/localagent.exetarget/release/localagentcargo install --path . --force
Prebuilt binaries are available in GitHub Releases.
For full install, updates, Windows troubleshooting, and verification steps, see:
These are mainly for contributors changing shared runtime behavior.
Issues, feedback, and contributions are welcome.
If you are interested in local-first agent runtimes, MCP workflows, trust controls, and reproducible agent systems, you are in the right repo.
Start here:
MIT
$ claude mcp add LocalAgent \
-- python -m otcore.mcp_server <graph>