Two projects, built end to end

Projects Biresh has built with others.

Built by Biresh during an internship at PGAGI Consultancy (Lead AI/ML Intern on SentLogic, AI/ML Intern on the eBay AI Arbitrage System), not as Biru Labs contracts.

One project for a client in the USA and one for a client in Estonia, both delivered by our founder through PGAGI Consultancy: AI, backend, integrations and billing. The source code is private, and we're happy to walk through the architecture on a call.

Chapter 01 · Instagram B2B AI DM Automation SaaS

SentLogic

Built by Biresh as a Lead AI/ML Intern at PGAGI Consultancy, not as a Biru Labs contract.

A B2B SaaS that automates Instagram DMs for merchants and creators. A merchant connects Instagram, and optionally Shopify, and AI handles customer conversations in the DMs. A separate AI Business Advisor helps merchants understand and run their own account.

Client
United States
Integrations
Instagram, Shopify
Role
Lead AI/ML Intern, PGAGI Consultancy
Period
January to August 2026

Built by Biresh and the team during our internship at PGAGI Consultancy, with ownership across AI, backend systems, integrations, billing, knowledge management, and production infrastructure.

Two platforms, deeply integrated.

Instagram

Instagram OAuth with encrypted tokens, account switching and a posts feed. Meta webhooks with signature checks handle comments and DMs: keyword triggers with exclusions, cooldowns and duplicate protection, then an automatic first DM.

We researched Instagram's messaging-window rules and adapted the flows around them, and passed Meta's app review after fixing the issues from the first submission.

SentLogic

  • AI replies with RAG
  • Knowledge base
  • Business Advisor

Shopify

Shopify OAuth, bulk catalogue sync, and webhooks for products, inventory and orders. Product edits re-embed the knowledge base automatically, and a nightly reconciliation job catches anything a webhook missed.

Orders are traced back to the Instagram conversation that started them, and a dashboard handles Shopify customer data requests (GDPR).

What we built.

AI replies with RAG

Claude Sonnet and Haiku on AWS Bedrock, Titan embeddings stored in pgvector, and query expansion for better retrieval. Simple questions go to the smaller model and knowledge-heavy ones to the larger. Bedrock Guardrails keep customer-facing and merchant-facing replies safe.

Human handoff you can trust

Each reply gets a confidence score that weights the evidence found (60%) above the model's own opinion of itself (40%). Below 0.7 the AI pauses and the merchant takes over. Complaints and business enquiries escalate automatically, with an email and a push notification.

It's a practical rule of thumb, not a statistical guarantee.

A knowledge base with versions

Merchants add URLs, PDFs, Word files, text, FAQs and product catalogues. Up to five versions, one live at a time, with rollback. The AI only reads the live version, and live documents can't be deleted by accident. A report suggests what's missing for the merchant's kind of business.

The Business Advisor

A floating assistant that answers "how are my automations doing?" from real database queries instead of guesses. Merchants can create, pause, edit or delete automations in plain English: similar names trigger a clarifying question, and destructive actions ask for confirmation.

It knows which page you're on, remembers past chats, searches the web for competitor questions and has its own daily AI budget.

Automations

Comment, story and DM-responder automations with follow-gates, email capture, images, buttons and tracked links. Unfinished automations are saved as drafts, and stopped ones go to an archive instead of being deleted.

Conversations and nudges

A dashboard with pause and resume, human replies, and automatic pause with a grace period. Haiku classifies every message into seven types and tracks sentiment, and a nudge system follows up with people who go quiet mid-conversation.

Billing and limits

Stripe checkout, portal and cancellation with idempotent webhooks, five tiers, and monthly conversation credits. Customer replies and the Advisor have separate daily AI budgets, so heavy customer traffic can't starve the merchant's own assistant.

Controls and notifications

A global kill switch puts the whole account in manual mode. Web Push works on Android and on iPhone home-screen web apps, with per-type preferences so merchants only get what they want.

Analytics

Funnels, click-through, per-automation and per-product stats, peak hours, AI resolution rate, and link-click tracking with revenue attribution.

Internal admin panel

Role-based access, an append-only audit log, user and billing tools, a support inbox, a content CMS, broadcasts, platform analytics, two-factor login and time-limited read-only impersonation.

From comment to counted sale.

We chose cart links over UTM parameters and cookies, which can be stripped or blocked during checkout. Putting the attribution in the Shopify cart gave the backend a source of truth that survives.

  1. 1

    A comment

    A customer comments a keyword on a post.

  2. 2

    An AI reply

    The AI answers in the DM, using the merchant's knowledge base.

  3. 3

    A tracked cart link

    The reply carries a cart link with the conversation, workspace and channel.

  4. 4

    Shopify checkout

    The customer pays, and the attributes travel with the order.

  5. 5

    Revenue credited

    The order webhook is verified and de-duplicated, then the sale is credited to the conversation.

