Pular para o conteúdo

Criei um agent pessoal com Raspberry Pi — Jeremy Adams, Neo4j

Ver no idioma original →

Autoria: AI Engineer · 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: I Built a Personal AI Agent on a Raspberry Pi — Jeremy Adams, Neo4j · Canal: AI Engineer · 19:38 · Assistir no YouTube

Tópicos: Agentes de IA, Dados, bancos de dados e embeddings, Infraestrutura e hardware de IA, Modelos de IA

Jeremy Adams apresenta um agent pessoal construído em um Raspberry Pi 4B, com NanoClaw, Docker e um banco de dados Neo4j. O agent usa serviços na nuvem para inference e pode ser acessado por WhatsApp; o Raspberry Pi não executa um LLM localmente. Ele demonstra como armazenar memórias em um grafo usando uma estrutura baseada em pessoas, objetos, locais, eventos e organizações. Também mostra um protótipo portátil que grava áudio, transforma a fala em texto e registra informações sobre estandes de uma conferência, inclusive com suporte a uso offline.

  • O projeto usa um Raspberry Pi 4B como hardware dedicado para um agent pessoal, em vez de instalar o agent no laptop.
  • NanoClaw foi escolhido por ser compacto, usar contêineres Docker para executar processos do agent e permitir modificações.
  • O acesso ao agent é feito pelo WhatsApp, enquanto a inference do LLM ocorre na nuvem, não no Raspberry Pi.
  • Um servidor MCP conecta o agent a uma instância Neo4j com dados de filmes, permitindo responder a perguntas consultando o grafo.
  • O sistema de memória organiza informações em torno de pessoas, objetos, locais, eventos e organizações.
  • O protótipo portátil combina microfone USB, gravação de áudio e conversão de voz em texto para registrar informações durante uma conferência.
  • Uma instância local do Neo4j permite guardar dados quando a conexão de rede não está disponível; depois, os registros podem ser enviados à nuvem e enriquecidos.
  • O serviço de memória do Neo4j também é usado para transformar conversas do WhatsApp em memórias pesquisáveis.
Início Capítulo Resumo
00:12 Apresentação e montagem do Raspberry Pi Jeremy Adams apresenta o projeto e monta ao vivo a demonstração com o Raspberry Pi 4B, microfones e captura de vídeo.
06:01 Por que criar um agent pessoal compacto O apresentador explica sua preferência por uma solução barata, aberta e modificável e descreve a escolha do NanoClaw, do Docker e do WhatsApp.
09:09 Conexão com Neo4j e memória em grafo Ele demonstra consultas a um banco de filmes e apresenta uma estrutura de memória baseada em pessoas, objetos, locais, eventos e organizações.
13:19 Gravação de áudio e coleta de dados offline O projeto ganha microfone, gravação e conversão de voz em texto para registrar informações dos estandes, com armazenamento local quando necessário.
16:29 Enriquecimento dos dados e memórias de conversas O apresentador mostra como os registros dos estandes são enriquecidos na nuvem, identifica temas comuns e encerra com memórias extraídas de conversas do WhatsApp.
19:07 Encerramento e recursos para aprender sobre grafos Adams convida o público a visitar o estande da Neo4j e recomenda os cursos gratuitos da Graph Academy.

Eu queria algo barato, aberto e que desse para modificar. — 06:01

Não há inference de LLM acontecendo nesta máquina. — 09:09

Podemos construir um sistema de memória usando POLE+O? — 11:14

Na verdade, gerei algum conhecimento que talvez fosse novo. — 18:04

  • Jeremy Adams (pessoa): Apresentador da palestra e criador do projeto de agent pessoal mostrado no vídeo.
  • Neo4j (empresa): Empresa de banco de dados de grafos à qual Jeremy Adams é associado e cuja tecnologia é usada no projeto.
  • Raspberry Pi 4B (ferramenta): Computador de placa única usado como hardware dedicado para executar partes do projeto.
  • NanoClaw (repo): Projeto compacto escolhido para executar o agent em contêineres Docker no Raspberry Pi.
  • Claude Agent SDK (ferramenta): SDK no qual, segundo o apresentador, o NanoClaw se baseia.
  • Docker (ferramenta): Tecnologia usada para isolar em contêineres os processos do agent.
  • WhatsApp (ferramenta): Canal usado para enviar mensagens ao agent e receber suas respostas.
  • Neo4j Aura (ferramenta): Instância de banco de dados na nuvem que o apresentador usa para consultar e demonstrar as memórias.
  • MCP (conceito): Protocolo usado para conectar o agent a ferramentas e dados, como a instância Neo4j.
  • POLE+O (conceito): Estrutura de organização de memória mencionada na palestra, baseada em pessoas, objetos, locais, eventos e organizações.
  • Neo4j Agent Memory Service (ferramenta): Serviço usado para extrair e organizar memórias a partir das conversas do WhatsApp.
  • Graph Academy (ferramenta): Plataforma de cursos práticos gratuitos sobre grafos recomendada pelo apresentador.

