# Leonardo Maia Jr

Software engineer @ [pasito.ai](https://pasito.ai)

- GitHub: <https://github.com/LeomaiaJr>
- X: <https://x.com/le0maiajr>
- LinkedIn: <https://www.linkedin.com/in/leonardo-maia-j%C3%BAnior/>
- Mail: [me@leomaiajr.dev](mailto:me@leomaiajr.dev)

> The Markdown version of https://leomaiajr.dev/, from the same text. On the page, Work shows one job at a time and an underlined phrase opens a short note; here every job is listed, newest first, and the notes are footnotes under each job.

## Work, in my own words

### Pasito

Software engineer, now technical lead · April 2025 to now · [pasito.ai](https://pasito.ai)

My current job. Pasito makes software that helps employees understand and choose their health benefits[^pasito-benefits]. When I moved to the US I didn’t understand how benefits worked here either, so this one is personal: I was exactly the person Pasito is for.

The company is in New York; I work from Orlando. I joined in April 2025, became a senior engineer in January 2026, and a technical lead in May. It’s the kind of place where an engineer’s ideas actually make it into the product.

I’ve been bringing AI into many different parts of the product: the document processing pipeline[^pasito-pipeline] that reads insurance plan documents, translation into Spanish, our internal MCP server[^pasito-mcp], and agents that answer questions about a company’s data. We plan to take AI a lot further from here.

[^pasito-benefits]: **Health benefits in the US.** Most people in the US get health insurance through their employer, and every year they have to choose a plan: which doctors are covered, how much comes out of each paycheck, how much they pay when they actually get sick. Most people find it confusing.

[^pasito-pipeline]: **Document processing pipeline.** A chain of steps that takes a document in and gets structured data out: work out what the file really is, read it, extract the fields with AI, check them, store them. Insurance plans arrive as PDFs, spreadsheets and Word files in every possible shape.

[^pasito-mcp]: **MCP.** Model Context Protocol: an open standard for connecting AI assistants to tools and data. Our internal server gives the team’s assistants access to Pasito’s own systems. [modelcontextprotocol.io](https://modelcontextprotocol.io)

### Zoorix

Software engineer, on contract · February 2024 to January 2025 · [zoorix.com](https://www.zoorix.com)

My first international job: a contract with Zoorix, a company in Tel Aviv that makes apps for Shopify[^zoorix-shopify] stores. It’s also where I improved my English, working in it every day, before I moved to the US. I took it on alongside my full-time job at Tech4Humans, so for most of that year I had both.

Shopify was a completely different world. Apps live inside the store’s admin and on the storefront itself, so it was my first time leaning heavily on server-side rendering[^zoorix-ssr], and on Liquid[^zoorix-liquid], which was new to me. Most of the data came through GraphQL[^zoorix-graphql].

Our code ran on other people’s stores, so every millisecond of load time was theirs to lose. I spent a lot of time on performance, enough for the app to earn Shopify’s Built for Shopify[^zoorix-built-for-shopify] status. I also built the billing: paid plans, monthly and yearly.

The backend was my first time with Ruby on Rails[^zoorix-rails] and Sidekiq[^zoorix-sidekiq]. I already knew my way around infrastructure, and here I went deeper: first AWS, then moving everything to Cloudflare[^zoorix-cloudflare], which cut the infrastructure bill by about 80%. Cloudflare is still the cloud I use for my own projects, this site included.

[^zoorix-shopify]: **Shopify.** The platform millions of online stores run on. Developers build apps that stores install to add features. [shopify.com](https://www.shopify.com)

[^zoorix-ssr]: **Server-side rendering.** Building the page on the server and sending finished HTML, so it shows up fast, instead of making the browser assemble it with JavaScript. We used Remix for it.

[^zoorix-liquid]: **Liquid.** Shopify’s template language for store themes: HTML with placeholders and simple logic, filled in by Shopify’s servers. [Liquid docs](https://shopify.github.io/liquid/)

[^zoorix-graphql]: **GraphQL.** A way of asking an API for exactly the data you need in one request. Shopify’s main APIs use it. [graphql.org](https://graphql.org)

[^zoorix-built-for-shopify]: **Built for Shopify.** A status Shopify gives apps that meet its bar for quality and performance, including how little they slow a store down.

[^zoorix-rails]: **Ruby on Rails.** A web framework for Ruby. A lot of the web runs on it, Shopify itself included. [rubyonrails.org](https://rubyonrails.org)

[^zoorix-sidekiq]: **Sidekiq.** Runs background jobs for Rails apps: work nobody should have to wait for, like syncing data or sending emails. [sidekiq.org](https://sidekiq.org)

[^zoorix-cloudflare]: **Cloudflare.** A network that sits in front of a large part of the internet. It also runs code and stores data close to users, which is what we moved to: Workers, R2 and Hyperdrive. [cloudflare.com](https://www.cloudflare.com)

### Tech4Humans AI

AI senior software engineer · January 2024 to April 2025 · [techforhumans.com.br](https://www.techforhumans.com.br)

At the beginning of 2024 the founders decided to create an AI team, to catch the very first wave of companies putting AI into their products and automating work with it. I joined it, and it shifted the whole direction of my career. By then the company had grown past 50 people.

2024 felt like an Age of Discovery[^tech4humans-ai-age-of-discovery] for LLMs. Things that are basic now were still being worked out: chain of thought[^tech4humans-ai-cot], RAG[^tech4humans-ai-rag], the first multi-agent[^tech4humans-ai-multi-agent] tools, and frameworks like LlamaIndex[^tech4humans-ai-llamaindex] and LangChain[^tech4humans-ai-langchain] appearing and changing every few weeks. It took a lot of experimenting, fast. Our first “product” was RAG: knowledge bases with re-ranking[^tech4humans-ai-reranking], which we showed in a lot of client demos.

The models were nowhere near today’s: slower, with small context windows[^tech4humans-ai-context-window], and much less capable, and there were few benchmarks to tell you which one to use. So we tested everything. That’s where I learned to do research and to think like a scientist: change one thing, run the experiment, measure what it did to the result. Everyone on the team wrote technical articles to back up our choices of models and methods.

Between what the models could do and what they cost (AI is more expensive in Brazil, since it’s priced in dollars), we built very tailored systems. The LLM was never the main piece, just one component of a bigger orchestration: an AI gateway[^tech4humans-ai-ai-gateway], routing[^tech4humans-ai-routing] between models, observability[^tech4humans-ai-observability] on every step, guardrails[^tech4humans-ai-guardrails], and the hardest part, context management[^tech4humans-ai-context-management].

Guardrails were on us, since the providers had very few back then. They weren’t only about safety and keeping customers’ personal data out, but about keeping each agent on the topics it was there for. A model back then could be talked into almost anything.

It was also when open models[^tech4humans-ai-open-models] you could run yourself started to matter: the first versions of Llama, Phi, Mistral and Gemma. The team fine-tuned[^tech4humans-ai-fine-tuning] one to get close to GPT-4o[^tech4humans-ai-gpt-4o] at summarizing call center conversations, and trained a YOLO[^tech4humans-ai-yolo] model to find signatures in documents.

All of it led to the team’s biggest project, and I led its development: a chatbot to replace the tree-based IBM Watson[^tech4humans-ai-watson] bots that most Brazilian banks, brokers and financial institutions were using. Their flows filled hundreds of pages, with every branch, redirect and handoff to a human. The goal was for fewer people to need a human at all, because the chatbot actually solved their problem. At that scale it took everything above: the gateway, the routing, the guardrails, the experiments.

It went live after I left, still built on my architecture and ideas. One of the main support queues of a large financial institution ran it as a pilot, and the team tells me it keeps growing, with other companies adopting it. Tech4Humans now has more than 150 people. That AI team was one of the most important chapters of my career.

[^tech4humans-ai-age-of-discovery]: **The Age of Discovery.** Roughly the 15th to 17th centuries, when European ships sailed past the edges of the known maps and came back with new coastlines almost every year.

[^tech4humans-ai-cot]: **Chain of thought.** Asking a model to reason step by step before it answers. In 2024 it was a prompting trick; today’s reasoning models do it on their own.

[^tech4humans-ai-rag]: **RAG.** Retrieval-augmented generation: before answering, look up the relevant pieces of your own documents and hand them to the model, so it answers from your data instead of from memory.

[^tech4humans-ai-multi-agent]: **Multi-agent.** Several AI agents, each with its own role and tools, splitting a task between them. CrewAI was one of the first frameworks for it. [crewai.com](https://www.crewai.com)

[^tech4humans-ai-llamaindex]: **LlamaIndex.** A framework for connecting LLMs to your own data: documents, databases, APIs. [llamaindex.ai](https://www.llamaindex.ai)

[^tech4humans-ai-langchain]: **LangChain.** One of the first and most popular frameworks for building apps on top of LLMs. [langchain.com](https://www.langchain.com)

[^tech4humans-ai-reranking]: **Re-ranking.** After a search pulls up candidate passages, a second model reorders them by how well they actually answer the question, so the LLM sees the best ones first.

[^tech4humans-ai-context-window]: **Context window.** How much text a model can take in at once, measured in tokens (a token is roughly three quarters of a word). GPT-3.5 Turbo took about 4,000. Models today take hundreds of thousands, some over a million.

[^tech4humans-ai-ai-gateway]: **AI gateway.** One door between your product and every AI provider. It holds the keys, counts the cost, retries, caches, and switches to another provider when one fails.

[^tech4humans-ai-routing]: **Routing.** Sending each request to the cheapest model that can handle it, and only the hard ones to the expensive model.

[^tech4humans-ai-observability]: **Observability.** Recording every step an AI system takes (what it was asked, what it answered, how long it took, what it cost) so you can see why it did what it did.

[^tech4humans-ai-guardrails]: **Guardrails.** Checks around a model: what it may be asked, what it may say, what it may do. Ours kept agents on topic and inside each client’s rules, away from sensitive subjects, and kept customers’ personal data (PII) out of prompts and answers.

[^tech4humans-ai-context-management]: **Context management.** Deciding what goes into the model’s limited context at each step: which instructions, which documents, how much of the conversation. Too little and it guesses; too much and it gets lost, slow and expensive.

[^tech4humans-ai-open-models]: **Open models.** Models whose weights are published, so you can run and change them on your own machines. Llama is from Meta, Phi from Microsoft, Mistral from the French company of the same name, Gemma from Google.

[^tech4humans-ai-fine-tuning]: **Fine-tuning.** Training an existing model further on your own examples, so a small model gets good at one specific job.

[^tech4humans-ai-gpt-4o]: **GPT-4o.** OpenAI’s flagship model in 2024, released in May.

[^tech4humans-ai-yolo]: **YOLO.** You Only Look Once: a family of fast models for finding objects in images. Here, the objects were signatures on a page.

[^tech4humans-ai-watson]: **IBM Watson Assistant.** The chatbot platform many large companies used before LLMs. Conversations followed a tree of fixed paths that someone had to design, branch by branch.

### Tech4Humans

Senior software engineer · August 2022 to December 2023 · [techforhumans.com.br](https://www.techforhumans.com.br)

Tech4Humans was a small startup when I joined in August 2022, around 15 people, based in São Paulo. I worked remotely. My first project was a new CRM[^tech4humans-crm] for a large Brazilian insurer and bank.

Then I moved to the team building a forms system for that same company. The whole structure of the forms had to be dynamic[^tech4humans-dynamic-forms], and that pushed me deep into databases and how to design them. At some point there were so many forms to make that we built a form builder[^tech4humans-form-builder] into the app itself.

Keeping track of the frontend’s state[^tech4humans-state] in React was one of the hardest problems I’ve faced. We used Redux[^tech4humans-redux]. I don’t miss it.

The system grew until almost every large insurance broker in Brazil was using it to automate their ticketing[^tech4humans-ticketing], thousands of tickets a month. The team grew too, and I started reviewing code and mentoring the junior developers who joined.

At the end of 2022 ChatGPT[^tech4humans-chatgpt] came out, but the moment that changed things for me as a developer was June 13, 2023, when OpenAI released function calling[^tech4humans-function-calling]. A model could now call into a real system. LLMs stopped being just chatbots.

That same month I built a small demo that used GPT-3.5 Turbo[^tech4humans-gpt35] to build our forms instead of the form builder. It was the model we built with then, which is crazy to think about now. The big constraint was the context window[^tech4humans-context-window]: about 4,000 tokens, and our rules and business logic came nowhere near fitting. My idea was to give the model functions to fetch only the context it needed for the part of the form it was working on. It’s close to what we call skills[^tech4humans-skills] today. Half a year later, the founders started [an AI team](#tech4humans-ai).

[^tech4humans-crm]: **CRM.** Customer relationship management: the system a company uses to keep track of its customers and every conversation it has with them.

[^tech4humans-dynamic-forms]: **Dynamic forms.** Forms that aren’t written into the code. Their fields, order and rules live in the database, so new forms can be created without changing the software. The catch is that the database has to describe forms, not just store answers. Some of ours even had JavaScript stored in the database, which the frontend had to run without opening a security hole.

[^tech4humans-form-builder]: **Form builder.** A tool for making forms by choosing fields and rules on screen, instead of writing code.

[^tech4humans-state]: **State.** Everything an app has to remember while you use it: what you’ve typed, which step you’re on, what’s still loading. In a big form with rules between fields, it adds up fast.

[^tech4humans-redux]: **Redux.** A library that keeps all of an app’s state in one central place, popular with React. Powerful, and known for how much code it takes to do simple things. [redux.js.org](https://redux.js.org)

[^tech4humans-ticketing]: **Ticketing.** A ticket is one request tracked from start to finish: someone asks for something, and it moves through steps until it’s done. Ticketing is the process of handling them.

[^tech4humans-chatgpt]: **ChatGPT.** OpenAI’s chatbot, released on November 30, 2022. It had a million users in five days. [chatgpt.com](https://chatgpt.com)

[^tech4humans-function-calling]: **Function calling.** Now usually called tool calling. You describe your functions to the model, and instead of only answering in text, it can ask for one to be run, with the arguments filled in. Your code runs it and hands back the result. That’s what lets a model act inside a system. [OpenAI’s announcement](https://openai.com/index/function-calling-and-other-api-updates/)

[^tech4humans-gpt35]: **GPT-3.5 Turbo.** The model behind ChatGPT, and what most developers built with in mid-2023. GPT-4 was already out, but slower and much more expensive.

[^tech4humans-context-window]: **Context window.** How much text a model can take in at once, measured in tokens (a token is roughly three quarters of a word). GPT-3.5 Turbo took about 4,000. Models today take hundreds of thousands, some over a million.

[^tech4humans-skills]: **Skills.** Packages of instructions and knowledge that an AI agent loads only when a task needs them, instead of carrying everything from the start. Anthropic introduced Agent Skills in 2025.

### PD Solutions

Intern, then software engineer · January 2021 to August 2022 · [pdsolucoes.com.br](https://pdsolucoes.com.br/en)

My first job, in my hometown[^pd-solutions-santa-rita]. I started in January 2021, at the beginning of my third and last year of high school at ETE FMC[^pd-solutions-ete]. I had just turned 17.

By then I had built a few apps with Flutter[^pd-solutions-flutter], played around with servers in Dart, and knew some Python and JavaScript. The only project on my resume was ETE Progress[^pd-solutions-ete-progress], a Python bot that tweeted how much of the school year had gone by. For the technical challenge I built github-profiles-app[^pd-solutions-github-profiles-app], an app that searches GitHub users and shows their profiles using GitHub’s public API.

My first project was in Angular[^pd-solutions-angular], which I had never used. On the web I only knew vanilla HTML, CSS and JavaScript[^pd-solutions-vanilla], so I spent the day before my first day at work reading about it and trying it out. Luckily the project was brand new, not years of someone else’s code, and a senior engineer walked me through setting up its structure. For the rest of the internship, Angular was what I used on the web.

When the internship ended I spent three months on a completely different stack: an old HR system with a huge codebase, built with jQuery[^pd-solutions-jquery], JSP[^pd-solutions-jsp] and Spring[^pd-solutions-spring]. Even the version control was from another era: SVN[^pd-solutions-svn], through TortoiseSVN[^pd-solutions-tortoisesvn]. I brought Bootstrap[^pd-solutions-bootstrap] into its pages and added a couple of features. After that I moved between projects: servers, mobile apps in Flutter, and hardware, writing firmware[^pd-solutions-firmware] in C++.

Near the end of my first year I joined the team on the company’s biggest project at the time, for one of the largest brokerages in Brazil: automation around banking, finance APIs from the Banco Central[^pd-solutions-bcb], and invoice systems. I worked across the whole stack, in NestJS[^pd-solutions-nestjs] and React[^pd-solutions-react], and stayed on it until I left PD. React became my main library for the web, and it still is.

PD is also where I really learned Git. Another senior engineer there, one of the best engineers I know, taught me. It sounds like a small thing, but I think Git is one of the foundations of engineering, and it has paid off in every job since.

Those twenty months were my foundation as a software engineer. PD was a small startup, so we moved fast, and I kept landing on projects with technologies I had never used, learning them quickly enough to be useful. I had to pitch in on every front, infrastructure included. That gave me a sense of how all the pieces fit together, and of every step software goes through before it reaches someone. Knowing every step makes me better at each one.

[^pd-solutions-santa-rita]: **Santa Rita do Sapucaí.** A small town in the south of Minas Gerais, Brazil, known as the Vale da Eletrônica (Electronics Valley) and often called the Silicon Valley of Brazil. It’s full of electronics and tech companies, and it’s home to ETE FMC and Inatel, the two schools I went to there.

[^pd-solutions-ete]: **ETE FMC.** Escola Técnica de Eletrônica Francisco Moreira da Costa, in Santa Rita do Sapucaí. In Brazil it’s common to do high school at a technical school: the regular subjects and a technical course together, over three years. Mine was a technical degree in Systems Development, 2019 to 2021.

    In my second year I noticed that the school system’s password reset links weren’t random: they were built from predictable details, lightly encoded. I wrote a small program that, given only someone’s email, produced the reset link for their account, which meant access to any student’s or teacher’s account. I took it to my professor and the head of IT, and the developers fixed it. The same system was used by more than ten schools in Brazil’s Jesuit school network.

[^pd-solutions-flutter]: **Flutter.** Google’s toolkit for building phone apps from a single codebase. You write it in Dart. [flutter.dev](https://flutter.dev)

[^pd-solutions-ete-progress]: **ETE Progress.** A Twitter bot inspired by @year_progress that tweeted how far through ETE’s school year we were. It got popular at school: people tweeted about it and retweeted it a lot. The first version is from 2019, my first year at ETE. [Code on GitHub](https://github.com/LeomaiaJr/ete-progress-v2) · [@EteProgress](https://x.com/EteProgress) · [@year_progress](https://x.com/year_progress)

[^pd-solutions-github-profiles-app]: **github-profiles-app.** A Flutter app: type a GitHub username and it shows that person’s profile, using GitHub’s public API. Built for the challenge. [Code on GitHub](https://github.com/LeomaiaJr/github-profiles-app)

[^pd-solutions-angular]: **Angular.** Google’s framework for building web apps, written in TypeScript. It decides a lot of a project’s structure for you. [angular.dev](https://angular.dev)

[^pd-solutions-vanilla]: **Vanilla.** Plain HTML, CSS and JavaScript: the three languages every browser understands, with no framework on top.

[^pd-solutions-jquery]: **jQuery.** A JavaScript library from 2006 that made it easier to change web pages and talk to servers. A lot of the older web is built on it. [jquery.com](https://jquery.com)

[^pd-solutions-jsp]: **JSP.** JavaServer Pages: one of Java’s older ways of building web pages on the server, mixing HTML with Java code.

[^pd-solutions-spring]: **Spring.** The most widely used Java framework for building servers. [spring.io](https://spring.io)

[^pd-solutions-svn]: **SVN (Subversion).** A version control system from 2000, older than Git. Everyone works against one central server instead of keeping a full copy of the history. [subversion.apache.org](https://subversion.apache.org)

[^pd-solutions-tortoisesvn]: **TortoiseSVN.** A Windows program for using SVN from the file explorer: right-click a folder to commit or update. [tortoisesvn.net](https://tortoisesvn.net)

[^pd-solutions-bootstrap]: **Bootstrap.** A ready-made set of styles and components, first made at Twitter, that gives a website a consistent look quickly. [getbootstrap.com](https://getbootstrap.com)

[^pd-solutions-firmware]: **Firmware.** The software that lives on a device’s chip and runs its hardware directly. Usually written in C or C++.

[^pd-solutions-bcb]: **Banco Central do Brasil.** Brazil’s central bank. Besides setting interest rates, it publishes official financial data, like exchange rates, through public APIs. [bcb.gov.br](https://www.bcb.gov.br)

[^pd-solutions-nestjs]: **NestJS.** A framework for building servers in TypeScript, on Node.js. Its structure is modelled on Angular’s. [nestjs.com](https://nestjs.com)

[^pd-solutions-react]: **React.** Meta’s library for building user interfaces on the web. [react.dev](https://react.dev)

### The last page, handwritten

“Never stay in a room where you’re the smartest person.” I’ve been lucky: I’ve never had to leave one. At every step I’ve worked alongside really good engineers I could look up to, people who pushed me to be a better engineer.

## Writing

Soon

## Projects

Soon

## Fig. 1

*A watercolour of an old beige computer: a CRT monitor, keyboard, mouse and tower on a desk, painted stroke by stroke*

Fig. 1 — a small computer, never painted the same way twice. Neither is anything I’ve made with one.
