<< Back to Blog
·4 min read·Tech

AI Agent in Practice: Which Decisions Were Right and Which Were Wrong?

Last year, I impulsively added an AI assistant to my SaaS warehouse system. After countless pitfalls, here's a postmortem on tech choices, architecture, and product strategy—what worked and what made me want to slap myself.

AI Agent in Practice: Which Decisions Were Right and Which Were Wrong?

Last fall, I was squatting in my rental apartment, staring at my newly launched SaaS warehouse system. User count was single digits, bugs were double digits. I thought: let's add some AI, maybe it'll save the day. So I spent two weeks integrating an OpenAI API chatbot. On launch day, a user asked: "Check my inventory." The bot replied: "Sorry, I'm still learning." I was crushed.

TL;DR My pitfalls: don't add AI too early, don't blindly trust large models, don't ignore product fundamentals. Right decisions: use API for quick validation, choose the right scenarios, stick with open source.

Why is "Don't Add AI Too Early" a Bloody Lesson?

Because if core features aren't solid, AI is just a gimmick.

At that time, my system had just finished purchase and sales modules, and inventory counting still had bugs. I should have polished the basics, but instead I went for AI. Result? No matter how smart the AI responded, users couldn't find the buttons they needed. Later, I spent three months rebuilding the UI, and user retention went from 15% to 35%.[1]

It's like in an RPG: you haven't even left the starter village, but you're challenging the final boss. Skill tree not maxed, equipment still a wooden sword—how can you win?

配图

Tech Choices: Why API Over Building My Own Model?

Because for indie devs, API is the most cost-effective choice.

I've seen peers who want to train their own models from scratch. Honestly, burning money faster than hiring a personal trainer at the gym. I used OpenAI's GPT-4 API, charged per token, costing a few dozen bucks a month. GitHub's 2024 report shows AI-assisted programming tools boost dev efficiency by 30-55%[2], but that's Copilot, not building your own LLM.

Of course, APIs have pitfalls: latency, third-party dependence, data privacy. Later, I used Cloudflare Workers as a cache and routing layer, cutting response time for common queries from 3 seconds to 500ms.

Product Positioning: What Should an AI Agent Solve?

It should solve high-frequency, low-complexity problems, not replace human judgment.

Initially, I made the AI do everything: inventory forecasting, purchase suggestions, even customer complaints. Its inventory prediction error hit 50%. Later, I narrowed AI's scope to three scenarios:

ScenarioFunctionUser Satisfaction
Product SearchNatural language query92%
Operation GuideStep-by-step instructions88%
Data ExportOne-sentence report generation85%

It's like working out: you can't expect squats to give you abs. Each exercise targets specific muscles, same for AI.

配图

Architecture: Why Do I Regret Not Going Modular Earlier?

Because coupled code is like a tangled mess—hard to cut through.

Initially, I wrote AI logic directly into business code. Later, when I needed to switch model providers, changing one thing required touching ten. I spent a whole week refactoring, splitting AI into a separate microservice with message queue communication. Now switching models is like changing phone cases—done in minutes.

This lesson reminds me of Nietzsche: "Become who you are"—your architecture should be itself, not a vassal of others.

配图

Looking Back: What Did I Do Right, What Wrong?

Right: quick validation, focused scenarios, open mindset. Wrong: premature complexity, ignoring basics, being too ambitious.

Now the AI assistant in my system has 40% monthly active users. The most common feedback isn't "AI is so smart" but "this feature is really useful." I finally understand: no matter how flashy the tech, solving a real pain point matters most.

Key Takeaways

  • Don't add AI before core features are solid; it's a castle in the air
  • API is indie devs' best friend; building your own model is for giants
  • AI should solve specific problems, not be a panacea
  • Modular architecture saves you from crying during changes
  • Users want "useful," not "smart"

References

  1. Stack Overflow 2024 Developer Survey — Data on developer roles and tech stack distribution
  2. GitHub Octoverse 2024 Report — Data on AI-assisted programming efficiency gains
  3. Gartner Top Technology Trends 2025 — SaaS market growth trends