00:12 Como está todo mundo? Que dia é hoje? 4. Quatrocentos e alguma coisa. Obrigado pela paciência enquanto resolvíamos um pequeno problema técnico para começar. Mas eu sou Jeremy Adams, da Neo4j. Talvez vocês tenham visto nosso estande. Fica mais ou menos ali naquela direção. Nosso foco são grafos e bancos de dados de grafos. Hoje vou ampliar um pouco esse assunto e falar de um projeto paralelo com o qual tenho mexido. Quem aqui já fez alguma coisa com OpenClaw, Hermes agent ou algum dos seus claws preferidos?

00:46 Ou qualquer agent desse tipo. Certo. Então, algumas pessoas já mexeram com isso, mas a maioria ainda está começando nesse espaço, o que é legal. E quanto a coisas mais parecidas com dispositivos de borda, hardware? Pensando em coisas como o modo offline. Sim. Certo. Há algum interesse nisso. E quem já tem experiência com grafos em geral? Um pouco de grafos, algumas pessoas que trabalham com grafos. Legal. E quem já está construindo agents com memória e coisas

01:18 assim? Certo. Uau. Legal. Esse é o maior grupo até agora. E quero manter isso. Vamos tentar fazer mais coisas relacionadas a algum tipo de estatística, quando chegarmos a algumas descobertas que vamos apresentar daqui a pouco. Então, o que vou fazer nesta palestra é falar deste projeto de memória para agents que fiz, envolvendo um pouco de hardware que vocês podem ver no meu peito. E, ao longo da apresentação, vamos falar também sobre como desenvolvi um software para memória de agents

01:52 e como tudo isso funcionou. Esta é a demonstração ao vivo mais ao vivo que já fiz com isso, porque estou literalmente montando as peças na frente de vocês. Vamos ver. Estou com um microfone, um microfone extra pequeno. Sim, vou usá-lo para falar com meu claw daqui a pouco. Ele ainda não está ligado. Então, isso é bem maluco. E tenho uma captura de vídeo HDMI aqui. Vou conectar.

02:24 Uau. Em algum lugar. Vou conectar. Certo. Ainda não está ligado. Também vou… Este é o receptor USB do microfone. Então, esperamos que isso também funcione hoje. Se eu conseguir ver onde ele encaixa. Pronto. Vou conectar. Acho que foi por isso que inventaram o USB-C. Tem que ficar virando o conector. Certo. Então, está conectado. Agora vou tentar sincronizar esses dois microfones. Certo,

02:54 estão verdes. Tudo bem. Então, tenho um microfone ali. Agora, vamos ligar a energia. A boa e velha bateria. Certo. Então, antes de começarmos a apresentação principal, vou mostrar rapidinho, só por diversão, este truque. Com essa situação estranha de captura de vídeo que estou usando, vou abrir o QuickTime Player e dizer que quero uma… quero algo que ele não vai me deixar

03:25 fazer agora. Vou fechar o QuickTime Player e abri-lo de novo. Certo, lá vamos nós. Vamos tentar fazer uma nova gravação de filme. Certo, dá para ver. Aí está. Estão vendo o claw? Certo, não queremos ver isso. Queremos ver o que aparece no claw. Então, em vez disso, vou usar como fonte a saída deste vídeo aqui. Certo. Vamos ligá-lo e vou fazer o melhor que puder. Aí está.

03:57 Para capturar durante a sequência de inicialização. Certo. Vou acessar aqui e mudar para este dispositivo de captura USB 3, e vou mexer um pouco nisso para que a gente consiga ver. E, espero… não posso garantir nada, mas espero que, quando este carinha iniciar, a gente veja alguma coisa acontecer de verdade. Vou dar um reset nele e voltar para aquilo.

04:28 Ah, deixa eu ligar isto. Certo, pronto. Certo. Então, de novo, espero que… Vejo que agora a energia está chegando aqui. Certo. Ah, alguma coisa está acontecendo. Certo. E isso me deixa bastante confiante, porque, como vocês podem imaginar, já fiz isso umas um milhão de vezes, mexendo nessa coisinha ridícula. Certo. A área de trabalho do Raspberry Pi. Ah, sim. Este é um Raspberry Pi 4B, não o modelo mais recente. Certo. Mas dá muito bem conta do recado, e

05:00 por muito tempo usei um sistema operacional de 32 bits, até perceber que ele era compatível com ARM de 64 bits. Bem legal. Não dá para executar tudo nessa coisa, mas dá para executar bastante coisa. E vamos entrar em detalhes sobre o que instalei nela para preparar esta apresentação. Certo, legal. Então, está funcionando, e tenho um pequeno teclado Bluetooth extra; é assim que consigo controlar as coisas aqui. E vamos fazer isso daqui a pouco. Mas, principalmente, eu queria mostrar a vocês

05:31 a configuração, para que pudessem, sabe, acreditar que é mesmo algo real. E pronto. Certo. Agora vou passar à apresentação. Vamos para cá. Aí está. Já volto a este Pi daqui a pouco, depois de abrir… Pronto. Só para dar uma ideia, este tem o NanoClaw, mas também tem Docker. E estou executando o Neo4j aqui. Tenho um banco de dados Neo4j baseado em Docker. Certo,

