Pular para o conteúdo

A maior atualização para agentes de programação com IA já está na sua máquina?!

Ver no idioma original →

Autoria: Cole Medin · Assistir no YouTube

Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.

Idioma original: inglês

Vídeo original: The Biggest AI Coding Agent Upgrade Is Already on Your Machine?! · Canal: Cole Medin · 17:03 · Assistir no YouTube

Tópicos: Agentes de IA, Claude Code, Dados, bancos de dados e embeddings

As conversas armazenadas localmente pelos agentes de programação contêm dados valiosos para identificar falhas e oportunidades de melhoria. O vídeo mostra uma forma simples de pedir ao agente que analise essas conversas e uma abordagem mais estruturada usando Databricks, Genie e tabelas com sessões, turnos e chamadas de ferramentas. Com os padrões identificados, é possível ajustar regras, permissões, subagents e hooks para tornar o agente mais confiável e eficiente. O apresentador também demonstra mudanças reais que fez no próprio sistema, incluindo um hook que injeta a estrutura atual do repo no início de cada sessão.

  • As conversas com agentes de programação são armazenadas em arquivos locais e podem conter prompts, chamadas de ferramentas e respostas do agente.
  • A análise direta dos arquivos pode ser simples, mas consome muitos tokens e pode deixar passar padrões importantes.
  • Uma base estruturada com sessões, turnos e chamadas de ferramentas facilita consultas e análises recorrentes.
  • O Databricks CLI e o MCP permitem interagir com a plataforma a partir do agente de programação.
  • O Genie pode processar arquivos JSONL com esquemas inconsistentes e criar tabelas estruturadas.
  • Os padrões encontrados podem orientar mudanças em regras, skills, permissões e hooks.
  • O apresentador alerta para remover informações sensíveis, como chaves de API, antes de enviar conversas a outra plataforma.
  • Uma das mudanças demonstradas injeta a estrutura atual do repo no início da sessão para reduzir suposições incorretas sobre caminhos.
Início Capítulo Resumo
00:00 O valor das conversas anteriores O apresentador explica que os arquivos de conversas podem revelar oportunidades para tornar agentes mais eficientes e confiáveis.
05:42 Da análise direta a uma base estruturada Ele compara a análise simples dos arquivos com uma abordagem estruturada e apresenta o Databricks como solução.
09:17 Armazenar e estruturar as transcrições O vídeo mostra como enviar arquivos ao Databricks e usar Genie para processá-los e criar tabelas.
13:25 Consultar padrões e aplicar melhorias O agente consulta os dados estruturados, identifica falhas recorrentes e ajuda a decidir mudanças no sistema.
16:33 Resultados e conclusão O apresentador resume o processo e destaca o potencial das conversas anteriores para melhorar agentes de programação.

Há uma mina de ouro de dados que provavelmente você não está aproveitando. — 00:00

Estamos usando nosso assistente de programação para aprender com erros passados e se tornar mais eficiente e confiável. — 02:05

Você está enviando as conversas com seu agente de programação para uma plataforma totalmente nova. — 09:48

Suas conversas anteriores com o agente de programação são uma mina de ouro. — 16:33

  • Claude Code (ferramenta): Agente de programação usado no vídeo como exemplo para analisar conversas anteriores e aplicar melhorias.
  • Databricks (empresa): Plataforma usada para armazenar transcrições e criar tabelas estruturadas para análise.
  • Genie (ferramenta): Agente integrado ao Databricks que processa os dados, cria tabelas e ajuda a extrair padrões.
  • Databricks CLI (ferramenta): Interface de linha de comando usada para instalar a integração e interagir com o Databricks.
  • MCP (conceito): Protocolo usado para conectar o agente de programação a recursos do Databricks.
  • JSONL (conceito): Formato dos arquivos de conversas do Claude Code que o vídeo propõe processar e estruturar.
  • Claude Mem (repo): Projeto citado como uma solução de memória para agentes de programação.
  • CC usage (repo): Projeto citado entre as ferramentas relacionadas ao uso e à memória de agentes de programação.
  • Opus 5.5 (modelo): Modelo mencionado pelo apresentador ao explicar por que limita a quantidade de melhorias sugeridas.

00:00 Não importa qual coding agent você está usando, como Claude Code, nem para que está usando: existe uma mina de ouro de dados da qual você provavelmente não está tirando proveito nenhum. Neste vídeo, vou mostrar como podemos usar esses dados para melhorar cada vez mais nossos coding agents ao longo do tempo, sem exigir muito esforço da sua parte. Os dados de que estou falando são, pura e simplesmente, as conversas que você tem com seu coding agent. Cada conversa é armazenada como um arquivo no seu computador, seja qual for o coding agent que você estiver usando. No Claude Code, elas são armazenadas como arquivos JSONL

