Sofia Costa is a consistent AI persona: a fictional 28-year-old nomadic film photographer whose content, images, captions and hashtags, is generated and published automatically by a bot. The core engineering challenge is consistency: the exact same face, writing voice and visual style in every post, with no human touch. The project is in active development, with a site at sofia-costa.com.
The character
Sofia is defined in a detailed persona.json: Italian father, Brazilian mother, born in Milan, studied photography in London, now traveling with a leather duffel and a 35mm film camera. Her appearance is specified down to freckles and a beauty mark, her wardrobe has a fixed palette, and her voice is calm, observational English with dry humor and the occasional Italian or Portuguese word. Even the things she never writes are specified in advance.
The pipeline
- Scene: chosen from a planned travel schedule (SQLite-backed in the next phase), matched to local time at her location
- Image: Flux 2 Pro via Replicate generates the scene, with Gemini as a fallback backend
- Identity: a Python sidecar built on InsightFace swaps in the persona's fixed face, guaranteeing the same identity in every post
- Caption: Claude writes in Sofia's voice, with hashtags from a defined pool including location tags
- Distribution: Telegram is live today; WordPress and Instagram are planned for phase 3
A scheduler checks hourly and runs a new cycle once the configured interval (default 17 hours) has passed.
Stack
Node.js + Express with a cron scheduler, Flux 2 Pro on Replicate, Python 3.11 + InsightFace for face swapping, the Anthropic Claude API for captions, SQLite for the travel schedule, and a multi-stage Docker deployment (Node and Python together) on Railway with a persistent volume. Site: sofia-costa.com.