06:01 agora vamos continuar a palestra e voltamos ao claw daqui a pouco. Claw pequeno. O que eu quis dizer quando falei que claws pequenos são lindos? Bem, havia — e ainda há — muito entusiasmo em torno desses agents pessoais, mas eu não queria um no meu laptop. Desculpem. Sou um pouco conservador. Venho do antigo mundo de administração de sistemas e DevOps. Penso: quero esperar até que essa tecnologia esteja bem consolidada antes de fazer algo assim. Mas também queria algo barato, open, que desse para modificar, certo? E, para mim, eu

06:34 queria entender o que estava acontecendo, mais do que ter muitos recursos. Isso era mais importante para mim. Então, fui procurar e vi — moro em Portland, Oregon — um anúncio no Craigslist de alguém vendendo um Mac Mini com OpenClaw pré-instalado. Já pensei: “Pré-instalado? Isso é um sinal de alerta.” E, sabe, um Mac Mini pode ser legal, mas agora sei que não vai mais custar 600, com os aumentos recentes de preço, certo? Então, para mim, isso não é um claw pequeno. Aí, voltei no tempo e… isto foi… acho que durante a pandemia ou no fim dela, eu

07:05 fiz algo em que mexi neste mesmo Raspberry Pi para, por exemplo, medir o peso da louça na pia e dizer que você deveria lavar a louça. Enfim, podem conferir o vídeo ali, se gostam desse tipo de bobagem. Mas este é exatamente aquele aparelho. E pensei: “Tenho um desses no armário. Será que aguenta um claw? Não sei. Devia tentar e ver.” E, sim, funciona muito bem com claw. E aquela coisinha… não é um adesivo. É mais como se eu tivesse feito um claw no Photoshop ali, só

07:36 para, sabe, pensar: “Ah, talvez um dia eu consiga fazer algo muito legal com isso.” Mas dá para ver minha configuração antiga. Tenho este monitor externo, o teclado externo, um mouse fora da tela e tudo mais. Este carinha aqui mudou tudo. Agora está tão elegante. Tem Wi-Fi integrado, o que é ótimo, ou você pode conectar um cabo. Então, espero que eu esteja mesmo conectado à rede. Vamos ter que conferir isso daqui a pouco. Certo. E, além disso, usei o NanoClaw. Então, não usei o Open

08:08 Claw. Encontrei outro projeto que combinava mais com o meu gosto, porque tinha apenas uns 15 arquivos-fonte e era bem compacto, com poucas linhas de código. Ele simplesmente usava contêineres Docker para executar os processos do agent. Assim, eles não podiam sair fazendo qualquer coisa no sistema. Pensei: “Certo, esse é o tipo de coisa que eu gosto.” Então decidi seguir em frente. E ele também atendia a outros requisitos meus. Eu podia rodar Linux nele. Ele tem Docker. Eu entendo como funciona. Era baseado no Cloud Agent SDK, no NanoClaw, e eu

08:39 podia, e eles até incentivam você a modificá-lo. Use o Claude Code. Temos skills ali. Mexa nele. Faça funcionar para você. E ele usa mensagens, como o Telegram, sabe, se você quiser. Mas eu pensei: “Bom, já tenho WhatsApp no celular, então vou usar o WhatsApp.” Perfeito. Então, a arquitetura inicial era mais ou menos assim: partir do meu iPhone ou do meu MacBook, pelo WhatsApp, e então falar com o NanoClaw neste Raspberry Pi. Só isso. E você só precisava obter uma credencial. Você acessa o NanoClaw e faz o registro.

09:09 Então, agora vocês sabem que o WhatsApp fica na nuvem. E essa coisa consegue baixar as mensagens de lá. E, claro, como eu disse, estamos usando coisas da Claude em segundo plano. Então você tem toda a potência. Não há inference acontecendo aqui, nenhum inference de LLM neste aparelho. Estou usando a nuvem para tudo isso. Então tenho um cérebro enorme, embora ele esteja ligado à nuvem por um fio, certo? Mas aí pensei: “Bom, o que posso fazer com isso?” Sabe, também tenho o Neo4j na nuvem. Tenho um banco de dados Neo4j lá. E

09:41 para quem nunca trabalhou com grafos, esta é a aula 101 de grafos. Há um pequeno grafo, e isto é um grafo. Dá para ver quais são os nós, certo? Os redondos. E dá para ver as relações, as arestas entre eles. Então, há dois nós de pessoa e um nó de filme. Tom Hanks, a pessoa, atuou em Forrest Gump, e Robert Zemeckis o dirigiu. Bem fácil. É isso. Agora vocês conhecem grafos. Então, mandei uma mensagem pelo WhatsApp, depois de ter esse banco de dados cheio de filmes e meu

10:12 Claw conectado. Eu disse: “Ei, me diga em quais filmes Tom Hanks atuou.” Ele consultou o banco por meio de um servidor MCP conectado à minha instância do Neo4j, onde está o banco de dados de filmes, certo? E então me respondeu. Foi algo como: “Ah, primeiro, sua configuração não está certa. Está quebrada.” Eu disse: “Ah, certo. Deixe-me consertar.” Então, acessei o Claw, confirmei que tudo estava funcionando e, depois, recebi vários resultados ali à direita. E todos eles vieram diretamente dos dados buscados no banco de dados e enviados pela nuvem