00:32 E, quer você saiba ou não, seu coding agent provavelmente já examinou esses arquivos. Mesmo que você tenha configurado algum tipo de sistema de memória, percebi que, quando você pergunta sobre conversas anteriores, ele gosta de consultar esses arquivos, porque eles são ricos em informações. Esse é o objetivo deste vídeo: queremos aproveitar esses arquivos, e vou falar sobre como fazer isso. Mas o problema é que esses arquivos são tão ricos em informações que acabam sendo um pouco avassaladores. Então, mesmo que você já tenha olhado para eles antes, provavelmente percorreu o conteúdo e pensou: “Como é que eu vou

01:03 usar isso para alguma coisa útil?” Bem, é isso que vou mostrar agora. Porque o que podemos fazer com esses arquivos incríveis é analisar centenas ou milhares de conversas anteriores com nosso coding agent. Cada arquivo de conversa contém todos os prompts que enviamos, todas as ferramentas ou servidores MCP que o coding agent usou e todos os pensamentos que teve. Assim, podemos pegar tudo isso, extrair as partes boas, colocá-las em algum tipo de tabela estruturada e, então, começar a extrair insights. Por exemplo, podemos identificar oportunidades para tornar nossos

01:34 coding agents mais eficientes no uso de tokens ou descobrir falhas comuns para que possamos resolvê-las com mudanças em nossas regras ou skills. Sua imaginação pode realmente ir longe com todas as maneiras diferentes de aproveitarmos nossas conversas anteriores e, é claro, de usar nosso coding agent para nos ajudar a fazer isso. O que tenho para mostrar aqui é uma oportunidade muito fácil de aproveitar, porque a entrada do processo que vou apresentar são simplesmente as conversas que você já tem com seus coding agents, armazenadas no seu computador. Não há mais nada. E o que você obtém são insights para melhorar seu coding agent. Então, estamos usando nosso assistente de programação com IA para

02:05 aprender com os erros do passado e se tornar mais eficiente e confiável. O principal de que precisamos para fazer esse processo funcionar bem é um lugar para armazenar permanentemente nossas transcrições, porque, caso contrário, o Claude Code as apaga depois de 30 dias, por padrão. Também precisamos de um banco de dados para organizá-las. Como você viu há pouco, os arquivos JSONL são uma bagunça, e os arquivos de qualquer outro coding agent não são melhores. Por isso, precisamos de um banco de dados onde possamos dividir as informações em tabelas estruturadas e obter apenas o que precisamos. Por exemplo: aqui estão nossas sessões; aqui estão todas as chamadas de ferramenta

02:36 que o agent fez ao longo das conversas; aqui estão os diferentes turnos do agent. Vou mostrar como configurar isso em uma plataforma que adoro usar, chamada Databricks. Esta é minha solução gratuita favorita para tudo o que vou mostrar neste vídeo. Mas, é claro, há muitas maneiras diferentes de extrair dados dessas conversas e obter esses insights. É apenas o método que funcionou melhor para mim. Certo, vamos começar pela maneira mais fácil de fazer isso. Não é a melhor maneira, e é por isso que quero mostrar o processo com as tabelas estruturadas. Mas, se você quiser começar da forma mais simples possível, tudo o que precisa fazer é o seguinte:

03:07 Basta abrir seu coding agent e escrever algumas frases. Faça uma análise aprofundada das nossas conversas anteriores para identificar oportunidades de tornar nosso coding agent, como o Claude Code, mais eficiente ou confiável. Depois, sugira as 10 principais melhorias em uma lista concisa com marcadores. Obviamente, você não precisa escrever o prompt exatamente como eu, mas gosto de acrescentar isso para garantir que ele não comece a recomendar uma mudança atrás da outra. Porque, especialmente antes do Opus 5.5, o Opus 5 me dava um milhão de sugestões diferentes que mal faziam diferença. Por isso, gosto de limitar bastante

03:39 o que ele produz. E é só isso que você precisa para começar. É muito fácil. Também comecei esta conversa mostrando que os coding agents sabem onde as próprias conversas são armazenadas. Então, se você simplesmente perguntar: “Onde todas as conversas do Claude Code ficam armazenadas no meu computador?”, ele consegue identificar a pasta exata onde estavam todos aqueles arquivos JSONL que mostrei antes. Eles ficam separados por projeto em que estamos trabalhando com nosso coding agent. Ou, se você pesquisar na pasta por star.jsonl, verá todos os arquivos. Podemos copiar todos

04:10 se quisermos. Agora, de volta ao Claude Code: depois que eu enviar esse prompt, ele vai começar carregando uma skill que criei exatamente para esse processo. Mais uma vez, esta é a maneira simples de fazer isso. Não é a mais eficaz nem a mais eficiente no uso de tokens, mas, se você quiser o ponto de partida mais fácil, vou incluir o link para essa skill na descrição, e você pode simplesmente enviar um prompt como este. Ele vai executar alguns comandos de shell para ler todos esses arquivos e identificar falhas comuns. Então, vai listar as 10 principais e, depois, obviamente, posso dar continuidade e perguntar ao Claude Code: “Certo,

