Software engineer

Hi, I'm Mayank Raj.

I build whole products.

I design and build AI agents and the backends, data pipelines and cloud underneath them: today for India's small retailers at Tohands.

Now
AI Software Engineer, Tohands
Focus
AI, backend & cloud
Based in
Bengaluru · open to remote
Open to
Founding, applied AI & FDE roles
Portrait of Mayank Raj
01 — Experience

Where I've done the work.

Mar 2025 – Present
Tohands

AI Software Engineer

Tohands is a venture-backed startup making smart calculators and an app that help India's small shopkeepers run their business. I joined as an AI engineer and my scope grew to architecture across the product: the AI assistant, the commerce backend, event streaming, internal platforms and the cloud they run on. I lead an analyst and a junior engineer, and set how engineering works with AI.

Agentic AIArchitectureBackendCloudTeam lead
Apr 2024 – Present
CypherSage
Founder

A business consultancy focused on technology, helping founders, small businesses and researchers turn business problems into software, ML and data solutions. I was hands-on in 2024–25, scoping work with clients and leading delivery; I remain the founder but am no longer involved day to day.

Education
2023 – 2025
M.Sc Data Science
Christ University
2020 – 2023
B.Sc Computer Science, Mathematics & Statistics
Christ University
02 — Selected work

Systems I've designed and shipped.

Since joining Tohands I've designed and shipped systems across AI, backend, data, infrastructure and product. Three are walked through below. The rest follow, grouped by area.

01
Agentic AI

AI Assistant on a Keypad-Only Device

LangGraphMCPLiveKitpgvectorLiteLLM
The problem
Shopkeepers wanted answers about their own business in plain language, on their phone and on a smart calculator with nothing but a keypad.
The approach
One agent runtime for text and realtime voice, with tools reached over MCP and answers grounded in each shop's own data.
Key decisions
The device declares its own tools when a session starts, and the server treats that list as untrusted input. Model routing is provider-agnostic, so no single vendor is a hard dependency.
02
Architecture & Security

Event-Sourced Commerce Platform

KotlinSpring BootAxonCQRSOAuth 2.0
The problem
Billing, orders, inventory and subscriptions had grown together in one backend that was getting harder to change safely.
The approach
A modular monolith on an event-sourced core, with each domain as its own module and its own identity and access layer.
Key decisions
Event sourcing over plain CRUD, for a record that can be audited and replayed. Every lookup is scoped to the business making it, so tenant isolation is part of the structure, not a check someone might forget.
03
Internal Product

Company Operations Platform

KafkaDebeziumRealtimeAI triage
The problem
Sales, support and onboarding were working across scattered tools, with no single view of a customer.
The approach
One system of record for leads, orders, support and device onboarding, with AI-assisted triage and work queues that assign themselves.
Key decisions
Fed by change data capture instead of dual writes, so it can't drift from the source of truth. Scoped with the teams who use it and built together with a teammate.

More of what I've built

Most of it runs in production at Tohands; the last group is independent work.

AI & Voice
  • LLM routing & failover

    Routes each task to the right model, fails over live, with prompt caching and full tracing.

  • Realtime voice pipeline

    Voice on mobile and hardware, with self-hosted noise cancellation and per-turn recording.

  • Photo-to-inventory upload

    Reads a photo of stock or a bill straight into the catalogue.

  • Inventory recommendations

    Learns each shop's buying patterns and re-ranks from what merchants accept.

Identity & Security
  • Identity & access layer

    OAuth 2.0 for integrators, signed requests from devices, fail-closed sessions and an audit log.

  • Tenant isolation by design

    Every read and write re-checks which business it belongs to.

Data & Streaming
  • Kafka & change data capture

    Taken to production behind a production-readiness review, with lag and health alarms.

  • Analytics pipeline rebuild

    Made faster and lighter, and traced a cross-system data mismatch to its root cause.

  • Live business dashboards

    Real-time views of usage and activity for the whole company.

  • Onboarding cohort tracking

    Follows every new device from first login, and flags who needs a nudge.

Platform & Reliability
  • Kubernetes platform as code

    Multi-environment AWS, built with Terraform and Helm and delivered through GitOps.

  • Read replicas & disaster recovery

    A read replica for scale, plus a cross-region replica for disaster recovery.

  • Self-hosted internal tooling

    Feature flags, product analytics, project management, device access and error tracking, all in-house.

  • Quality gates for AI-assisted work

    Coverage floors and architecture-boundary checks that fail CI across teams.

Workflows & Integrations
  • Order lifecycle on Temporal

    Fulfilment, shipping and customer messaging across many third-party services.

  • AI triage of internal requests

    Bug reports and feature requests grouped, tagged and routed automatically.

  • Payment email ingestion

    Inbound partner emails parsed into the system through AWS SES.