10:42 Agent SDK, que formulou uma resposta e a enviou de volta pelo canal do WhatsApp. Entenderam? Então pensei: “Bom, o que mais posso fazer com isso?” Eu estava no avião e descobri que, mesmo sem pagar pelo Wi-Fi, podia usar os recursos de mensagens, e o WhatsApp estava funcionando. Pensei: “Meu Deus, posso falar com o Claw agora mesmo.” Então perguntei: “Será que posso criar uma memória?” E eu disse: “Bom, não sei exatamente o que quero, mas estava lendo posts de blog sobre essa coisa chamada POLE+O.” Essa é uma forma de criar memória em que você pensa em categorias como pessoa, objeto,

11:14 local, evento, uma organização, certo? Isso veio, na verdade, da polícia europeia, e esse pessoal desenha grafos há muito tempo. E em todas as suas séries policiais favoritas, quando fazem aqueles diagramas com fios, certo? Então eu estava no avião e perguntei: “Ei, será que podemos criar um sistema de memória usando POLE+O?” E a resposta foi: “Sim, claro. Dá para fazer. Vou criar uma skill para isso agora. Tenho este ponto de montagem. Ela vai persistir mesmo quando você me reiniciar. Sem problema.” Pensei: “Isso é incrível.” E agora tenho essa estrutura: o Neo4j na nuvem e esse

11:46 novo banco de dados de memória, com um esquema superavançado de memórias e coisas relacionadas, ainda bem no começo, sabe, antes das wikis do Karpathy e depois do Obsidian — mas vocês entenderam a ideia. É esse tipo de coisa. E isso acaba virando nós de memória no Neo4j, que mostram lugares aonde eu estava indo. Quando eu ia a pequenos eventos do DevRel, essa coisa registrava tudo para mim. Então podemos entrar e dar uma olhada nesse banco de dados. Vou até aqui, para o navegador, que já está aberto, mas vou para esta outra aba e, aqui, tenho o Neo4j Aura e esta instância de demonstração. Vou me conectar a ela no Query. É aqui que venho armazenando essas informações ao longo do tempo. Vou entrar e mostrar os nós de memória. Tenho um monte de coisas aqui. Admito que está meio que servindo de depósito. E aqui estão as memórias. Estas são os tipos originais de memória que eu tinha aqui. E, na verdade, quero mostrar

12:18 as memórias. Quero mostrar todas as memórias conectadas a outras coisas. Vou executar a consulta. Assim dá para ver melhor o grafo conectado. E, ao aproximar a imagem, dá para ver coisas como eu indo a algum lugar, conversando com uma pessoa, indo ao escritório da Snowflake em Menlo Park. Menlo Park é, por si só, um local nessa estrutura, e depois eu estava em certo evento de encontro de IA, certo? Então, a estrutura acompanha tudo. E há pessoas aqui, como

12:48 Rebecca, como Jeremy, pessoas diferentes, certo? Então, esta é uma forma de fazer isso. Voltando aqui, vemos que com certeza podemos armazenar memórias. E o que mais? Eu estava pensando: será que consigo colocar isso neste Claw físico? Alguém tinha um microfone do lado de fora da janela, gravando todos os cantos dos pássaros no quintal, e havia um modelo de identificação de aves que conseguia dizer quais eram. Pensei: “Ah, uau. Quero fazer isso.” Aí pensei: “Ah, espere. Talvez eu possa converter voz em texto. Será que dá?” Então pensei:

13:19 “Claro. Vou conectar um microfone USB, certo, e fazer algo assim.” Depois, fazer conversão de voz em texto e algo nessa linha. E, para adiantar as coisas, só por diversão, vou tentar usar… Ah, que engraçado. Ah, aqui está. O botão caiu. Eu fiz este botão e ele está conectado a alguns pinos. Estou me adiantando um pouco, mas, para ganhar tempo, vou conectá-lo de novo. E o que isso me permite fazer é acionar esse modelo

13:49 e fazer uma gravação rápida. Estou dizendo que, na verdade, estou no palco da AI Engineer World, apresentando a palestra para a qual venho me preparando, certo? E vocês viram que as luzinhas acenderam. Então, ele fez uma gravação. Espero que possamos verificar se estou mesmo online, se recebemos uma mensagem e assim por diante. Mas esse é o sonho, certo? Comecei a fazer isso com todo tipo de microfone, experimentando. E aí pensei: “Ah, quero levar isso para a AI Engineer e sair andando por aí, certo? Com essas pequenas luzes de LED de gravação acesas

14:23 e vou fazer uma gravação rápida. Estou dizendo que estou mesmo no palco do AI Engineer World apresentando a palestra para a qual me preparei, certo? E aí vocês viram que as luzinhas acenderam. Então, ele fez uma gravação. Tomara que a gente consiga verificar se eu realmente estou online, se recebemos uma mensagem e assim por diante. Mas esse é o sonho, certo? E comecei a fazer isso com todo tipo de microfone, experimentando. Aí pensei: “Ah, quero levar isso para o AI Engineer e sair andando por aí, certo? E com esses pequenos LEDs de gravação acesos