04:41 com base nesta falha ou naquela falha, o que podemos mudar na nossa camada de IA, como nossos hooks, skills ou regras, para não nos depararmos com isso repetidamente?” Por exemplo, no terceiro problema que ele identificou, disse que estou atingindo com muita frequência meu limite de subagents simultâneos. Com certeza, é um problema que quero resolver. Então, para dar continuidade, basta perguntar: “O que posso mudar na nossa camada de IA para corrigir o problema número três?” Aliás, minha definição de camada de IA está incluída na skill, então ele sabe que está fazendo uma

05:11 auditoria própria dos subagents, hooks, regras e skills, de tudo o que você incluiu nas suas regras globais ou na pasta .claude. Aqui, ele sugere que devemos fazer uma mudança neste subagent. Este é o culpado. Se a sugestão estiver correta, fazemos essa mudança e as conversas futuras não vão mais se deparar com o problema número três. Então, cabe a você continuar trabalhando com seu coding agent no futuro e ver se realmente resolveu o problema. Em termos bem simples, é assim que aproveitamos conversas anteriores para

05:42 melhorar as próximas. Mas agora chegamos ao sistema de verdade, porque o problema de fazer isso da maneira simples, por melhor que seja como ponto de partida, é que estamos pedindo ao coding agent que leia centenas de milhares de tokens em arquivos, percorrendo aqueles enormes arquivos JSONL que mostrei antes. Então, se analisarmos essa lista, ou ele precisa ler tudo para identificar todos os padrões certos, ou vai captar apenas as coisas mais superficiais e escolher alguns desses arquivos para ler. Nenhuma dessas opções

06:12 é ideal. É claro que existem outros projetos open source, como CC usage e Claude Mem. É uma memória especializada para seus coding agents, mas esses dois projetos — e, na verdade, nada mais do que vi — são realmente voltados a armazenar memórias especificamente para que possamos tornar nosso coding agent mais eficiente e confiável ao longo do tempo. É isso que queremos fazer agora usando o Databricks. Vou mostrar como é fácil instalá-lo, usá-lo de graça para montar nosso conjunto de dados estruturado das conversas e, então, começar a extrair insights delas. E

06:44 Vou mostrar como, dentro da plataforma Databricks, podemos usar um agent que eles têm, chamado Genie, para nos ajudar a definir a estrutura e montar essas tabelas. Então, você tem uma conversa como esta, que ajuda a criar a estrutura e reunir os insights, sem precisarmos fazer nada manualmente. Mais uma vez, isso é algo fácil de resolver. Seja dessa forma ou da maneira super simples, realmente não precisamos fazer muita coisa por conta própria, especialmente considerando o quanto são poderosos os insights que obtemos, economizando muito tempo nas nossas conversas daqui para a frente. E, para ser totalmente transparente, decidi trabalhar com a Databricks para trazer este vídeo até vocês. Achei que fazia

07:14 sentido, porque já estou usando a plataforma deles para fazer isso, e a edição gratuita oferece tudo de que você precisa para passar por todo esse processo. Certo, vou começar mostrando rapidamente como instalar o Databricks com apenas alguns comandos e conectá-lo ao coding agent de sua preferência, para que seja muito fácil trabalhar com ele. Então, vamos instalar o Databricks CLI. Tudo o que mostrei na interface deles pode ser configurado no nosso sistema. Vou deixar na descrição o link para esta página, que tem instruções de instalação para cada sistema operacional. Depois de instalar, você

07:45 também pode conectá-lo ao seu coding agent, como o Claude Code. Eu só uso o comando de instalação das ferramentas de IA do Databricks CLI; o agent é o Claude Code. Você também pode usar Pi ou Codex, algo assim. E, para este projeto, vou deixar esse comando na descrição. Então, você instalou, conectou ao seu coding agent e agora temos isso como um servidor MCP. Praticamente tudo o que você quiser fazer na interface, como enviar suas transcrições ou criar as tabelas estruturadas, pode ser feito diretamente pelo seu coding agent. Por exemplo, em uma conversa no Claude Code, posso dizer: use o servidor MCP do Databricks Genie para consultar meu

08:16 histórico do Claude Code. Obviamente, isso é depois que configurarmos tudo, e é isso que vou mostrar a seguir. Mas estou mostrando como é fácil trabalhar com a plataforma dentro do coding agent que já usamos. É o mesmo tipo de coisa que mostrei na demonstração simples, em que pedimos que ele analise conversas anteriores para identificar falhas e padrões relacionados a elas. Só que agora temos bastante estrutura. Isso vai ser eficiente em termos de tokens e tornar o processo muito mais confiável. E, só para mostrar rapidamente, também podemos usar o Databricks CLI diretamente para fazer uma pergunta ao Genie, que é o agent integrado à plataforma deles

