Sponsored by Deepsite.site

Personal Productivity Agent

Created By
mwill207 months ago
Personal Productivity Agent (Python) for Windows. Automates tasks, provides system info, and uses Google Gemini for intelligent Windows Event Log analysis. Supports interactive CLI and MCP server mode.
Content

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.
  • MCP (Multi-Capability Protocol): A simple JSON-based protocol over stdio for inter-process communication in server mode.

Setup and Requirements

  1. Python: Ensure Python 3.x is installed.
  2. Dependencies: Install necessary Python packages. The primary one for LLM interaction is google-generativeai. A requirements.txt file would typically list all dependencies.
    pip install google-generativeai
    # Potentially other packages like 'plyer' for notifications
    
  3. 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.)

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.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
Tavily Mcp