14:54 e quero gravar alguma coisa. Não sei o que quero, o que quero gravar.” E eu pensei: “Já sei o que vou fazer. Vou de estande em estande e vou gravar as mensagens que as pessoas exibem nos estandes.” Aí pensei: “Deixa eu construir essa coisa.” E então comecei mesmo a trabalhar, sabe, em adicionar esse tipo de funcionalidade de gravação. Aí pensei: “Tudo bem, os estandes têm números e nomes. Preciso mapear isso.” Então pensei: “Vou criar um modelo de dados bem simples. São só expositores, e eles nem sequer estão conectados. Estão apenas no”

15:25 banco de dados. Então tentei coletar o máximo que consegui, e havia alguns dados para limpar. Depois, fiquei preocupado. Pensei: “Meu Deus, o Wi-Fi de conferências costuma ser péssimo.” Então preciso de um modo offline. Aí tive outra ideia. Coloquei o Neo4j rodando aqui e pensei: “Bem, eu poderia fazer com que, se eu estiver offline, ele use algumas regex e coisas assim, e extraia do áudio, com conversão de voz em texto, o número do estande; talvez consiga escrever uma consulta para inseri-lo neste banco de dados local.” E, sabe, de novo, se essa coisa estiver…

15:58 no ar, o que, a esta altura, nem tenho certeza. Vamos tentar o Cypher. Meu navegador do Cypher Shell. Ah, preciso escrever direito. Vamos lá. Cypher. Navegador do Shell. É um programinha que escrevi para me comunicar com bancos de dados Neo4j sem uma GUI muito cara e coisas assim. E eu deveria conseguir encontrar todos os meus expositores e retorná-los. Então, isso está se comunicando com o

16:29 banco de dados que está rodando aqui, junto ao meu pescoço. E, olhando aqui, posso dizer: “Ah, sim, tem Microsoft, Minmax, CI, certo?” E aqui estou eu, com estas anotações brutas. Tipo: “Ah, estas são as anotações brutas que fiz. Estou neste estande e blá-blá-blá.” Certo? Então peguei esses dados e depois os carreguei no Neo4j na nuvem. E, na nuvem, eles estão um pouco diferentes porque agora eu os enriqueci.

17:00 E, se olharmos para isso, vamos ver se consigo voltar ao Neo4j por um instante. Aqui vou procurar expositores, certo? E aqui estão meus expositores. Posso clicar em um deles. E dá para ver que eles estão conectados a outra coisa. Então carreguei todos os dados deles. Aqui estão as anotações, agora todas revisadas. Mas você vai notar que eles estão conectados a estas outras coisas. E as coisas a que estão conectados — vou colocar aqui — são todas…

17:32 sortes de outras coisas. E vou traçar um caminho por elas e retornar esse caminho. E acabamos com algo assim. Isso mostra como todas estão conectadas a alguns outros nós de temas. Em algum momento, percebi: “Ah, olha, existem alguns temas aqui. Avaliação e observabilidade. A Buildkite tem esse tema. A LangChain tem esse tema”, certo? Então pensei: “Tudo bem, na verdade gerei algum conhecimento que talvez seja novo, que…

18:04 talvez ninguém tenha, certo? Então, existem temas? Sim, existem temas. Então, estes são os dados que coletei andando pelos estandes e descobrindo quais eram os temas. Há um monte de coisas por aí. E sei que meu tempo está quase acabando. Uma coisa que vou destacar para quem tiver interesse em conversar mais: depois, atualizei a memória do agent usando o serviço de memória de agent. Basicamente, queria carregar todas as mensagens de WhatsApp que já tive…

18:35 em todas as conversas. E já faz um tempo que venho conversando com ele, como vocês podem ver. Eu queria carregar tudo aquilo e ver se conseguia extrair algum tipo de insight. E, de fato, usei este serviço de memória de agent do Neo4j. Se você entrar nesse tipo de sistema, em algum momento eu simplesmente o conectei, e isso me permitiu obter um monte de memórias das conversas, que depois foram sintetizadas. E dá para ver aqui que tenho todas estas coisas diferentes, as conversas que tive e assim por diante. E isso

19:07 vai me permitir navegar por essas memórias e, por exemplo, ver todas as pessoas com quem conversei, os locais, os conceitos, seja lá o que for. Então, estas são todas as coisas sobre as quais tenho conversado com meu Claw, e foram sintetizadas em memórias que agora podem ser acessadas por um servidor MCP a partir deste mesmo Claw. Enfim, isso dá uma ideia de como essas coisas funcionam. Venham nos visitar no estande P3 ali. Posso contar muito mais. Se

19:38 você está começando agora com grafos, pode acessar a Graph Academy, neste link aqui, onde temos todos estes cursos práticos. É tudo totalmente gratuito. Então, por favor, visitem a gente por lá ou, melhor ainda, no estande. Muito obrigado. [música]

Transcrição original

[00:12] How’s everybody doing? Day what is it? 4 400 something. Thank you for bearing with us as we had a little technical difficulty getting started. But I am Jeremy Adams. I’m from Neo4j. You might have seen our booth. It’s kind of right over that way. And we’re all about graphs and graph databases. Today I’m going to expand that a little bit to a side project I’ve been playing with. Uh who here has done something with uh open claw or Hermes

