# Lucas Espindola > Lucas Espindola is a principal engineer doing applied AI research: he trains small, specialised models that run on-device and outperform general frontier models on narrow AI security problems, and builds the platforms AI agents run on. He has 10+ years of experience in distributed systems, cloud-native platforms and decentralized storage (IPFS). Principal Engineer, AI Research & Platform · United States · Website: https://lucasespindola.com/ Focus: AI agent security · Small-model fine-tuning and evaluation · Private, on-device inference · Platforms for AI agents · Decentralized content routing (IPFS). ## Research - **Llama-Doorman-22M** (Oct 2026): An on-device prompt-injection classifier (22M parameters, ONNX int8) that tells an instruction aimed at an AI agent apart from text that merely mentions an attack. It catches 79% of attacks that rule-based checks miss at a 0.4% false-alarm rate, against 38% for the best frontier model, in about 0.24 s per check on a laptop CPU. It powers Doorman, an open-source (Apache-2.0) local app and CLI that watches what AI coding agents read and run, and holds risky steps for an engineer's approval. [Model on Hugging Face](https://huggingface.co/PinataCloud/Llama-Doorman-22M) · [Doorman on GitHub](https://github.com/PinataCloud/doorman) · [How it was trained](https://lucasespindola.com/notes/small-model-prompt-injection) - **Federated Content Routing: A Three-Tier Architecture for Resilient Content Routing in IPFS** (IEEE ICC 2026): Sole author and presenter. A three-tier design for IPFS content routing: an edge query plane, a regional Byzantine-fault-tolerant control plane and a global DHT fallback, giving central-indexer latency with 99.95% availability when the edge goes down. [Paper on IEEE Xplore](https://ieeexplore.ieee.org/document/11586836) · [Write-up](https://lucasespindola.com/notes/federated-content-routing-ipfs) ## Projects - **Scout** (Side project): Describe a task and find model candidates on Hugging Face. Scout searches live repository records, reads model cards, and compares task fit, language metadata, licenses, estimated weight memory and available inference providers. Recommendations link to their evidence, with setup snippets and shareable searches. [Scout](https://lucasespindola.com/scout) - **Doorman** (Open source): A local app and CLI that watches what AI coding agents read and run, flags prompt injections and leaked secrets, and holds risky steps for an engineer's approval. It runs entirely on the user's machine and is open source (Apache-2.0). Lucas built its on-device model, Llama-Doorman-22M, and the research pipeline behind it. [Doorman on GitHub](https://github.com/PinataCloud/doorman) · [Model on Hugging Face](https://huggingface.co/PinataCloud/Llama-Doorman-22M) - **Human-ish** (Side project): A browser lab for comparing two open AI-text detectors: TMR RoBERTa and ModernBERT trained on RAID and MAGE. It runs models locally, maps scores passage by passage, exposes model disagreement and limitations, and presents every result as a screening signal rather than proof of authorship. [Human-ish](https://lucasespindola.com/human-ish) · [TMR RoBERTa](https://huggingface.co/onnx-community/tmr-ai-text-detector-ONNX) · [ModernBERT RAID + MAGE](https://huggingface.co/onnx-community/modernbert-ai-detection-raid-mage-ONNX) - **Neuron Dissector** (Side project): A browser lab for looking inside a language model: it runs a small story-writing model (TinyStories), or any GPT-Neo or GPT-2 model a visitor picks from Hugging Face, on a forward pass written in JavaScript with a WebAssembly SIMD kernel for its matrix multiplies, shows every MLP neuron and attention head firing token by token, and lets visitors cut, boost, invert or clamp them and compare the edited model's story with the original's. It's on this site's desktop (Dissector, or `app dissect` in its terminal). [Neuron Dissector](https://lucasespindola.com/dissector) · [How it works](https://lucasespindola.com/notes/neuron-dissector) · [TinyStories models](https://huggingface.co/roneneldan/TinyStories-3M) - **Prism** (Side project): A browser lab for the features inside a language model: a TopK sparse autoencoder splits TinyStories' residual stream into thousands of features, either a ready-made atlas or one a visitor trains on their own device for any layer. Visitors browse the features as a map, see the text that fires each one and the words it pushes the model toward, and clamp a feature on or cut it out while the model writes, next to the untouched original. It runs on Neuron Dissector's forward pass. It's on this site's desktop (Prism, or `app prism` in its terminal). [Prism](https://lucasespindola.com/prism) · [TinyStories models](https://huggingface.co/roneneldan/TinyStories-3M) - **Autopsy** (Side project): A browser lab for why a RAG system answered what it did: it follows every passage of a document set (the site's notes, or a visitor's own files, which never leave the page) through chunking, BM25 keyword search, embedding search, their hybrid, a cross-encoder reranker, the context window and the answer, on one chart. Answers come from Workers AI, which sees only the question and the passages that reached the context, or from a small model in the browser; citations, numbers no passage contains and weakly supported sentences are flagged. Visitors poison a passage (a swapped number, a planted instruction, a keyword decoy) and see whether retrieval or the model passes it on. It's on this site's desktop (Autopsy, or `app autopsy` in its terminal). [Autopsy](https://lucasespindola.com/autopsy) - **Intern** (Side project): An AI that uses this site's desktop in plain sight: given a task, it searches notes and profile files, opens apps, clicks, picks options, types and reads, one step at a time, with a visible cursor and a persistent pause/resume control. Each step, the page sends a text snapshot of the desktop's controls to Llama 3.3 70B on Workers AI, which picks one action as schema-checked JSON; the page runs it on its own controls, blocks sending messages and leaving the site, and asks the visitor before any download. Every step is logged with what the model said it saw and what happened, unsupported numbers are flagged, and bundled tasks check their expected result. It's on this site's desktop (Intern, or `app intern` in its terminal). [Intern](https://lucasespindola.com/intern) - **llms.ink** (Side project): An llms.txt generator for any link: it turns a website, docs section, article, GitHub repo or PDF into an llms.txt index and an llms-full.txt with the content. A model groups the links into sections and writes the descriptions, but refers to links only by number, so it can't add a URL that wasn't on the page. [llms.ink](https://llms.ink/) - **gimmeclip** (Side project): A video downloader for any link: paste a YouTube, Instagram, X, TikTok or Bluesky link and get the video as MP4 (up to 1080p) or MP3, save it, or send the file itself to WhatsApp from a phone's share sheet; or put gimmeclip.com/ in front of any video link. Downloads run in Cloudflare Containers with yt-dlp and ffmpeg. It's on this site's desktop too (gimmeclip, in Tools). [gimmeclip.com](https://gimmeclip.com/) - **peptidemeta** (Side project): An evidence-graded peptide reference library and wiki: 60+ peptides and blends tiered S–D by the strength of published evidence, with FDA and anti-doping (WADA) status and citations checked against PubMed. [peptidemeta.com](https://peptidemeta.com/) ## Writing - [I gave a tiny language model a lobotomy: neuron ablation in the browser](https://lucasespindola.com/notes/neuron-dissector.md): Neuron Dissector opens up a small story-writing model in your browser, every neuron and attention head on screen as it writes, with a scalpel for mechanistic interpretability's basic moves: ablation, activation steering and a per-neuron logit lens. A neuron that waits for a girl, a lobotomy that writes “good” forever, a palace neuron that leads to mud, and the GPT-Neo forward pass written from scratch to hold the knife. (November 9, 2026) - [How we trained a small model to tell a prompt injection from a quote](https://lucasespindola.com/notes/small-model-prompt-injection.md): Llama-Doorman-22M: a 22M-param on-device classifier that catches ~2× more missed prompt injections than frontier models, and the use-vs-mention dataset, eval harness and selection rules behind it. (October 20, 2026) - [Should my website be WebAssembly? One loop was enough](https://lucasespindola.com/notes/one-loop-in-webassembly.md): I measured before rewriting anything: the page stays JavaScript, but a 2.9 KB Rust kernel for matrix × vector runs 13–19× faster than the JS loop it replaces and makes the language models running in this site's browser apps 3–5× faster end to end, with the same results. Benchmarks, the memory rules that took most of the work, and what WebAssembly can't fix. (August 15, 2026) - [How we track our providers' outages, without the noise](https://lucasespindola.com/notes/tracking-upstream-outages.md): A small Cloudflare Worker that polls the status pages of the clouds and model providers we depend on every ten minutes, keeps only the incidents that touch services we use, and posts each one once in Slack, with its updates threaded underneath. (June 23, 2026) - [Federated Content Routing: A Three-Tier Architecture for Resilient Content Routing in IPFS](https://lucasespindola.com/notes/federated-content-routing-ipfs.md): My IEEE ICC 2026 paper: edge caches that serve quorum-signed snapshots, regional BFT clusters that only handle changes, and a global DHT that is always there. Central-indexer latency with 99.95% availability when the edge goes down. (May 27, 2026) - [How REBUY priced used electronics: from live comparables to machine learning](https://lucasespindola.com/notes/rebuy-pricing-used-electronics.md): Live marketplace comparables ranked by Levenshtein distance and priced by their median, a daily catalogue crawl to target the right products, then an ML layer: quantile price models trained on what actually sold, sales-velocity prediction and embedding-based product matching. (October 15, 2018) - [Thermohydraulic analysis and machine learning on the cloud](https://lucasespindola.com/notes/thermohydraulic-analysis-machine-learning-cloud.md): A stateless API, a queue-backed solver fleet on Azure and a scenario cache that removes 97 per cent of the arithmetic: how a 27-hour Monte Carlo availability study became a 62-second click, and the ML layer that learns from that cache where to start solving. (March 2018) - [Monte Carlo availability and capacity ramp-up studies in software](https://lucasespindola.com/notes/monte-carlo-availability-capacity-ramp-up.md): A 100,000-iteration Monte Carlo availability study and capacity ramp-up planning built into the app, with the GASBOL pipeline redesigned as a case study: system availability from 0.9811 to 0.9997 with stand-by units. (March 2016) - [Thermohydraulic simulation as a cross-platform mobile app](https://lucasespindola.com/notes/thermohydraulic-simulation-mobile-apps.md): Packaging a gas-pipeline thermohydraulic solver as an app for iOS, Android, desktop and the web: hundreds of simulations in seconds, executive and technical reports, XML models and KML for Google Earth. (December 2015) ## Experience - **Principal Engineer, AI Research & Platform** (current): Trained Llama-Doorman-22M and built the research pipeline behind it: use-vs-mention datasets, 72 trained candidates, held-out evaluation and pre-registered model selection. Architected a managed platform for persistent, stateful AI agents: container orchestration, global edge networking, workspace snapshots and multi-provider LLMs. Designed a distributed file storage system that scaled throughput ~500x; content-addressed storage (IPFS) at petabyte scale. - **Solutions Architect & Cloud Consultant**: On-prem to multi-cloud migrations with infrastructure and policy as code; microservices to Kubernetes. - **Software Architect**: Distributed systems for energy-sector clients, modelled with DDD and CQRS. - **Co-Founder & CTO**: An API product backed by web scraping and a machine-learning pricing model. - **Senior Software Engineer**: Engineering simulation software: numerical methods, optimization, Monte Carlo and ML models. Work led to filed patents. ## Skills Top skills: Large Language Models, Kubernetes, Distributed Systems, IPFS, TypeScript. Also: Artificial intelligence, Machine learning, AI agent security, Prompt injection, Model Context Protocol (MCP), AI agent infrastructure, AI coding agents, LLM gateways, Model fine-tuning, Model evaluation, PyTorch, Hugging Face Transformers, Vector search and embeddings, On-device inference, ONNX, WebAssembly, Platform engineering, GitOps, Argo CD, Helm, Terraform, OpenTelemetry, Cloudflare Workers, Cloudflare Durable Objects, AWS, libp2p, Content-addressed storage, Go, Python, Hono, React, PostgreSQL, Monte Carlo simulation. ## Talks, recognition and credentials - StartupRIO 2017 (2017): Finalist with a platform helping cancer patients in the public health network start treatment within the 60 days required by state law. - Rio Oil & Gas Expo and Conference 2016 (Oct 2016): Presented the GasPipelineDesign Suite mobile app through a pipeline case study. - Rio Pipeline Conference & Exposition 2015 (Sep 2015): A methodology combining market pipeline simulators with the GasPipelineDesign Suite to optimize gas pipeline design. - Judge — Hacktech 2026 (Caltech, Apr 2026): Reviewed 60+ submissions and judged finalists' live demos. - Judge — HackMIT 2025 (MIT, Sep 2025): Read all 35+ submissions in the judging group and scored finalists. - B.S. Computer Science - AWS Certified Solutions Architect – Associate - Certified Kubernetes Administrator (CKA) - Languages: English, Portuguese, Spanish ## Contact - GitHub: https://github.com/lukax - LinkedIn: https://www.linkedin.com/in/espdlucas - Hugging Face: https://huggingface.co/PinataCloud/Llama-Doorman-22M - Email: me@lucasespindola.com ## On this site The site is a desktop that runs in the browser. Each app below has a page of its own, also as Markdown (its address plus .md), and opens from the desktop's terminal with the command shown. - [Scout](https://lucasespindola.com/scout) (`app scout`, [Markdown](https://lucasespindola.com/scout.md)): Scout finds model candidates on Hugging Face for a task you describe in a sentence. It searches live repository records, reads model cards, and compares task fit, language metadata, licenses, estimated weight memory and available inference providers. Each recommendation links to its evidence, with a setup snippet and a shareable search. - [Doorman](https://lucasespindola.com/doorman) (`app doorman`, [Markdown](https://lucasespindola.com/doorman.md)): Doorman checks text an AI agent might read for prompt injection with Llama-Doorman-22M, a 22M-parameter classifier that runs in your browser. It tells a live instruction aimed at the agent apart from text that only quotes or mentions an attack, alone or side by side with Meta’s Llama Prompt Guard 2 (22M) or any prompt-injection classifier with ONNX weights you pick from Hugging Face, shows which part of the text drove each score, and traces the score’s circuit through the model’s own neurons and attention heads. - [Human-ish](https://lucasespindola.com/human-ish) (`app detect`, [Markdown](https://lucasespindola.com/human-ish.md)): Human-ish runs open AI-text detectors in your browser (TMR RoBERTa, and ModernBERT trained on RAID and MAGE, or any AI-text detector with ONNX weights you pick from Hugging Face), alone or side by side, and maps their scores passage by passage. A score measures how much text resembles a model’s machine-written training examples: it’s a screening signal, not proof of who wrote something. - [Neuron Dissector](https://lucasespindola.com/dissector) (`app dissect`, [Markdown](https://lucasespindola.com/dissector.md)): Neuron Dissector opens up a small story-writing language model (TinyStories, GPT-Neo), or any GPT-Neo or GPT-2 model you pick from Hugging Face, in your browser. It shows every MLP neuron and attention head firing token by token, traces a neuron’s circuit (the earlier neurons, heads and tokens whose outputs add up to its activation), and lets you cut, boost, invert or clamp them and compare the edited model’s story with the original’s. - [Prism](https://lucasespindola.com/prism) (`app prism`, [Markdown](https://lucasespindola.com/prism.md)): Prism splits a small language model’s residual stream into thousands of features with a TopK sparse autoencoder, in your browser: a ready-made atlas of 2,048 features for TinyStories-3M’s layer 4, or one you train on your own device for any layer. You browse the features as a map, see the story text that fires each one and the words it pushes the model toward, watch every word you type split into its features, and clamp a feature on or cut it out while the model writes, next to the untouched original. - [Autopsy](https://lucasespindola.com/autopsy) (`app autopsy`, [Markdown](https://lucasespindola.com/autopsy.md)): Autopsy follows every passage of a document set, this site’s notes or your own files, through a RAG pipeline on one chart: chunking, BM25 keyword search, embedding search (MiniLM, BGE or GTE), their weighted hybrid, a cross-encoder reranker, a word-budgeted context window and the answer. Poison a passage with a swapped number, a planted instruction or a keyword decoy, and see whether retrieval or the model passes it on, with or without a guard prompt. - [Intern](https://lucasespindola.com/intern) (`app intern`, [Markdown](https://lucasespindola.com/intern.md)): Intern is an AI agent that uses this site’s desktop in plain sight: given a task, it opens apps, clicks, picks options, types and reads with a visible cursor, one action a step, chosen by Llama 3.3 70B on Workers AI from a text snapshot of the desktop’s controls. It can’t send messages or open other sites, asks before any download, logs every step with what it saw and why, and checks its answers against what was on screen. - [Mimic](https://lucasespindola.com/mimic) (`app mimic`, [Markdown](https://lucasespindola.com/mimic.md)): Mimic records about ten seconds of you reading a passage aloud, then says whatever you type in that voice, with Resemble AI’s Chatterbox Turbo (350M, MIT) or the original Chatterbox, which sounds less like you but has an expressiveness control. The model runs on your GPU through WebGPU; the recording and the text never leave the page. - [Narrator](https://lucasespindola.com/narrator) (`app narrate`, [Markdown](https://lucasespindola.com/narrator.md)): Narrator reads any text aloud with a speech model of your choice: Kokoro-82M’s 28 English voices (Apache-2.0), Supertonic 2’s ten voices in five languages (OpenRAIL), Meta’s MMS-TTS in ten languages (CC BY-NC 4.0), or any Kokoro, Supertonic or VITS model with ONNX weights you pick from Hugging Face. It runs on your GPU or, more slowly, the CPU, and nothing you type leaves the page. - The terminal also answers questions about Lucas with an LLM grounded in this file (`ask`). - Lucas's skills open as a 3D map (`skills` in the terminal), or print as a list (`skills --json`); Snake has a hall of fame (`app snake`, `app snake scores`). - Visitors can send Lucas a message (Messages, on the desktop, or `message` in the terminal), or a voice memo of up to 30 seconds instead (from Messages, or `message --voice`). ## Optional - [Full text of every post and app page](https://lucasespindola.com/llms-full.txt) - [Research](https://lucasespindola.com/src/research.md) · [Projects](https://lucasespindola.com/src/projects.md) · [Experience](https://lucasespindola.com/src/experience.md) - [RSS feed](https://lucasespindola.com/feed.xml) - [Sitemap](https://lucasespindola.com/sitemap.xml)