PA is a local-first, command-driven personal assistant for daily execution. It combines chat, calendar, tasks, email intelligence, research memory, journaling, habits/goals tracking, Slack notifications, voice input, automations, and plugins in one Python CLI app.
- REPL chat with persistent conversation history in PostgreSQL
- Command system with aliases and macros
- Session export to Markdown
- Local memory/preferences support
- Google Calendar OAuth2 integration
- Calendar views by date and range
- Reminder scheduling with natural language time parsing
- Smart free-slot suggestions and conflict detection
- Morning brief and end-of-day summary foundation
- Task management with Notion backend or local fallback
- Project-based task views
- Overdue and priority views
- Meeting notes extraction into actions
- Gmail OAuth2 integration
- Inbox triage and urgency scoring
- Draft reply generation
- Follow-up detection
- VIP sender management
- Local vector knowledge base
- Save/search notes and ask contextual questions
- Web research and clipping
- Knowledge stats and export
- Daily journal entries and reflection
- Mood tracking and trends
- Habit tracking with streaks and history
- Goal tracking with milestones/progress updates
- Weekly review flow
- Slack integration and quick notifications
- Workflow automation engine (trigger/action)
- Voice input (local transcription)
- Plugin architecture with auto-discovery
- Scheduled automation checks and weekly reporting
- Python 3.10+
- PostgreSQL 14+
- 8GB RAM recommended for voice models
- Google Cloud OAuth credentials (Calendar/Gmail)
- Optional: Notion API token
- Optional: Slack bot token
- Clone repository.
- Create and activate virtual environment.
- Install Python dependencies.
- Create PostgreSQL database and user.
- Configure
pa/config.yaml. - Run the assistant.
cd pa
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -r requirements.txtCreate database:
CREATE DATABASE pa_assistant;
CREATE USER pa_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE pa_assistant TO pa_user;Start app:
cd pa
python -m assistantFile: pa/config.yaml
groq_api_key: API key for LLM calls. Keepnulland provide via env for safety.model: LLM model name.user_name: Name shown in prompt.user_email: Email destination for weekly report and automations.timezone: IANA timezone (America/New_York).
host: Postgres host.port: Postgres port.name: Database name.user: Database user.password: Database password.
working_hours.start: Start of working day.working_hours.end: End of working day.duration: Default event duration in minutes.buffer: Travel/context buffer in minutes.
vip_check_interval: VIP scan interval in minutes.digest_max: Max emails in digest.urgency_threshold: Urgency cutoff for escalations.
api_key: Notion integration token.tasks_db_id: Notion tasks database ID.projects_db_id: Notion projects database ID.
default_priority: Default new-task priority (high|medium|low).nudge_time: Daily task nudge time.backup_to_markdown: Mirror tasks to Markdown backup.
embedding_model: Sentence-transformer model for vectors.storage_path: Local KB path.threshold: Similarity threshold for retrieval.
engine: Search provider (duckduckgoor custom logic).brave_api_key: Optional Brave Search key.max_results: Result cap per search.
bot_token: Slack bot OAuth token.default_channel: Default Slack channel.notification_channel: Channel for alerts/reminders.
daily_prompt: Enable daily prompt seeding.reflection: Enable AI reflection support.streak_reminder: Reminder when journaling streak breaks.
reminder_time: Daily habit reminder time.show_on_startup: Print habit snapshot at startup.
check_in_frequency: Goal check cadence.ai_planning: Enable AI-assisted planning hints.
enabled: Enable voice system.model: Whisper model (base,small, etc.).language: Language code.record_seconds: Recording duration for voice captures.
check_interval_minutes: Workflow trigger polling interval.
- Open Google Cloud Console.
- Create/select project.
- Enable APIs:
- Google Calendar API
- Gmail API
- Configure OAuth consent screen.
- Create OAuth Client ID (Desktop app).
- Save credentials JSON to:
pa/assistant/integrations/credentials.json
- Run assistant and trigger:
/calendarfor Calendar auth/emailfor Gmail auth
- OAuth tokens are stored locally and refreshed automatically.
- Create integration at Notion Developers.
- Copy integration token to
notion.api_key. - Create two databases: Tasks and Projects.
- Share both databases with integration.
- Add IDs to:
notion.tasks_db_idnotion.projects_db_id
- Create app in Slack API dashboard.
- Add bot scopes:
chat:writechannels:readchannels:historysearch:read
- Install app to workspace.
- Copy bot token into
slack.bot_token. - Invite bot to channels:
/invite @your-bot
- Ensure machine has enough RAM (8GB recommended).
- Install audio dependencies from
requirements.txt. - Enable in config:
voice.enabled: true
- Start assistant and run:
/voice test
- Toggle runtime voice mode:
/voice
/help- Show command list- Example:
/help
- Example:
/clear- Clear history state- Example:
/clear
- Example:
/history- Show latest conversation entries- Example:
/history
- Example:
/memory- Show stored memory/preferences- Example:
/memory
- Example:
/export- Export chat history to Markdown- Example:
/export
- Example:
/alias- Create alias- Example:
/alias /gm = /brief
- Example:
/macro- Execute named macro- Example:
/macro morning_routine
- Example:
/calendar- Calendar view/status- Example:
/calendar today
- Example:
/remind- Create reminder- Example:
/remind "Call Alex" "tomorrow 3pm"
- Example:
/reminders- List reminders- Example:
/reminders
- Example:
/schedule- Schedule event- Example:
/schedule "1:1 with Sam" tomorrow 2pm
- Example:
/freeslots- Suggest available slots- Example:
/freeslots next 3
- Example:
/conflicts- Show overlaps- Example:
/conflicts 2026-04-02
- Example:
/brief- Daily briefing- Example:
/brief
- Example:
/eod- End-of-day summary- Example:
/eod
- Example:
/tasks- Task list summary- Example:
/tasks all
- Example:
/task add- Add task- Example:
/task add "Ship report" due:tomorrow priority:high project:Ops
- Example:
/task done- Complete task- Example:
/task done 12
- Example:
/task find- Search tasks- Example:
/task find payroll
- Example:
/projects- Project overview- Example:
/projects
- Example:
/overdue- Overdue tasks grouped by age- Example:
/overdue
- Example:
/meeting- Meeting action extraction- Example:
/meeting
- Example:
/email- Inbox triage and operations- Example:
/email unread
- Example:
/reply- Draft/send reply flow- Example:
/reply 18c2a1f0
- Example:
/followups- Detect follow-up candidates- Example:
/followups
- Example:
/unsubscribe- Suggest unsubscribe candidates- Example:
/unsubscribe
- Example:
/send- Compose/send new message- Example:
/send jane@company.com "Status Update"
- Example:
/vip- VIP sender management- Example:
/vip add ceo@company.com "CEO"
- Example:
/save- Save note to KB- Example:
/save "Client prefers async updates" #client #ops
- Example:
/ask- Ask with KB context- Example:
/ask What did I decide about launch scope?
- Example:
/search- Web/local search- Example:
/search SOC2 control mapping
- Example:
/notes- Note browsing/search- Example:
/notes search launch
- Example:
/research- Multi-result research summary- Example:
/research AI meeting assistants privacy model
- Example:
/clip- Clip URL into KB- Example:
/clip https://example.com/article
- Example:
/kb- KB tools- Example:
/kb stats
- Example:
/journal- Journal commands- Example:
/journal today
- Example:
/habit- Habit tracking commands- Example:
/habit done reading
- Example:
/mood- Mood logging/trends- Example:
/mood good energy:high note:focused
- Example:
/goal- Goal/milestone management- Example:
/goal add "Publish v1" by:2026-05-15 category:product
- Example:
/weekly- Weekly review- Example:
/weekly
- Example:
/slack- Slack integrations (send/read/channels/mentions/search)- Example:
/slack channels
- Example:
/notify- Quick Slack notification- Example:
/notify Team sync moved to 4 PM
- Example:
/workflow- Automation workflows- Example:
/workflow add
- Example:
/voice- Toggle voice input- Example:
/voice
- Example:
/voice test- Record and transcribe test clip- Example:
/voice test
- Example:
- Plugin commands are auto-discovered from
assistant/plugins/*.py. - Example default plugin command:
/github prs/github issues/github repos
Plugins live in pa/assistant/plugins/.
PLUGIN_NAME = "example"
PLUGIN_VERSION = "1.0"
PLUGIN_DESCRIPTION = "Example plugin"
PLUGIN_COMMANDS = {
"/example": "Does something useful"
}
def setup(config: dict) -> bool:
return True
def handle_command(command: str, args: list) -> None:
pass
def on_message(message: str) -> None:
# Optional hook
pass- Auto-discovers
.pyfiles in plugins directory - Skips
__init__.pyand files starting with_ - Calls
setup(config)if present - Skips plugin if setup returns
False - Registers plugin commands into
/help - Dispatches unknown command routing to plugin owner
- Broadcasts every non-command message to plugin hooks
- Error: database connection failed
- Verify
database.*keys in config - Confirm user/password and DB exists
- Confirm PostgreSQL service is running
- Verify
- Error: missing API key
- Set
groq_api_keyin config or environment - Validate model name in
model
- Set
- Error: OAuth flow not starting
- Ensure credentials JSON path is correct
- Check APIs are enabled in Google Cloud
- Delete stale token files and re-auth
- Error: no tasks returned
- Ensure integration has access to both databases
- Verify database IDs in config
- Error: Slack not connected
- Verify bot token starts with
xoxb- - Ensure scopes are granted and app is installed
- Invite bot to target channels
- Verify bot token starts with
- Error: model load failure
- Install
sentence-transformers - Ensure write access to
knowledge.storage_path
- Install
- Error: transcription unavailable
- Install voice deps from
requirements.txt - Check microphone permissions/device availability
- Use lighter model if memory is constrained
- Install voice deps from
- Error: plugin not loaded
- Confirm required
PLUGIN_NAMEandhandle_command - Check plugin import errors in startup logs
- Ensure
setup(config)returnsTrue
- Confirm required
pa/
assistant/
__main__.py
core/
main.py # startup sequence + REPL + command routing
commands.py # parse, aliases/macros, built-in command catalog
orchestrator.py # LLM conversation orchestration
memory.py # PostgreSQL schema and persistence
plugin_system.py # plugin discovery/loading/dispatch/broadcast
handlers/
calendar.py # calendar command handlers
tasks.py # task command handlers
email.py # email command handlers
knowledge.py # knowledge command handlers
tracking.py # journal/habit/mood/goal handlers
slack.py # slack/notify handlers + notifier helpers
workflows.py # workflow command handlers
features/
briefing.py # daily/weekly brief logic
scheduler.py # background jobs and automation schedules
task_manager.py # task backend router
journal.py # journal + mood features
habits.py # habits and streaks
goals.py # goal tracking
workflows.py # trigger/action automation engine
knowledge.py # vector KB + research
integrations/
calendar.py # Google Calendar API
email.py # Gmail API
notion.py # Notion API
slack.py # Slack API
utils/
display.py # config loading + rich output helpers
timeparser.py # natural language date/time parsing
voice.py # whisper audio capture/transcription
plugins/
github_plugin.py # example plugin
