Skip to content

macizomedia/personalagent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PersonalAgent πŸ€–πŸ“…

Intelligent Calendar Management with AI-Powered Task Automation

PersonalAgent is a sophisticated, priority-based multi-calendar management system that respects your life priorities while providing intelligent conflict resolution and AI-powered task automation.

Version Python License

🌟 Key Features

πŸ† Priority-Based Calendar System

  • Family First: Family events are immovable anchors that other calendars adapt around
  • Smart Hierarchy: Personal > Work priority with intelligent conflict resolution
  • Context Switching: Seamlessly switch between life contexts (Family, Personal, Work)

🧠 AI-Powered Intelligence

  • Multiple LLM Support: OpenAI GPT-4, Google Gemini, Anthropic Claude, OpenRouter (200+ models)
  • Intelligent Subtask Inference: Automatically break down complex tasks into actionable steps
  • Smart Scheduling: AI-powered conflict detection and alternative time suggestions

⚑ Streamlined Workflow

  • Profile-Aware Operations: All commands respect your current calendar context
  • Conflict Prevention: Automatic detection prevents double-booking
  • Quick Commands: Lightning-fast task creation and activity listing

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • Google Calendar API credentials
  • OpenAI/Gemini/Claude API keys (optional, for AI features)

Installation

# Clone the repository
git clone https://github.com/personalagent/personalagent.git
cd personalagent

# Set up virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Set up Google Calendar credentials
# (Follow Google Calendar API setup guide)

# Add aliases to your shell
cat zshrc_aliases.txt >> ~/.zshrc
source ~/.zshrc

Basic Usage

# Main system - fetch latest data
pagent

# Quick activity overview
pa-list today

# Switch calendar profiles
pa-family    # Switch to family calendar
pa-work      # Switch to work calendar
pa-personal  # Switch to personal calendar

# Create profile-aware tasks
pa-create --title "Team meeting" --when "tomorrow 14:00"

# Manage existing activities
pamanage edit T1  # Edit first TODO item

πŸ“ Project Structure

personalAgent/
β”œβ”€β”€ πŸ“‚ src/                    # Source code modules
β”‚   β”œβ”€β”€ πŸ“‚ core/               # Core system functionality
β”‚   β”‚   β”œβ”€β”€ fetchGregorian.py  # Sacred calendar integration
β”‚   β”‚   β”œβ”€β”€ fetchTodos.py      # TODO management
β”‚   β”‚   └── getLatest.sh       # Main data fetcher
β”‚   β”œβ”€β”€ πŸ“‚ calendar/           # Calendar management
β”‚   β”‚   β”œβ”€β”€ profileManager.py  # Profile system core
β”‚   β”‚   β”œβ”€β”€ createTask.py      # Task creation with conflict detection
β”‚   β”‚   β”œβ”€β”€ listActivities.py  # Profile-aware activity listing
β”‚   β”‚   └── manageActivities.py # Activity management
β”‚   β”œβ”€β”€ πŸ“‚ ai/                 # AI integration
β”‚   β”‚   β”œβ”€β”€ inferSubtask.py    # LLM-powered subtask inference
β”‚   β”‚   └── setModel.py        # Multi-provider LLM management
β”‚   └── πŸ“‚ utils/              # Utility functions
β”‚       β”œβ”€β”€ promptHelper.py    # Terminal prompt integration
β”‚       └── help.py            # Help system
β”œβ”€β”€ πŸ“‚ bin/                    # Executable entry points
β”‚   β”œβ”€β”€ pagent                 # Main entry point
β”‚   β”œβ”€β”€ pa-profiles            # Profile manager
β”‚   β”œβ”€β”€ pa-list                # Activity lister
β”‚   └── pa-create              # Task creator
β”œβ”€β”€ πŸ“‚ config/                 # Configuration files
β”œβ”€β”€ πŸ“‚ docs/                   # Documentation
β”œβ”€β”€ πŸ“‚ tests/                  # Test files
└── πŸ“‚ data/                   # Data cache

🎯 Calendar Profile System

PersonalAgent's core innovation is its priority-based calendar management:

Priority Hierarchy

  1. πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Family Profile (Priority 1)

    • Highest priority - events are immovable
    • Other calendars automatically adapt around family time
    • Keywords: family, kids, home, personal
  2. 🏠 Personal Profile (Priority 2)

    • Can coexist with family events
    • Schedules around family commitments
    • Keywords: personal, self, appointment, health
  3. πŸ’Ό Work Profile (Priority 3)

    • Fills available free slots only
    • Shows family events as [BUSY] blocks
    • Auto-suggests alternatives for conflicts
    • Keywords: work, meeting, project, deadline

Smart Conflict Resolution

When creating work events that conflict with family time:

  1. πŸ” Automatic Detection - Identifies conflicts with higher priority calendars
  2. πŸ“‹ Clear Notification - Shows exactly what conflicts exist
  3. πŸ’‘ Smart Suggestions - Offers 3 alternative times automatically
  4. ✏️ Custom Options - Allows manual time entry
  5. 🚨 Override Available - Emergency override for critical situations