08:47 e que tem acesso a tudo o que você configurar lá. Estou executando o comando ask e, em seguida, fornecendo um prompt, como faria com seu coding agent. Depois de instalar o Databricks na sua máquina e conectá-lo ao seu coding agent, precisamos configurar o armazenamento das transcrições e das tabelas. Não podemos simplesmente começar a fazer perguntas. Então, na página inicial do painel da edição gratuita do Databricks, vou acessar Catalog. Vamos começar criando um volume. Para economizar tempo, já criei um, mas basta seguir esse processo. É super, super rápido,

09:17 e é aqui que vamos armazenar todas as transcrições. Vamos simplesmente enviar as conversas que queremos do nosso computador, aqui mesmo. Neste ponto, elas ainda estão no formato JSONL. E, literalmente, tudo o que fiz foi pedir ao meu coding agent que enviasse esses arquivos diretamente para o volume usando o servidor MCP que acabei de mostrar como conectar. É claro que você também pode enviá-los manualmente. Por exemplo, posso abrir meu sistema de arquivos aqui, selecionar minhas conversas, arrastá-las para cá e enviá-las com a mesma facilidade. E, para

09:48 esta demonstração, enviei 62 das minhas conversas mais longas, só para não enviar milhares de arquivos. Mas você pode fazer isso, se quiser. O principal que eu diria para ter em mente é que você precisa estar de acordo com o seguinte: está pegando as conversas com seu coding agent e enviando-as para uma plataforma totalmente nova. Mas devo dizer que a Databricks não vai treinar com seus dados. Na minha opinião, não há realmente nenhum problema em enviar seus dados para cá, especialmente porque você não deveria fornecer informações confidenciais ao seu

10:20 coding agent em primeiro lugar. Quer dizer, sim, se você tem chaves de API armazenadas nesses arquivos JSONL, provavelmente não vai querer enviá-las para lugar nenhum. Mas também não deveria fornecer suas chaves de API à Anthropic, à OpenAI ou a qualquer outra empresa. Então, supondo que esses arquivos estejam limpos e que não haja nada confidencial neles, você pode enviá-los diretamente para a plataforma. Caso contrário, você pode pedir ao seu coding agent que faça algum tipo de higienização antes de enviá-los pelo MCP. Enfim, só queria mostrar isso rapidamente, porque sei que muitos de vocês se preocupam bastante com esse assunto. Mas o importante é que, depois que suas conversas estiverem aqui, está tudo pronto.

10:52 Você já configurou seu volume. Agora, o que precisa fazer é clicar nos três pontos aqui e copiar o caminho para o volume, porque vamos fornecê-lo ao Genie, o agent integrado ao Databricks, para que ele possa acessar esse local, extrair os dados e criar as tabelas estruturadas. Então, copie esse caminho, acesse Workspace e crie um notebook. Vamos pedir ao Genie que escreva o código para operar diretamente no nosso ambiente Databricks. É claro que já criei um notebook. Vou clicar nele e mostrar o que fiz para

11:23 montá-lo com o Genie. Vou começar clicando neste botão no canto superior direito para abrir o Genie. Este é o agent que tem acesso a todo o meu ambiente Databricks. É como um coding agent turbinado, aqui mesmo na plataforma. Estou fornecendo o caminho para o meu volume e pedindo que ele o processe. Ou seja, que leia cada arquivo JSONL, mas usando Spark, certo? Assim, não gasto centenas de milhares de tokens. Ele faz isso de uma maneira muito estruturada. Então, digo que são transcrições de sessões do Claude Code, com esquemas aninhados inconsistentes entre os registros. Esse também é parte do problema. Cada uma dessas

11:54 conversas está formatada de um jeito um pouco diferente. E esse é o desafio que estou pedindo ao Genie que resolva. Ele faz um ótimo trabalho. Então, ele entende a estrutura geral e as inconsistências. Depois, trabalha com isso para montar este notebook completo. Não escrevi nada desse código. Hoje em dia, nunca escrevo código. O Genie criou tudo para processar os dados com base na análise inicial que fez, deixando tudo organizado nas tabelas que criou no final, aqui. Se eu rolar para baixo até o

12:24 fim desta conversa, vocês podem ver cada uma das tabelas que ele criou. Criou tabelas de turnos, tool calls e sessões. Ele informa o número de registros em cada uma e as colunas. E não só cria essas tabelas, como também preenche tudo com base em todas as conversas do volume. Para o meu processo específico, fiz isso em duas etapas. Primeiro, pedi que ele entendesse os dados e me mostrasse que tinha conseguido. Depois, pedi que criasse as tabelas para organizar os dados e carregasse tudo no banco de dados. Então, você não precisa

12:54 fazer desse jeito. O prompt pode ser muito mais aberto. Por exemplo: “Aqui está o volume; crie uma estrutura para eu extrair conclusões das transcrições do Claude”. Faça como quiser; o Genie vai conseguir tocar o trabalho, porque tem acesso completo ao nosso ambiente. E não quero entrar em detalhes sobre como ele analisou os dados e criou essas tabelas. Mas é realmente impressionante. Sim, meus prompts são um pouco específicos, mas não dei tantas orientações, e ele fez um trabalho excelente. Então, depois que o Genie criar as tabelas e carregá-las com os dados das nossas conversas,

