2026-06-27
Building My AI Digital Twin
I wanted a way for people visiting my site to actually talk to me — or at least a faithful AI version of me — instead of just reading a static bio. So I built a digital twin: a chatbot that answers questions about my background, skills, and experience, grounded in facts I wrote about myself.
The stack
- Frontend: Next.js, statically exported and served from S3 through CloudFront.
- Backend: FastAPI running on AWS Lambda behind API Gateway.
- Model: the OpenAI API, with a system prompt built from my own bio and a strict instruction not to hallucinate facts about me.
- Infra: all of it — Lambda, S3, CloudFront, API Gateway — provisioned with Terraform.
What I learned
The trickiest parts weren't the AI integration — they were the infrastructure details: making sure the Lambda's dependencies were actually bundled into the deployment package, and remembering to invalidate the CloudFront cache after every frontend deploy so changes show up immediately instead of an hour later.
This site — the one you're reading right now — is itself one of the projects on my projects page. Try the chat widget in the corner; it's me, or at least a very faithful copy.