Fully local autonomous AI agent for laptop management. LangGraph reasoning loop, Ollama local LLM, ChromaDB RAG, MCP server, and a SHA-256 chained audit log. Zero API keys. Zero cloud calls.
Ask it anything about your machine. It reasons, calls tools, and answers — entirely on your hardware, with every action cryptographically logged.
Multi-step planning with tool use via a LangGraph StateGraph. Up to 10 agentic iterations per query, with a ToolNode for parallel tool dispatch and automatic loop termination.
Default qwen2.5-coder:7b for high tool-calling accuracy. No internet, no API key, no data ever leaves localhost:11434. Swap models in one line of config.
Ingest git repos, configs, logs, and docs. Retrieve relevant context at inference time via cosine similarity over all-MiniLM-L6-v2 embeddings — also running fully locally.
Exposes 5 tools to Claude Desktop and Claude Code over stdio transport. One config block and Claude can query your system, repos, and knowledge base from any conversation.
Every tool call passes through PermissionGuard before execution. Path allowlist, blocked system dirs, command allowlist, manual approval for destructive ops, 100 MB write cap, 30s timeout.
Every agent action writes to logs/audit.jsonl as a hash chain — each entry commits the SHA-256 of the previous entry. Any historical modification is detectable.
A LangGraph loop ties together a local LLM, a RAG layer, system tools, and an audit trail — all on your machine.
┌─────────────────────────────────────────────────────────────────────────┐
│ User / MCP Client │
│ (CLI chat or Claude Desktop) │
└─────────────────────────────────────┤───────────────────────────────────┘
| query
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ LangGraph Agent Loop │
│ │
│ ┌──────────┐ tool_calls? ┌────────────────┐ │
│ │ agent │ ────────────► │ ToolNode │ │
│ │ (LLM) │ ◄──────────── │ (LangChain) │ │
│ └──────────┘ tool results └────────────────┘ │
│ │ │ │
│ max 10 iters Permission Guard + Audit Log │
│ │ │
│ ▼ Final response │
└─────────────────────────────────────────────────────────────────────────┘
| | |
▼ ▼ ▼
┌──────────────────┐ ┌───────────────────┐ ┌────────────────────┐
│ Ollama (localhost) │ │ ChromaDB (RAG) │ │ System Tools │
│ │ │ │ │ │
│ qwen2.5-coder:7b │ │ all-MiniLM-L6-v2 │ │ psutil, git, │
│ temperature=0.1 │ │ cosine similarity │ │ pathlib, subprocess │
│ NO API KEY │ │ 512-token chunks │ │ Permission Guard │
└──────────────────┘ └───────────────────┘ └────────────────────┘
| Tool | Description | Permission | MCP |
|---|---|---|---|
| get_system_status | CPU %, memory %, disk free, battery %, boot time, platform | Read | ✓ |
| list_gitrepos | All repos under C:\Gitrepos with remote URL and current branch | Read | ✓ |
| run_git_status | git status --short for a named repo | Read (path check) | ✓ |
| list_running_processes | Top N processes ranked by CPU usage via psutil | Read | ✓ |
| read_file | Read any text file ≤ 2 MB from an allowed path | Read (allowlist) | ✗ |
| write_file | Write content to a file in an allowed path | Write (allowlist) | ✗ |
| query_knowledge_base | Semantic search over ingested documents — top-k cosine hits | Read | ✓ |
A local agent with file-write access is a high-privilege process. LaptopAI-Agent treats it that way from the ground up.
Allowed write paths: C:\Gitrepos, C:\Users\Sunil\Documents, C:\Users\Sunil\Desktop
Blocked paths: C:\Windows\System32, C:\Program Files
Allowed commands: git, python, pip, npm, node, powershell, Get-ChildItem …
Manual approval for: rm, Remove-Item, Format-*, reg delete
Max file write: 100 MB • Max execution time: 30 seconds
Any violation raises PermissionError and the tool call is blocked — the LLM never sees the result.
Every agent action writes to logs/audit.jsonl as a hash chain. Each entry commits the SHA-256 of the previous entry, making any historical modification immediately detectable. Run python main.py verify-audit to check the full chain integrity at any time.
LLM inference runs via Ollama at localhost:11434. Embeddings run via sentence-transformers locally. Vector store is ChromaDB on disk at ./data/chroma_db/. The audit log is a local file. No tokens, queries, files, or embeddings are ever sent over the network.
| Feature | Cloud AI (ChatGPT / Claude API) | Local LLM (no agent) | Cloud LLM + Agent | LaptopAI-Agent |
|---|---|---|---|---|
| Runs fully offline | ✗ | ✓ | ✗ | ✓ |
| Zero API keys | ✗ | ✓ | ✗ | ✓ |
| Multi-step tool use | ✓ | ✗ | ✓ | ✓ |
| RAG over local files | ✗ | ✗ | partial | ✓ |
| MCP integration | partial | ✗ | partial | ✓ |
| Cryptographic audit trail | ✗ | ✗ | ✗ | ✓ SHA-256 |
| Permission enforcement | ✗ | ✗ | ✗ | ✓ |
| Swap models in config | ✗ | ✓ | ✗ | ✓ |
Pull a local model, install dependencies, start chatting. No API key, no signup, no data leaving your machine.
ollama pull qwen2.5-coder:7b git clone https://github.com/\ sunilgentyala/LaptopAI-Agent cd LaptopAI-Agent pip install -r requirements.txt
python main.py chat python main.py status python main.py repos python main.py verify-audit
python main.py ingest \ C:\Gitrepos python main.py chat > What does the ZKP-RA circuit enforce at the policy layer?
// claude_desktop_config.json
{
"mcpServers": {
"laptop-ai": {
"command": "python",
"args": ["main.py","mcp"],
"cwd": "C:\\...\\LaptopAI-Agent"
}
}
}
Swap models with one line in config.yaml — no code changes needed.
| Model | Size | Strength |
|---|---|---|
| qwen2.5-coder:7b ⭐ | ~4.7 GB | Tool calling, code reasoning — default |
| llama3.2:3b | ~2.0 GB | Lightweight, fast responses |
| mistral:7b | ~4.1 GB | General reasoning, instruction following |
| deepseek-r1:7b | ~4.7 GB | Multi-step planning, math |
Track LaptopAI-Agent's growth on GitHub.
A star helps other developers who want local-first, privacy-respecting AI agents find this project. No cloud required — ever.