13:25 Agora podemos voltar ao nosso coding agent e usar o servidor MCP do Databricks para começar a consultar os dados estruturados e fazer as perguntas de que precisamos. Então posso perguntar, por exemplo: que tipos de padrões de falha você está vendo aqui? O que você propõe que mudemos na nossa camada de IA? Exatamente como mostrei na demonstração mais simples. Mas a vantagem aqui é que temos os dados estruturados. Não precisamos ler centenas de milhares de tokens em arquivos JSONL só para obter conclusões cada vez que queremos fazer nossa análise. E trazer mais

13:55 conversas é muito fácil, porque já temos o pipeline. Mais uma vez, não precisamos gastar centenas de milhares de tokens para que nosso coding agent faça isso por nós. Então, com esta pergunta, em vez de todas aquelas chamadas de shell lendo todos esses arquivos, agora ele está fazendo chamadas ao Genie. O Genie é realmente o cérebro que entende os dados e fornece os insights. E agora estamos usando nosso coding agent principal, como o Claude Code, basicamente como orquestrador, só para fazer as perguntas certas e obter o resultado do Genie. Então, nesta demonstração específica, ele encontrou três padrões principais de falhas em todos os dados. Então, o Genie

14:27 escreveu o SQL, analisou a tabela com muita eficiência e extraiu essas informações muito rapidamente. Agora podemos pegar isso e perguntar ao Claude Code o que podemos mudar na nossa camada de IA para evitar esses problemas daqui para a frente, como mostrei naquele exemplo anterior. E, no fim da conversa, ele até me dá um link para explorar no Databricks. Assim, posso ver a própria conversa com o Genie e o que o Claude Code delegou aqui, para obter mais insights se eu quiser me aprofundar. Mas o mais importante que quero mostrar são as melhorias que realmente fiz na minha camada de IA com base nesta

14:58 conversa. Não fiz este vídeo só para mostrar algo sem testar por conta própria. Usei exatamente esse processo para comprovar isso para vocês enquanto fazia este vídeo. E, claro, já executei praticamente o mesmo processo muitas vezes. Enfim, vou abrir o VS Code e mostrar as mudanças reais que fiz na minha camada de IA, que uso no meu segundo cérebro. E vou continuar usando essas mudanças daqui para a frente. Elas são legítimas. Então, a primeira coisa foi adicionar umas 38 linhas às minhas regras globais, abordando os problemas específicos que encontramos na análise do Genie no Databricks.

15:29 Por exemplo, nunca adivinhar um caminho, algo que os coding agents realmente fazem bastante se você não disser explicitamente para não fazerem isso. Adicionei mais algumas permissões no settings.json, para que ele consiga trabalhar melhor com o Git. Também adicionei um hook, que é minha parte favorita das mudanças que fizemos aqui na camada de IA. É uma árvore de sessão. Trata-se de um script que é executado sempre que inicio uma nova conversa com meu coding agent. E isso é bem legal: ele injeta a estrutura real do repo, então é menos provável que o agent adivinhe caminhos para acessar coisas

16:02 quando estiver lendo arquivos e reunindo contexto. Isso é ótimo, especialmente porque é dinâmico. Muita gente gosta de incluir a estrutura da base de código nas regras globais, mas aí é preciso atualizá-la constantemente e ela sempre corre o risco de ficar desatualizada. Mas agora vamos reunir contexto sobre a estrutura de arquivos e injetá-lo imediatamente no coding agent sempre que iniciarmos uma nova conversa. Então, fiz algumas mudanças bem legais e práticas na minha camada de IA, graças aos insights que reuni com o que configurei no Databricks. E sei que esses exemplos são muito específicos do que

16:33 tenho no meu próprio sistema, mas só queria dar algumas ideias reais, alguns exemplos reais de como estamos melhorando nosso coding agent ao longo do tempo, analisando nossas conversas anteriores. Então, é isso. É assim que você usa o Databricks e o agent Genie deles para melhorar seu coding agent ao longo do tempo. E o principal aqui é que suas conversas anteriores com seu coding agent são uma mina de ouro. Há muitas maneiras diferentes de estruturar as conversas, reunir insights e agir com base neles. Eu só queria mostrar um processo completo, de ponta a ponta.

17:03 E, se você gostou deste vídeo e está ansioso por mais conteúdo sobre programação com IA, eu agradeceria muito se deixasse uma curtida e se inscrevesse no canal. E, com isso, nos vemos no próximo vídeo.

Transcrição original

[00:00] No matter the coding agent that you’re using, like Claude code, and what you’re using it for, there is a goldmine of data that you’re probably not taking advantage of at all. And in this video, I’ll show you how we can use it to make our coding agents better and better over time, and it really doesn’t take that much effort on your part. The data that I’m talking about is the conversations that you have with your coding agent, plain and simple. Every single conversation gets stored as a file on your computer, no matter the coding agent that you’re using. With Claude code, they are stored as these JSONL

