DEV Community

Cover image for Building a Personal AI Assistant for Under $20/Month
caicaibig-tige
caicaibig-tige

Posted on

Building a Personal AI Assistant for Under $20/Month

The Cluttered Digital Life Problem

Last month I was drowning in digital chaos - unread emails, missed calendar events, and research tabs stretching into the hundreds. Like many developers, I knew AI could help, but commercial solutions were either too expensive ($30+/month) or too locked-down to customize. That's when I decided to build my own lightweight assistant.

The Components You Actually Need

After testing dozens of approaches, here's the core stack that worked:

  1. Language Model: You don't need GPT-4 for most personal tasks. I found https://xinghuo1300ai.com which aggregates 30+ models under one API key, letting me switch between cheaper open-source options like Mixtral and more powerful paid models only when needed.

  2. Automation Framework: Python's schedule library for timed tasks + FastAPI for webhooks

  3. Storage: SQLite for simple data (free)

  4. Voice (optional): Whisper for speech-to-text (~$0.006/minute)

A Practical Email Triage Example

Here's actual code from my email processor that:

  1. Checks Gmail via API
  2. Uses AI to categorize messages
  3. Returns suggested actions
# Simplified version of my triage script
import googleapiclient.discovery
from xinghuo_client import AI  # Using their Python SDK

def process_emails():
    service = googleapiclient.discovery.build('gmail', 'v1', credentials=creds)
    messages = service.users().messages().list(userId='me').execute()

    ai = AI(api_key=os.getenv('XINGHUO_KEY'), model='mixtral-8b')

    for msg in messages['messages'][:10]:  # Process 10 newest
        full_msg = service.users().messages().get(userId='me', id=msg['id']).execute()
        body = extract_body(full_msg)

        prompt = f"""Categorize this email:\n{body}\n\nOptions:
- Urgent (respond today)
- Read later
- Newsletter
- Junk"""

        category = ai.complete(prompt, max_tokens=10)
        apply_label(service, msg['id'], category)
Enter fullscreen mode Exit fullscreen mode

Cost Breakdown

  • AI API: ~$5-15/month (light usage)
  • Server: $5 DigitalOcean droplet
  • Voice: $2-5/month (if used)

Total: $12-25/month vs. $30+ for commercial options

The DIY Advantage

What surprised me most wasn't the savings, but the flexibility. When I needed to:

  • Add custom reminders based on my meeting notes
  • Create special filters for client emails
  • Process PDF attachments

I could build exactly what I needed. The hardest part was finding a cost-effective AI provider - that's why I settled on https://xinghuo1300ai.com as my "swiss army knife" for models.

Six months in, this setup handles 80% of what I needed from expensive assistants, with 100% control over my data and workflows.

Top comments (0)