Pular para o conteúdo

Neo4j ao vivo: AgentMemory for .NET, um mecanismo de memória persistente para agentes de IA

Ver no idioma original →

Autoria: Neo4j · 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: Neo4j Live: AgentMemory for .NET: Persistent AI Agent Memory Engine · Canal: Neo4j · 1:04:49 · Assistir no YouTube

Tópicos: Agentes de IA, Avaliação e benchmarks de IA, Dados, bancos de dados e embeddings, RAG, busca e recuperação de informação

Jose apresenta o AgentMemory for .NET, um projeto open source de memória persistente para agentes, desenvolvido com suporte a Neo4j. A apresentação explica diferentes tipos de memória e compara arquivos, bancos vetoriais e grafos para armazenar e recuperar informações. Uma demonstração ao vivo mostra recuperação, aprendizado, esquecimento e ferramentas de depuração e medição de desempenho. No fim, Jose discute avaliações, extensibilidade e a possibilidade de usar a memória para tornar o comportamento dos agentes mais consistente e auditável.

  • O AgentMemory for .NET oferece suporte a nove tipos de memória, incluindo memória de trabalho, semântica, episódica, procedural e temporal.
  • Um roteador de memória identifica quais tipos são relevantes para cada pergunta e reúne os resultados de consultas personalizadas em Cypher.
  • O projeto combina grafos e busca vetorial, e permite distinguir memórias compartilhadas de memórias vinculadas a uma pessoa ou organização.
  • Cada memória pode apontar para a mensagem de origem, possibilitando rastreabilidade e inspeção das informações recuperadas.
  • A demonstração inclui um agente de estudo que recorda informações sobre uma estudante fictícia chamada Lena.
  • O Demo Brain permite conversar com o agente, visualizar o grafo, examinar rastros de execução, comparar sessões e testar o esquecimento de informações.
  • Jose relata que, após otimizações, a recuperação de uma solicitação simples pode levar cerca de 200 milissegundos.
  • O projeto usa avaliações para medir diferentes tipos de memória, e Jose considera que benchmarks focados principalmente em memória semântica não avaliam todas as capacidades.
  • Entre os planos estão adicionar modelos de memória personalizados, ampliar a avaliação e desenvolver memória de consistência comportamental e aprendizado com experiências.
Início Capítulo Resumo
00:02 Apresentação e motivação para criar memória de agentes Jose conta sua trajetória em ferramentas para agentes e explica a inspiração por trás do projeto.
05:45 Por que .NET e Neo4j Jose explica sua escolha de desenvolver para .NET e usar Neo4j como infraestrutura de grafos.
07:17 Demonstração de recuperação e aprendizado A demonstração introduz um agente de estudo e mostra as etapas de recuperação e registro de novas memórias.
08:56 Memória de agentes, histórico, vetores e grafos A apresentação diferencia memória persistente, histórico de conversa, busca vetorial, RAG e recuperação baseada em grafos.
13:09 Tipos de memória e roteamento Jose descreve nove tipos de memória e explica como o roteador escolhe quais consultar para responder a cada pergunta.
17:49 Armazenamento em arquivos, vetores e grafos A conversa compara as vantagens e limitações de diferentes formas de guardar e recuperar memórias.
24:07 Arquitetura e esquema do grafo Jose apresenta as integrações do projeto e o esquema baseado em pessoas, organizações, locais, objetos e relações rastreáveis.
27:49 Demo Brain: conversa e visualização da memória A demonstração mostra interações com o agente, respostas em voz e visualizações das informações recuperadas.
37:07 Rastreabilidade, depuração e desempenho Jose inspeciona os nós e rastros associados às respostas e apresenta métricas de tempo e desempenho.
40:45 Memórias pessoais, compartilhadas e esquecimento A demonstração diferencia memória individual de memória compartilhada e mostra como remover informações.
43:22 Avaliações e resultados de memória Jose descreve como mede os tipos de memória, compara resultados e relata otimizações no tempo de recuperação.
49:39 Estado atual e planos de expansão A apresentação resume as integrações existentes e os planos para modelos personalizados, aprendizado e consistência comportamental.
53:49 Perguntas sobre dados, ontologias e modelos Jose responde a perguntas sobre consultas a dados, construção de grafos, uso de modelos de raciocínio e execução local.
1:03:15 Encerramento e recursos da comunidade Neo4j A apresentadora divulga eventos, cursos e opções para começar a desenvolver com Neo4j.

As soluções precisam ser construídas. — 05:45

A recuperação busca na memória algo relacionado à pergunta e traz isso de volta. — 08:22

A memória não deveria falhar silenciosamente; você deveria conseguir vê-la e medi-la. — 54:20

A ontologia é o modelo, as regras e o vocabulário; o grafo de conhecimento são os fatos conectados segundo esse modelo. — 58:33

  • AgentMemory for .NET (ferramenta): Projeto open source apresentado por Jose para fornecer memória persistente a agentes em .NET.
  • Neo4j (empresa): Empresa e plataforma de banco de dados de grafos usada como infraestrutura para a memória apresentada.
  • Jose (pessoa): Engenheiro de software e arquiteto que apresenta o AgentMemory for .NET e suas demonstrações.
  • Cypher (conceito): Linguagem usada para consultar e percorrer os dados organizados em grafos no Neo4j.
  • Microsoft Agent Framework (ferramenta): Framework da Microsoft com o qual Jose integrou inicialmente o AgentMemory for .NET.
  • Semantic Kernel (ferramenta): Framework da Microsoft para o qual Jose também integrou o projeto de memória.
  • Demo Brain (ferramenta): Aplicação de demonstração e depuração que permite inspecionar a memória, o grafo e o desempenho do agente.
  • RAG (conceito): Abordagem de recuperação de informações que, na apresentação, inclui métodos vetoriais e baseados em grafos.
  • memória episódica (conceito): Memória de acontecimentos e de quando eles ocorreram ao longo das interações.
  • memória temporal (conceito): Memória que registra quando uma informação era válida, além de quando foi aprendida.
  • memória prospectiva (conceito): Memória de intenções e lembretes sobre coisas que devem ser feitas no futuro.
  • memória de consistência comportamental (conceito): Proposta de memória para ajudar agentes a manter valores, princípios e comportamento consistentes ao longo do tempo.

00:02 Olá, pessoal. [limpa a garganta] Estou animado por estar aqui com vocês hoje. Sou Zim. Sou da Neo4j, responsável pelas relações com desenvolvedores na… e estou muito feliz por estar aqui com meu bom amigo Jose para falar sobre memória de agent para .NET: um mecanismo persistente de memória para agentes de IA. Eu adoraria que vocês deixassem

00:33 suas perguntas aqui no chat. Qual é o foco de vocês? O que trouxe vocês até aqui? E, claro, gostaríamos de compartilhar e discutir com Jose quaisquer perguntas que vocês tenham. Então, vamos dar as boas-vindas a Jose e uma calorosa salva de palmas por se juntar a nós hoje. Oi, Jose. Bem-vindo. Você está no mudo. >> Agora não estou mais. Oi, Say, fico feliz por estar aqui.

01:05 Obrigado a você, Antonio Forj, por me convidar para participar ao vivo do seu programa. >> Que ótimo. Muito obrigado por se juntar a nós hoje. Para começar, gostaria que você se apresentasse rapidamente e falasse sobre quem é e o que faz. >> Sim. É simples. Sou engenheiro de software e arquiteto. Não construo apenas agents; construo as ferramentas usadas por quem constrói agents. Colaboro com a Microsoft no

01:35 Semantic Kernel desde 2023, desde que começou toda essa loucura com agents de IA e workflows. Também venho contribuindo com AutoGen e, mais recentemente, com o Microsoft Agent Framework. Além disso, no ano passado comecei a criar alguns projetos open source que eu diria serem meus projetos principais, como, por exemplo, agent eval e, agora, bem, você conhece este porque ele tem a ver com você: AgentMemory. >> Que ótimo. E eu gostaria muito de

02:06 saber o que desperta seu entusiasmo e interesse em trabalhar com memória de agent, em particular, por que .NET e por que especificamente com a Neo4j. >> Essa é uma ótima pergunta. Você pode compartilhar meus slides? Eu me preparei para essa pergunta. >> Certo, vamos fazer isso. Só um segundo. Pronto. >> Sim, perfeito. Então, vou voltar a este

02:37 porque você já me apresentou. O que me levou a criar isso? Bem, todo robô que eu adorava quando criança era definido por duas coisas. Isso realmente me marcou: aquilo de que ele se lembrava e aquilo que valorizava. Em 1977, aconteceu uma coisa. Eu nasci em 1971. Sim, pareço mais jovem do que sou. Então, eu era uma criança pequena em um cinema escuro e

03:08 um pequeno robô azul e branco aparece na tela, carregando uma mensagem secreta que salvará a galáxia. Essa lembrança salva todo mundo. Saí daquele cinema pensando: quero construir isso. Depois, em 2001, uma máquina com um conflito interno e um cubo que não conseguia ver dentro da própria cabeça, mas mantinha aquelas palavras dentro dela. Mais tarde, Asimov — quase li todas as histórias dele —, seu

03:38 cérebro positrônico… Se alguém leu Asimov, sabe que ele é um escritor incrível. Os cérebros positrônicos dele tinham os valores incorporados antes de qualquer outra coisa. Depois vieram todas as coisas de que gosto: anime, mangá, robôs. Uma que me marcou foi Astro Boy, de Samuka. Era um robô criado para proteger as pessoas. E esta foi divertida. Alguém se lembra de Short Circuit, de 1986? O Número Cinco lendo livros em velocidade acelerada pela

04:09 casa, dizendo: “Mais informações, mais informações”. Sempre fui um construtor: arquiteturas, sistemas complexos, fazendo tudo funcionar. Nunca deixei de querer construir aquele cérebro. Eu sei, é uma loucura. E, por fim, hoje, isso deixou de ser ficção científica. Até hoje, grafos eram o meio nativo. Ideias conectadas por relações que ficam mais fortes ou mais fracas com o tempo, como acontece conosco. No ano 2000, não tão longe de HAL, certo? Um ano depois de uma

04:43 pessoa chamada Emil desenhar um grafo em um guardanapo durante um voo para Mumbai, e isso mudou tudo. Então, obrigado, Emil. Anos antes de alguém chamar isso de banco de dados de grafos, 26 anos depois, aqui estamos. [fungada] Aquele guardanapo é onde [risos] meu agent guarda as memórias. E então aconteceu uma coisa este ano. Havia um projeto open source de memória para agents em Python. Saint William… E aí falei com meu amigo Say; ele pode

05:15 contar a parte dele da história, se quiser. Comecei a fazer uma adaptação para aprender como aquilo funcionava, porque pensei: “Meu Deus, isso é open source, preciso aprender como funciona”. E acabou virando uma reconstrução completa, porque o mundo do .NET não tem as mesmas coisas que o Python. Então, hoje vocês vão ver a parte de memória: um agent que se lembra de você, como um orientador que conhece você. A parte dos valores vem no final — e já falei isso três vezes. Asimov também disse isso muito bem.

05:45 Os escritores de ficção científica preveem o inevitável e, embora problemas e catástrofes possam ser inevitáveis, as soluções não são. As próximas palavras são minhas: as soluções precisam ser construídas. Então, estou tentando construir uma. E gostaria de mostrar um pouco do que construí. Esta parte é um… >> Sim, talvez antes de prosseguirmos, Jose, você poderia explicar brevemente por que escolhemos .NET e por que você está avançando especificamente com a Neo4j?

06:16 >> Sim. Bem, como eu disse antes, adoro Cypher, certo? Então, acho muito legal o que vocês construíram. Na verdade, o que a Neo4j construiu, como principal provedora de banco de dados. É uma solução muito sólida e estável, que você pode hospedar localmente ou na nuvem. Foi isso que

06:46 me atraiu. Para ser sincero, venho usando e explorando a Neo4j há anos. Cypher é uma linguagem que me parece muito natural. Por isso, foi a escolha óbvia. Além disso, vocês estão investindo bastante nessa área, aprimorando e melhorando o desempenho. Para mim, é a infraestrutura perfeita, eu diria, a provedora perfeita para construir esse cérebro. Foi isso que me atraiu. Isso responde à sua pergunta? >> Com certeza. Parece empolgante. Vamos em frente.