[00:32] files. And whether you know it or not, your coding agent has probably already looked through these files before. Even if you have some kind of memory system set up, I find that when you ask about past conversations, it likes to look in these files because they are rich with information. That’s the whole point of this video is we want to leverage these, and I’ll talk about how we do that. And so, the problem we have with this though is that these files are so rich with information that it’s kind of overwhelming. So, even if you’ve looked at this before, you’ve probably scrolled through it and been like, “How am I even

[01:03] going to use this for anything useful?” Well, that is what I have for you right now. Because what we can do with these beautiful files is we can take a look at the hundreds or thousands of past conversations with our coding agent. Each one of these files for that conversation has every prompt that we sent in, every tool or MCP server coding agent has used, every thought that it’s had. And so, we can take all of that, extract the good parts, put it in some kind of structured table, and then start extracting insights. Like we can identify opportunities to make our

[01:34] coding agents more token efficient, or figure out common failures so we can address them with changes to our rules or our skills. Your imagination can really start to run wild with all the different ways we can leverage our past conversations, and of course, using our coding agent to help us do that. And so, what I have for you here is such low-hanging fruit because the input into the process I’ll show you is just the conversations that you already have with your coding agents stored on your machine. There’s nothing else. And what you get out of it is the insights to make your coding agent better. So, we are using our AI coding assistant to

[02:05] learn from past mistakes to make itself more efficient and reliable. The main thing that we need to make this process work well is a place to store our transcripts permanently because otherwise Claude Code cleans them up after 30 days by default. And then we also need a database for structure. Like you saw just a bit ago, the JSONL files are super messy and it’s not better for any other coding agent. And so having a database where we can split things into structured tables, just getting the information we need. Like here are our sessions, here are all the tool calls

[02:36] the agent has made across conversations, here are the different agent turns. I’ll show you how to set this up here in a platform that I love using called Data Bricks. This is my favorite free solution for everything I’m going to show you in this video. But there are of course a lot of different ways we can extract data from these conversations and get these insights. This is just the way this worked the best for me. Okay, so let’s start with the easiest way to get this done. Now this isn’t the best way to do it, which is why I want to show you the process with the structured tables. But if you want to get started simple as possible, this is all you have

[03:07] to do. You just go into your coding agent, couple of sentences here. Do a deep dive into our past conversations to identify opportunities to make our coding agent like Claude Code more efficient or reliable. And then I want you to suggest the top 10 improvements in a concise bullet point list. So obviously you don’t have to prompt exactly as I do, but I like adding this just to make sure it doesn’t spit out change after change that it recommends. Cuz especially before Opus 5.5, like Opus 5 would just give me like a million different things that barely mattered at all. And so I like to very much bound

[03:39] what it outputs. And this is all it takes to get started. It’s super easy. And I also started this conversation by showing you that coding agents are aware of where their own conversations are stored. So if you just simply ask, “Where are all Claude Code conversations stored on my machine?” It is able to identify that exact folder that I was showing you all the JSONL files in earlier, which they’re all split by the different projects that we’re working on with our coding agent. Or if you just search the folder for star.jsonl, it’ll show all the files. We can copy them all

[04:10] if we want to. Now, back over to Claude code, once I send in this prompt, it’s going to start by loading a skill that I built for this exact process. So again, this is the simple way to do it. It’s not the most effective or token efficient, but if you do want the easiest starting point, I will link to this skill in the description, and you can just send off a prompt like this. And so it’s going to run some shell commands to read through all these files here and identify common failures. And so it’s going to list out the top 10, and then obviously I can take that forward and then ask Claude code, “Okay,

[04:41] like based on this failure or this failure, what can we change in our AI layer, like our hooks or our skills or our rules, so we’re not going to run into this time and time again?” So for example, with the third issue that it identified, it said that I’m hitting my concurrent sub-agent limit way too often. That is definitely a problem that I want to address. And so taking this forward is as simple as asking it, “What can I change in our AI layer to fix issue number three?” And by the way, my definition for AI layer is built into the skill, so it knows that it’s doing a

[05:11] self-audit of its sub-agents and hooks and rules and skills, everything that you’ve built into, you know, your global rules or your .claude folder. And so here it makes a suggestion that we should make a change to this sub-agent. This is the culprit. Assuming that it’s correct here, we make this change and now future conversations won’t run into issue number three again. And so it’s all up to you just continuing to work with your coding agent in the future and seeing if you really did address this problem. So at a very simple level, this is how we leverage past conversations to

[05:42] make future ones better. But now we get to the real system here, because the problem with doing this the simple way, as good of a starting point as it is, is we are asking the coding agent to go through and read hundreds of thousands of tokens of files going through these massive JSONL files that I was showing you earlier. So, if we go through this list, either it has to read everything to identify all the right patterns, or it’s only going to pull the surface level things and just pick out a few of these files to read. Neither of those

