Speed vs Safety: the AI Dilemma

Speed vs Safety: the AI Dilemma

I'm currently working on a personal project for the purposes of leveling up my skill-set as a programmer using the latest greatest AI tools. While I do use some of these in my work, our tech stack and the types of things our clients request don't leverage these tools to the fullest extent.

But first, let's talk about the what and why. What am I building, and why do I feel the need to?

The what: a life dashboard application. Something that will act as my personal life management system, including all the tools I use on a regular basis. Everything from my contacts, calendar, and grocery lists, up to recipes, to do lists, chores, and eventually up my smart home system and a locally hosted AI assistant to interact with it all.

Think Jarvis a la the Iron Man films, if Jarvis' job was to handle mundane life tasks/documentation as opposed to helping save the world.

I already have a system in place for this, cobbled together with a variety of tools(Notion being the heavy lifter). But I am a firm believer in Derek Sivers' idea of 'Tech Independence', and these disparate tools I use don't play particularly well with each other.

In addition, a friend of mine recently showed me her AI-assistant dashboard that she'd spun up, and it was an incredible tool. It took her high level goals and broke them down into manageable chunks, measuring her progress towards them. It provided simple progress displays for each of the 3 main areas in health, profession, and creativity. It even had a little AI coach baked in that gave her a daily pep talk, written in the voice of Ted Lasso!

So this felt like the perfect project for me to tackle: a self-hosted, fully-local life dashboard with deep AI integration and extensibility. I also wanted it to play well with Home Assistant, and potentially turn it into an open source project that others could plug and play as well.

Here are the basics of the project at a high level:

  • Tech Stack:
    • Postgres 16, self hosted in Docker on my network attached storage drive.
    • Backend language: Python. I've never worked with it before, felt it would be good to learn how to work in it.
    • Backend framework: FastAPI - the industry standard for building backend services that play well with LLMS.
    • Auth: argon2 + JWT + refresh tokens. Even though I'm the main person who will be using this I want it to be extensible for a larger household, and in my opinion it's just a good piece of functionality to build in at the start.
    • Frontend: Next.js.
      • Styling: tailwindcss(my favorite) and shadecn/ui.
    • Remote access: Tailscale - opens it up for me/authenticated users to access without opening it up to the public internet.
    • AI agent: Local LLM - Ollama + LM studio + MCP server, self-hosted on my gaming computer.
  • Data structure:
    • Phase 1:
      • Goals
      • To dos
      • Habits
      • Notes
      • Calendar events
      • Contacts
      • Recipes
      • Grocery lists
    • Phase 2:
      • Households
      • Users
      • Audit log(for error reporting for a future self-correcting LLM)
      • Attachments(for file uploading)
      • Tags + tagging system - for Zettelkasten style smart notes
      • Refresh tokens - for auth
      • Schema migrations - version tracking table

Creating all these data structures and having them intermingled + an LLM that can interact with all of it opens up a lot of interesting possibilities, for example:

  • My AI agent can look at my To-Dos and calendar events before I wake up, and build out my task list for any given day.
  • I can tell it what I plan to cook for a given day/week and it will fill out my grocery list with the necessary ingredients.
  • Integrating with Home Assistant, it can display a small weather widget on my home dashboard and even suggest wardrobe choices in my morning update.

I'm barely scratching the surface here of what the setup as laid out in this first build phase can do, or even what it could do in the future with extensions/new tables added to the data structure. But it's very exciting nonetheless!

  • At the moment I have my PostgreSQL database set up on my network storage drive, so that's step 1.
  • Next I need to set up the FastAPI backend with auth, CRUD(Create, Read, Update, Delete) actions for all data tables.
  • Then I build the NextJS frontend with auth, dashboard, and manual triggers for all CRUD actions.
  • After that I'll build out the local AI agent + it's action vocabulary(how it connects words I type to the AI agent to the backend code actions I create), and after that I'll set up the Home Assistant integration.

The database and FastAPI backend are the ones more likely to exist as stand-alone tasks which are good to go once completed. Building out the NextJS frontend is more likely to be an ongoing task as I iterate and refine it over time. The local AI agent is also going to be a bit of a moving target, as I'll need to use a less powerful open source model that my computer can actually power and as such I'll need to spend more time manually testing/tweaking/refining it as I go, since this is very new to me.

Still, it feels good to have a fun project to work on that'll help me level up my career skillset this way!

I already used an AI agent to help me completely rebuild this blog using the Ghost API and self hosting it on Digital Ocean which was a task unto itself. I imagine a future setup where this domain is my little slice of home on the internet, where I can access these personal tools from anywhere on this domain the same as others are able to access my blog. Fully secure/private, bespoke/custom built to my spec, with full ownership over my data...I don't know why that's so appealing to me, but for some reason it is!

This is the first in ideally a long series of posts on this topic. My progress so far has been inconsistent at best, a few hours here and there with days to weeks of nothing in between. I'd like to make a better habit of it and progress more steadily(a completed version would probably help me there!), but even writing this post and getting it out there should both help me remain accountable and sink what I've learned thus far deeper into my brain.

This sort of brings me all the way back to the original thought/title of this post. When building with AI it feels like you've attached rocket boosters to your productive output: the speed at which you can move is absolutely insane. So much so that even for me as an experienced programmer it's easy to fall behind and not be able to fully explain the code base/infrastructure that the AI built!

I've reviewed the high level decisions and went back and forth for a while to hammer out the specific data structure, but it would take me a painfully long time to write the SQL queries that created the database by hand, and they'd likely be lower quality at the end of the day. Is there an inherent danger in that: utilizing tech

This is one of the bigger danger zones of AI in my opinion: it would be insane for me to write all the code manually when I can have AI do it in a fraction of the time, but bugs and security flaws often live in the most minute of details in the codebase. That's not a huge deal for me and my small scale/personal life dashboard app; and ideally my audit logs will catch those bugs and make it easy to fix them. But when you're running an enterprise company that moves millions of dollars around a day, the smallest bug can be catastrophically expensive.

It's difficult to know what AI coding will look like in even 3 months, let alone 3 years. Many people have compared the rise of LLMs as dramatic a shift in society as the invention of the internet itself, and honestly it's kind of hard to argue with them. It's hard not to be both excited at the creative potential and a bit terrified of the implications of it all. Do some digging into Claude Mythos if you want a real eye-opening experience about dramatic the possibilities are.

All I know is that for now, I'm cautiously optimistic. There are many aspects of the current state of the web that are just plain shitty and painful to use, and it's easy to see many ways in which AI could improve these things.

At the same time, skeuomorphic thinking is a thing for a reason. I can't imagine a scenario where the internet just becomes a series of AI chatbots that you ask for things, humans like to interact with things that are aesthetically pleasing. So this whole 'AI is going to eat software' thing is, in my opinion, a bit overblown.

That said, I don't have a damn clue where things are going to end up either. Just trying to stay ahead of the curve, hence this project!

I'll keep you updated as I progress, til next time!

Brandon