[00:46] agent or any of your kind of claw of choice. Okay. So a lot of some folks but most folks are kind of new to the space which is cool. How about uh things that are more like edge devices, hardware? Um thinking about like you know offline mode kind of stuff. Yeah. Okay. Some interest there. Um how about who’s experienced with graph in general? A little bit of graph some graph people. Cool. And how who’s been doing like building agents with memory and things

[01:18] like that? Okay. Whoa. Cool. That’s the the biggest group so far. And I want to keep it going. We’re going to try and do more things that have to do with uh statistics of some sort uh as we get to some findings that we’re going to do in a little bit. So, um what I’m going to do in this talk today is talk about this agent memory project that I did that involves a bit of hardware that you can see on my chest. And um as we go through it, we’re going to talk about how I also built up some software for agent memory

[01:52] and how that all went. So, this is like the livest of the live demos I’ve done with this so far because I’m like literally assembling the pieces in front of you. So, let’s see. We’re I have a microphone, little extra microphone. Yes, I’m going to be using this to talk to my claw in a second. It’s not It’s not yet powered on. So, this is really crazy. And I’ve got this uh I’ve got like a capture a video capture from my HDMI, which is over here. I’m going to plug that in.

[02:24] Whoa. Somewhere. Plug that in. Okay. It’s not on yet. I’m also going to This is the receiver for the USB for the mic. So, we hope this works too today. If I can see where it goes. There we go. Plug that in. Guess that’s why they made USBC. You have to keep flipping the thing over. Okay. So, there that goes in. And now gonna try and sync these two mics. Okay,

[02:54] they’re green. That’s okay. So, I got a mic there. Now for some power. Good old good old battery power. All right. So, what I’m going to do really quick, just for fun before we get into the main presentation. I’m going to show you this trick. So, with this weird video capture situation I’ve got going on, I’m going to go over here to my QuickTime player, and I’m going to say that I want a I want something that it will not let me

[03:25] do right now. Let me quit QuickTime Player and let’s reopen it. All right, here we go. And let’s try and do a f a new movie recording. All right, we can see there we go. You see the claw? All right, we don’t want to see that. We want to see what’s on the claw. So, what I’m going to do instead is I’m going to use the source will be from my from the output of this video here. All right. So, let’s power it up and I’ll try my best. There we go.

[03:57] To catch it during the boot sequence. All right. So, I’m going to go here to my I’m going to change to this USB3 capture device and I’m going to move this around a little bit so we can see it. And hopefully, I mean, I can’t give you any guarantees, but hopefully what’s going to happen is as this guy goes, we’re going to see something actually happen. So, I’m going to give a little reset to that and back to that.

[04:28] Oh, and let me push power on this. Okay, there we go. All right. So, again, hopefully I see power is now flowing through into here. Okay. Oh, something’s happening. Okay. And um this gives me high confidence because I’ve done this only like one million times as you can imagine, hacking on this silly thing. Okay. Raspberry Pi desktop. Oh, yeah. So, this is a Raspberry Pi 4B, not the latest model. Okay. So, um, but very serviceable, and

[05:00] I was running a 32-bit operating system for a long time until I realized it was 64-bit ARM capable. It’s pretty cool. Um, you can’t run everything on this thing, but you can run quite a bit. And, um, we’re going to get into exactly what I did put on this to end up getting this presentation together. Okay, cool. All right. So, it’s alive and I’ve got a little extra Bluetooth keyboard and that’s how I can drive things on here. And we will do that um in a second. But I mostly just kind of wanted to show you

[05:31] the setup so you could, you know, believe that it actually is a real thing. And uh there we go. All right. So, now I’m going to get into the presentation. We’ll come here. There we go. I’ll come back to this Pi here in just a second after I open up. There we go. And just to give you a a flavor, uh, this one has nano claw, but it also has Docker on here. And I’m running Neo Forj on on here. I’ve got a little Docker based Neo Forj database. Okay,

[06:01] now let’s continue with the talk and we’ll get back to the claw in a minute. So small claw. What did I I I said small claws are beautiful. What did I mean by that? Well, there was a lot of hype happening and still is about these personal agents, but I did not want one that was on my laptop. I’m sorry. I’m a little conservative. I come from the old kind of cisadmin devops space. I’m like, I want to wait for this stuff to be really solid before I do something like that. But I I also wanted to be cheap, open, hackable, right? And for me, I

[06:34] wanted to understand what was happening more than it being featurerich. That was more important to me. And so I went and I saw like lo I live in Portland, Oregon. I looked on Craigslist. Somebody’s selling a Mac Mini with OpenClaw pre-installed. I’m already like pre-installed. That’s a red flag. And you know, Mac Mini could be cool, but um I know now it’s not going to be 600 anymore with the recent price increases, right? So that’s not a small claw as far as I’m concerned. So then I reached back and this is uh I did I think it’s pandemic or at the end of the pandemic I

[07:05] did something where I was hacking with this very Raspberry Pi doing something like measuring the weight of the dishes in your sink to tell you you should wash the dishes. Anyway, you could check out the video there if you like that kind of nonsense. But that’s this exact guy. And I saw I said I have this in the closet. Will it claw? I don’t know. I should try it and see. And uh yeah, it claws real good. It was and um that that that little that it’s not a sticker. It’s like more like me, you know, photoshopping a a claw on there just

