AI Personal Agent SDK for automation with OpenAI, Zapier, and security features
Project description
AI Personal Agent SDK
A comprehensive, secure AI-powered personal assistant SDK that provides 24/7 automation, intelligent planning, and beautiful web interface for managing your digital life.
Features
๐ค AI-Powered Automation
- Intelligent Planning: Daily schedule optimization using OpenAI GPT-4
- Smart Reminders: Context-aware notifications for meetings and tasks
- Conversational AI: Natural language chat interface for assistance
๐ Enterprise-Grade Security
- End-to-End Encryption: All data encrypted with AES-256
- Permission-Based Access: Granular control over data access with time-limited permissions
- Hacker Protection: Continuous monitoring and security alerts
- Local Data Storage: No data sent to external servers without explicit permission
๐ Seamless Integrations
- Google Services: Gmail, Google Calendar integration
- Zapier Automation: Connect with 5000+ apps and services
- Social Media: Automated posting and monitoring
- Email Management: Intelligent email processing and responses
๐จ Beautiful Web UI
- Responsive Design: Works on desktop, tablet, and mobile
- Real-time Dashboard: Live updates of meetings, tasks, and alerts
- Interactive Chat: AI assistant with natural conversation
- Permission Management: Visual approval system for data access
๐ฑ 24/7 Monitoring
- Continuous Operation: Background monitoring of all data sources
- System Health: Resource usage and performance monitoring
- Security Alerts: Instant notifications for security events
- Data Integrity: Automatic corruption detection and repair
Architecture
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Web UI โ โ Core Agent โ โ Integrations โ
โ (Flask) โโโโโบโ (Scheduler) โโโโโบโ (Google, โ
โ โ โ โ โ Zapier) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Security โ โ Monitoring โ โ Data Storage โ
โ (Encryption, โ โ (24/7 Health โ โ (Encrypted โ
โ Permissions) โ โ Checks) โ โ Local) โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
Core Components
- PersonalAgent: Main orchestrator class
- Security Layer: Encryption and permission management
- Integration Layer: External service connections
- Monitoring System: Continuous health and security checks
- Web UI: User interface and API endpoints
Installation
Prerequisites
- Python 3.8+
- OpenAI API key
- Google Cloud Project (for Google integrations)
- Zapier API key (optional, for advanced automations)
Install from Source
git clone https://github.com/yourusername/ai-personal-agent-sdk.git
cd ai-personal-agent-sdk
pip install -e .
Install Dependencies
pip install -r requirements.txt
Quick Start
1. Environment Setup
Create a .env file in your project directory:
# Required
OPENAI_API_KEY=your_openai_api_key_here
# Optional - for Google integrations
GOOGLE_CREDENTIALS_PATH=path/to/google/credentials.json
# Optional - for Zapier automations
ZAPIER_API_KEY=your_zapier_api_key_here
# Optional - custom settings
DATA_STORAGE_PATH=./my_agent_data
UI_PORT=8080
MONITORING_INTERVAL=60
2. Google Setup (Optional)
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Gmail API and Google Calendar API
- Create credentials (OAuth 2.0 Client ID)
- Download the credentials JSON file
- Set the path in your
.envfile
3. Basic Usage
from ai_personal_agent_sdk import PersonalAgent, Config
# Load configuration
config = Config()
# Create agent
agent_config = Config.AgentConfig(
openai_api_key=config.openai_api_key,
zapier_api_key=config.zapier_api_key,
google_credentials_path=config.google_credentials_path
)
# Start the agent
agent = PersonalAgent(agent_config)
agent.start()
# The web UI will be available at http://localhost:8080
4. Using the Web Interface
- Open your browser and go to
http://localhost:8080 - View your dashboard with meetings, daily plan, and active permissions
- Chat with the AI assistant
- Set alarms and manage automations
- Approve or deny permission requests
API Reference
PersonalAgent Class
Initialization
agent = PersonalAgent(config: AgentConfig)
Methods
start(): Start the agent and all servicesstop(): Stop the agent and save datarequest_permission(action, resource, duration_minutes): Request permission for an actionexecute_automation(type, params): Execute automation via Zapierget_meetings(): Get upcoming meetingsadd_alarm(time, message): Add a new alarmget_daily_plan(): Get today's AI-generated plan
Security Features
Data Encryption
All sensitive data is automatically encrypted using AES-256 encryption:
from ai_personal_agent_sdk.security import DataEncryptor
encryptor = DataEncryptor(key)
encrypted = encryptor.encrypt(b"sensitive data")
decrypted = encryptor.decrypt(encrypted)
Permission Management
from ai_personal_agent_sdk.security import PermissionManager
pm = PermissionManager()
approved = pm.request_permission("read_email", "gmail", 60) # 60 minutes
Integrations
Google Services
from ai_personal_agent_sdk.integrations import GoogleIntegration
google = GoogleIntegration("path/to/credentials.json")
emails = google.get_recent_emails()
events = google.get_today_events()
Zapier Automations
from ai_personal_agent_sdk.integrations import ZapierIntegration
zapier = ZapierIntegration("your_api_key")
result = zapier.execute_automation("email_reply", {"message": "Hello!"})
Security Best Practices
Data Protection
- All data is stored locally and encrypted
- No data is sent to external servers without explicit permission
- Encryption keys are managed securely
Permission System
- All sensitive operations require explicit permission
- Permissions are time-limited and auto-expire
- Users can revoke permissions at any time
Network Security
- All API calls use HTTPS
- Credentials are stored encrypted
- No sensitive data in logs
Monitoring & Alerts
- Continuous security monitoring
- Instant alerts for suspicious activity
- Regular data integrity checks
Configuration Options
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key | Required |
ZAPIER_API_KEY |
Zapier API key | Optional |
GOOGLE_CREDENTIALS_PATH |
Path to Google credentials | Optional |
DATA_STORAGE_PATH |
Data storage directory | ./agent_data |
UI_PORT |
Web UI port | 8080 |
MONITORING_INTERVAL |
Monitoring check interval (seconds) | 60 |
Troubleshooting
Common Issues
-
OpenAI API Key Issues
- Ensure your API key is valid and has sufficient credits
- Check the key format (should start with
sk-)
-
Google Integration Problems
- Verify credentials JSON file path
- Ensure APIs are enabled in Google Cloud Console
- Check OAuth consent screen configuration
-
Permission Denied Errors
- Check if the required permissions are granted
- Verify permission expiration times
- Look for pending permission requests in the UI
-
Web UI Not Loading
- Check if port 8080 is available
- Verify Flask is installed correctly
- Check browser console for JavaScript errors
Logs and Debugging
Enable debug logging:
import logging
logging.basicConfig(level=logging.DEBUG)
Check the logs for detailed error information and system status.
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
git clone https://github.com/yourusername/ai-personal-agent-sdk.git
cd ai-personal-agent-sdk
pip install -e ".[dev]"
Running Tests
pytest tests/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Roadmap
- Mobile app companion
- Voice interface integration
- Advanced AI models support
- Multi-user support
- Plugin system for custom integrations
- Advanced analytics and insights
Important Security Notice: This SDK is designed with privacy and security as top priorities. All data processing happens locally on your device. No personal data is transmitted to external servers without your explicit permission and approval.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_personal_agent_sdk-0.1.0.tar.gz.
File metadata
- Download URL: ai_personal_agent_sdk-0.1.0.tar.gz
- Upload date:
- Size: 24.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5fe71ef13a8c30c2d7037f0ecb9305f558ba9c682709b9dfef3a39ac6ffe4f3
|
|
| MD5 |
5064c8d5d2f21333fadab9d7312cea81
|
|
| BLAKE2b-256 |
b28bbb14789266e5501ff05022d5125c6e7a7d1a020f787ca4b3240d4026c518
|
File details
Details for the file ai_personal_agent_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ai_personal_agent_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f38a9d0a904be72470d62fcee327b80d60851222cd2ccc9eb8853136eb04f913
|
|
| MD5 |
2a5e24dc4404420ce2f0f5459d515aaa
|
|
| BLAKE2b-256 |
857256903e5d0fc5cbf92571084253c0f053302093b99980371bad624638cb6e
|