[06:12] are ideal. And of course, there are other open-source projects out there like CC usage and Claude Mem. It’s specialized memory for your coding agents, but these two and really nothing else that I’ve seen is really directed towards storing memories specifically so that we can make our coding agent more efficient and reliable over time. That’s what we want to do right now using Databricks. And so, I’ll show you how easy it is to install it, use it for free to build up our structured data set for our conversations, and then start extracting the insights from them. And

[06:44] I’ll show you how within the Databricks platform, we can use an agent they have called Genie to help us define the structure and build up these tables. So, you have a conversation like this, so it helps you create the structure and gather the insights, so we don’t have to do anything manually. Again, this is low-hanging fruit. Either this way or the super simple way, we really don’t have to do that much ourselves, especially considering how powerful the insights are that we get, saving us a ton of time in our conversations going forward. And full disclosure, I did decide to work with Databricks to bring this video to you. I thought it made

[07:14] sense because I’m already using their platform to do this, and their free edition gives you everything you need to go through this entire process. All right, so I’ll start by quickly showing you how we can install Databricks in just a couple of commands and get it connected to your coding agent of choice, so it’s very easy to work with. And so, we’re going to be installing the Databricks CLI. So, everything I’ve been showing you in their user interface, we can set up on our system. So, I’ll link to this page in the description that has installation instructions for every OS. Once you have this installed, then you

[07:45] can also connect it to your coding agent like Claude code. So, I just use the Databricks CLI AI tools install the agent is Claude code. You could do Pi or Codex, something like that. And then just for this project, I’ll also have this command in the description. So, you’ve got it installed, you got to connect it to your coding agent, and now we have it as an MCP server. So, pretty much anything you want to do in the interface, like upload your transcripts or create the structure tables, you can do it directly from your coding agent. So, for example, within a Claude code conversation, I can say use the Databricks Genie MCP server to query my

[08:16] Claude code history. Obviously, this is once we have things set up, and that’s what I’ll show you next. But, I’m just showing you how easy it is to work with the platform within our coding agent where we already work. And so, it’s the same kind of thing I showed you with the simple demo, where we’re having it go through past conversations to identify failures and patterns around that. But, now we have a lot of structure. It’s going to be token efficient, and it’s going to be a lot more reliable of a process. And also, just to show you really quickly, we can just use the Databricks CLI directly to ask Genie, which is the agent built into their

[08:47] platform that has access to everything you set up there. And so, I’m running the ask command, and then just giving it a prompt like you would your coding agent. So, once you have Databricks installed on your machine and connected to your coding agent, we have to go set up the storage of our transcripts and the tables. We can’t just go ask the questions right away. So, here in the homepage dashboard of Databricks free edition, I’m going to go to catalog. And so, we’ll start by creating a volume. So, for the sake of time, I already have one created, but you’ll just go through this process. It’s super super quick,

[09:17] and then this is where we’re going to store all the transcripts. So, we’ll just upload the conversations we want from our computer right here. And at this point, it’s still in the JSON L format. And so, literally all I did at this point is I just had my coding agent upload these files directly to the volume using the MCP server I just showed you how to connect. And of course, you can also upload these manually as well. Like I can just go to my file system here, select my conversations, drag them in, and then upload them that easily. And so, for

[09:48] this demo here, I uploaded 62 of my biggest conversations, just so I’m not uploading thousands of files here. But you definitely can do that if you want. The main thing I would say to keep in mind here, you just have to be okay with this, is you are taking your coding agent conversations and uploading them into a whole new platform. But I will say that Databricks, they are not going to train on your data. There’s not really any kind of problem, at least in my mind, for uploading your data here, especially because you should not be giving any sensitive information to your

[10:20] coding agent in the first place. I mean, yes, if you have API keys that are stored in these JSON L files, you probably don’t want to upload that anywhere. But also, you shouldn’t be giving Anthropic or OpenAI or whatever your API keys, either. So, assuming these files are clean and you don’t have anything sensitive here, you can upload it right into the platform. Otherwise, you could have your coding agent do some kind of scrubbing before it uploads with the MCP. So, anyway, I just wanted to show that really quickly, cuz I know some of you care about that a lot. But the point is, once you have your conversations here, you are good to go.

[10:52] You have your volume set up. And so, now what you want to do is you want to click on the three dots right here and copy the path to your volume, because we’re going to give that to Genie, the agent built into Databricks, so that it can look here, pull the data from this, and create the structured tables. So, you copy that path, and then you go to workspace, and you can create a new notebook. And so, we’re going to have Genie actually write the code to operate directly in our Databricks environment. I obviously have a notebook created already. So, I’m going to click into this, and I’ll show you what I did to