07:17 >> Sim. Certo. Foi isso que construí. Deixe-me mostrar. Olhem o vídeo. Ele deve começar agora. Hum. Não perturbe. Este é meu agent de demonstração atuando como orientador de estudos, certo? Ele está se lembrando de uma estudante fictícia chamada Lena. Esta é uma sessão real gravada, e quero que meus agents se lembrem de coisas como

07:50 esta, certo? E, quando a memória falha, ninguém avisa você; normalmente, nada avisa. Então, eu queria um sistema capaz de informar quando ela falha, certo? E é isso. Daqui a pouco, vocês vão ver ao vivo. Este é o momento do vídeo. Por exemplo, vocês podem ver as etapas em que fazemos duas fases. Uma delas acontece quando faço uma pergunta ao agent, ao meu LLM, e o agent que gerencia o LLM faz uma etapa prévia: “Com esta pergunta do

08:22 usuário ou de outro agent, consulte sua memória e veja se há algo relacionado para trazer de volta”. Essa é a parte de recuperação. Depois, fazemos a etapa posterior: “Recebemos alguma informação nova? Devemos nos lembrar de algo?”. E então vem a fase de memorização. É assim que essas coisas funcionam no momento, e foi isso que vocês viram na tela. Legal. Esperem, tem mais coisa legal. Então, vamos falar primeiro de alguns conceitos básicos. O que é memória de agent?

08:56 Um bom amigo meu me perguntou se eu poderia explicar um pouco os conceitos básicos. Eu disse: “Tudo bem”, porque nem todo mundo aqui conhece alguns desses conceitos. Então, vamos falar sobre eles. O que é memória de agent? Em que ela é diferente do histórico de conversa ou de RAG? Neste caso, temos a context window na configuração habitual quando usamos um LLM, certo? É o que o modelo vê durante a chamada. E temos o histórico de conversa, que é reproduzido e fornecido ao

09:28 agent todas as vezes, até não caber mais na context window que cada modelo tem. Alguns têm uma maior, outros, menor. No momento, ela é de cerca de 1 milhão de tokens. Também temos alguns tipos de memória que geralmente usam embedding. Isso é um banco de dados vetorial, e fazemos o processo de embedding para transformar uma palavra em um vetor com significado que pode ser armazenado nesse banco de dados, certo? E é…

10:00 recuperado pelo significado, e basicamente encontra a coisa mais próxima que coincide. É para encontrar coisas que significam mais ou menos a mesma coisa, certo? E existe o RAG, que é simplesmente a recuperação de algo que eu quero de qualquer local. O RAG não implica explicitamente um banco de dados vetorial. Há muitos métodos, e o outro, que nos leva aos bancos de dados de grafos, são os relacionamentos, como os humanos fazem. Temos um grafo de conhecimento

10:32 no banco de dados de grafos, em que há coisas que ocupam um espaço e têm algumas relações com outras coisas. Nós simplesmente percorremos o grafo e, com isso, encontramos o que queremos. É o RAG aqui, por exemplo, da Lina, que tem um tônico localizado em Munique, certo? Então, as coisas são os nós, e a forma como se relacionam são os relacionamentos armazenados. Especialmente nós, humanos, temos neurônios e temos

11:04 sinapses, e elas conectam os neurônios, certo? É uma metáfora muito semelhante. E então temos o GraphRAG, que é uma recuperação que segue o mesmo atributo. Basicamente, o grafo é um grafo personalizado, definido e criado explicitamente para uma finalidade concreta. Você é mais especialista em Graphiti do que eu, mas, basicamente, essa é uma das maneiras de

11:35 fazer isso. É uma explicação muito simples: é um grafo personalizado para uma tarefa concreta, que pode envolver livros, medicina, finanças ou combate à lavagem de dinheiro. Aqui na Suíça, isso é bastante importante e tem recebido muita atenção ultimamente. Mas você pode me dizer se isso está correto? Acrescentaria algo? >> Totalmente. Esses casos de uso estão de acordo com os nossos principais casos de uso. Além disso, um dos casos mais interessantes é, claro, o das ciências da vida

12:06 e da indústria farmacêutica, com coisas relacionadas à descoberta de medicamentos. Como o uso do GraphRAG basicamente acelera o processo? Porque conseguimos entender melhor como todas essas doenças e vírus estão conectados uns aos outros e a quais tratamentos. E isso, basicamente, permite uma descoberta de medicamentos mais rápida. Além disso, há muito

12:38 impulso também no setor aeroespacial. Pense que você está construindo seu… não sei, talvez sua aeronave. Uma aeronave é feita de diferentes componentes. Você precisa entender como esses componentes estão conectados uns aos outros, com que tipo de sistemas e assim por diante. Então, precisa entender as conexões e os relacionamentos. É uma maneira de raciocinar sobre as coisas. Vamos em frente. E tudo isso nos leva à memória de agent, que é

13:09 basicamente decidir o que escrever, do que se lembrar e o que esquecer. Mas, para isso, estou usando basicamente um grafo de conhecimento, certo? Ou um grafo — para ser claro, um conjunto diferente de grafos. Mas vamos chegar a isso, porque depende de algo importante: os tipos de memória.

13:39 Então, temos aqui a tecnologia e a estrutura que usamos, e também surge a questão do que usamos para armazenar isso. Isso nos leva à próxima parte: os tipos de memória. Sim. Se olharmos para o cérebro, cada região aqui representa um tipo de memória, mostrado por meio de uma bela visualização de um grafo. Na demonstração, vocês vão vê-las se iluminarem ao vivo à medida que o agent se lembra e aprende.

14:10 E temos vários tipos de memória. Os mais comuns são a memória de trabalho, semântica e episódica; basicamente, quase todo mundo usa essas. A memória de trabalho é a conversa atual. A semântica são os fatos e as preferências que permanecem verdadeiros, os relacionamentos. Por exemplo, Lena prefere sessões curtas pela manhã. A episódica é o que aconteceu e quando: é uma espécie de histórico do que aconteceu nos diferentes episódios das conversas que tivemos. E então chegamos à memória procedural, que é

14:42 como faço isso. Por exemplo, um agent de programação precisa de memória procedural. Mas, se você tem um agent que quer que ajude a cozinhar alguma coisa, isso também é um processo. Esse é o tipo de memória de que estamos falando aqui: a rotina que funciona. Depois, temos o raciocínio: as próprias etapas e ferramentas do agent. E já vimos que grafos são incrivelmente úteis para isso. E então temos a memória temporal. Quando esse fato era verdadeiro? Não apenas quando foi aprendido, certo? É uma coisa diferente.

15:12 E a memória prospectiva. Essa é interessante, e quase ninguém a usa. É lembrar-se de fazer algo mais tarde, como um lembrete de alguns fatos ou coisas que você precisa fazer, como uma lista de tarefas. “Devo fazer isso até hoje”, certo? Esse tipo de coisa. E depois há o esquecimento, também chamado de abstenção: deixar algo de lado, esquecer. Normalmente, nem todo mundo usa isso. A maioria dos sistemas de memória, ou muitos deles, usa um sistema de arquivos, então não

15:44 esquecem: simplesmente adicionam mais fatos que substituem os antigos, mas os antigos continuam lá. Isso também é muito complicado. Chama-se memória de abstenção, que não é exatamente um tipo de memória, mas é uma memória temporal, porque você quer esquecer entre todas as diferentes partes. E a melhor maneira de fazer isso é por meio de uma função de decaimento, mas essa é outra história. E então temos a memória bitemporal, que tem dois blocos: um para quando um fato era verdadeiro e o outro para quando o sistema o aprendeu. E

16:14 depois, quando deixou de ser verdadeiro. Por exemplo, posso ter comprado um carro há dois meses e, na semana passada, vendi. Então, já não é verdade que tenho um carro. Esse é um exemplo. Esses nove tipos de memória têm suporte no AgentMemory para .NET. E bem, esses são os nove que acompanho. Outros, como memória compartilhada entre agents, imagens e áudio, virão depois. Mas o modelo de plug-in de que vou falar

16:45 um pouco é como… >> Uma pergunta rápida: quando você usa cada tipo de memória? Você usa todos os componentes de memória juntos? >> Sim e não. >> Certo. >> Eu os escrevi de modo que cada recuperação de cada tipo diferente de memória seja um sistema diferente, e simplesmente os reúno. Então, criei o que vocês veem

17:16 no núcleo: um roteador de memória. É ele que conduz tudo. Identifico, com base na pergunta, os tipos de memória que devem ajudar a responder à pergunta feita pelo usuário e, então, direciono isso ao sistema correspondente. Faço uma consulta Cypher personalizada em cada sistema de memória diferente e depois reúno os resultados. >> Uhum. Legal. >> É interessante. Sim. [limpa a garganta] Certo. >> Ótimo. Devemos fazer as

17:49 perguntas agora ou devemos…? >> Podemos continuar, porque ainda há algumas coisas. Basicamente, como eu disse, damos suporte às perguntas; portanto, aos nove tipos de memória. A única coisa… Eu queria ver o que os outros estão fazendo e acho bastante interessante dar suporte a N de 9. Não estou dizendo que o AgentMemory para .NET é o melhor. Cada um tem suas próprias capacidades, mas acho que é um exercício interessante, como

18:19 desenvolvedor independente, tentar criar um sistema melhor do que os de empresas inteiras. Esse é um pouco o desafio que tenho. E, no momento, acho que não está indo tão mal. Vocês vão ver. Gosto de destacar o trabalho da Zep e da Graphiti. Elas cobrem seis tipos de memória, e a Zep é a que mantém os dois registros de tempo por padrão. Ou seja, memória bitemporal. Quase ninguém se lembra de fazer algo mais tarde com um agent de IA, certo? Então, se perguntar sobre

18:52 as falhas… Bem, se alguém tiver uma pergunta, posso destacar alguma pergunta no chat. Não consigo ver o chat. Então, vocês podem dizer, mas eu não consigo. >> Sim, há duas. Talvez possamos destacar isso agora. Dá para ver aqui. Já foi feito algum trabalho em direção a uma arquitetura centrada na pessoa e a uma estruturação diferente da do outro projeto? >> Essa é uma pergunta muito, muito abstrata.

19:23 Boa pergunta, certo? Mas vocês vão ver, uma coisa que eu queria era poder conversar com meu agent, que tem essa memória, e fazer com que ele se lembrasse de mim. Então, deixei isso seguro por padrão. Esforcei-me bastante nisso, e ele consegue correlacionar e identificar a memória de um interlocutor específico. Essa pode ser uma memória global, compartilhada por todos, ou uma memória específica, à qual só eu tenho acesso. Então, ela tem uma chave, e essa chave pode ser uma pessoa ou uma organização. É mais ou menos o que

19:54 todo mundo está chamando de memória organizacional. Então, tecnicamente, isso pode ser usado para isso; você só precisa de um identificador adequado. A outra pergunta… A outra parte da pergunta é: já foi feito algo específico para organizar o conhecimento usando métodos históricos, sem abstraí-los, mas de forma bem clara? >> Certo. Acho que respondi isso com…

20:27 …estruturação tópica usando métodos históricos. O que você quer dizer com métodos históricos? Seria interessante entender, sem abstrair. Então, se você explicar isso, posso dizer se sim ou não. Certo, vamos em frente. Então, foi isso que eu construí: os tipos de memória que existem ali. E outra coisa: um colega meu… Tive uma conversa interessante há uns três

20:59 ou quatro dias. “Ei, por que não usamos esta wiki?” Certo. Eu queria incluir isso. Há algumas maneiras de armazenar as informações. Uma é em arquivos; vocês sabem, o Claude Code faz isso principalmente. A wiki é interessante para armazenar diferentes tipos de informação. Criar nós, lê-los e corrigi-los é muito humano. Quase não há infraestrutura. Você escreve, armazena, e pronto. Um exemplo disso são CLAUDE.md, MEMORY.md, a LLM wiki do Karpathy e o sistema de arquivos de memória da Letta

