How sunilgentyala/laptopai-agent works
LaptopAI-Agent is a local laptop-management assistant with CLI and MCP entry points. Its primary workflow takes a user query through a LangGraph/Ollama reasoning loop, invokes guarded system or knowledge tools, and returns a response; tool activity is recorded in a chained audit log. Separate CLI workflows ingest documents, verify audit integrity, and clean browser history. The README also documents MCP research-analysis and SignalTrim tools. Their detailed handlers are not fully excerpted, so those capabilities are represented within the MCP surface without asserting unsampled internals.
Main entry points: server.py MCP Server · main.py CLI Commands · tools.py System Tools · history_cleaner.py History Cleaner
Components 14
User Entry
- CLI Commands
main.py - MCP Server
src/mcp/server.py
Agent Runtime
- Agent Loop
src/agent/graph.py - System Tools
src/agent/tools.py - Local Ollama
Local Knowledge
- Knowledge Base
src/rag/knowledge_base.py - ChromaDB Store
Security
- Permission Guard
src/security/permissions.py - Chained Audit Log
src/security/audit.py
Privacy Hygiene
- History Cleaner
src/privacy/history_cleaner.py - Browser Profiles
Other components
- User
- MCP Client
- SignalTrim
Connections 19
- User → CLI Commands: submits query
README.md - CLI Commands → Agent Loop: runs chat
main.py - Agent Loop → Local Ollama: invokes model
src/agent/graph.py - Agent Loop → System Tools: dispatches tools
src/agent/graph.py - System Tools → Knowledge Base: queries knowledge
src/agent/tools.py - System Tools → Permission Guard: checks access
src/agent/tools.py - System Tools → Chained Audit Log: records actions
src/agent/tools.py - CLI Commands → Knowledge Base: ingests documents
main.py - Knowledge Base → ChromaDB Store: stores and searches
src/rag/knowledge_base.py - MCP Client → MCP Server: calls tools
README.md - MCP Server → Knowledge Base: queries knowledge
src/mcp/server.py - MCP Server → Permission Guard: checks access
src/mcp/server.py - MCP Server → Chained Audit Log: records actions
src/mcp/server.py - CLI Commands → Chained Audit Log: verifies chain
main.py - CLI Commands → History Cleaner: runs cleanup
main.py - MCP Server → History Cleaner: runs cleanup
src/mcp/server.py - History Cleaner → Browser Profiles: backs up and clears
src/privacy/history_cleaner.py - History Cleaner → Chained Audit Log: records run
src/privacy/history_cleaner.py - MCP Server → SignalTrim: runs commands
src/mcp/server.py