Problems we solved.

  1. Paid access that outlived the subscription

    Subscription status was cached in a login token that lasted seven to eight days, so a cancelled user kept paid access until they signed in again. We moved the check to the database.

    We also added an automatic downgrade the moment a payment dispute opens.

  2. A bot that apologised for a sandwich that didn't exist

    In testing, the AI apologised to a customer who claimed to have found a cockroach in a sandwich the merchant doesn't even sell. Claims about products and complaints are now checked against the knowledge base before the AI admits or apologises for anything.

  3. Answers from a half-built index

    While a document was being re-chunked and re-embedded, the playground could answer from stale data, and the Advisor was reading drafts. We locked input during processing and limited retrieval to the live version.

  4. Revenue counted twice

    Webhooks get retried. Order handling checks the Shopify order ID first, and revenue moves through explicit states (untracked, attributed, paid, partially refunded, refunded, cancelled) so partial refunds are right too.

  5. Choosing a model with evidence

    We built a side-by-side comparison of Sonnet and Haiku on the same prompts and the same knowledge base, so the client could choose from real outputs instead of hunches.

Built with.

  • Python
  • FastAPI
  • PostgreSQL
  • pgvector
  • Redis
  • AWS Bedrock
  • Claude Sonnet
  • Claude Haiku
  • Titan embeddings
  • Stripe
  • Shopify
  • Instagram Graph API
  • Exa search
  • Web Push
  • Amazon S3
  • SendGrid

Chapter 02 · eBay AI Arbitrage System

AI Arbitrage System

Built by Biresh as an AI/ML Intern at PGAGI Consultancy, not as a Biru Labs contract.

An AI-assisted arbitrage service built on FastAPI. It finds products on source marketplaces and lists them on eBay (Germany by default) at a target profit. It collects, cleans, prices and publishes, and records every step.

Client
Estonia, Europe
Role
AI/ML Intern, PGAGI Consultancy
Integrations
eBay, Zyte
Status
Core pipeline built, order handling next

Built by Biresh and the team, during our internship at PGAGI Consultancy.

Pricing that knows eBay's fees.

13% + 2.9% + €0.30eBay's final-value fee plus payment processing, built into every price.
20%The target profit each sell price is calculated for.
15%The minimum profit. Anything below it is filtered out.

One pipeline, six stages.

  1. 1

    Collect

    Scrapes product pages and searches through the Zyte API, in batches.

  2. 2

    Transform

    Normalises to one schema, parses prices, drops invalid or out-of-stock items.

  3. 3

    Price

    Finds the sell price for the target profit after fees, and filters the rest.

  4. 4

    List

    Creates, updates and deactivates eBay listings through the Inventory API.

  5. 5

    Store

    Saves products, listings and runs in PostgreSQL on Google Cloud SQL.

  6. 6

    Log

    Writes every event to Google Sheets so the client can follow along.

Fifteen source platforms.

  • Amazon
  • Walmart
  • Target
  • Costco
  • Best Buy
  • Home Depot
  • AliExpress
  • Alibaba
  • Temu
  • Shein
  • eBay
  • Etsy
  • DHgate
  • Made-in-China
  • Wayfair

What we built.

Categories found, not hardcoded

The system asks eBay's Taxonomy API for the best category for each product and the item details it requires, then fills them from product data: brand, colour, model, material and size, using both German and English field names.

The full listing lifecycle

Inventory items, offers, publishing and withdrawal, merchant locations and business policies, all wrapped in one client, with fee lookups before anything is published.

Runs you can trust

Every run is recorded with its numbers (collected, valid, profitable, listed, errors) and ends as completed, partial or failed. A dry-run mode does the pricing analysis without creating a single listing.

eBay sign-in that looks after itself

OAuth tokens are stored in the database and refreshed before every run, with a standalone refresh script for schedulers.

A clean API and a demo mode

Endpoints to run, dry-run and inspect runs, platforms and listings. A mock mode with a built-in catalogue shows the whole flow, from sign-in to a published offer, without scraping anything.

Everything traceable

Tables for raw products, products, listings, orders, action logs, pipeline runs and eBay tokens, so every listing can be traced back to the run that created it.

Built with.

  • Python
  • FastAPI
  • pydantic
  • PostgreSQL
  • Google Cloud SQL
  • Zyte API
  • eBay Inventory API
  • eBay Taxonomy API
  • Google Sheets API

Your turn

Want something like this built?

Tell us about your project. We'll reply with questions, not a sales pitch.