21:30 sistema, que, aliás, é muito bom. E então temos bancos de dados vetoriais, que são ótimos para encontrar paráfrases, pesquisar uma frase entre milhões de memórias — isso é superescalável. Mem0, open source, LangMem, Magior. E então temos grafos e vetores, que são ótimos para lugares, pessoas, eventos, qualquer coisa que você queira — para horários, responsáveis e de onde veio. E você também pode se beneficiar dos grafos. Você pode adicionar vetorização e fazer…

22:01 busca vetorial dentro do Neo4j Agent Memory. O Agent Memory para .NET, que estou apresentando, e o Cognee também fazem isso. Eles são realmente bons, mas às vezes falham silenciosamente. Wikis e arquivos carregam apenas o conteúdo do topo; o contexto só comporta até certo ponto, porque você carrega tudo nele. E o que acontece quando duas linhas discordam? Qual delas está atualizada? Além disso, não há um responsável, então você não sabe quem está editando

22:31 aquilo. Um banco de dados vetorial falha quando algo não é semelhante o bastante: não retorna o resultado. Ele sempre vai dar uma confiança de cinco, e a dimensão temporal geralmente é ignorada. Então, há problemas. Você pode melhorar isso com ranking, aliás. Essa é uma pergunta de entrevista do Google, mas só aumenta a precisão em 5% a 10%. O melhor é combinar grafos e vetores, mas às vezes a extração pode não captar algo na hora certa. Então, esse é um pouco do…

23:04 ecossistema. E há uma pergunta para as três memórias. Então, em setembro, meu exame é no dia 12 de dezembro. Meu exame de estatística é no dia 12 de dezembro, na TU München. Se usarmos arquivos, o arquivo de memória cresceu e só o conteúdo do topo é carregado. A linha sobre outubro fica depois do limite. A revisão do plano em Munique é no dia 11, então ela pode não ser encontrada. Com busca vetorial, a revisão para o exame encontra o exame, mas no ponto menos relevante. É melhor. Mas a…

23:36 viagem a Hamburgo não é semelhante. Então, ela não é recuperada. O sistema recupera algo parecido, mas um plano errado. Esse é um exemplo de caso que foi usado. E então temos o grafo, ou grafo mais vetores: percorremos o caminho de Lena até os eventos de dezembro dela — o exame no dia 12, em Munique, e a conferência de 10 a 13 em Hamburgo — e então o sistema diz: “Ei, você vai estar em Hamburgo até o dia 13; vamos adiantar ou adiar a revisão.” Esse é um exemplo do que acontece

24:07 quando você faz uma pergunta ao agent e as memórias estão em arquivos, em um banco de dados vetorial ou em um banco de dados de grafos como o Neo4j. Vou acelerar, porque preciso mostrar algumas coisas. O grafo também só é tão bom quanto o conteúdo que contém, certo? Então, é preciso medi-lo. Construí o Graph Agent Memory para Python e TypeScript. E…

24:40 no .NET, também reimplementei isso com memória apenas vetorial ou como um provedor GraphRAG. Ele tem os métodos de GraphRAG que constroem um grafo, mas nunca escrevem nele nem o criam do zero. Então, inicialmente, construí isso de forma nativa para o Microsoft Agent Framework; depois, para o Semantic Kernel, como um MCP e também como MIT. Outra coisa importante é que ele também se conecta ao NMS, algo muito legal

25:10 que o Neo4j criou: basicamente, Agent Memory na nuvem, um novo serviço. Acho que, no momento, é gratuito, então qualquer pessoa pode explorar. Basta pesquisar por Neo4j NMS e você vai ver que é muito, muito, muito fácil de usar. Ou, se você usa .NET, pode usar o AgentMemory for .NET. Certo, então o esquema básico que alimenta — ou começou a alimentar — nosso cérebro é este:

25:44 ele se chama POLE+O, que significa pessoa, organização, local, evento e objeto, basicamente as entidades. E depois há as relações: uma entidade está relacionada a outra entidade; uma mensagem pode mencionar uma entidade; um fato diz respeito à entidade; ou uma preferência diz respeito à entidade. E então há um registro de proveniência, um nome que parece muito complicado, mas que simplesmente indica de onde veio este fato

26:15 — só isso, nada mais. E cada memória aponta de volta para a mensagem de onde veio, então você tem rastreabilidade. Vamos em frente. POLE+O para Lena. O exemplo que dei é muito simples: “Lena: Ei, sou a Lena, estudo ciência de dados na TU München, aqui em Munique.” Ela participou de um quiz, com um certo nível de confiança e alguns intervalos. Ela é estudante da TU München e fica em Munique. Então, com essa frase, criamos isso e podemos raciocinar com base nisso

26:46 e no fato de que ela está participando de um exame de estatística. Essa é a representação POLE. Acho que talvez seja uma pergunta interessante, José: como você começa a construir o esquema e por que escolheu esse formato específico? Por que escolheu POLE? >> Essa é uma pergunta muito boa. Basicamente, esse é o padrão que William Lyon usou para implementar a memória no Neo4j. Então, eu…

27:18 [limpa a garganta] Eu uso o mesmo por enquanto. O que eu queria era ter rastreabilidade completa. Sei que aquilo que construí é totalmente compatível com o esquema de vocês. Basicamente, eu queria que fosse totalmente compatível com o esquema de vocês e também com o esquema usado no NMS, certo? Porque ele mapeia para isso, então é basicamente o mesmo. Acrescentei mais algumas coisas, mas o esquema central é este, e é este que foi usado. Faz sentido? >> Aham. Parece bom.

27:49 >> Sim. Vou pular este, porque não vou mostrar como programá-lo, certo? Mas vou para o [risos] Demo Brain. [limpa a garganta] O que vou mostrar no Demo Brain é um registrador de voo. É como um depurador ou um laboratório de integridade que estou usando para desenvolver, testar e explorar o Agent Memory for .NET, que é open source. O Demo Brain que vou mostrar não é open source. Com ele, você pode conversar com o cérebro, depurar as interações e ver onde o tempo está sendo gasto. Então…

28:23 deixe-me mostrar. Certo. Vocês conseguem ver? Sim. Por exemplo, aqui carreguei a mim mesmo, José, e fiz… Posso digitar: “Ei, em quais projetos eu trabalhei…”

28:55 E aí ele faz a recuperação, busca a memória e, se eu disser mais alguma coisa, ele armazena. Neste caso, a única coisa é episódica: o que foi dito e quando. E tudo isso acontece em tempo real. Na verdade, também posso configurar isso. Quando a velocidade da memória… Isso é bem… E então tenho a renderização, então…

29:26 No momento, essas partículas podem ser adaptadas. Uma partícula é uma unidade. Quando digo uma unidade, quero dizer um token, mas podemos usar um pouco mais para a demonstração, porque é uma apresentação, certo? Então, vamos usar quatro partículas. A próxima pergunta seria um pouco mais interessante: posso perguntar: “Ei, o que você acha da agent memory?”

30:02 E agora tem mais coisas acontecendo. Mais algumas partículas. Não queria sobrecarregar. E, a propósito, o que vocês estão vendo é em tempo real. Também coloquei um pouco de voz porque me dedico bastante ao desempenho. Para otimizar isso, consegui chegar a menos de 200 milissegundos, e isso torna o sistema útil para esse tipo de coisa. Oi, gostaria de…

30:33 usar uma memória como sua memória? Na verdade, você já está usando, mas pode me dizer por que gostaria de usá-la e o que acha dela? E não se estenda demais. Você tem 200 letras para usar. Fale de um jeito engraçado, fazendo as palavras rimarem. Então, a recuperação… 400. >> Escolha. Não precisa de sorte. A memória digitada me inspira, com proveniência em grafo no tempo. Minha recuperação continua excelente. Então…

31:05 sim, fico feliz por estar conectado. Sua memória me deixa com a mente sã. >> Certo. Vou desativar isso. Diga… Foi isso aqui? Conseguimos ouvir direito? >> Sim. Estava audível. >> Certo, perfeito. Lindo. Então, vamos voltar. [limpa a garganta] Então, o que você acha…

31:37 de mim e o que sabe sobre mim? E, a propósito, ele sabe um pouco sobre mim porque carregou algumas coisas antes. Então, faça um breve resumo. Diga algumas coisas positivas que sabe sobre mim, o que eu faço e quais são meus hobbies. Isso, pode começar.

32:08 A propósito, por trás disso há um modelo de raciocínio. Então, às vezes demora um pouco mais, e ele rima. Agora estou falando como a IA. [risos] Certo. Ele não escreveu. Ei, pode dizer de novo? Não ouvi você. Certo. Acho que perdi a…

32:39 Pode dizer de novo? Não ouvi você. É, acho que quebrei isso. Então, vou fazer uma coisa rapidinho e reiniciá-lo. Enquanto isso…

33:10 Vou mostrar uma coisa. Alguém se lembra desta cena de No? Certo, essa é divertida, né? Então, deixa eu mostrar como isso funciona aqui.

33:41 Isso está carregado. Então, vou fazer a outra coisa. A voz está aquecendo. Ei, diga em poucas palavras o que você acha de mim, dos meus hobbies, da minha atitude e das minhas paixões. Você tem no máximo 400 letras. Diga isso em voz alta e faça algumas palavras rimarem. Deixe engraçado. >> Jose, é o seguinte: sem enrolação, só a real. Você é um mago do código, nascido na Espanha e radicado em Zurique, com habilidade e coração para tecnologia.

34:12 Criando agents como o Intent Forge, pura arte open source. Pobre J Ninja, que adora noites de ficção científica. Harlock e Azimoth enganam seus voos espaciais. Você também me desafia a buscar evidências. Por isso, os poemas dele são honestos, sem baboseira. Veredito: brilhante, curioso e um pouco travesso. Nota 10/10; depuraria código com você de novo. >> Certo, isso é bem legal. Então, vamos lá. Tenho um livro aqui, ou alguns capítulos. Se você estiver acompanhando, estou carregando…

34:45 o livro inteiro de Alice no País das Maravilhas, que é um livro de que gosto, de Louis Coral. Vou carregar o livro e podemos contar os segundos. Opa. Certo. Não. Ensine Alice. Vai levar um pouco mais do que os 10 segundos que o número nove — número cinco, desculpe — levou para ler o livro. Mas lembrem-se também de que parte dos modelos que estou usando está no meu computador. Então, não está na velocidade máxima, mas responde muito bem. Estou abrindo mão da precisão por isso. Agora está alimentando o cérebro com o livro da Alice. Certo. Pronto. Foi bem rápido, mais ou menos o mesmo tempo. Então, o que você sabe sobre Alice no País das Maravilhas? Pode resumir a história e o que ela significou para você? Em um ou dois parágrafos curtos, no máximo 400 letras.

35:19 Certo. Acho que há algo errado com o áudio. Está lendo, mas é mais ou menos isso, e até dá para ver. Então, o que você acha do Chapeleiro Maluco, que é um dos meus personagens favoritos? Adoro essa parte. E uma coisa importante é que posso fazer com que ele esqueça. Posso dizer que meu personagem favorito é o Chapeleiro Maluco, porque ele meio que se destaca…

36:00 de tudo. Tem uma personalidade estoica e supera tudo, até todos os problemas e desafios que enfrenta, que são muitos. Ele também é divertido, apaixonado e, de certa forma, conduz toda a história de Alice no País das Maravilhas. Então, para mim, um dos personagens que conduzem a história é mais o Chapeleiro Maluco do que a própria Alice.

36:34 Além disso, deixa eu mostrar uma coisa. Por enquanto, mostrei como funciona. A propósito, você gosta? Diga. É incrível. Adoro a interação por voz em tempo real e como você obtém as… >> Sim. As coisas… >> que vêm do grafo, do cérebro. >> Sim. >> É bem responsivo. Então, posso perguntar…

37:07 até por que este Android, porque gosto de rastreabilidade. Quero saber, e essa é outra parte de que gosto. Ainda preciso trabalhar um pouco nisso, mas posso dizer: “Ei, humor, memorável, educativo”. Então, aqui está o que está no grafo. Estou transcrevendo de acordo com a pergunta que fiz e posso ver a constelação de informações que tenho no grafo atual. Certo? Assim, consigo ter um pouco de rastreabilidade e ver as memórias que foram fornecidas para…