[07:36] like, you know, oh, maybe someday I could actually, you know, uh do something really cool with this. And uh but you see my old setup. I have this external monitor. I’ve got my external keyboard. There’s a mouse off screen and everything. This guy, this is a game changer right here. I’m like so it’s so sleek now. Uh, it’s got onboard Wi-Fi, which is great, or you can plug into wired. So, hopefully I’m actually on the network. We’ll have to check that in a second. Um, okay. And then addition, uh, I used nano claw. So, I didn’t use open

[08:08] claw. I found this other project that more suited my tastes because it was like 15 source files and it was quite compact and small number of lines of code. It just used Docker containers to run the agent processes. So they couldn’t run a mock on the system. I was like, okay, this is my kind of thing. So I said, I’m going for it. Uh, and so I like the other boxes that check for me. I could run Linux on here. It’s got a Docker. I understand. Uh, it was based on cloud agent SDK, nano clause, and I

[08:39] could and they actually encourage you modify it. Use cloud code. We got skills in there. Hack on it. Make it work for you. And it use messaging like, you know, Telegram if you want. But I was like, well, I had WhatsApp on my phone, so I’ll just use WhatsApp. Perfect. So, the initial architecture was something like this to go from my iPhone uh or my MacBook WhatsApp, you know, and then go through and talk to NanoClaw on this Raspberry Pi. That’s it. And you just had to get like a credential. You go on the NanoClon, you get it to register.

[09:09] So, now you know WhatsApp’s in the cloud. And this thing can pull messages down from it. And of course, you know, on board, I said we’re using Claude stuff in the background. So you got all the power. There’s no inference, no LLM inference happening on this thing. I am using the CL the cloud for all that. So I’ve got a big brain though it’s over over a wire to the cloud, right? But then uh I said well what can I do with this? You know uh I I’ve got also in the claw in the cloud I also have Neo forj. I’ve got Neo Forj database up there. And

[09:41] for the folks here that have never done graph before this is your graph 101. There is a small graph and this is a graph. Can you see which ones are the nodes, right? The round ones. And you see the relationships, the edges between them. So, there’s two person nodes and a movie node. And Tom Hanks, the person acted in Horus Gump and Robert Zmechus directed it. Pretty easy. That’s it. Now, you know, graphs. So, I asked in a WhatsApp message once I had this database full of movies and I had my

[10:12] claw connected. I’m like, “Hey, tell me what movies Tom Hanks acted in.” and it went through there with an MCP server connecting into my Neoforj instance with the movie database in there, right? And then it responded back to me. It’s like, “Oh, well, first your stuff’s not set up right. It’s broken.” I’m like, “Oh, okay. Let me fix it.” So, I got on the claw, made sure O was working, and then I got a bunch of results back on the right there. And those all came right out of pulling data from the database, feeding it back up through the cloud

[10:42] agent SDK, forming a response, and sending it back through the WhatsApp channel. Got it? So then I was like, well, what else could I do with this? And I’m on the airplane, and I found that even without paying for Wi-Fi, I could use the messaging stuff and WhatsApp was working. I was like, oh my god, I could talk to Claw right now. So I was like, hey, could I do memory? And I said, well, I’m not exactly sure what I want, but I was reading blog posts about this thing called poll plus O. So, this is a way of doing memory where you just think of like person, object,

[11:14] location, event, uh, uh, an organization, right? And it’s this actually came from the European policing and you know those folks have been drawing graphs for a long time and every every one of your favorite cop shows that does a string diagram, right? And so then I just was on the plane. I’m like, hey, could we build a memory system using pole plus o? And then it’s like, “Yeah, sure. Yeah, we can do it. I’m your right of skill for that right now. I’ve got this mount point. It’ll persist even when you reboot me. No problem.” I was like, “This is amazing.” And so now I have this thing where I’ve got Neo4j in the cloud. I’ve got this

[11:46] new memory database with this super advanced schema memories and related things very early, you know, before Carpathy’s, you know, wiks and be after Obsidian, but you know, you get the idea. It’s it’s that kind of thing. And this is what ends up being in Neo forj memory nodes that show like places I was going and as I went to do little Devril events I was having this thing record it for me and all that. So then we can like actually jump in and look at this database. So I’m going to go over here to um to the web browser which I’m

[12:18] already in but I’m going to go over to this other tab and over here I’ve got Neo forj Aura and I’ve got this demo instance. I’m going to connect to it in query. And this is where I’ve been storing all this information kind of over time. And so I’m going to jump in and show you the memory nodes. I got a bunch of stuff. It’s kind of a dumping ground in here, I admit. And um here’s all the here’s the memories. So he these are those original memory types that I had in here. And I actually want to show

[12:48] you the memories. I want to show you all the memories uh as they’re connected to other things. And I’m going to run that. So you can see more like the connected graph. And as I zoom in on this thing, you can see there’s like me going to there’s, you know, talking to a person going to the snowflake office in Menllo Park. Menlo Park is itself a location in that framework and then I was at a certain AI meetup event, right? So it follows and there’s people in here like

