<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gabriel Varela on Medium]]></title>
        <description><![CDATA[Stories by Gabriel Varela on Medium]]></description>
        <link>https://medium.com/@gabrielvrl?source=rss-b9758b231017------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3msjcG_4HZ1vVvKnU6COoQ.jpeg</url>
            <title>Stories by Gabriel Varela on Medium</title>
            <link>https://medium.com/@gabrielvrl?source=rss-b9758b231017------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 08:34:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gabrielvrl/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Agentes de IA como Analistas de Business Intelligence]]></title>
            <link>https://gabrielvrl.medium.com/agentes-de-ia-como-analistas-de-business-intelligence-4a2a1146261e?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a2a1146261e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 18:36:15 GMT</pubDate>
            <atom:updated>2026-07-27T18:36:15.509Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>Já estive em situações onde precisei de um relatório sobre tendências de engajamento de usuários, e os dados estavam em três lugares diferentes: um banco de dados para ações de usuários, uma plataforma de analytics para sessões, e um sistema de billing para receita.</p><p>O jeito antigo: escrever queries SQL, exportar CSVs, puxar relatórios de analytics, copiar pra uma planilha, construir gráficos, escrever insights. Meio dia, no mínimo.</p><p>O jeito novo: descrever o que preciso pra um agente de IA com acesso aos três sistemas. Dez minutos.</p><h3>O Que Mudou</h3><p>Agentes de IA com acesso a ferramentas podem fazer queries em bancos, chamar APIs, e sintetizar descobertas entre fontes. Você descreve a pergunta em linguagem natural. O agente descobre quais dados puxar e como combinar.</p><p>Isso muda seu papel de analista para orquestrador. Você não está escrevendo queries. Está fazendo perguntas.</p><h3>Um Exemplo Prático</h3><p>Uma pergunta como: “O que está causando a queda nos usuários ativos semanais no último mês? Cruze com impacto de receita e identifique quais segmentos de usuários são mais afetados.”</p><p>O agente pode:</p><ol><li>Fazer query no banco pra contagem diária de usuários ativos, segmentados por canal de aquisição</li><li>Puxar dados de sessão do analytics pra checar profundidade de engajamento</li><li>Checar dados de billing pra receita por segmento</li><li>Correlacionar os datasets</li><li>Gerar um relatório com gráficos e descobertas específicas</li></ol><p>Em um caso, isso revelou que usuários de ads pagos estavam churnando mais rápido que usuários orgânicos, mas só após uma mudança específica no produto. O impacto de receita estava concentrado em uma única faixa de preço.</p><h3>Montando a Stack</h3><p>A configuração técnica envolve três componentes:</p><p>1. Conectores de dados</p><p>Cada fonte de dados precisa de uma interface que o agente possa usar. Pra bancos de dados, isso significa acesso de query read-only. Pra APIs, significa endpoints autenticados que o agente pode chamar.</p><pre>// Exemplo: conector PostgreSQL<br>const dbTool = {<br>  name: &quot;query_database&quot;,<br>  description: &quot;Roda uma query SQL read-only&quot;,<br>  execute: async (query: string) =&gt; {<br>    return await db.query(query);<br>  }<br>};</pre><p>2. Contexto sobre seus dados</p><p>O agente precisa entender seu schema e o que cada tabela representa. Forneça isso como contexto de sistema ou como um recurso consultável.</p><pre>// Contexto de schema<br>const schemaContext = `<br>Tabelas:<br>- users: id, created_at, acquisition_channel, subscription_tier<br>- events: user_id, event_type, timestamp, metadata<br>- subscriptions: user_id, plan, mrr, status<br>`;</pre><p>3. Especificações de formato de output</p><p>Diga ao agente como quer os resultados formatados. Sumário executivo, descobertas detalhadas, gráficos, recomendações.</p><h3>A Mudança na Linguagem de Query</h3><p>Ao invés de escrever isso:</p><pre>SELECT <br>  acquisition_channel,<br>  DATE_TRUNC(&#39;week&#39;, created_at) as week,<br>  COUNT(DISTINCT user_id) as active_users<br>FROM events<br>WHERE timestamp &gt; NOW() - INTERVAL &#39;30 days&#39;<br>GROUP BY 1, 2<br>ORDER BY 2, 1;</pre><p>Você escreve isso:</p><p>“Me mostra usuários ativos semanais por canal de aquisição nos últimos 30 dias. Destaque canais com tendências de queda.”</p><p>O agente escreve a query, roda, e interpreta os resultados. Se a primeira query não responder completamente a pergunta, ele escreve queries de follow-up.</p><h3>Quando Funciona Melhor</h3><p>Análise orientada por IA se destaca em:</p><ul><li>Perguntas exploratórias onde você não sabe exatamente o que procurar</li><li>Análise cross-source que exigiria join manual de dados</li><li>Relatórios recorrentes que seguem a mesma estrutura mas precisam de dados frescos</li><li>Respostas rápidas quando você precisa de um número rápido e não pode esperar por um dashboard</li></ul><p>É menos adequada para:</p><ul><li>Dashboards em tempo real que precisam de updates sub-segundo</li><li>Dados altamente sensíveis onde você não pode dar acesso à IA</li><li>Relatórios regulados que exigem audit trails e reprodutibilidade exata</li></ul><h3>Construindo Templates de Relatório Reutilizáveis</h3><p>Quando você tem um prompt útil, salve-o. Mantenho uma pasta de templates de relatório:</p><pre># Relatório Executivo Semanal<br>Puxe dados dos últimos 7 dias e gere:</pre><pre>1. Sumário de métricas chave (WAU, receita, taxa de churn)<br>2. Mudanças semana-a-semana com contexto<br>3. Top 3 oportunidades ou preocupações<br>4. Ações recomendadas</pre><pre>Formate como um sumário executivo de uma página.<br>Referência cruzada: banco de dados (users, events), billing (receita), analytics (sessões)</pre><p>Rodar esse template leva segundos. O output é consistente. Qualquer pessoa do time pode gerar.</p><h3>A Questão da Precisão</h3><p>Relatórios gerados por IA podem estar errados. O agente pode interpretar mal um schema, escrever uma query incorreta, ou tirar conclusões falhas.</p><p>Mitigações:</p><ol><li>Mostre o trabalho. Configure o agente pra incluir as queries que rodou e os dados brutos que usou. Você pode verificar a metodologia.</li><li>Valide números críticos. Pra decisões de alto risco, confira números chave contra a fonte diretamente.</li><li>Comece com relatórios de baixo risco. Construa confiança com relatórios internos antes de usar IA pra relatórios externos ou de compliance.</li><li>Versione seus prompts. Quando um template de relatório funciona bem, trave-o. Mudanças devem ser intencionais.</li></ol><h3>O Que Isso Significa para Analistas</h3><p>Se seu trabalho é escrever SQL e construir gráficos, isso é uma ameaça. O trabalho mecânico de extração de dados está sendo automatizado.</p><p>Se seu trabalho é fazer as perguntas certas e tomar decisões baseadas em dados, isso é uma ferramenta. Você pode fazer mais perguntas, explorar mais hipóteses, e se mover mais rápido.</p><p>O valor muda de “consegue extrair dados” para “sabe quais dados importam.”</p><h3>Começando</h3><ol><li>Escolha uma fonte de dados que você consulta frequentemente</li><li>Conecte a um agente de IA com acesso read-only</li><li>Faça uma pergunta que você normalmente responderia com SQL</li><li>Compare o output com o que você teria produzido manualmente</li></ol><p>Comece pequeno. Expanda conforme ganha confiança nos resultados.</p><p>O objetivo não é substituir análise. É gastar menos tempo em extração e mais tempo em insight.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a2a1146261e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Agents as Business Intelligence Analysts]]></title>
            <link>https://gabrielvrl.medium.com/ai-agents-as-business-intelligence-analysts-55bf6f1bfbcc?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/55bf6f1bfbcc</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 18:34:10 GMT</pubDate>
            <atom:updated>2026-07-27T18:34:10.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>I’ve been in situations where I needed a report on user engagement trends, and the data lived in three different places: a database for user actions, an analytics platform for sessions, and a billing system for revenue.</p><p>The old way: write SQL queries, export CSVs, pull analytics reports, copy into a spreadsheet, build charts, write insights. Half a day, minimum.</p><p>The new way: describe what I need to an AI agent with access to all three systems. Ten minutes.</p><h3>What Changed</h3><p>AI agents with tool access can query databases, call APIs, and synthesize findings across sources. You describe the question in plain language. The agent figures out what data to pull and how to combine it.</p><p>This shifts your role from analyst to orchestrator. You’re not writing queries. You’re asking questions.</p><h3>A Practical Example</h3><p>A question like: “What’s driving the drop in weekly active users over the last month? Cross-reference with revenue impact and identify which user segments are most affected.”</p><p>The agent can:</p><ol><li>Query the database for daily active user counts, segmented by acquisition channel</li><li>Pull session data from analytics to check engagement depth</li><li>Check billing data for revenue per segment</li><li>Correlate the datasets</li><li>Generate a report with charts and specific findings</li></ol><p>In one case, this revealed that users from paid ads were churning faster than organic users, but only after a specific product change. Revenue impact was concentrated in a single pricing tier.</p><p>I would have found this eventually. The agent found it in minutes.</p><h3>Setting Up the Stack</h3><p>The technical setup involves three components:</p><p>1. Data connectors</p><p>Each data source needs an interface the agent can use. For databases, this means read-only query access. For APIs, it means authenticated endpoints the agent can call.</p><pre>// Example: PostgreSQL connector<br>const dbTool = {<br>  name: &quot;query_database&quot;,<br>  description: &quot;Run a read-only SQL query&quot;,<br>  execute: async (query: string) =&gt; {<br>    return await db.query(query);<br>  }<br>};</pre><p>2. Context about your data</p><p>The agent needs to understand your schema and what each table represents. Provide this as system context or as a queryable resource.</p><pre>// Schema context<br>const schemaContext = `<br>Tables:<br>- users: id, created_at, acquisition_channel, subscription_tier<br>- events: user_id, event_type, timestamp, metadata<br>- subscriptions: user_id, plan, mrr, status<br>`;</pre><p>3. Output format specifications</p><p>Tell the agent how you want results formatted. Executive summary, detailed findings, charts, recommendations.</p><h3>The Query Language Shift</h3><p>Instead of writing this:</p><pre>SELECT <br>  acquisition_channel,<br>  DATE_TRUNC(&#39;week&#39;, created_at) as week,<br>  COUNT(DISTINCT user_id) as active_users<br>FROM events<br>WHERE timestamp &gt; NOW() - INTERVAL &#39;30 days&#39;<br>GROUP BY 1, 2<br>ORDER BY 2, 1;</pre><p>You write this:</p><p>“Show me weekly active users by acquisition channel for the last 30 days. Highlight any channels with declining trends.”</p><p>The agent writes the query, runs it, and interprets the results. If the first query doesn’t answer the question fully, it writes follow-up queries.</p><h3>When This Works Best</h3><p>AI-driven analysis excels at:</p><ul><li>Exploratory questions where you don’t know exactly what to look for</li><li>Cross-source analysis that would require manual data joining</li><li>Recurring reports that follow the same structure but need fresh data</li><li>Quick answers when you need a number fast and can’t wait for a dashboard</li></ul><p>It’s less suited for:</p><ul><li>Real-time dashboards that need sub-second updates</li><li>Highly sensitive data where you can’t grant AI access</li><li>Regulated reporting that requires audit trails and exact reproducibility</li></ul><h3>Building Reusable Report Templates</h3><p>Once you have a useful prompt, save it. I keep a folder of report templates:</p><pre># Weekly Executive Report<br>Pull data for the last 7 days and generate:</pre><pre>1. Key metrics summary (WAU, revenue, churn rate)<br>2. Week-over-week changes with context<br>3. Top 3 opportunities or concerns<br>4. Recommended actions</pre><pre>Format as a one-page executive summary.<br>Cross-reference: database (users, events), billing (revenue), analytics (sessions)</pre><p>Running this template takes seconds. The output is consistent. Anyone on the team can generate it.</p><h3>The Accuracy Question</h3><p>AI-generated reports can be wrong. The agent might misinterpret a schema, write an incorrect query, or draw flawed conclusions.</p><p>Mitigations:</p><ol><li>Show your work. Configure the agent to include the queries it ran and the raw data it used. You can verify the methodology.</li><li>Validate critical numbers. For high-stakes decisions, spot-check key figures against the source directly.</li><li>Start with low-risk reports. Build confidence with internal reports before using AI for external or compliance reporting.</li><li>Version your prompts. When a report template works well, lock it down. Changes should be intentional.</li></ol><h3>What This Means for Analysts</h3><p>If your job is writing SQL and building charts, this is a threat. The mechanical work of data extraction is being automated.</p><p>If your job is asking the right questions and making decisions based on data, this is a tool. You can ask more questions, explore more hypotheses, and move faster.</p><p>The value shifts from “can extract data” to “knows what data matters.”</p><h3>Getting Started</h3><ol><li>Pick one data source you query frequently</li><li>Connect it to an AI agent with read-only access</li><li>Ask a question you’d normally answer with SQL</li><li>Compare the output to what you’d have produced manually</li></ol><p>Start small. Expand as you build confidence in the results.</p><p>The goal isn’t to replace analysis. It’s to spend less time on extraction and more time on insight.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55bf6f1bfbcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[O 80/20 dos Custos de Tokens de IA]]></title>
            <link>https://gabrielvrl.medium.com/o-80-20-dos-custos-de-tokens-de-ia-57faca237661?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/57faca237661</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 16:13:40 GMT</pubDate>
            <atom:updated>2026-07-25T16:13:40.831Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*tPPa9AwH0Ag-53QBpL_YYQ.jpeg" /><figcaption>RTK AI</figcaption></figure><h3>O 80/20 dos Custos de Tokens de IA</h3><p>Estava gastando mais do que esperava em tokens de IA antes de olhar pra onde o dinheiro estava indo.</p><p>Descobri que a maior parte do meu uso de tokens vinha de poucos workflows. E boa parte disso era desperdício.</p><h3>O Problema Que Ninguém Rastreia</h3><p>A maioria dos desenvolvedores usando assistentes de IA não faz ideia de quanto gasta. O custo é abstraído. Você paga uma assinatura ou bate em uma API e não pensa em tokens individuais.</p><p>Mas tokens acumulam. Rápido.</p><p>Uma sessão típica de coding pode usar:</p><ul><li>50K tokens lendo contexto de arquivos</li><li>30K tokens em conversa ida e volta</li><li>20K tokens em outputs de ferramentas (git status, ls, resultados de grep)</li><li>10K tokens em resposta realmente útil</li></ul><p>São 110K tokens pra talvez 10K tokens de valor. Uma proporção de 10:1 de overhead pra output.</p><h3>Onde Vive o Desperdício</h3><p>Depois de rastrear meu uso por um mês, encontrei três fontes principais de desperdício:</p><p>1. Carregamento de contexto redundante</p><p>Toda vez que começava uma conversa nova, a IA relia arquivos que tinha acabado de ler. O mesmo arquivo de 500 linhas sendo carregado várias vezes. Mesmo README. Mesmos arquivos de config.</p><p>2. Outputs de ferramentas verbosos</p><p>Comandos como git status com muitos arquivos, ou ls -la em diretórios grandes, despejam milhares de tokens no contexto. A maior parte dessa informação não é relevante pra tarefa atual.</p><p>3. Padding conversacional</p><p>”Claro! Fico feliz em ajudar com isso. Deixa eu dar uma olhada no código e ver o que está acontecendo aqui…” São 30 tokens de nada antes da resposta real começar.</p><h3>As Correções</h3><p>Para contexto redundante:</p><ul><li>Use persistência de sessão quando disponível. Mantenha a mesma conversa em vez de começar do zero.</li><li>Seja explícito sobre qual contexto a IA já tem. “Você já leu o módulo de auth” evita uma releitura.</li><li>Estruture o trabalho em sessões focadas. Uma tarefa por conversa, não tudo misturado.</li></ul><p>Para outputs de ferramentas verbosos:</p><ul><li>Filtre outputs antes de chegarem no contexto. Um git status que mostra só arquivos alterados ao invés da árvore completa.</li><li>Use comandos direcionados. grep -l pattern pra encontrar arquivos, depois head -20 file ao invés de ler tudo.</li><li>Faça proxy de ferramentas através de filtros que removem informação irrelevante.</li></ul><p>Para padding conversacional:</p><ul><li>Configure modos de output terso se seu assistente de IA suportar. Respostas diretas, sem formalidades.</li><li>Peça formatos específicos. “Responda em uma frase” ou “Só o comando, sem explicação.”</li><li>Use system prompts que desencorajam preenchimento.</li></ul><h3>Medindo Seu Uso</h3><p>Você não consegue otimizar o que não mede. Veja como começar:</p><p>Se usando uma API diretamente:</p><p>Logue toda requisição e resposta com contagem de tokens. A maioria das SDKs expõe isso nos metadados da resposta.</p><pre>const response = await anthropic.messages.create({...});<br>console.log({<br>  input_tokens: response.usage.input_tokens,<br>  output_tokens: response.usage.output_tokens,<br>});</pre><p>Se usando Claude Code ou ferramentas similares:</p><p>Cheque o sumário da sessão depois de trabalhar. Procure padrões no que consome mais tokens.</p><p>Rastreie ao longo do tempo:</p><p>Um único dia não te conta muita coisa. Rastreie por uma semana. Identifique quais workflows são caros e por quê.</p><h3>O Princípio de Pareto em Ação</h3><p>Quando analisei meu uso, encontrei:</p><ul><li>3 workflows específicos representavam 70% do meu gasto de tokens</li><li>2 desses workflows podiam ser otimizados sem mudar como eu trabalho</li><li>O terceiro precisava de uma abordagem totalmente diferente</li></ul><p>As correções:</p><ol><li>Workflow de code review: Estava carregando arquivos inteiros quando só precisava do diff. Mudei pra carregar só as linhas alteradas. 60% de redução nesse workflow.</li><li>Workflow de debugging: Estava deixando a IA ler qualquer arquivo que quisesse explorar. Adicionei um passo de confirmação pra arquivos grandes. 40% de redução.</li><li>Workflow de documentação: Estava pedindo pra IA escrever docs lendo o codebase inteiro. Mudei pra uma abordagem incremental: outline primeiro, depois preencher seções. 80% de redução, melhor qualidade de output.</li></ol><h3>Workflows Conscientes de Tokens</h3><p>Quando você está ciente de custos de tokens, começa a desenhar workflows diferente:</p><p>Incremental ao invés de abrangente. Não peça pra IA entender tudo de uma vez. Construa entendimento em etapas.</p><p>Leituras direcionadas ao invés de exploração ampla. Aponte a IA pra arquivos específicos ao invés de “olhe o codebase.”</p><p>Outputs estruturados ao invés de forma livre. Respostas JSON com campos específicos são mais eficientes que explicações em prosa.</p><p>Cache onde possível. Se você vai fazer a mesma pergunta de novo, salve a resposta localmente.</p><h3>O Cálculo de ROI</h3><p>Digamos que você gasta $150/mês em tokens de IA. Você implementa as otimizações acima e corta pra $50/mês.</p><p>São $100/mês economizados. $1.200/ano.</p><p>Mas o ganho real não é o dinheiro. É espaço na janela de contexto. Quando você não está desperdiçando tokens em overhead, consegue encaixar mais informação útil em cada sessão. A IA tem mais espaço pra raciocinar sobre seu problema real.</p><p>Menos tokens gastos em ruído significa mais tokens disponíveis pra sinal.</p><h3>Começando</h3><ol><li>Meça primeiro. Passe uma semana rastreando pra onde seus tokens vão antes de otimizar.</li><li>Mire nos maiores ofensores. O princípio de Pareto se aplica. Alguns workflows geram a maior parte do custo.</li><li>Automatize as correções. Vigilância manual não escala. Construa as otimizações nas suas ferramentas. Ferramentas como <a href="https://github.com/rtk-ai/rtk">RTK</a> podem filtrar automaticamente outputs verbosos de comandos, cortando 60–80% do desperdício de tokens sem mudar como você trabalha.</li><li>Re-meça. Verifique se as correções funcionaram. Às vezes “otimizações” só movem o custo pra outro lugar.</li><li>Eficiência de tokens não é sobre ser pão-duro. É sobre ser intencional com o recurso mais restrito no desenvolvimento assistido por IA: espaço na janela de contexto.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57faca237661" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 80/20 of AI Token Costs]]></title>
            <link>https://gabrielvrl.medium.com/the-80-20-of-ai-token-costs-69d01a27d643?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/69d01a27d643</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 16:11:47 GMT</pubDate>
            <atom:updated>2026-07-25T16:14:09.772Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*tPPa9AwH0Ag-53QBpL_YYQ.jpeg" /><figcaption>RTK AI</figcaption></figure><p>I was spending more on AI tokens than I expected before I looked at where the money was going.</p><p>Turns out, most of my token usage came from a few workflows. And most of that was waste.</p><h3>The Problem Nobody Tracks</h3><p>Most developers using AI assistants have no idea how much they spend. The cost is abstracted away. You pay a subscription or hit an API and don’t think about individual tokens.</p><p>But tokens add up. Fast.</p><p>A typical coding session might use:</p><ul><li>50K tokens reading file context</li><li>30K tokens in conversation back-and-forth</li><li>20K tokens in tool outputs (git status, ls, grep results)</li><li>10K tokens in actual useful response</li></ul><p>That’s 110K tokens for maybe 10K tokens of value. A 10:1 ratio of overhead to output.</p><h3>Where the Waste Lives</h3><p>After tracking my usage for a month, I found three main sources of waste:</p><p>1. Redundant context loading</p><p>Every time I started a new conversation, the AI would re-read files it had just read. The same 500-line file getting loaded over and over. Same README. Same config files.</p><p>2. Verbose tool outputs</p><p>Commands like git status with many files, or ls -la on large directories, dump thousands of tokens into the context. Most of that information isn’t relevant to the current task.</p><p>3. Conversational padding</p><p>”Sure! I’d be happy to help you with that. Let me take a look at the code and see what’s going on here…” That’s 30 tokens of nothing before the actual answer starts.</p><h3>The Fixes</h3><p>For redundant context:</p><ul><li>Use session persistence when available. Keep the same conversation going instead of starting fresh.</li><li>Be explicit about what context the AI already has. “You’ve already read the auth module” saves a re-read.</li><li>Structure work in focused sessions. One task per conversation, not everything jumbled together.</li></ul><p>For verbose tool outputs:</p><ul><li>Filter outputs before they hit the context. A git status that shows only changed files instead of the full tree.</li><li>Use targeted commands. grep -l pattern to find files, then head -20 file instead of reading the whole thing.</li><li>Proxy tools through filters that strip irrelevant information.</li></ul><p>For conversational padding:</p><ul><li>Configure terse output modes if your AI assistant supports them. Direct answers, no pleasantries.</li><li>Prompt for specific formats. “Answer in one sentence” or “Just the command, no explanation.”</li><li>Use system prompts that discourage filler.</li></ul><h3>Measuring Your Usage</h3><p>You can’t optimize what you don’t measure. Here’s how to start:</p><p>If using an API directly:</p><p>Log every request and response with token counts. Most SDKs expose this in the response metadata.</p><pre>const response = await anthropic.messages.create({...});<br>console.log({<br>  input_tokens: response.usage.input_tokens,<br>  output_tokens: response.usage.output_tokens,<br>});</pre><p>If using Claude Code or similar tools:</p><p>Check the session summary after working. Look for patterns in what consumes the most tokens.</p><p>Track over time:</p><p>A single day doesn’t tell you much. Track for a week. Identify which workflows are expensive and why.</p><h3>The Pareto Principle in Action</h3><p>When I analyzed my usage, I found:</p><ul><li>3 specific workflows accounted for 70% of my token spend</li><li>2 of those workflows could be optimized without changing how I work</li><li>The third needed a different approach entirely</li></ul><p>The fixes:</p><ol><li>Code review workflow: I was loading entire files when I only needed the diff. Switched to loading just the changed lines. 60% reduction in that workflow.</li><li>Debugging workflow: I was letting the AI read every file it wanted to explore. Added a confirmation step for large files. 40% reduction.</li><li>Documentation workflow: I was asking the AI to write docs by reading the whole codebase. Changed to an incremental approach: outline first, then fill in sections. 80% reduction, better quality output.</li></ol><h3>Token-Aware Workflows</h3><p>Once you’re aware of token costs, you start designing workflows differently:</p><p>Incremental over comprehensive. Don’t ask the AI to understand everything at once. Build understanding in stages.</p><p>Targeted reads over broad exploration. Point the AI at specific files instead of “look at the codebase.”</p><p>Structured outputs over freeform. JSON responses with specific fields are more efficient than prose explanations.</p><p>Caching where possible. If you’ll ask the same question again, save the answer locally.</p><h3>The ROI Calculation</h3><p>Let’s say you spend $150/month on AI tokens. You implement the optimizations above and cut that to $50/month.</p><p>That’s $100/month saved. $1,200/year.</p><p>But the real gain isn’t the money. It’s context window space. When you’re not wasting tokens on overhead, you can fit more useful information in each session. The AI has more room to reason about your actual problem.</p><p>Fewer tokens spent on noise means more tokens available for signal.</p><h3>Getting Started</h3><ol><li>Measure first. Spend a week tracking where your tokens go before optimizing.</li><li>Target the top offenders. The Pareto principle applies. A few workflows drive most of the cost.</li><li>Automate the fixes. Manual vigilance doesn’t scale. Build the optimizations into your tooling. Tools like <a href="https://github.com/rtk-ai/rtk">RTK</a> can automatically filter verbose command outputs, cutting 60–80% of token waste without changing how you work.</li><li>Re-measure. Verify the fixes worked. Sometimes “optimizations” just shift the cost elsewhere.</li><li>Token efficiency isn’t about being cheap. It’s about being intentional with the most constrained resource in AI-assisted development: context window space.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69d01a27d643" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[De Debugar Código para Debugar Produtos]]></title>
            <link>https://gabrielvrl.medium.com/de-debugar-c%C3%B3digo-para-debugar-produtos-ff87930496a4?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff87930496a4</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 14:53:13 GMT</pubDate>
            <atom:updated>2026-07-24T14:53:13.140Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>Uma vez passei três dias construindo uma feature. O código funcionava perfeitamente. Testes passando. Zero bugs.</p><p>Aí os usuários começaram a reclamar.</p><p>A feature estava errada. Não quebrada. Errada. Resolvia um problema que ninguém tinha.</p><h3>O Debug Antigo</h3><p>Antes de assistentes de IA, debugar significava encontrar por que o código não funcionava como esperado. Null pointer exceptions, race conditions, erros de off-by-one. Problemas técnicos com soluções técnicas.</p><p>O ciclo de feedback era lento. Você passava uma semana implementando algo, outra semana corrigindo bugs, e só então entregava pros usuários. Quando você descobria que a feature estava errada, já tinha investido tanto tempo que pivotar parecia caro demais.</p><p>Essa lentidão era dolorosa, mas tinha um benefício escondido: forçava você a pensar com cuidado antes de codar. Você não podia se dar ao luxo de construir a coisa errada porque construir qualquer coisa levava uma eternidade.</p><h3>O Debug Novo</h3><p>Com a IA escrevendo código, consigo prototipar uma feature em horas ao invés de dias. A implementação técnica é rápida. Rápida demais, às vezes.</p><p>Agora descubro que uma feature está errada no dia um, não na semana três. O bug não é um null check faltando. O bug é que eu entendi errado o que os usuários realmente precisam.</p><p>Esse é um tipo diferente de debugging. Ao invés de perguntar “por que isso não funciona?”, estou perguntando “por que isso não importa?”</p><h3>O Que Mudou</h3><p>O gargalo se moveu.</p><p>Quando código era lento de escrever, a parte difícil era traduzir requisitos em software. Agora essa tradução é quase instantânea. A parte difícil é garantir que os requisitos estavam certos desde o início.</p><p>Me pego gastando mais tempo em:</p><ul><li>Conversar com usuários antes de construir, não depois</li><li>Prototipar versões descartáveis pra testar suposições</li><li>Questionar requisitos que parecem óbvios demais</li><li>Matar features cedo quando o sinal é fraco</li></ul><p>Menos tempo escrevendo código. Mais tempo garantindo que o código vale a pena ser escrito.</p><h3>A Mudança de Habilidade</h3><p>Debug tradicional requer profundidade técnica. Você precisa entender memória, concorrência, internals do sistema. Essas habilidades ainda importam, mas agora são o básico.</p><p>Debug de produto requer músculos diferentes:</p><ul><li>Empatia. Entender o que usuários realmente precisam, não o que dizem que querem.</li><li>Ceticismo. Questionar suas próprias suposições antes de investir tempo.</li><li>Velocidade até o sinal. Colocar algo na frente dos usuários o mais rápido possível.</li><li>Disposição pra deletar. Jogar fora código que funciona mas não importa.</li></ul><p>Os melhores engenheiros que conheço não são mais os que codam mais rápido. São os que desperdiçam menos tempo construindo a coisa errada.</p><h3>Um Exemplo Prático</h3><p>Uma vez trabalhei num algoritmo de recomendação. A implementação técnica era elegante. Vector embeddings, busca semântica, a stack completa.</p><p>Os usuários não ficaram felizes.</p><p>Não porque estava quebrado. Porque mostrava resultados que batiam com critérios explícitos mas não com a intenção real. Alguém querendo mudar de direção não queria mais do mesmo. Queria algo diferente.</p><p>O bug não estava no algoritmo. Estava na suposição de que match de preferências declaradas equivale a match de necessidades reais.</p><p>Debug tradicional nunca teria encontrado isso. O código estava correto. O produto estava errado.</p><h3>O Que Isso Significa para Engenheiros</h3><p>Se você só sabe debugar código, vai sofrer. A parte fácil agora é fácil. A parte difícil é todo o resto.</p><p>Comece a praticar debug de produto:</p><ol><li>Entregue algo pequeno antes de construir algo grande</li><li>Observe usuários usando ao invés de perguntar o que acham</li><li>Meça comportamento não só funcionalidade</li><li>Delete mais rápido quando algo não está funcionando</li></ol><p>O código se escreve sozinho. Descobrir o que escrever ainda precisa de um humano.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff87930496a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Debugging Code to Debugging Products]]></title>
            <link>https://gabrielvrl.medium.com/from-debugging-code-to-debugging-products-bd8f182e91c9?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd8f182e91c9</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 14:51:06 GMT</pubDate>
            <atom:updated>2026-07-24T14:51:06.438Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>I once spent three days building a feature. The code worked perfectly. Tests passed. No bugs.</p><p>Then users started complaining.</p><p>The feature was wrong. Not broken. Wrong. It solved a problem nobody had.</p><h3>The Old Debugging</h3><p>Before AI assistants, debugging meant finding why code didn’t work as expected. Null pointer exceptions, race conditions, off-by-one errors. Technical problems with technical solutions.</p><p>The feedback loop was slow. You’d spend a week implementing something, another week fixing bugs, and only then ship it to users. By the time you discovered the feature was wrong, you’d invested so much time that pivoting felt expensive.</p><p>That slowness was painful, but it had a hidden benefit: it forced you to think carefully before coding. You couldn’t afford to build the wrong thing because building anything took forever.</p><h3>The New Debugging</h3><p>With AI writing code, I can prototype a feature in hours instead of days. The technical implementation is fast. Too fast, sometimes.</p><p>Now I discover that a feature is wrong on day one, not week three. The bug isn’t a missing null check. The bug is that I misunderstood what users actually need.</p><p>This is a different kind of debugging. Instead of asking “why doesn’t this work?”, I’m asking “why doesn’t this matter?”</p><h3>What Changed</h3><p>The bottleneck moved.</p><p>When code was slow to write, the hard part was translating requirements into software. Now that translation is nearly instant. The hard part is making sure the requirements were right in the first place.</p><p>I find myself spending more time on:</p><ul><li>Talking to users before building, not after</li><li>Prototyping throwaway versions to test assumptions</li><li>Questioning requirements that seem too obvious</li><li>Killing features early when the signal is weak</li></ul><p>Less time writing code. More time making sure the code is worth writing.</p><h3>The Skill Shift</h3><p>Traditional debugging requires technical depth. You need to understand memory, concurrency, system internals. Those skills still matter, but they’re table stakes now.</p><p>Product debugging requires different muscles:</p><ul><li>Empathy. Understanding what users actually need, not what they say they want.</li><li>Skepticism. Questioning your own assumptions before investing time.</li><li>Speed to signal. Getting something in front of users as fast as possible.</li><li>Willingness to delete. Throwing away code that works but doesn’t matter.</li></ul><p>The best engineers I know aren’t the fastest coders anymore. They’re the ones who waste the least time building the wrong thing.</p><h3>A Practical Example</h3><p>I once worked on a recommendation algorithm. The technical implementation was elegant. Vector embeddings, semantic search, the whole stack.</p><p>Users weren’t happy.</p><p>Not because it was broken. Because it surfaced results that matched explicit criteria but not actual intent. Someone looking to change direction didn’t want more of the same. They wanted something different.</p><p>The bug wasn’t in the algorithm. It was in the assumption that matching stated preferences equals matching real needs.</p><p>Traditional debugging would never have found this. The code was correct. The product was wrong.</p><h3>What This Means for Engineers</h3><p>If you only know how to debug code, you’ll struggle. The easy part is now easy. The hard part is everything else.</p><p>Start practicing product debugging:</p><ol><li>Ship something small before building something big</li><li>Watch users use it instead of asking what they think</li><li>Measure behavior not just functionality</li><li>Delete faster when something isn’t working</li></ol><p>The code writes itself. Figuring out what to write still takes a human.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd8f182e91c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP Servers: Dando Olhos e Mãos para a IA]]></title>
            <link>https://gabrielvrl.medium.com/mcp-servers-dando-olhos-e-m%C3%A3os-para-a-ia-cf54b986429d?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf54b986429d</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 14:46:53 GMT</pubDate>
            <atom:updated>2026-07-22T14:46:53.442Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>Durante a maior parte da sua existência, a IA foi cega e paralisada. Conseguia pensar, mas não conseguia ver seus sistemas ou tocar seus dados. Você tinha que copiar e colar contexto pra dentro, depois copiar e colar ações pra fora.</p><p>MCP muda isso.</p><h3>O Que é MCP</h3><p>MCP (Model Context Protocol) é um padrão para conectar modelos de IA a ferramentas externas e fontes de dados. Pense nele como USB para IA. Ao invés de explicar o que tem no seu banco de dados, você dá acesso direto pra IA fazer queries.</p><p>A arquitetura é simples:</p><ul><li>MCP Server: Um serviço pequeno que expõe tools (funções que a IA pode chamar) e resources (dados que a IA pode ler)</li><li>MCP Client: O assistente de IA que conecta aos servers e usa suas capacidades</li><li>Protocolo: Uma forma padronizada de comunicação entre eles</li></ul><p>Você pode rodar múltiplos MCP servers. Um pro seu banco de dados. Um pro seu cloud provider. Um pra analytics. A IA conecta em todos e orquestra entre os serviços.</p><h3>Por Que Isso Importa</h3><p>Antes de MCP, trabalhar com IA era conversacional. Você descrevia o que queria, a IA descrevia o que fazer, e você ia fazer manualmente.</p><p>Com MCP, a IA pode agir diretamente. Ao invés de dizer “rode essa query SQL”, ela roda a query. Ao invés de sugerir “verifique seu bucket S3”, ela verifica o bucket e conta o que encontrou.</p><p>Isso muda a relação de conselheiro para operador.</p><h3>Um Exemplo Prático</h3><p>Considere investigar uma queda nos cadastros de usuários. O fluxo tradicional:</p><ol><li>Perguntar pra IA quais métricas checar</li><li>Ir no dashboard de analytics, rodar queries</li><li>Copiar resultados de volta pra IA</li><li>Pedir pra IA interpretar</li><li>Ir no banco, rodar mais queries</li><li>Copiar resultados de volta</li><li>Repetir</li></ol><p>Com MCP servers conectados ao meu analytics e banco:</p><ol><li>Pedir pra IA investigar a queda de cadastros</li><li>IA faz query no analytics diretamente</li><li>IA faz query no banco diretamente</li><li>IA correlaciona dados entre fontes</li><li>IA reporta descobertas com evidências</li></ol><p>Mesma investigação. Metade do tempo. Zero copy-paste.</p><h3>O Que Você Pode Conectar</h3><p>MCP servers existem pra maioria dos serviços comuns:</p><ul><li>Bancos de dados: PostgreSQL, MySQL, MongoDB, DynamoDB</li><li>Cloud: AWS, GCP, Firebase</li><li>Analytics: Mixpanel, Amplitude, dashboards customizados</li><li>Comunicação: Slack, email, notificações</li><li>Arquivos: S3, filesystem local, Google Drive</li><li>Código: Git, GitHub, pipelines de CI/CD</li></ul><p>Você também pode construir MCP servers customizados pra ferramentas internas. Se tem uma API, você pode empacotar em MCP.</p><h3>A Questão de Segurança</h3><p>Dar acesso direto da IA a sistemas de produção parece perigoso. Pode ser.</p><p>A mitigação é permissões em camadas:</p><ol><li>Servers read-only pra investigação. A IA pode fazer query mas não modificar.</li><li>Acesso de escrita limitado pra operações específicas. A IA pode criar um ticket mas não deletar usuários.</li><li>Gates de confirmação pra ações destrutivas. A IA propõe, você aprova.</li><li>Logs de auditoria pra tudo. Você consegue ver exatamente o que a IA acessou e quando.</li></ol><p>Comece com acesso read-only a sistemas não sensíveis. Expanda gradualmente conforme ganha confiança.</p><h3>Construindo Seu Primeiro MCP Server</h3><p>Um MCP server é só um programa que fala o protocolo. Você pode construir em qualquer linguagem, mas TypeScript e Python têm o melhor suporte de SDK.</p><p>Os conceitos principais:</p><pre>// Tools: funções que a IA pode chamar<br>server.tool(&quot;query_users&quot;, async ({ filter }) =&gt; {<br>  const users = await db.users.find(filter);<br>  return { users };<br>});<br><br>// Resources: dados que a IA pode ler<br>server.resource(&quot;schema://database&quot;, async () =&gt; {<br>  return { tables: await db.getSchema() };<br>});</pre><p>A IA descobre tools e resources disponíveis no momento da conexão. Ela pode então usá-los pra realizar tarefas.</p><h3>Quando Usar MCP</h3><p>MCP brilha quando:</p><ul><li>Investigação requer fazer query em múltiplos sistemas</li><li>Operações são repetitivas e bem definidas</li><li>Contexto é grande demais pra colar no chat</li><li>Ações precisam acontecer em sistemas externos</li></ul><p>MCP é overkill quando:</p><ul><li>Você está fazendo tarefas únicas que são mais rápidas manualmente</li><li>O sistema é sensível demais pra qualquer acesso de IA</li><li>A tarefa requer julgamento que não pode ser verificado</li></ul><h3>O Quadro Maior</h3><p>MCP é parte de uma mudança mais ampla em direção a IA agêntica. Ao invés de chatbots que conversam, estamos construindo agentes que trabalham.</p><p>O agente lê seus error logs, faz query nas suas métricas, checa seus deploys recentes, e conta o que deu errado. Ele não só sugere correções. Ele abre um PR com a correção.</p><p>Isso muda o que desenvolvedores fazem. Menos tempo sendo a ponte entre IA e sistemas. Mais tempo definindo o que a IA deve fazer e verificando se fez certo.</p><p>A IA ganha olhos pra ver seus sistemas e mãos pra mudá-los. Seu trabalho muda de operador para supervisor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf54b986429d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP Servers: Giving AI Eyes and Hands]]></title>
            <link>https://gabrielvrl.medium.com/mcp-servers-giving-ai-eyes-and-hands-8c1bcfdacfa7?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c1bcfdacfa7</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 14:45:30 GMT</pubDate>
            <atom:updated>2026-07-22T14:45:30.698Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>For most of its existence, AI has been blind and paralyzed. It could think, but it couldn’t see your systems or touch your data. You had to copy-paste context in, then copy-paste actions out.</p><p>MCP changes that.</p><h3>What MCP Is</h3><p>MCP (Model Context Protocol) is a standard for connecting AI models to external tools and data sources. Think of it as USB for AI. Instead of explaining what’s in your database, you give the AI direct access to query it.</p><p>The architecture is simple:</p><ul><li>MCP Server: A small service that exposes tools (functions the AI can call) and resources (data the AI can read)</li><li>MCP Client: The AI assistant that connects to servers and uses their capabilities</li><li>Protocol: A standardized way for them to communicate</li></ul><p>You can run multiple MCP servers. One for your database. One for your cloud provider. One for your analytics. The AI connects to all of them and orchestrates across services.</p><h3>Why This Matters</h3><p>Before MCP, working with AI was conversational. You’d describe what you wanted, the AI would describe what to do, and you’d go do it manually.</p><p>With MCP, the AI can act directly. Instead of telling you “run this SQL query”, it runs the query. Instead of suggesting “check your S3 bucket”, it checks the bucket and tells you what it found.</p><p>This shifts the relationship from advisor to operator.</p><h3>A Practical Example</h3><p>Consider investigating a drop in user signups. The traditional flow:</p><ol><li>Ask AI what metrics to check</li><li>Go to analytics dashboard, run queries</li><li>Copy results back to AI</li><li>Ask AI to interpret</li><li>Go to database, run more queries</li><li>Copy results back</li><li>Repeat</li></ol><p>With MCP servers connected to my analytics and database:</p><ol><li>Ask AI to investigate the signup drop</li><li>AI queries analytics directly</li><li>AI queries database directly</li><li>AI correlates data across sources</li><li>AI reports findings with evidence</li></ol><p>Same investigation. Half the time. Zero copy-paste.</p><h3>What You Can Connect</h3><p>MCP servers exist for most common services:</p><ul><li>Databases: PostgreSQL, MySQL, MongoDB, DynamoDB</li><li>Cloud: AWS, GCP, Firebase</li><li>Analytics: Mixpanel, Amplitude, custom dashboards</li><li>Communication: Slack, email, notifications</li><li>Files: S3, local filesystem, Google Drive</li><li>Code: Git, GitHub, CI/CD pipelines</li></ul><p>You can also build custom MCP servers for internal tools. If it has an API, you can wrap it in MCP.</p><h3>The Security Question</h3><p>Giving AI direct access to production systems sounds dangerous. It can be.</p><p>The mitigation is layered permissions:</p><ol><li>Read-only servers for investigation. The AI can query but not modify.</li><li>Scoped write access for specific operations. The AI can create a ticket but not delete users.</li><li>Confirmation gates for destructive actions. The AI proposes, you approve.</li><li>Audit logs for everything. You can see exactly what the AI accessed and when.</li></ol><p>Start with read-only access to non-sensitive systems. Expand gradually as you build confidence.</p><h3>Building Your First MCP Server</h3><p>An MCP server is just a program that speaks the protocol. You can build one in any language, but TypeScript and Python have the best SDK support.</p><p>The core concepts:</p><pre>// Tools: functions the AI can call<br>server.tool(&quot;query_users&quot;, async ({ filter }) =&gt; {<br>  const users = await db.users.find(filter);<br>  return { users };<br>});<br><br>// Resources: data the AI can read<br>server.resource(&quot;schema://database&quot;, async () =&gt; {<br>  return { tables: await db.getSchema() };<br>});</pre><p>The AI discovers available tools and resources at connection time. It can then use them to accomplish tasks.</p><h3>When To Use MCP</h3><p>MCP shines when:</p><ul><li>Investigation requires querying multiple systems</li><li>Operations are repetitive and well-defined</li><li>Context is too large to paste into chat</li><li>Actions need to happen in external systems</li></ul><p>MCP is overkill when:</p><ul><li>You’re doing one-off tasks that are faster to do manually</li><li>The system is too sensitive for any AI access</li><li>The task requires judgment that can’t be verified</li></ul><h3>The Bigger Picture</h3><p>MCP is part of a broader shift toward agentic AI. Instead of chatbots that talk, we’re building agents that work.</p><p>The agent reads your error logs, queries your metrics, checks your recent deploys, and tells you what went wrong. It doesn’t just suggest fixes. It opens a PR with the fix.</p><p>This changes what developers do. Less time being the bridge between AI and systems. More time defining what the AI should do and verifying it did it right.</p><p>The AI gets eyes to see your systems and hands to change them. Your job shifts from operator to supervisor.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c1bcfdacfa7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[O Problema de Retenção que a IA Não Consegue Resolver (Ainda)]]></title>
            <link>https://gabrielvrl.medium.com/o-problema-de-reten%C3%A7%C3%A3o-que-a-ia-n%C3%A3o-consegue-resolver-ainda-67a1d230f04b?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/67a1d230f04b</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 20:00:57 GMT</pubDate>
            <atom:updated>2026-07-20T20:00:57.380Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>Já usei o Claude pra analisar por que os usuários estavam abandonando um app em que eu estava trabalhando. Em três minutos, ele fez query no banco, cruzou com analytics, e me deu um relatório detalhado.</p><p>O diagnóstico estava correto. Usuários estavam desistindo depois da primeira semana porque o fluxo de onboarding não demonstrava valor rápido o suficiente.</p><p>Então pedi pro Claude corrigir.</p><p>Foi aí que as coisas ficaram interessantes.</p><h3>O Que a IA Faz Bem</h3><p>IA é excepcional em diagnóstico. Dê acesso aos seus dados e ela vai encontrar padrões mais rápido que qualquer analista humano.</p><p>No meu caso, ela identificou:</p><ul><li>O passo exato onde usuários abandonavam o onboarding</li><li>Correlação entre descoberta de features e retenção</li><li>Segmentos que retinham bem versus segmentos que churneavam</li><li>Comportamentos específicos que previam engajamento de longo prazo</li></ul><p>Essa análise teria me levado uma semana. Levou três minutos.</p><p>O output foi um problem statement claro: usuários que não experimentam o valor central na primeira sessão raramente voltam.</p><h3>Onde a IA Para</h3><p>Em casos assim, a solução geralmente parece óbvia: mostrar o valor central mais rápido. Mas implementar isso é onde a IA encontra seus limites.</p><p>Se você pedir pro Claude redesenhar um fluxo de onboarding, ele pode te dar múltiplas opções com wireframes e racional. Todas tecnicamente sólidas. Mas frequentemente faltando algo crucial.</p><p>Propostas de IA tipicamente não consideram:</p><ul><li>Restrições de negócio que você não mencionou. Talvez certos passos não possam mudar por requisitos de compliance ou legais.</li><li>Psicologia do usuário que não está nos dados. Por que usuários resistem certas ações, mesmo quando essas ações os ajudariam.</li><li>Realidade organizacional. Talvez o time de design esteja sobrecarregado. Talvez a solução precise ser implementável só por engenheiros.</li><li>Considerações de marca. Algumas sugestões podem parecer fora da marca de formas difíceis de articular até você vê-las.</li></ul><p>IA pode propor soluções. Mas a melhor solução depende de contexto que vive em humanos, não em bancos de dados.</p><h3>O Ponto de Handoff</h3><p>Aqui está o padrão que percebi:</p><p>FasePerformance da IAColeta de dadosExcelenteReconhecimento de padrõesExcelenteDiagnósticoExcelenteGeração de soluçõesBoa mas incompletaSeleção de soluçãoPrecisa de julgamento humanoImplementaçãoPrecisa de execução humanaIteraçãoVolta pra IA pra medição</p><p>IA acelera o começo e o fim. O meio ainda é território humano.</p><h3>Um Workflow Prático</h3><p>É assim que trabalho com IA em problemas de retenção agora:</p><p>1. Deixe a IA diagnosticar. Dê acesso a analytics e banco de dados. Peça o “o quê” e “por quê” do churn. Não restrinja a análise.</p><p>2. Adicione contexto humano. Pegue o diagnóstico e adicione o que a IA não consegue ver. Restrições de negócio. Capacidade do time. Considerações de marca. Realidades políticas.</p><p>3. Gere soluções junto. Peça opções pra IA, mas com suas restrições explícitas. “Dado que não podemos mudar X e o time é limitado a Y, quais são nossas opções?“</p><p>4. Tome a decisão você mesmo. IA pode ranquear opções por impacto estimado. Mas a decisão envolve valores e tradeoffs que são seus pra fazer.</p><p>5. Implemente com assistência da IA. Uma vez que decidiu, IA pode ajudar a executar. Escrever o código, criar os assets, rascunhar as comunicações.</p><p>6. Meça com IA. Após o lançamento, IA analisa resultados e alimenta o próximo ciclo.</p><h3>Por Que Isso Importa</h3><p>Existe uma tentação de tratar IA como onipotente ou inútil. Ambos estão errados.</p><p>IA é incrivelmente poderosa em tarefas específicas: encontrar padrões, gerar opções, executar trabalho bem definido. Ela fica aquém em tarefas que requerem julgamento, contexto organizacional, ou psicologia humana.</p><p>O problema de retenção é um exemplo perfeito. IA pode te dizer exatamente o que está errado. Pode até sugerir correções. Mas escolher a correção certa, implementá-la dentro de restrições reais, e iterar baseado em feedback humano: isso ainda é seu trabalho.</p><h3>O Futuro</h3><p>Essa fronteira vai se mover. IA vai ficar melhor em entender contexto, navegar restrições, e fazer julgamentos. O ponto de handoff vai se deslocar em direção a implementação e iteração.</p><p>Mas por agora, o diagnóstico vem de graça. A solução ainda custa esforço humano.</p><p>Use IA pra entender o problema profundamente e rapidamente. Depois faça o trabalho duro de realmente resolvê-lo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67a1d230f04b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Retention Problem AI Can’t Solve (Yet)]]></title>
            <link>https://gabrielvrl.medium.com/the-retention-problem-ai-cant-solve-yet-06e7703661e9?source=rss-b9758b231017------2</link>
            <guid isPermaLink="false">https://medium.com/p/06e7703661e9</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Gabriel Varela]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 20:00:03 GMT</pubDate>
            <atom:updated>2026-07-20T20:00:03.678Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v43yD7NeMSyXO222NKLnEA.png" /><figcaption>Claude Code</figcaption></figure><p>I’ve used Claude to analyze why users were churning from an app I was working on. In three minutes, it queried the database, cross-referenced with analytics, and gave me a detailed report.</p><p>The diagnosis was correct. Users were dropping off after the first week because the onboarding flow didn’t demonstrate value fast enough.</p><p>Then I asked Claude to fix it.</p><p>That’s when things got interesting.</p><h3>What AI Does Well</h3><p>AI is exceptional at diagnosis. Give it access to your data and it will find patterns faster than any human analyst.</p><p>In my case, it identified:</p><ul><li>The exact step where users abandoned onboarding</li><li>Correlation between feature discovery and retention</li><li>Segments that retained well versus segments that churned</li><li>Specific behaviors that predicted long-term engagement</li></ul><p>This analysis would have taken me a week. It took three minutes.</p><p>The output was a clear problem statement: users who don’t experience core value within the first session rarely come back.</p><h3>Where AI Stops</h3><p>In cases like this, the solution often seems obvious: show users core value faster. But implementing that is where AI hits its limits.</p><p>If you ask Claude to redesign an onboarding flow, it can give you multiple options with wireframes and rationale. All technically sound. But often missing something crucial.</p><p>AI proposals typically don’t account for:</p><ul><li>Business constraints you haven’t mentioned. Maybe certain steps can’t change due to compliance or legal requirements.</li><li>User psychology that isn’t in the data. Why users resist certain actions, even when those actions would help them.</li><li>Organizational reality. Maybe the design team is overloaded. Maybe the solution needs to be implementable by engineers alone.</li><li>Brand considerations. Some suggestions might feel off-brand in ways that are hard to articulate until you see them.</li></ul><p>AI can propose solutions. But the best solution depends on context that lives in humans, not databases.</p><h3>The Handoff Point</h3><p>Here’s the pattern I’ve noticed:</p><p>PhaseAI PerformanceData collectionExcellentPattern recognitionExcellentDiagnosisExcellentSolution generationGood but incompleteSolution selectionNeeds human judgmentImplementationNeeds human executionIterationBack to AI for measurement</p><p>AI accelerates the beginning and the end. The middle is still human territory.</p><h3>A Practical Workflow</h3><p>This is how I work with AI on retention problems now:</p><p>1. Let AI diagnose. Give it access to analytics and database. Ask for the “what” and “why” of churn. Don’t constrain the analysis.</p><p>2. Add human context. Take the diagnosis and layer in what AI can’t see. Business constraints. Team capacity. Brand considerations. Political realities.</p><p>3. Generate solutions together. Ask AI for options, but with your constraints explicit. “Given that we can’t change X and the team is limited to Y, what are our options?“</p><p>4. Make the decision yourself. AI can rank options by estimated impact. But the decision involves values and tradeoffs that are yours to make.</p><p>5. Implement with AI assistance. Once you’ve decided, AI can help execute. Write the code, design the assets, draft the communications.</p><p>6. Measure with AI. After launch, AI analyzes results and feeds back into the next cycle.</p><h3>Why This Matters</h3><p>There’s a temptation to treat AI as either omnipotent or useless. Both are wrong.</p><p>AI is incredibly powerful at specific tasks: finding patterns, generating options, executing well-defined work. It falls short at tasks requiring judgment, organizational context, or human psychology.</p><p>The retention problem is a perfect example. AI can tell you exactly what’s wrong. It can even suggest fixes. But choosing the right fix, implementing it within real constraints, and iterating based on human feedback: that’s still your job.</p><h3>The Future</h3><p>This boundary will move. AI will get better at understanding context, navigating constraints, and making judgment calls. The handoff point will shift toward implementation and iteration.</p><p>But for now, the diagnosis comes free. The solution still costs human effort.</p><p>Use AI to understand the problem deeply and quickly. Then do the hard work of actually solving it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06e7703661e9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>