37:37 esta resposta específica. Também posso ver o que está compartilhado, mostrar tudo ou esquecer tudo, embora eu não queira fazer isso agora. Também é interessante que, estando aqui, posso ver, além do conhecimento, uma visualização real do grafo, que posso inspecionar e navegar um pouco. Então, eu poderia dizer: “Ei, vamos ver Asher. A que isso está relacionado?” Ou Intent Forge, ou…

38:08 SDLC não está morto, ou Math Doctor, outro produto de proxy. [limpa a garganta] Posso até navegar por isso e ver o que ele sabe. Ou posso ver o rastreamento, que é outra coisa que gosto de fazer. Por exemplo, posso ver quanto tempo a solicitação levou ou quanto tempo levou para armazenar informações. É basicamente um rastreamento de rede, ou o tempo de execução para depuração e avaliação do desempenho, certo? A recuperação total levou 308…

38:40 milissegundos, e a maior parte do tempo foi consumida pelo agent, porque, no momento, estou usando o Set Theor GLM 5.3 Flash, que não é tão bom quanto alguns outros, mas é bem rápido e bem barato. Depois, vejo quanto tempo levou para o outro cartão. Também posso ver alguns rastreamentos, e todos eles estão carregados. Então, também posso ver o que aconteceu nesta sessão e…

39:10 carregar de novo. É como uma ferramenta de depuração da memória. Também posso ver uma visualização do desempenho do que aconteceu nas diferentes respostas, certo? Tenho esta aqui. Posso ver que a recuperação levou 384 milissegundos. Geralmente, é bem rápida. Posso ver onde foi gasto a maior parte do tempo e também para onde o tempo está indo. Então, a maior parte foi no…

39:42 …

40:14 O agent e a factory têm um desempenho bastante bom. O Neo4j funciona muito bem, e as métricas também são bem boas. Também tenho um leaderboard de operações, então posso ver onde devo concentrar meus esforços para melhorar. Acho isso muito, muito, muito legal, e posso aplicar alguns filtros ou até comparar sessões. Então, vamos voltar ao cérebro. Acho que já mostrei isso a vocês. Vamos fazer uma coisa. Posso adicionar uma pessoa nova, ou posso

40:45 dizer Sam. Posso dizer: “Oi, sou Sam, gosto de surfar e gosto de assistir a filmes”. Sempre posso raciocinar sobre por que a pergunta foi feita. Certo. Me diga, o que eu gosto de fazer? Certo. E posso simplesmente esquecer

41:16 tudo. Oi, quem sou eu e do que gosto? Ah, a propósito, eu deveria remover o histórico de matemática. Certo. Sou Sam. Do que gosto? Você sabe alguma coisa sobre mim? Hum. A propósito, Alice no País das Maravilhas está carregado em uma memória compartilhada. Então posso ter uma memória geral e, depois, uma memória

41:46 específica para mim. No momento, isso é totalmente possível, e eu poderia até esquecer alguma parte. Então: “Oi, sou Sam. Gosto de surfar e gosto de comer chocolate”. Certo.

42:20 As pessoas cozinham, o filhote come o bolo. Certo. >> Então, José, o que são essas visualizações diferentes? Dá para ver o grafo. >> Sim, dá para ver o grafo relacionado à pergunta, certo? O que ele recuperou para responder à pergunta, e também posso ver os nós no grafo. Eu poderia até pedir que ele esquecesse, mas, no momento, ele ainda não construiu memória suficiente. Então, vou simplesmente pular essa parte

42:51 por enquanto. Mas, se eu for, por exemplo, para mim de novo, dá para ver que há um pouco mais de informação, certo? Então, eu poderia dizer “market mind” e pedir para esquecer. E poderia perguntar: “Ei, do que o market mind não costuma ter medo? Me diga”. Então, ele não se lembra. Portanto, há a parte de

43:22 esquecimento e o esquecimento definitivo implementados, para que possamos pedir que ele esqueça algo de forma definitiva, se necessário. Normalmente, isso não é muito gentil com o agent, mas, para fins de teste, acho que tudo bem. É isso. E então, sobre o desempenho, seu colega Michael Hunger estava bastante interessado. “Ei, como está o desempenho?” Michael, não sei se você está por aí,

43:53 mas foi assim que cheguei a esse resultado. Inicialmente, era mais alto do que isso. Levava vários segundos. Então, funcionava, mas não era utilizável. Estou falando de quando nos encontramos em Berlim, na conferência Global AI que a [inaudível] estava organizando, certo? Conheci algumas pessoas da Neo4j [inaudível], e conversamos sobre isso, sobre o TCK. Na época, o desempenho não era tão bom quanto é hoje

44:27 em meados de setembro. A execução completa levava cerca de 30 segundos, e a parte de recuperação levava quase 2, 3, 4 segundos ou até mais, o que era péssimo, mas funcionava. Hoje, porém, a recuperação de uma solicitação bem simples leva cerca de 200 milissegundos. E, além disso, o carregamento da camada de memória

44:59 no Neo4j — trabalho bastante nas consultas Cypher — agora leva 300 milissegundos. Antes demorava muito mais, mas isso foi em 25 de julho. Agora leva cerca de 36 milissegundos, certo? E, após mais algumas otimizações, graças à ferramenta que mostrei a vocês, leva 24 milissegundos. Então, está muito, muito otimizado. É por isso que posso usar isso em uma interface de voz. Ela chegou a funcionar, mas acho que meu sistema está ficando sem

45:30 memória. O modelo de voz está carregado no meu contêiner Docker, então pode simplesmente ter travado. Espero que o Neo4j local que tenho — estou usando a versão local — continue funcionando até o fim. Mas estou bastante orgulhoso do desempenho, que está melhorando, e a precisão também não está tão longe. O que fiz foi medir recall, rejeições e armazenamento. Fiz uma observação e

46:02 também tentei explicar o que acontece e experimentar outras políticas de memória e limiares, além de fazer muitas análises. Então, é bastante trabalho com uma mentalidade de engenharia. E uma coisa importante: mencionei que construí algo chamado Agental, do qual tenho bastante orgulho [risos], e que mede a memória. No começo do ano, reimplementei completamente o LongMemEval. Posso executar uma versão curta do LongMemEval para ter uma noção do que

46:34 funciona e do que não funciona, e de como estamos nos saindo. Depois, implementei um benchmark novo por conta própria, chamado TypeMeEval. Ele mede especificamente memória semântica, de trabalho, episódica, procedural, temporal e prospectiva — os diferentes tipos de memória — em uma fatia vertical. O LongMemEval mede principalmente memória semântica e mistura memórias de lugares diferentes. A ideia é observar como um agent reage em um contexto longo. O LongMemEval avalia a memória em uma

47:06 fatia vertical. Ele não se importa com o contexto. Então, normalmente, se você quiser usá-lo com H&L, desative o histórico do chat e use simplesmente seu sistema de memória. É assim que se usa. Mas isso me ajudou bastante a melhorá-lo. E é assim que estamos. A propósito, se alguém quiser conferir o repo Haval, este QR code leva até ele. Está em aal hqal

47:36 e você pode dar uma estrela se gostar. Vou deixá-lo na tela por um momento e depois passarei para o próximo slide. É assim que estamos. Vou ser bem sincero: a memória semântica está em primeiro lugar, depois vêm a memória de trabalho, o esquecimento, a memória prospectiva, a episódica e, por último, a temporal. Adicionei as últimas entre agosto e setembro. Elas ainda não estão no topo. Essa medição vem do

48:06 TypeMeEval, que pode ser bastante difícil para elas. Então, é apenas uma regra que determina se vou melhorar ou não. O teto está quase na perfeição, eu diria. E, no momento, a memória temporal está desativada por padrão. Então, não está habilitada. Por isso, você não a vê acesa aqui. Quanto ao LongMemEval que mencionei, minha medição fica entre 76 e 90, com 4.003 tokens.

48:36 Quando uso apenas a memória no banco de dados de grafos, o resultado não é ruim; e, no modo híbrido, fica entre 84 e 90. Híbrido significa que uso o banco de dados de grafos e também o histórico do chat, mas isso ocupa um pouco mais de tokens: 22.000. Então, você sabe, tem que pagar por isso. E os outros resultados publicados são: o CIE, de 71 a 90,2; o Mem, 94,4, que é muito alto, mas

49:09 outras pessoas dizem que é mais baixo. Não sei. E o Supermemory dentro do Mastra fica por aí: 81, outros resultados são 91 e 94. Então, sim, é bem alto no Mastra. Bom, há uma disputa, e todo mundo está competindo nesses LongMemEval, que, para mim, não é a métrica certa para avaliá-los. Mas essa é apenas a minha opinião; estou fazendo as coisas de um jeito um pouco diferente. Então, o que está pronto são

49:39 os pacotes 1.6.1, acho que desde ontem. No momento, está no NuGet e é feito em .NET. Funciona perfeitamente em [inaudível]. Foi testado, é compatível com o TCK, funciona com o Microsoft GH Framework e o Semantic Kernel, tem um MCP e também alguma documentação no Microsoft Learn. E hoje já tem um recall de 0,2 segundo, ou seja, 200 milissegundos. O modelo é o que leva mais tempo. Então, é por isso

50:10 que fiz o modelo med local, que perde precisão, mas fica muito mais rápido por causa da latência. [limpa a garganta] E, sim, depois construí essa demonstração do cérebro e o TypeMeEval, para que você possa conferir e medir o desempenho. E, a seguir, adoro esta imagem; é de um dos meus filmes favoritos. Planejo permitir extensibilidade para trazer modelos de memória personalizados e esquemas de graph RAG adaptados ao trabalho que seu agent faz. Acho que isso é bom e [inaudível]. Então, você pode

50:41 Aí, ah, agora quero aprender artes marciais. Então você traz um modelo de artes marciais, certo? Ou uma coisa muito legal que eu estava discutindo há cerca de um mês com William Lion é a destilação de skills que existe no Nams. Nams é uma obra de arte incrível neste momento. Ele consegue destilar skills para seus agents a partir das memórias. É bem legal. E uma coisa em que quero trabalhar é o aprendizado automático. Então, melhorar com a própria

51:13 experiência. Assim que você tem memória procedural, pode aprimorá-la, refiná-la e aprender a fazer as coisas melhor, e então torná-la útil para agentes de programação, porque, se conseguirmos chegar a 90, 95% da precisão com, quero dizer, 400 tokens ou, digamos, 5.000 tokens, certo? Se você fizer isso da maneira normal, com arquivos, seriam 100 ou 200 mil tokens. Acho que estamos economizando

51:44 um pouco de dinheiro aqui, certo? Então, esse é um dos objetivos. Depois, aprimorar, adicionar completamente os tipos de memória pendentes, medir um pouco mais e melhorar também o desempenho e a capacidade de mensuração. É disso que eu estava falando sobre os valores. E uma ideia que tenho na cabeça sobre a própria formação é: isso é uma pesquisa, certo? Quando os tipos de memória forem plugins, os primeiros que quero

52:17 criar não serão sobre o que o agent sabe, mas sobre como ele se comporta. E se os agents pudessem se lembrar não apenas do que discutiram, mas também de como se comportaram durante a discussão? A memória de consistência comportamental é o termo geral que reúne duas partes. Chamo-as de continuidade de identidade. É a consistência do caráter: seus princípios, seus valores. Lembrem-se, certo? Os valores dos robôs de Star Trek são o que dizem à galáxia a mensagem que eles transmitem.

52:47 E, ah, Isaac Asimov: eram os valores e as leis, as três leis da robótica, e também as decisões sob pressão e a detecção de desvios de alinhamento. Esse é o maior problema que todos nós temos: o mesmo agent na segunda e na sexta-feira. E, depois, a continuidade experiencial, a continuidade do relacionamento. É o histórico compartilhado e os momentos que importam. Sim, que importam para o agent. Não sei se vocês sabem, mas o Claude e outros modelos de raciocínio de alto nível estão registrando alguns pensamentos e atribuindo pontuações a eles internamente. É o que estão fazendo.

53:18 Certo. Então, é basicamente também essa continuidade experiencial, essa continuidade do relacionamento, o histórico compartilhado e os momentos que importam. Não é preciso reapresentar tudo ao seu agent toda manhã, certo? Não é um encontro amoroso; ele já sabe do que vocês conversaram. >> José, estamos chegando lentamente ao fim. Que tal respondermos a algumas perguntas