[13:19] Rebecca, like Jeremy, there’s different people, right? So this is one way of doing it. So then going back over here, we see that we can definitely store memories. Well, what else? I was thinking can I fit on this physical claw and somebody was doing like they had a microphone out their window and they were recording all the bird song in the backyard and they could there was a bird net model that that could tell you that. And I was like, “Oh, whoa. I want to do that.” And then I was like, “Oh, wait. Or maybe I could do voice to text. Is that possible?” So then I was like,

[13:49] “Sure enough, let me hook up a USB microphone, right, and do something like that.” And then do some voice to text and and do something like that. So, um, and just to get ahead of it, just for fun, I’m going to go ahead and try and use Oh, that’s funny. Oh, there it is. The button fell off. So, I I made this button and it’s connected into into some pins. This is me getting ahead a little bit, but just in the interest of time, I’m going to go ahead and plug this back in. And what this allows me to do is trigger that model

[14:23] and I’m going to do some quick recording. I’m saying I am actually on stage at AI Engineer World delivering the talk I’ve been preparing for, right? And so I you see the little lights went on. So it did some recording. Hopefully we’ll be able to look and see if we actually if I’m actually online, if we got a message and so forth. But this is the dream, right? And I started doing it with all sorts of microphones, playing around with it. And then I was like, “Oh, I want to bring this to AI engineer and I want to like walk around, right? And with these recording little LEDs on

[14:54] it, and I want to like record something. I don’t know what I want what I want to record.” And I was like, I know what I’ll do. I’ll go booth to booth and I’ll record what messaging people have up at their booths. And then I was like, let me build this thing. And then I actually started working on, you know, adding in that kind of capability for recording. And then I was like, okay, well, the booths, they got numbers and names. Okay, I had to map this out. So I was like, I’m just going to like create a very simple data model. It’s just exhibitors and they’re not even connected. They’re just there in the

[15:25] database. So I tried to get as many as I could and there was some data cleaning to do. And now then then uh I was worried. I was like, “Oh god, conference Wi-Fi is terrible typically.” So I need like an offline mode. So then I had this other thing. I put Neo forj running on here and then I was like, well I I could have this thing so if I’m offline it’ll use some reaxes and stuff and parse out of the audio voice to text the booth number and maybe it can write a query to insert it in this local database. And you know again if this if this thing is

[15:58] uh if this thing is up which I at this point I’m not even I’m not even sure. Um, we’re going to try cipher. Uh, my cipher shell browser. Oh, I should spell right. Let’s go. Cipher. Shell browser. So, this is like a little program I wrote to talk to Neoforj databases without a very expensive guey and things like that. And I should be able to match all my exhibitors and return those. So, this is talking to the

[16:29] database that’s running in here around my neck. And as I go in here and I look, I could say, “Oh, yeah, there’s Microsoft, Minmax, CI, right?” And so this is me and I had on these like my raw notes. It’s like, “Oh, this is like the raw notes that I took. I’m at this booth and blah blah blah.” Right? So I and I took that data and then I uploaded it later up into Neo4j in the cloud. And in the cloud, um, it looks a little bit different because I’ve now enriched it.

[17:00] And so if we look at this, let’s see if I can just move back into Neo forj for a second. And here I’m going to look for exhibitors, right? And here are my exhibitors. And the exhibitors, I can click on one. And you can see they’re actually connected to something else. So I did load all their data in. So here’s, you know, got the notes all cleaned up now on them. But you’ll notice that these other things are connected to. And the things that they’re connected to is I’m going to put in here they’re connected to all

[17:32] sorts of other things. And I’m going to put a path through them and return the path. And we end up with something like this. This shows how they’re all connected to some other theme nodes. So at some point I figured out, oh look, there’s some themes that exist here. Evaluation and observability. Build kite has that theme. Lang chain has that theme, right? So I I was like, okay, I’ve got I’ve actually generated some knowledge that was maybe novel that

[18:04] maybe nobody has any, right? So are there themes? Yes, there are themes. So these this is the data dump that I collected by walking around the booth and figuring out what the themes were. So there’s a whole bunch out there. And um I know I’m just about at my time. The thing uh I will point out for folks that are interested uh in talking more, I did subsequently upgrade the agent memory that I have using the agent memory service. Basically, I wanted to load all of the WhatsApp messages that I ever had

[18:35] in all and it’s been a while I’ve been talking to it as you see. I wanted to upload all of those in there and see if I could get some kind of insights out of those. And sure enough, I use this Neo Forj agent memory service. And if you log into this sort of thing, at some point I just connected it up and that allowed me to get a whole bunch of memories from the conversations and then it distilled them out. And you can see here that uh I’ve got all these different things, these conversations that I’ve had and so forth. And this

[19:07] will allow me to browse those memories and um for example, all the people I’ve spoken to or the locations, the concepts, whatever. So this these are all the things that I’ve been doing talking about with my claw and they’re all distilled out into memories that are now accessible via an MCPU server from this very claw. So anyway, that gives you some flavor of how this stuff works. Please come see us at booth P3 over there. I can tell you a lot more. If

[19:38] you’re just getting started with graph, you can go to Graph Academy, which is this link right there, and we’ve got all these hands-on courses. It’s all totally free to use. So, please either uh visit us there or even better at the booth. Thank you so much. [music]