I build AI agents and automations that do real work for businesses.
Chatbots that answer customers day and night. Workflows that qualify leads, book appointments and send the right alert to the right person. I build them in n8n with Claude and OpenAI, and I run them in production on servers I set up myself.
Everything below is work I've designed, built and run myself.
AI chatbots and agents
Assistants that talk to customers on a website or WhatsApp, ask the right questions, capture the lead and book the appointment.
Claude API · OpenAI API · WhatsApp Cloud API · Twilio
Workflow automation
n8n workflows that connect the tools a business already uses: email, calendar, Slack, CRMs and any API. Logging, alerts and error handling come built in.
Knowledge bases (RAG) where the AI searches real documents first, and a check stops it from answering when it can't find good evidence.
pgvector · embeddings · hybrid search · reranking
Backend and hosting
PostgreSQL databases, REST APIs and Docker servers, set up and looked after, so the automation keeps running after launch day.
PostgreSQL · Docker · Linux · Cloudflare
Work
Three AI products I built end to end
Each one is a full system: the AI logic, the database, the integrations and the server. Here's what they do and how they work.
CareLayer
Live
AI receptionist for dental and health clinics
n8n · Claude API · PostgreSQL + pgvector · Google Calendar · WhatsApp Cloud API
It sits on the clinic's website and WhatsApp, answers patients at any hour, and books them straight into the clinic's Google Calendar. Staff get an alert the moment a new patient comes in.
The problem
Clinics pay for ads, but a lot of patients message after hours and nobody replies. By morning they've booked somewhere else.
An AI can reply instantly, but in healthcare it must never make things up. It can't promise a slot, a price or an insurance deal it doesn't actually know.
What I built
A 55-node n8n workflow behind the website chat. It sends each message to Claude, works out whether this is a real patient, and moves them to booking.
The same logic on WhatsApp through Meta's Cloud API, with duplicate messages filtered out before anything runs.
Instant alerts to the clinic on Slack, email and staff phones, one alert per patient.
A 29-node REST API behind a staff mobile app for leads and outcomes.
← scroll the diagram →
The slot is held in Postgres before anything touches Google Calendar. If two patients ask for 4pm at the same moment, only one can hold it, so nobody gets double-booked. Unused holds are released every 5 minutes.
Answers that come from real sources
Patients also ask about UAE health rules, so CareLayer has a knowledge base built on pgvector. Before the bot answers from it, a step I call the Grounding Gate checks how strong the evidence is.
← scroll the diagram →
Rerank only runs when search returns enough results to be worth the extra call. When the evidence is weak, the bot defers instead of guessing, and the gap is logged so the knowledge base can be improved.
Decisions I made
Hold first, calendar second. A Postgres row can only be claimed once, so two chats can never grab the same slot.
A lock around calendar sync. Google can send several change notices at once. A Postgres lock makes sure only one run edits a booking, and an expired sync token (HTTP 410) triggers a full resync automatically.
Call Claude's API directly instead of n8n's built-in AI node, so I control the exact request that goes out.
Only re-embed what changed. Unchanged documents are skipped, and old versions are kept, so it's always clear what the bot knew and when.
Test ideas in a lab copy first. New retrieval methods, like a retriever that rewrites the question and tries again or Anthropic's contextual retrieval, run in separate workflows before they reach the live one.
Hard problems I solved
Keeping the AI honest. The bot must never promise a slot, a price or an insurance deal. Prompt rules on their own aren't enough for that, so the most important rules are also enforced in code. I tested it in English and Roman Urdu.
Booking that works in real conversations. I tested full multi-message chats, not single messages, over three rounds and fixed 12 issues along the way, including 3 data problems that would never have shown up as crashes.
Market research at scale. I built an n8n workflow and a Python script that scan clinic websites in batches and record what's on them: chat tools, booking links and ad tracking. I used it to study 105 clinics.
InboxLayer
Multi-tenant SaaS
Email reply automation for cold-email agencies
n8n · GPT-4o-mini · PostgreSQL · Instantly API · DNS-over-HTTPS
Agencies that send cold email through Instantly get a flood of replies. InboxLayer sorts every reply, follows up with the hot leads automatically and keeps an eye on the health of every sending domain.
What I built
Reply Intel (46 nodes) sorts every reply into a category and sends it down the right path.
HotLead Closer (49 nodes) picks up a hot reply, checks whether anyone has answered, sends a booking email and follows up if the lead goes quiet. Every step is logged.
Domain Sentinel (27 nodes) checks each sending domain's MX, SPF, DKIM and DMARC records, its expiry date and two spam blacklists (SpamCop and Barracuda), then gives it a health score.
Unsubscribe Shield (32 nodes) pushes every unsubscribe into Instantly's blocklist, and alerts the team if that fails.
7 API workflows with API-key auth for client info, stats, domain health and the compliance log.
Decisions I made
Rules first, AI second. Simple rules sort the obvious replies, and GPT-4o-mini only sees the ones the rules can't decide. It's cheaper and faster, and easy cases never depend on a model.
Multi-tenant from day one. Every request checks the client's API key and account status before any work happens, so one system can serve many agencies safely.
A claim step on every lead, so the same reply is never handled twice.
60Second
WhatsApp automation
WhatsApp lead qualification for real-estate agencies
n8n · Twilio WhatsApp API · Property Finder webhook · LLM
Designed for small Dubai real-estate agencies: reply to every new property lead on WhatsApp within seconds and ask the questions an agent would ask first, so agents only spend time on serious buyers.
What I built
A 26-node workflow on Twilio's WhatsApp API that catches every new lead and starts the conversation.
Leads from Property Finder come in through a webhook and join the same pipeline.
Separate logs for failed sends, so no lead goes missing without someone knowing.
Decisions I made
Check before calling the AI. Simple rules decide whether a message needs the AI at all, so tokens are only spent where they help.
A backup plan when the AI is down. The lead still gets a short reply, the owner gets notified and the failure is logged. No lead is left waiting in silence.
Infrastructure
Self-hosted, end to end
All three products run on a DigitalOcean server I set up and manage myself. It's lean on purpose: 2 vCPUs and 2 GB of RAM, with no managed platform in between.
Docker
Six containers across three Docker Compose projects: n8n, PostgreSQL, PgBouncer, Nginx Proxy Manager and the web servers.
Database
One PostgreSQL 15 database with pgvector, holding the data for all three products in 181 tables, with PgBouncer for connection pooling.
Network and security
Cloudflare in front, SSL through Nginx Proxy Manager, and server access over Tailscale.
Monitoring
Error-handler workflows post to Slack. A daily health check watches the website's sitemap, robots.txt and redirects, and only alerts when something changes.
Experience
8+ years building software
2025 – Present · Remote
Founder and AI Automation Engineer · Ahsomatic
Ahsomatic is my AI automation studio. I design and build its products on my own infrastructure: CareLayer, InboxLayer and 60Second, 73 n8n workflows in total.
Jun 2021 – Jul 2025 · Lahore
Senior Android Developer · Magnatec Systems
Designed and built SMACC, a cloud point-of-sale app for retailers in Saudi Arabia, with real-time inventory sync, secure payments, and barcode scanner, NFC and receipt printer support. Led feature delivery and mentored developers on MVVM and Kotlin.
2017 – 2021 · Pakistan / Remote
Android Developer · AsApp Studio, Ninesol Technologies and other studios
Shipped 10+ Android apps for chat, e-commerce, education and utilities. One of them, the text-to-speech app Narrator's Voice, passed 50,000 downloads with a 4.5 rating.
Why the Android years matter here. They taught me to plan for the things that break real systems: a task running twice, a job stopping halfway, data that changes while you're using it. A phone rotating in the middle of a network call and two patients booking the same 4pm slot are the same kind of problem, and I've been solving that kind of problem for years.
How I work
Four habits you'll see in my work
I test the failure, not just the happy path
Wrong ID, bad credential, empty result. I force each failure on purpose and check what the user actually sees.
Important rules live in code
Anything that must never happen, like confirming a booking that doesn't exist, is checked outside the AI model too.
Numbers come from real data
The figures on this page were counted on my live server and n8n instance, not estimated.
Cost matters from day one
Rules before AI calls. Rerank only when it helps. One well-run server instead of five paid services.