53:49 da plateia? >> Claro. Acho que é basicamente isso. Meu objetivo é tornar o alinhamento mensurável e também fornecer um benchmark para verificar se o agent está alinhado, examinando a memória e como o agent responde com essa memória, além de ser auditável e se basear no modelo de extensibilidade. [limpa a garganta] Certo? Acho que isso pode ajudar com o problema de alinhamento, que interessa a empresas como a Anthropic e a OpenAI. Se alguém estiver trabalhando nisso, quero entrar em contato e conversar. Tenho muito interesse nisso. Basicamente, adicionar os valores apropriados determinará o comportamento. E, dito isso, no início vocês viram um agent se lembrar da memória da Lena. A memória não deveria falhar silenciosamente; vocês deveriam poder vê-la e medi-la, porque os arquivos só conseguem fazer até certo ponto. Obrigado.

54:20 >> Incrível, obrigado, José. Então, vamos às perguntas da nossa querida plateia. Só um instante. Aqui vamos nós. Obrigado. Obrigado, José, pela ótima palestra e pela incrível demonstração ao vivo de hoje. Você arrasou, o que é ótimo. Foi tudo feito ao vivo [limpa a garganta], e foi simplesmente incrível. Vou seguir a ordem. A

54:54 pergunta que temos aqui, de K Zota: é possível fazer perguntas sobre um banco de dados e sobre o conteúdo dele? Se sim, posso verificar por conta própria, com uma consulta, se o que aconteceu é verdade? Essa consulta seria fornecida? É possível bloquear dados confidenciais?

55:28 >> Essa é uma pergunta interessante. Essa é uma das coisas que a parte de extensibilidade permitiria fazer. Uma coisa é conversar com ele e criar algumas memórias, certo? Usando os tipos de memória atuais que temos. Mas talvez pudéssemos configurar um tipo de memória específico para banco de dados, infraestrutura de IA ou infraestrutura de TI, certo? E colocar tudo

55:58 ali, um grafo personalizado para isso, adicioná-lo como tipo de memória e conectá-lo. Aí, sim, ele poderia responder a essas perguntas. Poderia armazenar as informações e teria as consultas para isso. Então, sim, e também pode bloquear dados confidenciais. Bem, se incluirmos isso no schema, sim, é perfeitamente possível. >> Legal. Incrível. Outra pergunta, de Harita.

56:28 >> O que vem primeiro, a ontologia ou os grafos de conhecimento? Isso é construído a partir da leitura do seu modelo de dados ou com base em entrevistas com a empresa? Sim, posso começar, e talvez você possa complementar, José. >> Então, como vimos no início ou durante a apresentação, José mostrou o schema do grafo dele e, claro, isso é em uma escala

57:00 mais ampla. Essa é a ontologia: entender que tipos de nós e de relacionamentos nosso grafo deve ter e descrever brevemente que tipos de relacionamentos e nós queremos ter no grafo para ingerir os dados adequadamente. Então, isso vem primeiro: pensar no schema. Depois, usando tecnologias como o Document Intelligence, que acabamos de lançar em prévia pública, ou o pacote GraphRAG, você também pode começar a construir seu grafo de conhecimento e ingerir o conteúdo e os documentos no grafo. O que você acha, José?

57:31 >> Acho que é uma pergunta muito ampla e detalhada. Vou simplificar. Quero dizer, a ontologia é o modelo, as regras, o vocabulário, aquilo que compõe o schema, certo? E o grafo de conhecimento são os fatos reais conectados de acordo com o modelo do grafo. Então, para mim, é aquela questão do ovo e da galinha. O schema do grafo faz parte do grafo de conhecimento. Para mim, a ontologia faz parte do grafo, porque é o que o define, certo? É o que o molda. Faz sentido? Parece bom. Outra pergunta, de Great Work

58:01 Great Work Alliance 642. >> Ah, >> Estou confusa. Espera. >> Sim. Sim. >> Sim. >> Está funcionando. Certo. >> Sim. Estou confusa sobre por que um modelo de raciocínio está sendo usado neste caso de uso. Não deveria ser necessário raciocínio para o tipo de recuperação demonstrado até agora. >> Essa é uma boa pergunta. Quero dizer, depende, certo? Primeiro: modelo de raciocínio para quê? Eu tenho um modelo de embeddings para os embeddings. Então, isso definitivamente não é raciocínio. O raciocínio é usado na recuperação e também no armazenamento. E acho que isso molda um pouco as coisas. Deixei em baixo, certo? Então, não raciocina tanto. Basicamente, o que está por trás disso é uma história interessante: também sou Microsoft MVP, Microsoft AI MVP, um dos quatro na Suíça. E a Microsoft oferece alguns benefícios, como créditos do Azure, para apresentações de projetos open source. Este projeto open source, no fim das contas, contribui para o Microsoft Agent Framework. Aliás, se vocês viram meu último slide sobre como usar isso em matemática, ele aponta para o repositório do Microsoft Agent Framework, que explica como usar este AgentMemory para .NET, que faz parte do ecossistema Neo4j, mas

58:33 também do ecossistema da Microsoft. Isso faz parte das minhas contribuições para o ecossistema de IA. Graças a isso, sou reconhecido como Microsoft MVP, além de fazer palestras em conferências como esta. E eles me deram alguns créditos do Azure. Basicamente, antes, quase até meados de setembro, eu estava usando um modelo da OpenAI implantado lá. Bem, estou fazendo muitos testes de desempenho

59:04 Ótimo Trabalho Alliance 642. >> Ah, >> Estou confuso. Espera. >> É. É. >> É. >> Funciona. Certo. >> Estou confuso sobre por que um modelo de raciocínio está sendo usado neste caso de uso. Não deveria ser necessário raciocínio para o tipo de recuperação demonstrado até agora. >> Essa é uma boa pergunta. Quer dizer, depende, certo? Então, estou usando um modelo de raciocínio primeiro para quê?…

59:36 Eu tenho o modelo de embeddings para os embeddings. Então, definitivamente, isso não é raciocínio. O raciocínio é feito para recuperar e também para armazenar. E acho que isso molda um pouco as coisas. Eu o configurei como baixo, certo? Então, basicamente, ele não raciocina tanto. O que me motiva é uma história interessante: também sou Microsoft MVP, Microsoft AI MVP, um dos quatro na Suíça. E a Microsoft…

1:00:08 oferece a você alguns benefícios, como créditos do Azure, para apresentações de projetos open source. No fim das contas, esse projeto open source contribui para o Microsoft Agent Framework. Aliás, se você olhar meu último slide sobre como usá-lo no .NET, é lá que está o link para o repositório do Microsoft Agent Framework, que explica como usar esse AgentMemory for .NET, que faz parte do ecossistema Neo4j, mas…

1:00:39 também do ecossistema da Microsoft. Isso faz parte das minhas contribuições para o ecossistema de IA. Então, graças a isso, sou reconhecido como Microsoft AI MVP, além de algumas palestras em conferências como esta. E eles me deram alguns créditos do Azure. Basicamente, antes de meados de setembro, eu estava usando um modelo da OpenAI implantado lá. Bom, estou fazendo muitos testes de desempenho…

1:01:11 e fazendo muitos benchmarks para ver se as coisas funcionam ou não. Isso consome uma quantidade enorme de dinheiro ou créditos que a Microsoft gentilmente me concedeu. Então, obrigado, Microsoft. E essa é a razão pela qual troquei muito rapidamente para outro provedor, que tinha o modelo mais rápido. Essa é, em parte, a razão pela qual escolhi esse modelo. Espero que faça sentido. Legal. E uma pergunta rápida sobre o aplicativo do cérebro que você criou.

1:01:42 Você consegue executá-lo localmente? >> Se consigo executá-lo localmente? >> Sim. >> Está rodando localmente. No momento, o novo banco de dados Neo4j é local, certo? >> Ah, perfeito, legal. >> O aplicativo está rodando localmente. O modelo de embedding está rodando localmente. A única coisa que não está rodando localmente é o modelo, o modelo de raciocínio que estou usando. E sim, eu poderia executá-lo localmente, mas aí precisaríamos de mais uma

1:02:13 hora de sessão para deixá-lo pensar antes de poder responder, porque meu computador só consegue fazer até certo ponto. Então, se alguém quiser me patrocinar uma das novas máquinas da Apple para rodar inference localmente, acho que poderíamos fazer isso. Mas, ainda assim, ele poderia executar o mesmo modelo a cerca de 60 ou 70 tokens por segundo, com menos latência. Mas essa é a velocidade. Estou executando os modelos na Bitdeer. E a velocidade é mais ou menos 200

1:02:43 tokens por segundo. Bem, acho que ainda não conseguimos superar isso com modelos locais, mas sim, você pode executá-lo localmente. >> Legal. Acho que é basicamente isso. Muito obrigado por se juntar a nós, Jose. Antes de encerrarmos, uma salva de palmas para nosso bom amigo Jose e para o trabalho empolgante que você está fazendo com a memória de agents. Estou ansioso para ver como podemos manter o ritmo e colaborar mais

1:03:15 E, mais tarde, neste mês de novembro, vamos realizar nossa conferência para desenvolvedores, chamada Nodes. É uma conferência online, virtual, então fique à vontade para pegar uma xícara de chá ou café à noite, dependendo de onde você estiver no planeta. E junte-se a nós, acompanhe e ouça algumas histórias interessantes e sessões técnicas

1:03:46 sobre grafos e IA. E, para continuar aprendendo e manter a conversa em andamento, vocês também são bem-vindos à Neo4j Graph Academy. Essa é a nossa escola. Essa é a nossa academia, onde ensinamos os aprendizados mais recentes sobre tecnologia de grafos. Oferecemos eventos, workshops e cursos

1:04:17 sobre os avanços mais recentes em tecnologia de grafos. Para começar a usar o Neo4j, também temos nossa edição comunitária do Aura. É só conectar e usar: crie uma instância do Aura e comece a desenvolver. E pronto. Foi ótimo conversar com você, Jose. Obrigado a todos que se juntaram a nós de todo o mundo. Estou ansioso pelo próximo encontro. E vamos

1:04:49 manter esse entusiasmo e nos vemos no próximo encontro. Obrigado a todos.

Transcrição original

[00:02] Hello everyone. [clears throat] I’m excited to be here with you today. So I’m Zim. I’m from Neo forj um running developer relations in ina and I’m thrilled to be here together with my um good friend Jose talking about agent memory for uhnet persistent AI agent memory engine. So um I would love to have you guys drop

[00:33] um your questions here in the chat. Uh what’s what’s your focus on? What brings you here. So and of course any any uh questions you have we would like to um to yeah to share and discuss with um with Jose. So let’s uh uh let’s welcome Jose and give him a warm uh applause for joining us today. So, hi Jose. Welcome. You’re muted. >> Not anymore. Hi Say, glad to be here.

[01:05] Thanks to you, Antonio Forj for inviting me to host me live in your show. >> Amazing. Thank you so much for um for joining us uh today. So, I would love to begin with a quick introduction around like who you are and what you do. >> Yeah. Um it’s easy. Uh I’m a software engineer architect and I don’t just build agents, I build the tools of the people build agents with. So I’ve been collaborating with uh Microsoft on

[01:35] sematic kernel since 2023 since all these craziness about AI agents and workflows started. uh been contributing as well to autogen and lately to Microsoft agent framework and as well since last year I started building some uh I would say flagship open source projects of mine like uh for example agent eval uh and now well um you know that one because it comes close to you um agent memory >> amazing and um I would be very much

[02:06] curious to know like what drives your excitement and interest working in in agent memory particularly why inn net and why with neo forj um in particular >> that’s a very good question can you share my slides because I came prepared for that question >> okay let’s uh let’s do it um just a second here we go >> yeah perfect so um I will go back this

[02:37] one because you already introduced me so what built me what drive me to create this. So, uh well, every robot that I love as a kid was defined by two things. Um that really hit me. What it remember and at what it valued 1,800 what 1977 um something happened. I was born in 71. Yes, I’m I’m I look younger than I look. So, I’m a small kid in a dark cinema and

