Summary
- Designed an autonomous agent that manages the entire customer lifecycle (from initial price inquiries to finalized bookings).
- Implemented a robust RAG pipeline using Next.js, Vercel AI SDK, and PostgreSQL (pgvector) to deliver high-accuracy, grounded responses based on curated service policies.
- Developed a system that allows the AI to pivot between specialized roles (e.g., Sales vs. Support) mid-conversation, adjusting system prompts and tool permissions on the fly.
- Built a tool-calling layer that integrates directly with internal REST APIs, enabling the bot to check postcode service coverage, retrieve live pricing, and execute real guest bookings.
- Engineered a structured session memory system using rolling summarization and a specific prompt hierarchy designed to maximize LLM prefix-cache hits, significantly reducing latency and operational token costs.
- Orchestrated a Firebase-backed phone OTP sign-in flow where the LLM manages the user experience via client-side tools, ensuring sensitive credentials and bearer tokens never enter the AI context.
I designed and built a full-stack conversational AI agent for Tipaload, an Australian marketplace for skip bin hires. The goal was to automate the entire customer lifecycle—from the first “How much does this cost?” to the final booking confirmation—creating a seamless, end-to-end journey that operates entirely without human intervention.
The chatbot is built on Next.js (App Router) and utilizes the Vercel AI SDK to deliver real-time, streaming responses via different models. I implemented similar RAG pipeline like AI Receptionist using PostgreSQL and pgvector. To help with content management, I built admin panels to manage chunks, auto update through crawling the main site.
One of the most flexible parts of the architecture is the persona system. The bot can dynamically and automatically switch between specialized roles, such as sales or order management, depending on the user’s needs. These personas, along with their specific system prompts and tool permissions, are managed through the admin panel. This means the bot’s behavior and capabilities can be updated or expanded instantly without requiring any new code deployments.
Beyond just chatting, the bot acts as a functional extension of the Tipaload platform. Through a custom tool-calling layer, it integrates directly with internal REST APIs. This allows the AI to perform live tasks like checking postcode coverage, retrieving real-time bin availability, and processing guest bookings.
To maintain performance and keep costs under control, I developed a structured session memory system. Rather than feeding the entire raw history back into the model, the bot uses a put_memory tool to extract and store key details (like name, location, and waste type) into a JSONB column. I also implemented a rolling summarization pipeline and an optimized prompt hierarchy. This specific ordering of data maximizes “prefix-cache hits” with the LLM provider, significantly reducing latency and token expenditure during long conversations.
Finally, security and authentication were handled with a “security-first” conversational flow. For sensitive actions like order lookups, I built a three-step phone OTP sign-in using Firebase. The architecture is designed so that the LLM orchestrates the flow through client-side tools, but never actually handles bearer tokens or credentials itself. This ensures the sign-in process feels natural to the user while keeping the AI context completely secure and isolated from sensitive authentication data.d through the LLM stream. This architecture ensures the authentication flow feels conversational and natural to the user, while keeping credentials completely out of the AI context.