[11:23] build this with Genie. So, I’ll start by clicking on this button on the top right to open up a Genie. This is the agent that has access to my entire Databricks environment. It’s like an amped-up coding agent right here in the platform. So, I’m giving it the path to my volume and I’m asking it to process it. So, reading every JSONL file, but with Spark, right? Like I’m not spending like hundreds of thousands of tokens here. It’s going about it in a very structured way. So, I’m saying these are Claude code session transcripts with inconsistent nested schemas across records. That’s also part of the problem here. Is every single one of those

[11:54] conversations is formatted in a bit of a different way. And so, that’s the challenge that I’m having Genie address here. And it does a really good job. So, it gets a general idea of the structure. It understands the inconsistencies. And then it works with that to build this full notebook here. So, I didn’t write any of this code. I never write any code these days. Genie created everything to process based on the initial dive that it took, getting everything created into the tables that it built at the end right here. So, if I scroll down in the

[12:24] bottom of this conversation, you can see each of the tables that it created. So, it created turns. It created tool calls and sessions. And so, it says the number of records in each one of them and the columns. And not only does it create these tables, but it populates everything based on all the conversations in the volume as well. So, for my specific process here, I did it in two steps. First, I had it understand the data and prove that out to me. Then I prompted it to create the tables for the structure and load everything into the database. And so, you don’t have to

[12:54] do it that way. It could even be a much more free-form prompt. Like here’s the volume, create some structure for me to get takeaways from the Claude transcripts. Whatever you want to do, Genie is going to be able to just run with it cuz it has full access to our environment here. And I don’t really want to get into the weeds for, you know, how it reasoned through the data and built these tables. But it is really impressive. Like, yeah, my prompts are a little specific, but there’s not too much guidance that I gave it and it really knocked this out of the park. So, once Genie has created the tables and loaded it with our conversation data,

[13:25] now we can go back over to our coding agent and use the Databricks MCP server to start querying the structured data asking the questions that we need. And so I can say like, you know, what kind of patterns of failures are you seeing here? What do you propose we change in our AI layer? Exactly like I showed you in the more simple demo. But the benefit here is we have the structure. We don’t have to read through hundreds of thousands of tokens of JSONL files just to get takeaways each time we want to do our analysis. And bringing in more

[13:55] conversations is a piece of cake cuz we already have the pipeline. We again don’t have to spend hundreds of thousands of tokens to have our coding agent do that for us. And so with this question here, instead of all those shell calls reading all these files, it’s now making the calls out to Genie. So Genie is really the brains that is understanding the data and giving the insights. And now we’re using our main coding agent like Claude Code really as the orchestrator to just ask the right questions to get the output from Genie. So now with my specific demo here, there are three core patterns that it found of failures across all the data. So Genie,

[14:27] it wrote the SQL, it analyzed the table very efficiently, and pulled this stuff out super quickly. And now we can take this and ask Claude Code what can we change in our AI layer to avoid these issues going forward, just like I showed you again with that example earlier. And at the very bottom of the conversation, it even gives me a link here to explore in Databricks. So I can take a look at the conversation with Genie itself, what Claude Code delegated here, so I can get more insights if I want to really dive into it. But the most important thing I want to show you is the improvements I actually made to my AI layer based on

[14:58] this conversation. I didn’t just build this video to show you something without trying it myself. I used this exact process to prove it out to you while I made this video. And of course, I’ve run the pretty much the exact same process many times before. So anyway, I’ll go into VS Code and show you the real changes that I made to my AI layer that I use within my second brain. And I’m going to keep these going forward. These are legit. And so, the first thing is I added just like, you know, 38 lines to my global rules addressing the specific problems we found with our Genie

[15:29] analysis in Databricks. Like, for example, never guessing a path, which is something that coding agents will actually do a lot if you don’t explicitly tell them not to. I added some more permissions within the settings.json, so it’s able to work better with Git. And then, I also added a hook, which is my favorite part of the changes that we made to the AI layer here. It is a session tree. It’s a script that runs whenever I start a new conversation with my coding agent. And this is pretty cool. It injects the real repository layout, so the agent is less likely to guess paths to access things

[16:02] when it’s reading through files and gathering context. This is awesome, especially cuz this is dynamic. A lot of people like to give like a code base layout in their global rules, but then you have to constantly change it and it always risks going stale. But now, we’re going to gather context around the file base structure and inject that right away in the coding agent whenever we start a new conversation. So, some pretty cool and practical changes that I’ve done to my AI layer here, all thanks to the insights I gathered from what I set up in Databricks. And I know these examples are very specific to what

[16:33] I have in my own system, but I just wanted to give you some real ideas, some real examples of how we are making our coding agent better over time looking at our past conversations. So, there you go. That is how you use Databricks and their Genie agent to make your coding agent better over time. And the big thing here is just that your past conversations with your coding agent are a gold mine. There are a lot of different ways to structure the conversations and gather insights from them and act on them. I just wanted to give you a full process end-to-end here.

[17:03] And so, if you appreciated this video, you’re looking forward to more things on AI coding, I would really appreciate a like and a subscribe. And with that, I will see you in the next video.