[03:08] a little blue and white robot draws on the screen carrying a hidden message that will save the galaxy. Uh, this one memory that saves everyone. I walked out of that memory out of that cinema thinking I want to build that then how in 2001 a machine with an inner conflict and a cube that couldn’t see inside its head and keep that words inside its head later on asimov uh I nearly read every story from him his

[03:38] posetronic brain this uh if anybody read Asimov uh it’s amazing writer his positron brains had the values built in before anything else. And then it came all the parts that I love, anime, manga, robots. Uh, one that hit me is Astro Boy from Samuka. It was a robot built to protect people. And then this one was fun. Anybody remembers short circuit in 86? Number five. Speed reading books in the

[04:09] house saying more input, more input. I always been a builder. architectures, complex systems, making them work. He never stopped wanting to build that brain. Crazy, I know. And last, today, it was science fiction. Until today, grabs were the national medium. Ideas connected by relationships that grow stronger or weaker over time, like we humans do. In year 2000, not that far away from HL, right? One year after um a

[04:43] person named Emil sketch a graph on a napkin on a flight to Mumbai and this changed everything. So thanks Emil. Years before anybody called it a graph database 26 years later here we are [snorts] that napkin is where [laughter] my agent keeps his memory. Um I and then something happened this year. Uh there was an open- source agent memory for Python. Saints William uh and then I talked to my friend say here so he can

[05:15] you can tell your part of the story if you want and I started to do a a port to learn uh how this was working because for me this oh my god this is open source I need to learn how this works and it became a full rebuild because the net world does not have the same that Python so today you will see the memory part an agent that remembers you like a coach that knows you the values part comes at the end and I already say that three times. U also Rasimov say it really really well.

[05:45] Science fiction writers foresee the inevitable and although problems and catastrophes may be inevitable, solutions are not. Uh these next are mine. Solutions have to be built. So I’m trying to build one. And I will like to show you a bit what I built. It’s this part is a >> yeah maybe before we go forward um Jose say like can you outline briefly like

[06:16] why did we go withnet and why are you particularly going forward with neoj >> yeah uh well I said it before I love cipher right so I think this what you built is pretty cool um so what neoforj has built in fact and it’s the leading database provider Right. So, and it’s very solid and and and very stable and you can host it in local, you can host it in a cloud. So, that’s what

[06:46] drew me to it. I’ve been playing and exploring Neo forj for years to be honest. Um, so Cypher it comes very natural to me as a language. So that made it the the obvious choice and also that you are investing strongly on on that area on uh improving making performance improvements. Um so to me is is the perfect um infrastructure I would say the perfect uh provider to build the brain on. Uh that’s what draw me. Does

[07:17] this respond to you? >> Definitely sounds exciting. So let’s go ahead. >> Yes. All right. So this is what I built. Uh let me show it. Uh so look over the video. It should be starting. Mhm. Do not disturb. So this is my demo agent playing a study coach, right? It’s remembering a fictional student named Lena. Uh this is a real session recorded and I want uh my agents to remember like

[07:50] this, right? And when memory fails, uh, nobody tells you uh, nothing tells you usually. So what I wanted is a system that can tell you if it fail, right? And, and this is it. And what you see, you will see it in in a little bit live. This is the moment a video. You can see for example the phases where uh, we are doing two phases. One is when I ask something to the agent to my LLM and the agent that manages the LLM it’s a pre which is hey with this question that the

[08:22] user has or another agent has hey remember look into your memory anything which is related to this and bring it back that’s what the retrieval part is and then we are doing the post hey did we get any new information should we remember something and and then it’s the remembering phase that’s at the moment how these things work and what you saw in the screen. Cool. Just wait there’s more cool in it. So um let’s talk first about some basics. What is agent memory?

[08:56] So a good friend of mine asked me if I would uh explain a bit the basics. So I say okay because not everybody here knows about some basics. So let’s go through them. What is agent memory? How is it different from a chat history or rag? Um so uh in this case we can have a context window in your usual setup when you use an LLM, right? Which is what the model sees on the call. And then we have a chat history that is replayed and provided to the

[09:28] agent every single time until it does not fit its context memory which each model has one. Some have bigger, some have less. At the moment is about 1 million tokens. Also we have uh some kinds of memory uh that usually use embedding. So this is vector database and we do the embedding process to transform a word into a meaningful vector that can be stored in that database, right? And it’s uh

[10:00] retrieved by meaning um and it’s basically finding the nearest thing that coincide. It’s for finding things that mean kind of the same, right? And there is rack which is simply retrieval something that I want from any location. Uh rack does not explicitly imply a vector database. There are many methods and the other which is the one that brings us to graph databases is relationships. like humans do. We have a knowledge

[10:32] graph in the uh graph database that there are things that have a space some relations to other things and we simply traverse the graph and with that we find what we want that’s ragged on here for example on Lina which have a tonin located in Munich right so things the nodes and how they are related the relationships are stored especially Here humans we have neurons and we have

[11:04] synapses and they connect uh the neurons right so it’s it’s a very similar uh metaphor and then we have graph rack which is retrieval that follows the same attribute so it’s basically the same graph is basically a custom graph defined and explicitly done for a concrete purpose uh and you say it you are more expert in in graphite than I am but basically this is one of the ways to

[11:35] do that and it’s a very simple explanation so it’s a custom graph for a concrete task which can be books can be medical can be finance can be um anti-money laundering here in Switzerland this is quite important and there’s a lot of focus on that lately but you can tell me say if that’s correct would you add something >> totally like these uh ro resonate with with our core use cases. Um, additionally like one of the very interesting cases is of course life

[12:06] science and pharma like >> things around drug discovery. So how this using graph ragra uh basically accelerates um the process because we can better understand how all these diseases, viruses um are connected with each other and with which procurements and um yeah this us basically >> quicker um drug discovery accordingly and additionally there’s a lot of um

[12:38] momentum around um aerospace as Well, like think about you’re building your >> I don’t know maybe your aircraft an aircraft is made of different components. You need to understand how these components are connected with each other with which um kind of um of of u yeah systems and so on. So you need to to understand the connections and relationships >> with it’s a way to reason things. So let’s move forward. Uh and this all comes to agent memory right which is uh

[13:09] basically um deciding uh how to uh um write what to recall what to forget. Um but the thing which I’m using for this is basically uh a knowledge graph right or or or a graph or let’s be clear a different set of graphs but we will get close to that because it depends of one important thing the types of memory. Um

[13:39] so we have here what technology and structure do we use and and then as well now comes what do we use to store that and this comes to the next part the memory types. Yeah. Um if we point uh at the brain uh each region here in the brain is a memory type that is represented through a nice visualization of a graph. And in the demo you will see them light up live as the agent recalls and learns. Um

[14:10] and and then we have uh several types of memory. Uh the most usual ones are working semantic sodic basically everybody almost is using this one. Working is the conversation right now. Uh semantic is the facts and preferences that stay true the relations. For example, Lena prefers short morning sessions. Episodic is what happened and when it’s kind of a history of what happened in the different episodes of the conversations that we had and then we come procedural which is

[14:42] how do I do this for example a coding agent needs a procedural but if you have a agent that want you want it to help you to cook something that’s also a process that is the kind of memory that we are talking here the routine that work then we have reasoning the agent’s own steps and tools and for that We have just seen that grabs are incredibly useful. And then we have temporal. When was this fact true? Not just when it was learned, right? That’s different thing.

[15:12] And perspective. So that’s interesting one. And almost nobody’s using it. Is remembering to do something later, a reminder like some facts or some things that you have to do like a to-do list. I should do this by today. Right? These kind of things. and then forgetting which is also called abstension letting go forgetting usually this is not everybody’s using that all the memory systems usually or a lot of them are using a file system so they do not

[15:44] forget they simply add more facts that override the the old ones but the old ones are still still there but this is very tricky also it’s called abstension memory which is not exactly a type of memory but it’s a traoral memory because you want to forget a among all the different parts and the best way to do that is through a decay function but that’s a different story and then we have by temporal which is two blocks right one when a fact was true and the other when the system learned it and

[16:14] then when it stopped being true because I may have bought a car two months ago and then last week I sold it that’s no longer true that I have a car that’s an example all these nine types of memory are supported in agent memory before.net H and well uh these are the nine that I track others like share memory agents between agents images and audio are next right but the plug-in model that I will speak

[16:45] a bit is how when >> one [clears throat] one question in between let’s say um like when do you use which kind of memory like do you use all memory components um al together >> yes and no >> okay >> I wrote them so every retrieval of every different uh kind of memory is a different system and I simply assemble them together so I created what you see

[17:16] in the in the core it’s a memory routter it’s what is driving that so I identify on the question the types of memory that should support to respond that question that the user makes and then derive that to the corresponding. So I make a custom cipher query on each different memory system and then I bring them together. >> Mhm. Cool. >> It’s it’s interesting. Yeah. [clears throat] Okay. >> Nice. Um we have should we do the

[17:49] questions now or should >> we can proceed because there will be some a couple of things. Um so uh basically what I said is we support the questions uh so all nine types of memory uh the only so I I wanted to look at what the others are doing and I think it’s pretty interesting that I support N of 9. I’m not saying aging memory for the net is the best. So everybody has their own uh capabilities but I think it’s an interesting exercise as a

[18:19] standalone developer to try to make a system better than what company full companies are doing. So that’s a bit the the challenge I have. Um and at the moment I think it’s not going that bad. You will see. Uh I like to highlight the the work of SEP and graffiti. They cover six uh types of memory and SEP is the one that keeps both clocks of time by default. So by temporal uh so almost nobody remembers to do something later with a AI agent, right? So if ask about

[18:52] the falls uh well um so if anybody has a question I can highlight if there is any question in the chat. I cannot see the chat. So you can see it say it but I cannot. Uh >> yeah there is there is two. So maybe we can uh we can highlight this now. So can see it here. Has any work been accomplished towards person centric architecture and structuring than the other project? >> That’s a very that’s a very abstract

[19:23] question right but you will see um one thing I wanted is to be able to talk with my agent that has this memory and to remember me. So I made it safe by default. So it’s something I put a lot of effort uh and it can correlate and identify uh the memory for a concrete interlocator and this can be uh global memory shared by everybody or uh concrete memory [clears throat] that I can only access right so it has a key and the key can be a person or can be organization so it’s kind of what

[19:54] everybody is talking about about organizational memory so technically this can be it you just need a proper identifier the other question Um the other question the other part of the question is has any been done specific to knowledge organization using historical methods not abstracted away but very clear. >> Okay. I think I responded that with uh

[20:27] to pensic structuring using historical methods. uh what do you mean with historical methods that would be interesting to understand not abstracted so well um if you explain that I can tell you if yes or no um okay so let’s move on so this is what I built so the memory types in in there right um and and there the other thing is that uh a colleague of mine this I had an interesting discussion uh the like three

[20:59] four days ago hey why don’t we use this uh wiki Right. So I wanted to bring that in. There’s some ways to store the information. One is in files you know uh clo mostly does that uh wiki that’s interesting right for storing different kinds of information. Created nodes reading fixing is very human. There is almost no infrastructure. You write it you store it that’s it. An example of that is cloud.mmd memory.mmd karpathis llm wiki uh and let us memory file

[21:30] system which is quite good by the way. Um and then we have vector databases are great for finding a paraphrase a phrase searching in millions of memories that’s super scalable. Mem zero, open source, lang mem, magior. Uh, and then we have grabs and vectors, which is great for places, people, events, any anything you want for time owners where it came from. And you can also benefit from graphs. You can put vectorization and and do

[22:01] vector search inside uh neo forj agent memory uh also agent memory for the net the one I’m presenting rapidly set and cogni do that right and they are really good but they fail silently sometimes wiki and files only the top is loaded the context can only hold so much because you load that into the context and what happens when two lines disagree which is current and then there is no owner so you don’t know who is editing

[22:31] that right a vector database it will fail when it is not similar so it doesn’t come back it always will give you a confident of five and time usually is ignored on that dimension so it has its problems you can improve that with ranking by the way that’s a Google recruiting question but it only gets five to 10% more of accuracy and the best is routes and vectors al together but sometimes extraction can miss a at right time so yeah that’s a bit uh

