Skip to content
Open to AI engineering roles and freelance work

I build AI systems that survive contact with production.

I’m Hussain — an AI Software Engineer working on agents, retrieval-augmented generation and LLM applications, and on the full-stack software that has to hold them up.

Architecture, implementation, evaluation and deployment — treated as one job, because a model that works in a notebook and a system people can depend on are not the same deliverable.

  • AI Agents
  • RAG
  • LLM Applications
  • Automation
  • Full-Stack AI
Requestuser intentApplicationNext.js · APIOrchestratorstate · routingLLMreasoningRetrievalvector searchToolsexternal APIsPersistencerecords · vectors
  • AI Agents

    Graph-structured workflows, tool calling, state

  • RAG Systems

    Ingestion, chunking, retrieval, grounded answers

  • LLM Applications

    Structured output, streaming, context budgets

  • Intelligent Automation

    Queues, schedules, realtime and push delivery

  • Full-Stack Systems

    Typed APIs, access control, tested domains

  • Cloud Deployment

    Stateless compute, CI, environment-scoped config

Selected work

Systems, not demonstrations

Four projects, each written up as an engineering case study: the problem, the architecture, the decisions that shaped it, and what proved difficult.

Retrieval-Augmented GenerationIn development · 2026

CogniFlow

A retrieval-augmented chatbot that answers from a private, continuously ingested corpus instead of the model's training data — with every answer traceable to its source.

  • Document ingestion
  • Vector retrieval
  • Grounded generation
  • Source attribution
  • Next.js 16
  • TypeScript
  • OpenAI
  • Astra DB
  • Puppeteer

View case study

Production Platform EngineeringIn development · 2026

EduNexus

A multi-role institute management platform covering attendance, finance, academics and operations — built as a tested, queue-backed system with realtime delivery and CI, not a CRUD app.

  • Multi-role access control
  • Background job processing
  • Realtime + push delivery
  • Automated test suite
  • Node.js
  • Express
  • MongoDB
  • Redis
  • Socket.IO
  • Jest

View case study

Agent & Retrieval EngineeringIn development · 2026

Generative AI Engineering Lab

A working reference set for the primitives agent systems are actually made of — graph-structured workflows, retrieval strategies, vector stores and schema-constrained model output.

  • LangGraph workflows
  • Retriever strategies
  • Vector store comparison
  • Structured output
  • Python
  • LangGraph
  • LangChain
  • FAISS
  • Chroma
  • Pydantic

View case study

Full-Stack ProductLive · 2026

Support & Issue Tracking System

A role-based internal ticketing system — reporters, agents and administrators working the same queue through different permissions — deployed as serverless functions.

  • Role-based access control
  • Ticket lifecycle
  • File attachments
  • Serverless deployment
  • React
  • Express
  • MongoDB
  • JWT
  • Cloudinary
  • Vercel

View case study

AI Engineering

What I actually do when I build an AI system

Capability described through implementation. Every practice below exists in code, not just in a list of technologies.

AI Agents

Agents are control flow before they are prompts. I build them as explicit graphs — ordered steps, concurrent branches, and routing that depends on state — so a failing step can be identified instead of a whole prompt being suspect.

  • Sequential, parallel and conditional workflow graphs, implemented rather than diagrammed
  • State passed explicitly between nodes so each transition is inspectable
  • Tool calls treated as a typed boundary, not as free-text the model improvises
  • Concurrent execution for steps with no data dependency between them
  • Escalation paths for the cases an agent should not decide alone
  • LangGraph
  • LangChain
  • Python
  • Tool calling

Retrieval-Augmented Generation

Most RAG systems fail at retrieval, not at generation. I treat ingestion, chunking and retrieval as the parts with the quality problem, and provenance as a requirement rather than a feature.

  • Headless-browser ingestion so client-rendered sources are captured instead of returning empty shells
  • Overlapping chunk windows so a fact spanning a boundary survives whole in at least one chunk
  • Batched embedding per document, which is the difference between minutes and hours of ingestion
  • Source URL stored beside every vector, captured at write time so citations are real
  • Multi-query retrieval to raise recall; contextual compression to raise precision
  • One embedding model on both sides of the pipeline, enforced by construction
  • OpenAI embeddings
  • Astra DB
  • FAISS
  • Chroma
  • LangChain retrievers

LLM Applications

The boundary between a model and application code is where LLM products break. Anything crossing it gets a schema, so a malformed response fails at the boundary instead of propagating.

  • Structured output constrained by Pydantic models and TypedDict schemas
  • Validation at the boundary, so an invalid response is an error rather than a silent bad value
  • Prompts held as configuration, so behaviour can be tuned without a deployment
  • Context budget managed deliberately — pruning retrieved documents rather than truncating blindly
  • Streaming responses on standard Node.js runtimes, no special-cased infrastructure
  • OpenAI API
  • Pydantic
  • Zod
  • Next.js route handlers

Engineering philosophy

I don’t build AI demos.
I build AI systems.