Independent Work
03 — Design decisions

The calls behind the systems.

Architecture is mostly trade-offs. A few I've made, what lost, and what each choice costs.

Let the device declare its own tools

Context
A server-side agent had to act on hardware it doesn't control, and each device can do different things.
Options
Register every device capability on the server, or have each device announce its tools when a session starts.
Chosen
The device declares its tools, and the server treats that list as untrusted input, scoped to the caller. New hardware features don't need a server release.
The cost
A declared tool is a promise the server can't verify in advance, so validation and timeouts at that boundary matter more than anywhere else.

Event sourcing for commerce

Context
Orders, stock, billing and refunds interact, and every change has to be explainable after the fact.
Options
Plain CRUD tables with an audit log on the side, or events as the source of truth with read models built from them.
Chosen
Event sourcing with CQRS. Writes are checked against the aggregate itself, never against a read copy, so a lagging view can't block a valid write.
The cost
It costs more up front: evolving event schemas and running projections are real work. Worth it for money and stock, not for every module.

Change data capture over dual writes

Context
The CRM and other systems needed every subscription and user change, in real time and without drifting.
Options
Have the backend write to the database and publish to Kafka separately, or publish from a transactional outbox through change data capture.
Chosen
An outbox table captured by Debezium into Kafka. If the transaction commits, the event exists; if it doesn't, nothing leaks.
The cost
Replication slots need watching. A stalled slot quietly grows, so heartbeats and lag alarms went in on day one.
04 — How I work

Design first. Build fast. Own the outcome.

Most of my time goes into the decisions that matter: what to build, how it fits together, and how it stays secure and scales. AI coding tools turn those decisions into working software quickly, and I review and own everything that ships.

  1. 01

    Understand

    Requirements first: who uses it, what happens when it fails, what it costs to run, and what the business actually needs from it.

  2. 02

    Architect

    Settle the design, flows, security model and scaling path before any code, and write it down so anyone can build on it.

  3. 03

    Build fast

    I move from design to working software quickly with AI coding agents like Claude Code. Tests, type checks, an architecture-boundary check and my own review of every change gate what ships.

  4. 04

    Own it in production

    A readiness review before anything risky goes live, alerts I'd want at 3am, and a rollback path for every change. I stay accountable for the outcome, not just the merge.

05 — What I do

Where I spend my time.

Most of my work sits where AI agents meet real backends: identity, event streams, and the infrastructure underneath. Around that, whatever the product needs next.

Product & System Architecture

Turning a fuzzy requirement into a design a team can build on: domain boundaries, data models, consistency, security and a path to scale. Event-sourced platforms, modular monoliths, multi-tenant products.

Agentic AI & Voice

AI assistants that take real actions: agents, tool protocols like MCP, retrieval, model routing and realtime voice, on the web, in mobile apps and on hardware.

Backend & Distributed Systems

Services in Kotlin and Python, event streams on Kafka, change data capture, and long-running workflows on Temporal that recover cleanly when something fails.

Cloud & Platform Engineering

AWS and Kubernetes run entirely as code: Terraform, Helm and GitOps delivery, with observability, disaster recovery and self-hosted tooling built in.

Data, Analytics & ML

Data pipelines, analytics dashboards and applied machine learning, from recommendation engines to evaluation sets, and the plumbing underneath them.

Products & Internal Tools

CRMs, operations platforms, websites and app features. Whatever the business needs next, built together with the people who will use it.

07 — Toolkit

What I reach for.

Strongest in
  • System design & architecture
  • Agentic AI & MCP
  • Kotlin / Spring Boot
  • Python / FastAPI
  • Kafka & event-driven systems
  • AWS & Kubernetes
Also work with

AI & Machine Learning

  • LangGraph / LangChain
  • Model Context Protocol
  • LiteLLM
  • RAG with pgvector
  • LiveKit voice
  • Langfuse & evaluation

Backend & Architecture

  • Event sourcing & CQRS
  • Axon
  • Temporal
  • OAuth 2.0 & multi-tenancy

Data & Streaming

  • PostgreSQL
  • Redis
  • ClickHouse
  • Kafka (Amazon MSK)
  • Debezium CDC
  • Analytics & dashboards

Cloud & DevOps

  • AWS
  • Kubernetes (EKS)
  • Terraform
  • Helm
  • ArgoCD
  • GitHub Actions
  • Sentry & Grafana

Way of Working

  • System design
  • Security by design
  • Claude Code
  • Requirements & scoping
  • Technical writing
  • Leading small teams