[23:04] the ecosystem right and then there is one question for three memories so in September my exam is on 12th of December so my statistic exam is on 12th of December at TU manion so if we go for files the the memory file grew on it stop is loaded the October line sits past the cut plan revision in Munich is on the 11th So it misses that or it has the potential to miss that. Then on vector exam revision finds exam at the weakest spot. It’s better. But the

[23:36] hamburg trip is not similar. So it’s not retrieve. It retrieves something similar but a wrong plan. So that would be an example of cases that were used it. And then we have graph or graph plus vector walk from Lena to her December evens exam 12 or Munich and the conference 10 to 13 in Hamburg and then it tells you hey you’re in Hamburg until the 13 let’s move the revision earlier or later right so that’s an example of what happens

[24:07] when you ask the agent a question and the memories are either in files in vector database or with a graph database like Neo forj Let me move faster because I need to show a couple things. So also the graph is only as good at what it has you know to it right. So it needs to be measured. So I built the graph agent memory for um so new forj built the graph agent memory for python and typescript. Um and uh

[24:40] then inn net I also reimplemented that with vector only memory or as a graph rack provider as well. So it has the methods for graph rack that builds a graph but never writes one um or creates one from scratch. So I basically built it natively for uh Microsoft agent framework initially and then semantic kernel and as an MCP and as MIT also one important thing it’s it is also a connection to NMS something very cool

[25:10] that uh Neo forj has created which is basically um agent memory in the cloud right new service I think at the moment is free so everybody can explore just search for neoforj nums ns and you will see it’s pretty pretty pretty easy to use or if you are in net you can use hme memory fornet all right then the basic schema of that powers or started powering um our brain is this

[25:44] one it’s called pole plus o which means person organization location even an object basically the entities And then there are the relations right so it’s an entity it’s related to another entity uh message can mention an entity uh a fact is about the entity or uh preference is about entity and then it has a reason trace because uh provenence which is interesting name sounds very complicated but it says where does this fact come

[26:15] from only as simple as that and then every memory points back to the message it came from so you have traceability. Let’s move on. Paul E on Lina. The example I gave, it’s very simple. Lena, hey, I’m Lina studying data science at TU Munchin here in Munich. Well, it participated in uh some quiz with some confidence, some intervals. It’s a student of TU Munchin and it’s located in Munich. So with that phrase, we have created that and we can reason over that

[26:46] and is participating on a statistic exam. So this is the poly representation. I think it’s a >> maybe an interesting question Jose like how do you start building the schema and why did you go for this particular schema format like why did you go with Paul? >> That’s a very good question. Um basically this is the default that uh William Lion used to implement neo for uh a memory right. Uh so I

[27:18] [clears throat] I I use the same at at the moment what I wanted is to have full tracibility. I know and so this what I build is fully compatible uh with um your uh schema and basically I wanted to be fully compatible with your schema and also it’s the schema using numps right because it it maps so it’s basically the same. I added a few more things on top but the the core schema is this one and this is the one use. Make sense? >> Mhm. Sounds good.

[27:49] >> Yeah. And I will skip this one because I will not show how to code it, right? But I will go to [laughter] demo brain. [clears throat] Uh um but demo brain what I’m going to show is a flight recorder. It’s kind of a debugger or integity laboratory that I’m using to develop and try and and explore agent memory fornet which is open source. What I’m going to show demo brain is not. So with that you can chat with the brain you can debug the turns and you can see where the time goes. So

[28:23] let me show it. Okay. Uh can you see that? Yes. So for example here I loaded me Jose and I did and I can type hey what projects I work uh

[28:55] and then it goes uh it’s doing the retrieval um getting the memory and then if I say anything else it’s storing right in this case the only thing is episodic what was said and when uh and everything here it happens in real time in fact uh I could also configure that uh when mem speed that’s quite and then I have uh the rendering so at

[29:26] the moment these particles can be uh adapted one particle is one unit when I say one unit is one token or we can do it a bit more and we can do for showcase because it’s a show right and yeah come on for particles and the next question would be a bit more interesting here so I can ask hey uh what do you think about agent memory

[30:02] And now there’s some more things going on. Some more particles. Uh didn’t want to make it overload. And what you see by the way is real time. Uh and also that’s I put a bit of voice because uh the performance I work a lot in performance. uh uh to optimize this it reach along this way under 200 milliseconds and this makes this useful for for that. Hi um would you like to

[30:33] use a memory as your memory? Well, in fact you are using it already but you can tell me why would you like to use it and what do you think about it? Also uh don’t overextend it. You have 200 uh letters to use and talk in a funny way that the words rhyme. So the recall 400 >> pick it. No luck required. Typed memory has me inspired with graph provenence in time. My recall stays truly prime. So

[31:05] yes, I’m glad I’m wired. Your memory keeps me well minded. >> Okay. Uh let me disable that. Uh say uh was this here? Uh could we hear that properly? >> Yeah. Um it was um audible. >> Okay, perfect. Beautiful. So let’s let’s go back. Uh [clears throat] so uh can you tell me what you think

[31:37] about me and what you know about me? And by the way, uh he knows a bit about me because he loaded a couple of things before. So yeah, uh just make me a short summary. Tell me some positive things of what you know about me, what do I do, what are my hobbies. Um yep, go ahead.

[32:08] By the way, it’s a reasoning model behind. So sometimes it takes a bit more time and it rhymes. I’m speaking like the AI now. [laughter] Okay. He did not write. Hey, uh, can you say that again? I didn’t hear you. Okay. I think I lost the

[32:39] Can you say that again? I didn’t hear you. Yeah, I think I uh broke it. So, let me do one quick thing and restart it. And meanwhile uh

[33:10] I will show something. Uh, does anybody remember this scene from No. Okay, that’s a fun one, right? Um, so let me show you how this works here. Um

[33:41] this is loaded. So let me do the other thing. It’s warming up the voice. Hey uh say in few words what do you think about me and my hobbies, attitude, um passions. Um you have like uh 400 letters maximum. Uh and say that out loud uh and rhyme a few words. Make it funny. >> Jose, here’s the deal. No fluff. All real. You’re a Spainborn Zurich code

[34:12] wizard with tech skill and heart. Building agent agents like Intent Forge, pure open- source art. Poor J Ninja who loves sci-fi nights. Harlock and Azimoth fool your space flights. Evidence-driven challenge me too. That’s why his poems honest not fluffy goo. Verdict, brilliant, curious, slightly mischievous. 10/10 will debug with you again. >> All right, that’s pretty cool. Uh, okay then. Uh, let’s do the thing. So, I have here a book, right, or some chapters. Uh, and if you were aware, I’m loading

[34:45] the full uh Alice in Wonderland, which is a book I like uh from Louis Coral. So, I’m going to load the book uh and we can count the seconds. Oops. Okay. No. Uh, teach Alice. Okay. It will take a bit more than the 10 seconds that it took uh number nine, number five, sorry, to to read the book. But also bear in mind that the um um what

[35:19] part of the models I’m using are in my computer. So it’s it’s not at fast speed, but they have a very good responsiveness. So I’m losing accuracy for that. So now it’s uh feeding the the book of Alice into the brain. Right. Okay. And it’s done. So it was quite fast more or less the same. So what do you know about Alice in Wonderland? Can you summarize the story uh and what it meant for you? Um in a short uh uh one or two paragraphs, maximum 400 letters.

[36:00] Okay. I think the audio there’s something there. Uh, it’s reading, but that’s more or less it and it even gives you. So, what do you think about the Mad Hatterer, which is one of my favorite characters. I I love that part. And then uh one important thing is I can make it forget um so I can tell um my favorite character is the Matt Hatterer um because it’s kind of um stands above

[36:34] everything. Uh is a stoic personality and raises above everything uh even all the problems and challenges that he has which are quite a few. So also he’s fun, he’s passionate, and he’s kind of driving the full story in Alice in Wonderland. So kind of to me the the one of the characters that lead the story is is to me more the mad hatter than really Alice.

[37:07] Also, let me show you one thing. Um, at the moment I show you how it works. By the way, uh, do you like it? Say it. It’s amazing. I I love the the the [clears throat] real-time voice um interaction and then how you get like the the >> Yeah. the um the the the things >> fueled from the the the graph from the brain. >> Yeah. >> It’s pretty responsive. So I can ask

[37:37] even why this Android because I like traceability. I want to know and this is the other part that I like. So I still need to work a bit on that but I can tell hey uh humor memorable teaching. So here is what is in the graph. So I’m transcribing it according to the question that I made and I can look at the constellation of information that I have in the current graph. Right? So I can do a bit of transability and memories that it was given right um for

[38:08] for this concrete response and also I can see what is shared or show everything or forget everything which at the moment I don’t want also it’s interesting that when I’m here I can also uh see aside from the knowledge which is a real uh graph visualization right that I can check and do a bit of navigation if I So I could say hey let’s see Asher uh what is it related to or intent forge or

[38:40] SDLC is not dead or math doctor another proxy product [clears throat] um I could even navigate through that and and see what it knows or I could see the trace and that’s a different thing which I like to do so I can see for example how much time it was on on the request or storing information uh basically it’s kind of a network trace or the effort time for debugging and assessing the performance right the recall total it was 308

[39:10] milliseconds and most of the time it was on the agent because I know at the moment I’m using the set theor GLM 5.3 flash which is not as good as some but it’s pretty fast and it’s pretty pretty cheap and then I’m see how much time it took for the other card. So I can see that also um can see some traces and all the traces are loaded. So I can also see what went on on this session and

[39:42] reloaded and so it’s kind of a memory debugability that I have uh tool and I can also see a performance view of what happened on the different responses. Right? So I have this one. I can see that the recall happened in 384 milliseconds. Usually it’s quite fast. I can see where uh the most of the time went and I can see as well uh where the time is going right. So most of it on on the

[40:14] agent and the factory is quite performant. Neforj behaves really well and the medics are also pretty good and I have as well operation leaderboard so I can see where should I put my effort in improving that. So I think it’s pretty pretty pretty cool and I can have some filters that I can or even compare sessions. So let’s go back to the brain. Um I think I show you that. Let’s do one thing. I can add a new person or I can

[40:45] say Sam. I can say hey I am Sam and I like to surf and I like to watch movies. I can always reason why the question was done. Okay. Uh tell me what do I like to do? Okay. And I can simply forget

[41:16] everything. Hey, who I am and what do I like to do? Oh, by the way, I should take the math history away. Okay. Uh, I am Sam. What do I like to do? Uh, do you know anything about me? Hm. By the way, Alice in Wonderland is loaded in a shared memory. So I can have a general memory and then a concrete

[41:46] memory for me. So this is at the moment uh fully possible and and then I could even uh forget uh some some part. So hey uh I’m Sam. I like to surf and I like to eat chocolate. Okay.

[42:20] People’s cook the puppy eat the cake. Okay. That’s >> So what are these different views, Jose? Like you can see the graph. >> Yes, I can see the graph related to the question, right? What it recovered uh for responding to the question and I can see the nodes in the graph. I could even tell them uh to to forget but at the moment uh it has not built enough memory. So I will simply skip that part

[42:51] for now. But um if I go for example to me like again you can see there’s a bit more information, right? So I could uh say market mind and I could forget and I could ask hey what is market mind not afraid usually the one tell me so it does not remember so uh there is the

[43:22] forgetting part and the hard forgetting uh implemented so we can tell it uh to hard forget something if needed be which usually is not that kind to the agent but yeah for testing purposes I think it’s okay. So that’s about it. Uh and uh then uh the performance which uh your colleague uh Michael Hunger uh was very keen. Hey what’s the performance uh Michael uh I don’t know if you’re around

[43:53] but this is how I brought it. Initially it was uh higher than that. Um I was like taking several seconds. So it was kind of it was working but not usable. I’m talking that about when we met in uh Berlin in global AI conference that uh say was organizing right and I met some people from Neo forj banger and we were talking about this about the TCK and then the performance was really uh not that not that uh good as today

[44:27] on about midepptember it was about 30 seconds the full around and about uh almost uh two three 4 seconds or even more uh the retrieval part which was terrible but it was working. Um but today the retrieval for a very simple request is about 200 milliseconds and uh as well um some other uh the the memory layer load