πŸ€– AI Integration

Multi-Provider LLM Support

# List available models
pamodels list

# Switch providers
pamodel-openai    # Use OpenAI GPT models
pamodel-gemini    # Use Google Gemini
pamodel-claude    # Use Anthropic Claude
pamodel-router    # Use OpenRouter (200+ models)

Intelligent Subtask Inference

# Generate subtasks for calendar events and TODOs
pasubtasks today

The AI analyzes your tasks and automatically generates:

  • Preparation steps (research, gather materials)
  • Execution subtasks (with realistic time estimates)
  • Follow-up actions (cleanup, documentation)
  • Context awareness (location, energy level, dependencies)

πŸ“± Command Reference

Profile Management

# View current profile
pacal-current

# List all profiles
pacal-list

# Switch profiles
pa-family / pa-personal / pa-work

# Profile context (for scripts)
pacal-context

Activity Management

# Quick activity listing
palist today / tomorrow / week / month

# Full system update
pagent today / week

# Create tasks
pacreate --interactive
pacreate --title "Meeting" --type WORK --when "tomorrow 15:00"

# Manage existing items
pamanage edit T1    # Edit TODO item #1
pamanage complete T2 # Complete TODO item #2
padelete E1         # Delete calendar event #1

AI & Analysis

# Subtask inference
pasubtasks today

# Model management
pamodels
pamodel-list

πŸ”§ Configuration

Environment Variables

# Google Calendar (required)
GOOGLE_CALENDAR_CREDENTIALS_PATH=~/personalAgent/config/credentials.json

# AI Providers (optional)
OPENAI_API_KEY=your_openai_key
GEMINI_API_KEY=your_gemini_key
ANTHROPIC_API_KEY=your_claude_key
OPENROUTER_API_KEY=your_openrouter_key

# Default LLM settings
LLM_PROVIDER=openai
LLM_MODEL=gpt-4o-mini

Profile Customization

Edit config/calendar_profiles.json to customize:

  • Calendar mappings
  • Priority rules
  • Conflict resolution behavior
  • Display preferences
  • Keyword filters

🚦 Current Status

βœ… Production Ready

  • βœ… Multi-calendar Google Calendar integration
  • βœ… Priority-based profile system
  • βœ… Conflict detection and resolution
  • βœ… AI-powered subtask inference
  • βœ… Multi-provider LLM support (OpenAI, Gemini, Claude, OpenRouter)
  • βœ… Profile-aware task creation and management
  • βœ… Quick activity listing and overview
  • βœ… Comprehensive alias system
  • βœ… Terminal integration ready

πŸ”„ In Development

  • πŸ”„ Terminal prompt integration (oh-my-zsh themes)
  • πŸ”„ Advanced calendar synchronization
  • πŸ”„ Web-based dashboard
  • πŸ”„ Mobile companion app

πŸ“‹ Upcoming Features

  • πŸ“‹ GUI Desktop Application
  • πŸ“‹ Real-time calendar synchronization
  • πŸ“‹ Advanced AI scheduling optimization
  • πŸ“‹ Team collaboration features
  • πŸ“‹ Integration with external productivity tools
  • πŸ“‹ Voice interface integration
  • πŸ“‹ Smart notification system

🎨 Future UI Vision

Desktop Application (Planned)

  • Modern React/Electron Interface
  • Drag-and-drop calendar management
  • Real-time conflict visualization
  • AI-powered scheduling assistant
  • Multi-calendar timeline view
  • Smart notification center

Mobile App (Planned)

  • Quick task capture
  • Voice-to-calendar integration
  • Location-aware scheduling
  • Offline capability
  • Push notifications for conflicts

🀝 Contributing

We welcome contributions! This project is designed to be:

  • Modular: Easy to extend with new features
  • Well-documented: Clear code structure and documentation
  • Test-friendly: Comprehensive test coverage
  • AI-first: Built for intelligent automation

Development Setup

# Clone and setup
git clone https://github.com/personalagent/personalagent.git
cd personalagent

# Development environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

# Run tests
python -m pytest tests/

# Test profile system
./bin/pa-profiles list

Areas for Contribution

  • 🎨 UI/UX Design - Desktop and mobile interfaces
  • 🧠 AI Enhancement - Better scheduling algorithms
  • πŸ“± Mobile Development - React Native app
  • πŸ”§ Integrations - Other calendar systems, productivity tools
  • πŸ“š Documentation - Tutorials, guides, examples
  • πŸ§ͺ Testing - Unit tests, integration tests

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Google Calendar API for robust calendar integration
  • OpenAI, Anthropic, Google for AI/LLM capabilities
  • Open Source Community for inspiration and tools

PersonalAgent - Where AI meets intentional living πŸ€–βœ¨