Designing and implementing a scalable microservices architecture for robust email processing
Developed core microservices (Mail Connection, Orchestrator, Agent, Search) with explicit event-driven workflows and PostgreSQL state tracking
A customer-support automation system built around explicit service boundaries, retrieval, and event-driven processing.
Context
The work started with a familiar operational problem: support teams had recurring email questions, fragmented knowledge, and little leverage from previous answers. The goal was not just to call an LLM, but to design a system that could ingest emails, search a controlled knowledge base, draft useful responses, and remain observable enough to operate.
Build
I split the platform into clear services for mail ingestion, orchestration, agent work, and search. Redis carried events between services, PostgreSQL held durable state, and Qdrant powered semantic retrieval. The interesting part was making the agent workflow boring in the right way: explicit states, logs, health checks, and retrieval steps that could be inspected when an answer was wrong.
Engineering
Developed core microservices (Mail Connection, Orchestrator, Agent, Search) with explicit event-driven workflows and PostgreSQL state tracking
Built a custom RAG solution leveraging tinygrad and Qdrant for efficient semantic search and accurate text embeddings
Applied computational graph patterns and sophisticated NLP techniques for query reformulation and answer synthesis
Implemented structured JSON logging, comprehensive health checks, and transactional processing to ensure operational excellence
Outcome
Stack