[44:59] the neo forj I work a lot in the cipher uh queries and now it’s run from 300 it was a lot more before but uh so this is 25 July yeah so now it’s about 36 milliseconds right So uh and uh after some more optimizations thanks to the tool I show you uh it’s 24 milliseconds. So it’s widely highly optimized and the reason why I can use this in in voice interface when when it wanted to work but I think my system is kind of out of

[45:30] memory the the voice model is loaded in my docker container so it may simply have uh exploded. I hope the um the Neo Forj local that I have because I’m using the local one is stays until the end but yeah so I’m pretty proud of the performance which is following and also about the precision it’s not that far away so what I did is I recall it rejected store so I did an observation I

[46:02] also tried to explain what happens and experiment with other memories policies and thresholds and did a lot of analysis. So it’s a a lot of engineering mindset and one thing which is key I haven’t I have mentioned that I built something called agental where I’m pretty proud to have built [laughter] and it measures memory. So I reimplemented fully beginning of the year long meal. I can run a short long meal to have a grease a grasp of what

[46:34] works and what not and how are we right and then I implemented a new uh benchmark on my own. Um which is type me eval. It measures concretely semantic working episodic procedural temporal perspective all the different kinds of memory in vertical because long meal measures mostly semantic and mixing memory from different places and it’s meant to see how do an agent reacts in a long context meal checks the memory in a

[47:06] vertical slice. It does not care about the context. So usually if you want to use this uh with H&L you disable the chat history and you simply use your memory system. That’s the way to use it. But it has helped me to improve it quite a bit. And this is how we stand. And by the way if anybody wants to check Haval repo this QR brings you to it. It’s in aal hqal

[47:36] and you can give it a start if you like it. I leave it for a moment and then I will go to the next slide. This is where we stand. So I will be very honest. Semantic is the top one working memory forgetting prospective episodic and then temporal the the last ones I’ve been adding them uh between August and September. They are still not uh top also. uh this measurement comes from

[48:06] type name eval which may be quite hard for them. So it’s just a rule that determines that I will get better or not. So the sailing is almost perfection I would say. Uh and by temporal at the moment is off by default. So this is not enabled. That’s why you don’t see it light here. Um yeah long way uh what I mention I measure is about 76 to 90 at 4003 tokens

[48:36] um when I use only the the memory on on the graph database which is not bad and hybrid is 8490 hybrid means I’m using um um the graph database and u chat history as well but then it it it occupies a bit more tokens 22,000. So you know you have to pay for that. And the others what have published is cip 71 to 90.2 uh mem 94.4 which is very high uh but

[49:09] other people say it’s lower I don’t know and super memory inside mastra it’s around that one it’s 81 other’s 91 94 so yeah it’s pretty high on on the master. Yeah. Well, there’s a a war and everybody’s fighting along these long meal which to me is the wrong the wrong rule to measure them. But yeah, that’s just my opinion and doing things bit different. So uh what is done is

[49:39] packages 1.6.1 I think since yesterday it’s in Nougat at the moment is inn net um um it it works perfectly on on ns. So it’s tested, it’s TCK compatible, it works with math, Microsoft GH framework, sematic kernel m, it has an MCP and also has some documentation in Microsoft learn and it has uh now today a recall of 0.2 seconds. So 200 millconds and the model is what takes the most. So that’s

[50:10] why I did the med model local that loses precision but makes it a lot faster because of latency [clears throat] and and yeah then I built this demo brain and time eval so you can watch it and measure the performance and next I love the picture one of my favorite movies I plan extensibility to be able to bring custom memory models and graph rack schemas tailored to the job your agent does I think that’s a good and ka. So you can

[50:41] bring oh now I want to learn uh martial arts. So you bring martial arts model right or one thing that is very cool I was discussing that I think one month ago with William Lion is about the skill distillation that is in Nams. So Nams is an amazing piece of art at the moment. It can distill skills for your agents from the memories. It’s pretty cool. And one thing I want to work is in autolearning. So improve from your own

[51:13] experience. As soon as you have procedural memory, you can improve it and sharpen it and and learn how to do things better and then make it useful for coding agents because if we can achieve 90 95% of the currency with I mean 400 tokens or uh put 5,000 tokens, right? And if you use it with a normal way with files, it would be 100 or 200,000 tokens. I think we’re saving

[51:44] some money here, right? Um, so that’s one of the goals. And then polish it, add the pending memory types completely, measure a bit more and improve the performance and the measurability also. This is what I mentioned about the values and a bit one idea I have around my brain and shaping itself is this is a research right once memory types are plugins the first ones I want

[52:17] to build are not about what the agent knows they are about how it behaves what if agents could remember not just what they discussed but how they behaved while discussing it behavior Consistency memory is the umbrella made of two parts. I call them identity continuity. This is consistent character. Its principles its values. Remember right the values of the starter robots are what say the galaxy they deliver the

[52:47] message right uh isak asimov it were the values and the lows the three robotic lows and then its decisions under pressure and drift detection alignment. That’s the biggest problem we all have. The same agent on Monday and Friday. And then experiential continuity, the relationship continuity. It’s the share history and moments that matter. Yeah. Matter to the agent. I don’t know if you are aware but clothes

[53:18] and other high level reasoning are putting some thoughts and scoring them internally. They are doing that. All right. So it’s basically this experiential continuity as well this relationship continuity the share history and moments that matter no rebriefing every morning to your agent right not dating he already knows what you talk about >> um Jose we are slowly coming to an end how about we answer some questions from

[53:49] the audience >> sure um I think that’s a bit it so my goal is basically to make alignment measurable also to provide a benchmark to check if the agent is aligned by checking the memory and how the agent with that memory responds and also auditable build on the extensibility model [clears throat] right so I think this can help on the alignment problem that companies like anthropic and openai are curious and if anybody’s working on it I

[54:20] like to connect to you and talk to you I’m very interested on that and this is basically adding the proper values will determine the behavior. Uh and that said uh at the start you saw an agent remember Lena memory shouldn’t foil sillingly you should be able to see it and measure it because files can only do so much. Thank you say >> amazing thank you Jose. So, time to take

[54:54] some questions from our lovely audience. So, just a second. Here we go. So, thank you. Thank you, Jose, for the very nice talk and uh an amazing live demo work today. So, you nailed it, which is great. sourcing it live [clears throat] and it was just amazing. So I’ll just go top down. Um the

[55:28] question we have here uh from K Zota is it possible to ask questions about a database as its as it as in its contents? If yes, can I check myself if what happened is true with a query? Would such a query be provided? Can it block sensitive data?

[55:58] >> That’s an interesting question. Um, this is one of the factors where the extensibility part would make its uh thing. One one thing is to talk to it and create some memories, right? using um um the the current uh memory uh types that we have. But maybe we could set up a concrete memory type for database or for AI infrastructure or for um IT infrastructure, right? Um and put it all

[56:28] there uh a custom graph uh for that and add it as a memory type and plug it in and then yes, it could respond to that questions. it could store the information and it would have the queries for that. So yes, and it can block sensitive data. Well, if we build that into the schema, yes, it’s perfectly possible. >> Cool. Amazing. Um, another question from uh Harita.

[57:00] >> What comes first, ontology or knowledge graphs? Is this built out of reading your data model or based on interviews with business? Um so yeah I can I can start maybe you can extend Jose. >> So um as we saw at the beginning of the or during the presentation Jose presented the the schema of his uh of his graph and of course that’s on on a

[57:31] on a on a wider scale. This is the ontology like understanding what kind of nodes, what kind of relationships our graph should have and outlining briefly like what kind of um yeah exactly relationships and nodes we want to um to have on the graph to ingest uh data uh accordingly. So this comes first like this the first part like thinking about the schema and then using uh using technologies like

[58:01] document intelligence which we just launched in public preview or your or or with our graph rack package you can also accordingly start building your knowledge graph and ingest that the content and the documents uh into the graph. What do you think Jose? uh uh I I think it’s a very wide uh detailed question. I would be more simple. I mean ontology is the model, the rules, the vocabulary, what makes the schema, right? And the knowledge graph is the actual facts connected according to the

[58:33] chart model. So to me it’s kind of the chicken and egg thing which to me is kind of uh the graph uh schema is part of the knowledge graph. to me is uh ontology is part of of a graph uh because it’s what defines it, right? It’s what uh shapes it. Make sense? Sounds good. Um another question from Great Work

[59:04] Great Work Alliance 642. >> Oh, >> I’m confused. Uh wait. Um >> yeah. Yeah. >> Yeah. >> It works. Okay. >> Yeah. I’m confused why reasoning model is being used um in this use case. No reasoning should be required for the type of retrieval being demonstrated so far. >> That’s that’s a good one. Uh I mean um it it it depends right. So I’m giving uh first reasoning model for what right? Um

[59:36] I I have uh the embeddings model for the embeddings. So that’s definitely not a reasoning and the reasoning is done for retrieving and also for storing. So and I think it it it shapes a bit uh I have it in low right so it’s not reason that much basically what drives it is interesting story so I’m also a Microsoft MVP Microsoft AI MVP one of the four in Switzerland um and um Microsoft uh gives

[1:00:08] gives to you a bit some benefit of Azure credits for presentations of open source which this open source at the end is contributing on uh Microsoft agent framework. By the way, if uh you went to my last slide on how to use it in math, it’s what points to the Microsoft Asian framework repository uh which explains how to use this um agent memory fornet which is part of the uh uh neoforj ecosystem but

[1:00:39] also of the uh Microsoft ecosystem. So as part of my contributions to the AI ecosystem. So this thanks to this I’m being recognized as a Microsoft AIP aside from some conference talks like this one. Uh and they gave me some credits for Ashure. Um basically before um almost mid of September I was using uh OpenAI model deployed there. Uh well I I’m doing a lot of performance test

[1:01:11] and doing a lot of benchmark to see if things work or not and this consume a hell a lot of money or credits that Microsoft gently gave me. So thank you Microsoft uh and and that’s the reason why I switched very quickly to another provider and this was the fastest model that they had. So that’s a bit the reason why I went with that. Hope it makes sense. Cool. And uh quick [clears throat] question regarding the brain app you built.

[1:01:42] Uh can you run it locally? [snorts] >> If I can run it locally. >> Yeah. >> Um it’s running locally. [snorts] Um the at the moment the new forj database it’s local right. >> Oh perfect cool. >> The um the application is running locally. The embedding model is running locally. The only thing which is not running locally is is the uh is the model the reasoning model that I’m using. Um and yeah, I could run it locally but then we will need like one

[1:02:13] hour more of session to let it think before it can respond because my computer can only do so much. So if anybody wants to sponsor me uh one of the new Apple machines for local inferencing, yeah, I guess we could. But still uh it could run the same model at about 60 or 70 tokens per second with less latency. But that’s the speed. Uh where I’m running them is in bit deer. Uh and the speed is more or less 200

[1:02:43] tokens per second. Well, I guess we cannot beat that yet with local models, [clears throat and cough] but yeah, you can run it locally. >> Cool. So, I think that’s uh pretty much it. So, thanks so much, Jose, for joining us. Um just quickly before we wrap it up here um so big applause to our good friend Jose exciting work what you’re doing in um in Asian memory. So looking forward how we can keep the momentum um going so and collaborate more

[1:03:15] and um yeah so coming up later this uh um this November we are running our developer conference called uh nodes so it’s an online conference it’s virtual so feel free to grab your cup of tea coffee in the evening depending where you are on the planet. And yeah, join us, tune in and listen for some cool uh stories and technical

[1:03:46] sessions around graphs and AI and to keep uh learning to keep the conversation going um you’re welcome to join us of course on Neo Forj Graph Academy. So this is our um school. This is our academy where we um where we teach the latest um um learnings um in in graph technology. So we offer events, workshops and courses

[1:04:17] talking about the latest um yeah advancements in in graph technology. To get started with Neo forj you also have uh we have also our community edition of aura. Let’s plug and play, spin up an aura instance and start building. And uh here we are. So it’s been great talking with you, Jose. Thank you to everyone who join us around the globe and looking forward to yeah to the next one. And uh yeah, let’s um

[1:04:49] let’s keep the excitement going and see you at the next one. Thank you everyone.