mwill20/PersonalProductivityAgent
If you are the rightful owner of PersonalProductivityAgent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Personal Productivity Agent is a Python-based tool designed to enhance productivity on Windows systems by leveraging Large Language Models (LLMs) for intelligent analysis.
analyze_windows_event_logs
Analyzes Windows Event Logs and provides LLM-based insights and suggested fixes.
Personal Productivity Agent
Overview
The Personal Productivity Agent is a Python-based tool designed to assist with various tasks on a Windows system and leverage the power of Large Language Models (LLMs) for intelligent analysis. It can operate as an interactive command-line assistant or as a backend server component for integration with orchestrators.
Features
The agent currently offers the following capabilities:
- Interactive File System Operations:
- Find files
- Move files (with confirmation)
- Rename files (with confirmation)
- Create directories (with confirmation)
- System Information & Utilities:
- Get disk usage, memory info, CPU info, network info
- Launch applications
- Find duplicate files
- Productivity Tools:
- Summarize documents (currently uses a mock LLM for this CLI feature)
- Get upcoming calendar events from
.ics
files - Set desktop reminders/notifications
- Windows Event Log Analysis (with LLM Integration):
- Fetch Windows Event Logs based on specified criteria (log names, levels, time range).
- Utilize Google's Gemini LLM to analyze event log entries, provide explanations, suggest potential causes, troubleshooting steps, and a safe command-line fix.
Modes of Operation
The agent can run in two distinct modes:
1. Interactive CLI Mode
- How to Run:
python main_agent.py
- Description: In this mode, the agent presents a menu-driven interface directly in your PowerShell or command prompt. You can select various actions, and the agent will prompt you for necessary inputs and display results directly. This mode is intended for direct user interaction.
2. MCP (Multi-Capability Protocol) Server Mode
- How to Run:
python main_agent.py --mcp-mode
- Description: When started in MCP mode, the agent runs as a background process, listening for JSON-formatted requests on its standard input (stdin) and sending JSON-formatted responses to its standard output (stdout).
- Purpose: This mode is designed for programmatic integration. Other applications or orchestrators (like a TypeScript-based agent or a central automation system) can communicate with this Python agent by sending it standardized JSON messages to invoke its capabilities.
- Example MCP Tool: The
analyze_windows_event_logs
functionality is exposed via MCP. An orchestrator can send a JSON request specifying event log parameters, and the agent will return a JSON response containing the LLM's analysis, a suggested command, and whether the command requires administrator privileges. - Benefits:
- Automation: Allows other systems to use the agent's features automatically.
- Modularity: Enables building specialized agents that can be orchestrated by a central controller.
- Structured Data Exchange: Ensures reliable communication between software components using JSON.
Key Technologies
- Python 3.x
- Google Gemini LLM: Used for intelligent analysis of event logs.
- Requires a
GEMINI_API_KEY
environment variable to be set for authentication. If not set, the agent will indicate that it's using a mock LLM for features requiring it.
- Requires a
- MCP (Multi-Capability Protocol): A simple JSON-based protocol over stdio for inter-process communication in server mode.
Setup and Requirements
- Python: Ensure Python 3.x is installed.
- Dependencies: Install necessary Python packages. The primary one for LLM interaction is
google-generativeai
. Arequirements.txt
file would typically list all dependencies.pip install google-generativeai # Potentially other packages like 'plyer' for notifications
- API Key: For Gemini LLM features, obtain an API key from Google AI Studio and set it as an environment variable:
- In PowerShell:
$env:GEMINI_API_KEY = "YOUR_API_KEY_HERE"
- (Remember to replace
"YOUR_API_KEY_HERE"
with your actual key. Do not commit your key to GitHub.)
- In PowerShell:
How to Run
-
Interactive Mode:
cd path\to\PersonalProductivityAgent # Set API Key if using LLM features $env:GEMINI_API_KEY = "YOUR_API_KEY_HERE" python main_agent.py
-
MCP Server Mode (for integration):
cd path\to\PersonalProductivityAgent # Set API Key if using LLM features $env:GEMINI_API_KEY = "YOUR_API_KEY_HERE" python main_agent.py --mcp-mode
The agent will then listen for JSON requests on stdin.
Future Enhancements
- Integration with a TypeScript-based orchestrator (
agent.ts
) to manage and utilize MCP tools. - Expansion of tools available via MCP server mode.
- Development of a more user-friendly graphical interface (Web UI or Desktop App) that leverages the agent's capabilities.