A demo has to work once, for someone who wants it to. A system has to keep working while inputs change, providers change and nobody is watching. Almost everything that separates the two is ordinary engineering.

  • Reliability

    A model is a probabilistic component inside a deterministic system. The system's job is to make the unpredictable part safe: validate what comes back, constrain what it can do, and define behaviour for the case where it is wrong.

  • Observability

    If you cannot see what an agent did, you cannot fix it. Explicit state transitions, logged tool calls and retrieval traces turn 'the answer was bad' into a specific step that misbehaved.

  • Security

    AI systems handle credentials and private data by default. Secrets stay in the environment, inputs are validated and sanitised at the boundary, and access is enforced centrally rather than per handler.

  • Scalability

    Slow work belongs on a queue, not in a request. Compute stays stateless so it can be replicated, and state lives where it can be shared — which is what makes growth a configuration change rather than a rewrite.

  • Human in the loop

    The most important thing an agent can know is when to stop. Irreversible actions, low-confidence answers and unfamiliar situations should route to a person by design, not by accident.

  • Evaluation

    Prompt changes are code changes without tests unless you measure them. A fixed question set, a retrieval quality baseline and a regression check make an improvement provable instead of anecdotal.

How I build AI systems

AI as software engineering, not experimentation alone

The order matters more than the steps. Most AI projects that fail were built correctly and aimed at the wrong problem, or shipped without any way to tell whether a change made them better.

  1. 01

    Understand the problem

    What decision or task is this actually replacing, who depends on it, and what does being wrong cost? Most AI projects that fail were correctly built and aimed at the wrong problem.

  2. 02

    Design the architecture

    Decide what the model is responsible for and what it is not. Draw the data path, name the failure modes, and pick where a human belongs — before any code exists.

  3. 03

    Build the system

    Typed boundaries, schema-constrained model output, thin handlers, secrets in the environment. The AI is one component in a system built to normal engineering standards.

  4. 04

    Evaluate

    Measure retrieval quality and answer behaviour against a fixed question set. Establish a baseline first, so later changes can be shown to be improvements rather than assumed to be.

  5. 05

    Deploy to production

    Stateless compute, external storage, environment-scoped configuration, CI that builds and tests before merge. Deployment is a property of the design, not a step at the end.

  6. 06

    Monitor and improve

    Watch what users actually ask, where retrieval misses and where the system escalates. Real usage is the only source of the next set of improvements worth making.

Technical stack

Tools I have actually shipped with

Restricted to technologies that appear in real work. A longer list would be easy to write and worth less to read.

AI

Agent orchestration, retrieval and output contracts.

  • Python
  • LangGraph
  • LangChain
  • OpenAI API
  • Embeddings
  • RAG pipelines
  • Tool calling
  • Structured output
  • Pydantic

Backend

APIs, access control and asynchronous work.

  • Node.js
  • Express
  • REST APIs
  • JWT + RBAC
  • Socket.IO
  • Bull queues
  • Joi
  • PDFKit

Data

Relational, document and vector storage.

  • MongoDB
  • Mongoose
  • Redis
  • Astra DB
  • FAISS
  • Chroma
  • Prisma
  • GraphQL

Frontend

Typed, server-rendered interfaces.

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Vite
  • shadcn/ui
  • Radix UI

Infrastructure

Deployment, CI and platform services.

  • Vercel
  • GitHub Actions
  • Git
  • Supabase
  • Cloudinary
  • Firebase
  • Resend

Quality

Proving the system still works after a change.

  • Jest
  • Supertest
  • mongodb-memory-server
  • ESLint
  • Prettier
  • Zod

Currently exploring

What I'm working through right now

Open questions I'm spending time on, rather than a list of things I already know.

  • Agentic AI

    Multi-step agents that plan, call tools and know when to hand back to a person.

  • AI evaluation

    Making prompt and retrieval changes measurable against a fixed question set instead of judged by feel.

  • Production RAG

    Ingestion freshness, retrieval quality and citation integrity at the point where a corpus stops being small.

  • Long-term agent memory

    What an agent should keep between sessions, and what it should be made to forget.

  • Multi-agent architectures

    When splitting work across specialised agents beats one capable agent, and when it only adds coordination cost.

  • AI infrastructure

    Queues, workers, streaming and observability — the layer that decides whether an AI feature survives contact with users.

About

Judge the work, not the adjectives

I came to AI engineering through software engineering, and most of what makes an AI feature trustworthy turns out to be ordinary engineering — validation, queues, provenance, evaluation.

I’m based in Faisalabad, Pakistan and work remotely. If something below doesn’t hold up under inspection, I’d rather hear it than not.

More about how I work
  • Every project links to its source

    The case studies describe code you can open and check. Nothing here rests on a claim you have to take on faith.

  • No metric I haven't measured

    Where a result has not been measured, the case study says so. An invented number is worth less than an empty space.

  • Decisions, including the trade-offs

    Each case study records what was chosen and what was given up. Architecture without its trade-offs is marketing.

Contact

Have an AI product or workflow worth building?

Send me the problem — not the spec. If it’s a fit I’ll tell you how I’d approach it; if it isn’t, I’ll say so.

Faisalabad, Pakistan · PKT (UTC+5) · Working remotely