Engenharia de harness: construindo a estrutura de produção para agentes especializados poderosos — Mike Chambers, AWS
Autoria: AI Engineer · Assistir no YouTube
Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.
Idioma original: inglês
Vídeo original: Harness Engineering: Building the Production Cage for Powerful Domain Agents — Mike Chambers, AWS · Canal: AI Engineer · 20:19 · Assistir no YouTube
Tópicos: Agentes de IA, Infraestrutura e hardware de IA
Mike Chambers diferencia os agentes que usamos daqueles que construímos e explica como um harness vai além de conectar um modelo a ferramentas. Para agentes destinados à produção e a muitos usuários, é preciso projetar componentes como memória, identidade, runtime, gerenciamento de contexto, observabilidade e evals para que possam escalar. Em uma demonstração, ele apresenta agentes criados com Strands Agents e mostra como o Amazon Bedrock AgentCore pode ajudar a implantá-los e gerenciar capacidades separadamente. A palestra também defende o uso de infraestrutura como código em vez de operações feitas manualmente no console.
Pontos-chave
Seção intitulada “Pontos-chave”- Há uma diferença entre os agentes que usamos e os agentes que construímos; estes últimos exigem atenção ao público e ao contexto de uso.
- Um harness é o conjunto de componentes que envolve o modelo, incluindo ferramentas, memória e a lógica que coordena o agente.
- Agentes de produção precisam de uma arquitetura que considere escala, pagamentos, identidade, runtime, gerenciamento de contexto, observabilidade e evals.
- Separar componentes como memória e loop de execução pode permitir que cada um escale de forma independente.
- O Agent Toolkit for AWS oferece instruções para ajudar agentes de programação a desenvolver para a AWS.
- Implantações em produção devem usar infraestrutura como código, em vez de depender de operações manuais no console.
- O Amazon Bedrock AgentCore pode apoiar a implantação de agentes, o isolamento multi-tenant, a memória e a observabilidade.
- Segundo Chambers, muitos casos de uso podem ser atendidos com um system prompt e ferramentas, sem exigir muito código específico de agente.
Capítulos
Seção intitulada “Capítulos”| Início | Capítulo | Resumo |
|---|---|---|
| 00:16 | Apresentação e trajetória | Mike Chambers se apresenta e comenta sua experiência com IA generativa, MCP e a Linux Foundation. |
| 02:28 | Agentes que usamos e agentes que construímos | O palestrante distingue os dois tipos de agentes e introduz o conceito de harness. |
| 06:48 | O que um agente de produção precisa | A palestra aborda os requisitos de escala, memória, identidade, observabilidade e evals para agentes construídos. |
| 12:07 | Implantação com Amazon Bedrock AgentCore | Chambers demonstra a criação e a implantação de um agente, incluindo opções de memória e execução em escala. |
| 18:05 | Harness configurável e capacidades compostas | O palestrante mostra uma configuração simples de agente e conclui apresentando capacidades do AgentCore que podem ser usadas juntas ou separadamente. |
Citações
Seção intitulada “Citações”Com um agente que você constrói, pense com cuidado. — 03:32
Você pega um agente, remove a parte do modelo e tudo o que sobra é o harness. — 04:36
Não quero ver mais slop ops. — 06:14
Observabilidade e evals são extremamente importantes. — 07:54
Conceitos e entidades
Seção intitulada “Conceitos e entidades”- Harness Engineering (conceito): Abordagem para projetar os componentes que envolvem um agente e permitem operá-lo em produção e em escala.
- Harness (conceito): Conjunto de componentes e mecanismos que resta após separar o modelo de um agente.
- Strands Agents SDK (ferramenta): SDK usado na demonstração para criar agentes e conectá-los a ferramentas.
- Amazon Bedrock AgentCore (ferramenta): Conjunto de recursos da AWS apresentado para implantar agentes e compor capacidades como memória e runtime.
- Agent Toolkit for AWS (ferramenta): Toolkit disponível no GitHub com instruções para ajudar agentes de programação a desenvolver para a AWS.
- MCP (conceito): Protocolo mencionado como forma de conectar agentes a ferramentas e servidores, inclusive para disponibilizar um agente.
- Infrastructure as Code (conceito): Prática defendida para definir e implantar infraestrutura na nuvem de modo controlado, em vez de configurá-la manualmente no console.
- AWS (empresa): Empresa em que Mike Chambers trabalha e cuja infraestrutura e ferramentas são abordadas na palestra.
- Mike Chambers (pessoa): Especialista sênior em IA e developer advocate da AWS que apresenta a palestra.
Tradução completa (pt-BR)
Seção intitulada “Tradução completa (pt-BR)”00:16 Olá, pessoal. Olá, engenheiros de IA. Ainda estamos todos nos divertindo? >> Eu estou me divertindo. Quer dizer, olhem para mim. Estou aqui em cima. Estou adorando. Então, muito obrigado por se juntarem a mim. Quero conversar com vocês sobre harness engineering e coisas desse tipo. Deixem-me dizer quem sou, caso ainda não me conheçam. Meu nome é Mike Chambers e sou defensor de desenvolvedores especialista sênior em IA. Trabalho na Amazon, na AWS. Um pouco
00:47 sobre como consegui chegar aqui, o que é muito empolgante para mim. Há bastante tempo, considerando a IA generativa, lá em 2023, tive o incrível privilégio de trabalhar com Antia, minha colega na época, que agora trabalha na Amazon AGI — vocês provavelmente já a viram neste palco — e com o incrível Dr. Andrew Ing, em um curso sobre IA generativa com LLMs. Posso dizer que estamos chegando a meio
01:19 milhão de inscrições nesse curso? Parece que sim. E, para um curso de três semanas, isso é bem legal. Se não conseguem perceber pela imagem, estou brincando de Transformers com Android. Na época, achei que seria muito engraçado. Em 2025, criei um handler de MCP para Lambda. Até hoje, ele é baixado cerca de 35 mil vezes por mês. Para ajudar as pessoas a fazer, da forma mais simples possível, o serviço de MCP serverless funcionar. Desta vez, vou falar de outras coisas relacionadas a isso. Então, já avançamos além daquele assunto. Em 2026, a AWS é um dos membros fundadores da
01:53 Agentic AI Foundation, parte da Linux Foundation. Estou fazendo um pouco de trabalho nos bastidores nessa iniciativa. Espero fazer muito mais também. Então, esse foi um pouco sobre mim. Enquanto me preparava para esta apresentação — aliás, reli o resumo da sessão e percebi que tinha dito que faria um pouco de programação ao vivo, então vou fazer. Torçam para que tudo dê certo para nós. Mas, enquanto tenho viajado um pouco, como costumo fazer, estive na conferência AI Engineers Summit em Melbourne
02:28 e absorvi bastante coisa, inclusive desde o início desta semana. Queria resumir algumas coisas que tenho observado e sobre as quais tenho pensado, e que realmente quero transmitir, além do que importa para mim. E é isto: existem dois tipos diferentes de agents. Falamos de agents o tempo todo, mas vejo dois tipos distintos. E, enquanto digo isso, vai ficar muito óbvio: são os agents que usamos. Então, vocês sabem, Claude Code, Cursor, Kiro e todos
02:59 esses tipos de ferramentas. E também coisas que não servem apenas para gerar código, mas que usamos para produtividade e coisas do tipo. Usamos esses agents de uma determinada maneira. Existem os agents que usamos. E, do outro lado, temos os agents que construímos. Isso tem mais a ver comigo e, na verdade, também tem mais a ver com esta apresentação: os agents que construímos e como pensamos sobre eles. Acho mesmo que essas duas coisas são bem distintas, e elas também se conectam. Posso construir um agent que você usa, e isso
03:32 continua valendo. Então, maximizem os tokens e façam tudo isso se é o que querem fazer com um agent que usam. Mas, com um agent que constroem, pensem com cuidado. Garantam que estão montando tudo de uma forma que funcione para o público que vai usá-lo. Prometi que falaríamos sobre harnesses e harness engineering. Então, vamos definir harness. Tenho certeza de que não sou a única pessoa a mostrar algo assim. Normalmente não faço esse tipo de coisa e peço desculpas se isso causa arrepios. Esta é a definição de dicionário de harness: um harness é um
04:02 conjunto de correias e fechos usados para controlar um animal. Mas, se tirarmos “animal” daqui e colocarmos “modelo”, a definição fica bem certa, não é? É mais ou menos isso que um harness é. Outras pessoas fizeram um trabalho muito melhor do que simplesmente apresentar a definição básica de dicionário do que é um harness. A LangChain publicou um artigo. Vocês provavelmente já viram coisas desse tipo. O Martinfowler.com, embora Martin não o tenha escrito. Foi Pitta quem escreveu: “Harness engineering para agents de programação”. Agents que usamos, certo? Há outras maneiras de pensar sobre harnesses. E a Amazon, então? Como vemos os harnesses? Bem,
04:36 não, certo, este não é o tipo de harness que queremos. Desculpem. Temos opiniões fortes sobre harnesses. Vou mostrar tudo isso a vocês, mas vendemos todo tipo de coisa. Então, em poucas palavras — e se vocês lerem esses artigos, ou conversarem por aqui neste evento, é claro —, um harness é o seguinte: você pega um agent, remove dele a parte do modelo, e tudo o que sobra é o harness. Certo, então vamos pensar nisso no contexto de um agent que usamos. Acho que é bem simples. Tenho
05:09 este assistente de programação. Provavelmente está na minha máquina. Ele tem acesso aos meus arquivos. E eu crio um harness, ou o lugar onde trabalho criou um para mim, que contém como ele vai usar a memória, as skills que quero que use, ferramentas e servidores MCP para permitir que ele se conecte a servidores de documentação e coisas do tipo. E equipes de engenharia bem organizadas têm seus padrões, que já existem há décadas: padrões de programação. Mas agora, basicamente, elas têm padrões de harness, as coisas que
05:40 querem disponibilizar para os assistentes de programação de todos. Em poucas palavras, é isso. Não vou falar muito mais sobre esse assunto. Mas quero compartilhar um código QR com vocês, e vou tentar avisar um pouco antes de mostrá-lo. Este é o toolkit de agents para AWS. Está disponível no GitHub. É claro que é gratuito. Vocês podem instalá-lo, e ele ajuda se é isso que estão fazendo e se estão disponibilizando código. Se estão fazendo deploy na AWS, pensando em fazer deploy na AWS ou talvez pretendam fazer isso um dia, peguem este toolkit e configurem o agent para ajudar vocês a seguirem na
06:14 direção certa. Há instruções de instalação para praticamente tudo. E o motivo de eu me empolgar com isso é que não quero ver mais slop ops. Antes, sempre rejeitávamos click ops no espaço profissional de desenvolvimento em nuvem. Clicar pela console é ótimo para entender o que está acontecendo, mas não é assim que se faz deploy em produção. Podemos perguntar a um agent o que está acontecendo, mas não queremos pedir que ele crie um bucket do S3, consiga uma instância do EC2, seja lá o que for. Queremos que o agent construa nossa
06:48 infraestrutura como código, que vai fazer isso, para que continuemos sendo responsáveis pelos nossos deploys na nuvem. Então, chega de slop ops. Certo. Esse é o agent que usamos. Agora, vamos falar do agent que vamos construir. Vou entrar no código o mais rápido que puder e vamos fazer o máximo que der tempo. Como pensamos em um harness em relação ao agent que estamos construindo? É exatamente igual até certo ponto. Sim. Ainda queremos saber: como vamos gerenciar a memória? Como vamos gerenciar as skills e as ferramentas em MCP? A propósito, isso envolve muita coisa, certo? Porque vocês podem
07:22 basicamente estender um agent para fazer quase tudo o que você quiser, com vários tipos diferentes de ferramentas, que podem ser acessadas via MCP. Mas, com um agent que estou desenvolvendo, preciso pensar em muito mais do que isso, especialmente se, como na Amazon, estou fazendo deploy do meu agent para o público em escala de nuvem. Então, como faço para gerenciar o loop? Como gerencio o escalonamento de pagamentos, memória, identidade, skills, runtime, gerenciamento de contexto, o resto de tudo isso? E deixei para falar por último daquilo que deveria
07:54 ser a primeira coisa que eu digo: observabilidade e evals são super, superimportantes. Como lidamos com isso, de fato? Escrevo todo esse código em um único container, faço deploy e escalo esse container? Não exatamente. Se quiser escalar para milhares de usuários, preciso pensar em cada um desses componentes individualmente e em como vou escalá-los separadamente. Para mim, isso é engenharia de harness. Este é o lado sério das coisas. É nisso que precisamos trabalhar para que os harnesses funcionem em escala real. Certo, vamos ver
08:26 se isso funciona. Consigo sentir toda a boa vontade de vocês sendo enviada na minha direção, para tentarmos fazer um código funcionar. Estou aqui no Kira. Este é meu IDE preferido. Tenho algumas amostras diferentes pelas quais vamos passar rapidamente, enquanto vemos o relógio fazendo a contagem regressiva. Então, só para garantir que estamos todos na mesma página e que vocês consigam ver isto: a propósito, entre os códigos que vou mostrar, um deles — não este — foi gerado pelo Curo. Todo o restante ou é uma ferramenta ou este
08:57 eu mesmo escrevi. Não usei um agent para isso. Sei que mereço uma salva de palmas, mas tudo bem. [risos] Então, este é um agent do Strand. Usei o SDK do Strand agents. Espero que esse tipo de coisa seja familiar. Importeis um agent, importei o decorador de ferramentas e estou criando um agent. A definição da ferramenta está aqui embaixo. Então, só passo meu system prompt. As coisas são bem simples nesta etapa, e passei algumas ferramentas. A calculadora é algo que posso instalar como uma biblioteca, e obter a hora é
09:31 o que sempre usamos, porque não costumo usar agents para reservar voos, certamente não agents como este. Então, posso dizer algo simples aqui, como: que horas são? Não vou executar isso porque vocês sabem que horas são, mas dá para ver, em geral, como funciona. Isso é um harness? Mais ou menos. Não tem muita coisa, certo? Temos as ferramentas aqui. O framework está gerenciando nosso loop. Isso é bem legal. Ótimo. Mas, obviamente, se eu executasse isto, estaria rodando no meu laptop. Não estaria rodando em nenhuma escala específica. E faltam alguns dos atributos que
10:03 quero nos agents que vou colocar em deploy. Vou passar rapidamente para meu próximo agent. Este também é um agent do Strand, mas pedi ao Kira para escrevê-lo para mim para esta sessão, porque queria incluir mais algumas coisas. Então, dentro deste agent, a principal coisa que quero destacar é que incluí um gerenciador de sessão. Meu gerenciador de sessão me ajuda a manter o estado da sessão entre as invocações. Isso é uma espécie de memória, algo como memória de curto a médio prazo. Não é
10:35 uma memória de longo prazo propriamente dita, mas está lá. E, na verdade, ele armazena memórias de longo prazo em arquivos, que estão aqui na lateral e que ele incluiu para nós. Se eu rolar para baixo, vocês podem ver: sim, aqui está a definição do agent. Temos um system prompt um pouco mais elaborado, porque o Kira não conseguiu se conter. E temos algumas ferramentas definidas aqui, incluindo uma ferramenta de lembrança que o agent pode decidir usar para se lembrar de coisas sobre mim. E então tenho meu gerenciador de sessão aqui embaixo. E esse gerenciador de sessão vai
11:06 restaurar o histórico da conversa quando eu voltar para conversar com ele da próxima vez. E talvez a próxima vez seja agora. Vamos ver se conseguimos fazer isso funcionar. Mais uma vez, isto está rodando na minha máquina local. É uma demonstração. Então, vou digitar apenas “olá”, porque tenho medo de digitar demais e escrever algo errado. E ele diz: “Sim, continue me testando. Manda ver.” Excelente. Quem vai ganhar a Copa do Mundo? Obviamente, preciso saber
11:37 disso. E o que ele diz? Sim. Embora você pudesse simplesmente dizer “Austrália”, ele sabe que eu quero que a Austrália vença. É onde estou morando atualmente. Sou australiano. Então, obviamente, a Austrália vai ganhar a Copa do Mundo. Mas por que ele sabe disso? Por causa das conversas anteriores que tivemos. E, obviamente, ele está sendo honesto ao dizer que não faz ideia, porque isso vem do LLM, é claro. Certo, vimos alguns agents diferentes, passei por tudo rapidamente. Isto está rodando na minha máquina. Então, isso
12:07 não me leva exatamente à escala de nuvem, claro. Estou escolhendo e incluindo vários componentes, como memória. Vamos para o próximo. Como chego ao ponto em que posso fazer deploy de algo assim — se não deste agent específico — em escala de nuvem e fazer deploy de componentes como a memória separadamente, para que possam escalar de forma independente? Tirar nosso loop dali para que possa escalar separadamente, e então adicionar também todos os tipos de outras coisas. Para fazer isso, vou usar algo chamado agent core. Temos o Bedrock
12:41 Agent Core. Faz parte da stack que temos na AWS, e é assim que estou fazendo isso e realizando o deploy. Já fiz isso, mas quero mostrar como começar e como fazemos. Se eu for até aqui, sim, estou pronto. Tenho uma ferramenta de linha de comando na minha máquina, a linha de comando do Agent Core. Como vocês podem imaginar, há um código QR no final para vocês acessarem isto. Mas posso usar essa ferramenta para me ajudar a fazer deploy do meu agent. Agora, ela me guia pelo processo, como fazem muitas ferramentas desse tipo. E
13:13 vai me guiando: o que você quer fazer? Este é meu agent “woohoo”. Vai me perguntar várias coisas, e quero mostrar um pouco disso enquanto avançamos. Curiosamente, não vou selecionar harness. Já volto ao motivo de não selecionar harness, mas estou dizendo que quero fazer deploy de um agent. O que vai acontecer é que essa ferramenta de linha de comando vai me guiar pelo processo e escrever um agent inteiro. É basicamente um agent “hello world” que posso personalizar depois. Usar essa ferramenta de linha de comando é uma maneira fácil de começar a usar
13:44 o Agent Core. Vou manter o nome padrão. Na verdade, provavelmente vou manter todos os padrões aqui, só para vermos quais são as opções. Claro que posso trazer código, se quiser, mas vou pedir que ele crie código para mim. Então, ele pergunta: o que você quer, Python ou TypeScript? Antigamente, eu fazia coisas como funções de ativação e retropropagação no campo de machine learning. Então, para mim, Python. Vou escolher essa opção. Há algumas opções de deploy. Também tem esta opção. Só quero destacar: como podemos nos conectar ao nosso agent?
14:15 Então, nosso agent, que está rodando em escala na nuvem, provavelmente deve usar HTTP, que é a opção mais óbvia, mas talvez queiramos disponibilizá-lo por trás do MCP. Talvez queiramos usar coisas incríveis e pequenas, como AGUI, para criar agents de chat interativos e agradáveis, mas vou dizer HTTP. Podemos usar qualquer framework que quisermos. Eu, por acaso, uso o SDK de agents do Strand, mas você pode usar qualquer coisa, escrever seu próprio framework se quiser ou seu próprio código-base. Isso também oferece suporte a qualquer modelo. Então, não precisamos usar apenas os modelos da Amazon. E não precisamos
14:48 usar os modelos do Amazon Bedrock, mas podemos usar qualquer modelo. Estou usando este aqui. Estou usando o Sonic 4.5 só porque é o que me é oferecido por padrão. E aqui está a memória. Então, esta é a única coisa que eu queria mostrar a vocês. Posso vir aqui e pedir que a memória de longo e curto prazo seja implantada. Já vamos ver o que isso significa, mas, basicamente, isso vai criar para nós uma infraestrutura na nuvem que vai gerenciar essas memórias separadamente do nosso agent, funcionando de forma assíncrona em relação a ele e, claro, conectada a ele. Obviamente, há outros tipos de coisas que podemos
15:18 fazer. Podemos pressionar Enter, e ele começará a criar a configuração desse agent na minha máquina. Agora vou pular para cá e voltar ao código que tenho, porque, claro, já fiz isso. E este é o agent que ele implantaria agora. Algo assim. Então, montamos isso aqui. É um pouco mais complexo. Este é um agent do Strands. Vocês vão notar que foram adicionadas mais algumas coisas. Ele tem a integração com o Amazon Bedrock AgentCore. Mas, fora isso, é basicamente tudo de que vocês precisam para conseguir escalar esse agent durante a execução e
15:53 fazer isolamento multi-inquilino. Assim, vocês podem escrever um agent que funciona para um usuário e depois escalá-lo sem precisar escrever todo o código multi-inquilino. Isso representa uma enorme economia de trabalho e, do ponto de vista da segurança e da identidade, torna tudo muito mais simples. É muito, muito útil. Se eu rolar a tela para baixo, vocês podem ver que o restante parece bem parecido. Temos algumas ferramentas de teste aqui. Temos uma conexão com o MCP, então podemos ver como isso é feito. E temos a conexão com nosso gerenciador de sessões e
16:25 nossa memória, tudo integrado aqui. Se eu rolar mais um pouco para baixo, vamos encontrar o ponto em que realmente invocamos a coisa, que está aqui. E o system prompt está em algum lugar no início. Podemos percorrer esse código. Estou passando por ele rapidamente. Vocês também podem escrever seu próprio código e fazer isso com ele. Se eu voltar ao meu código por um segundo, estou na pasta que foi criada com esse código localmente. Ele já está implantado, mas vamos supor que ainda não esteja. Posso voltar aqui e digitar agentcore dev. E o que isso vai
16:59 fazer para mim, se o Wi-Fi permitir, é abrir um navegador. Dentro desse navegador, estaremos conectados ao agent rodando localmente. Então, se eu fizer alterações nesse código, vamos vê-las aqui em tempo real. Posso dizer: “Olá, estou fazendo a apresentação agora”. Ele sabe que vim fazer uma apresentação — pelo menos acho que sabe. E então, sim, vocês podem interagir com o agent aqui. Podem fazer ajustes no código e vão vê-lo ser atualizado ao vivo aqui. Mas também podem usar isso para alternar para
17:33 a versão implantada ao vivo. Com o agent core deploy, ele usará infraestrutura como código, como mencionei antes, para implantar seu agent em escala, com a memória, o agent, o runtime e muitos outros componentes, se vocês quiserem. Depois, vocês podem usar essa interface para consultar traces, ver as memórias armazenadas e tudo mais, para depurar e entender o que está acontecendo. Quando passamos pela interface do console há pouco, pelo aplicativo da CLI, não
18:05 escolhemos um harness. Pulei essa parte e vou mostrá-la rapidamente agora. Uma alternativa é — acho que já dá para entender — que vocês me viram implantar agents. Não fiz muita coisa. Apenas defini um system prompt, algumas ferramentas e pronto. E há um argumento de que, se isso é possível, talvez 80% dos casos de uso agentic e 80% do desenvolvimento de agents já estejam praticamente resolvidos. Não precisamos fazer muito mais do que definir um system prompt, conectar algumas ferramentas MCP e temos o que queremos. E, se for esse o caso, temos um harness integrado ao agent core. Esta é a
18:40 configuração de um agent. Tenho apenas um JSON simples que mostra qual modelo quero usar e qual system prompt quero usar. Não dá para ser muito mais simples do que esse system prompt. E isso também pode ser implantado com agent core deploy. Então, neste ponto, nem sequer temos código agentic. Podemos simplesmente implantá-lo diretamente. Se quiserem saber mais sobre qualquer uma dessas coisas, venham falar conosco no estande ou falem comigo depois desta sessão. Terei todo o prazer em conversar com vocês sobre isso em detalhes. Dezoito minutos é muito pouco tempo para eu falar sobre quase
19:13 tudo. Mas, essencialmente, estes são todos os componentes mostrados aqui. Há algum mapeamento para algum recurso do Agent Core. Peço desculpas pelas cores. Na hora, pareceu uma boa ideia. Mas esta é uma visão geral dos diferentes recursos componíveis do agent core. Vocês podem escolher qualquer um deles e usá-los juntos ou separadamente. Se têm um agent rodando em produção e funcionando muito bem neste momento, mas gostam da ideia de ter a memória de longo prazo gerenciada para vocês de forma serverless, podem
19:47 simplesmente usar essa parte e integrá-la. É totalmente possível fazer isso. Aqui está um código QR. Desculpem, provavelmente deveria tê-lo colocado ali há pouco. Vou mover este código QR daqui a pouco, mas o Amazon Bedrock Agent Core é isso. Se vocês tiverem interesse nos agents do Strands, que estou usando aqui, ele é, obviamente, gratuito por ser open source. É um framework que prioriza os modelos para montar agents. É super-rápido, superpoderoso e é o que uso o tempo todo. Muito obrigado por estarem comigo nesta apresentação. Fiquem à vontade para entrar em contato comigo pelo
20:19 LinkedIn. Adoraria continuar a conversa com vocês. Aproveitem o restante do evento e façam uma boa viagem de volta para casa depois do evento. Muito obrigado.
Transcrição original
[00:16] Hello everybody. Hello AI engineers. Are we all having a good time still? >> I’m having a good time. I mean, look at me. I’m up here. I’m loving this. Um, so yeah, thanks so much for joining me. Um, I want to come and talk to you all about harness engineering and all that kind of stuff. Um, let me tell you who I am in case you’ve not met me before. Um, my name is Mike Chambers and I’m a senior AI specialist developer advocate. Um, and I work at Amazon at AWS. Um, little
[00:47] bit about like uh how I managed to get to stand here which is a very exciting time for me. Um so um quite a while ago in terms of generative AI anyway back in 2023 um I had the amazing awesome privilege uh to work with Antia my colleague at the time and now she works for Amazon AGI you’ve probably seen her on this stage before um and the amazing Dr. Andrew Ing on on a course about generative AI with LLMs um sort of can I say that we’re approaching half a
[01:19] million enrollments with that? It looks like that’s the case. And on a three-week course, that’s pretty cool. If you can’t tell, in that image, um, I’m playing Transformers with Android. That seemed like a really funny thing to do at the time. Um, in 2025, I created an MCP Lambda handler. It’s downloaded still to this day about 35,000 times a month. Um, to help people in some of the simplest ways of getting serverless MCP serving happening. Um, I’m going to talk about other things in relation to that this time. So, we’ve moved on from that. Um and in 2026, so the AWS is actually one of the founding members of the
[01:53] Aentka Foundation, part of the Linux Foundation. Um I’m doing a little bit of work behind the scenes on that. Hope to do a lot more of that as well. So little bit about me. Um so as I’ve been um preparing for this, oh by the way, I did reread the abstract for this session and realized I said I’d be doing some live coding and so I will. So all combined fingers crossed please that that all works for us. Um but as I’ve been sort of traveling around a little bit as I do and I was at the AI engineers uh session uh summit uh uh conference in Melbourne
[02:28] um and took a lot of it in and also from the beginning of this week as well. I just wanted to to to summarize some of the things that I’m seeing and I’m thinking and I really want to get across and and what really matters to me and that’s this. There are two different types of agents. Um, so we talk about agents all the time, but I see two distinct types of agents. And as I say this, it’s going to become really obvious, but they’re the agents that we use. And so, you know, this is claude code and cursor and kirao and all of
[02:59] those types of things. And also things that don’t just generate code, things that we use for productivity and the like as well. And so those agents we use in a certain type of way. There’s the agents that we use. And then on the other side of it, we’ve got the agents that we build. And that’s actually more to do with me and and actually it’s more to do with this presentation as well. It’s agents that we build and how we think about agents that we build. Um and and so I do really think that these don’t two things are quite separate and they chain together as well. I might build an agent that you use and this
[03:32] still holds true. So token maxing, all that kind of stuff, go for it if that’s what you want to do with an agent that you use. But with an agent that you build, think about it carefully. Make sure that you’re putting it together in a way that’s going to work for the audience who’s going to use that. So, I promised that we were talking about harnesses and harness engineering. So, let’s define harness. I’m sure I’m not the only person to have put something like this up. I don’t usually do this kind of thing and apologize if it makes your skin crawl. This is a dictionary definition of harness. A harness is a
[04:02] set of straps and fastenings used to control an animal. But if we took animal out of here and put model in there, then actually it’s pretty right, right, that that’s kind of what a harness is. Other people have done a much better job than just the basic dictionary definition of what a harness is. So Lang Chain has got a article out. You’ve probably seen stuff like that. Martinfowler.com although Martin didn’t write it. It was Pitta wrote this. Harness engineering for coding agents. Agents that we use, right? So there are other ways of looking at harnesses. What about Amazon then? How do we see um harnesses? Well,
[04:36] um no, okay, this is the wrong kind of harness. Sorry, we do have strong opinions on harnesses. I’m going to show you all of that, but we sell all kinds of things. So, in a nutshell, and if you read those articles, um and if you’ve had the conversations around here at this event, of course, um a harness, you take an agent, remove the model part from it, and everything that you have left, that’s the harness. Okay, so let’s think about that in context of an agent that we use. And so it’s pretty, I think, fairly straightforward. I have
[05:09] this coding assistant. It’s probably on my machine. It has access to my files. And I create a harness or the place I work at has created a harness for me which contains um how it’s going to use memory, the skills that I want it to use, tools and MCP servers to allow it to go to be able to go and connect to documentation servers and the like. and and well set up engineering teams have got their standards that they’ve had. They’ve had coding standards for decades, but now they have basically harness standards, the things that they
[05:40] want to deploy to everybody’s coding assistance. So, in a nutshell, that’s what it is. I’m not going to talk to too much more about that. Um, but I do want to share one QR code with you, and I’ll try and give you a little bit of warning before I bring QR codes out. This is the agent toolkit for AWS. This is u available on GitHub. Of course, it’s free. You can install it and it helps you if this is what you’re doing and you’re deploying code. If you’re deploying on AWS or you’re thinking about deploying on AWS or or maybe you will one day, grab this toolkit, enable your um uh agent to to help you in the
[06:14] right direction. It’s instructions for how to install it on pretty much everything. And the reason why I get passionate about this is because I don’t want to see any more slop ops. Um, so we always used to push back against click ops in, you know, in the professional cloud development space. Clicking around on the console is great for being able to figure out what’s going on, but it’s not how you deploy things into production. We can ask an agent what’s going on, but we don’t want to ask the agent to spin up an S3 bucket, get me an EC2 instance, whatever it might be. We want the agent to build up our
[06:48] infrastructure as code which is going to go and do that so that we still own our deployments in the cloud. So no more swap ops. Okay. So that’s the agent that we use. Now let’s go and talk about the agent that we’re going to build. And I’m going to get into the code as quickly as I can and we’ll do as much as it has time for. So how do we think about a harness in relation to the agent that we’re building? Exactly the same to a point. Yes. We still want to have how are we going to manage the memory? How are we going to manage the skills and tools in MCP by the way that that belies a lot of stuff, right? Because you can
[07:22] pretty much extend an agent to do almost anything you want with a whole bunch of different types of tools which could be via MCP. But with an agent that I am building, I need to think about a lot more than just that. especially if um like at Amazon and like at cloud scale I’m deploying my agent out to the masses. So how do I actually manage the loop? How do I manage um scaling payments, memory, identity, skills, runtime, context management, the rest of it and I have left it to the last thing but it should
[07:54] be the first thing that I say. Observability and evaluations super super important. How do we actually deal with this? Do I write all of this code down into one container and just deploy it and scale that? Not really. If I want to be scaling to thousands of users, I need to think about each individual of these components and how I’m going to scale them out individually. And that to me is harness engineering. This is the serious side of stuff. This is the big stuff that we want to get harnesses working at real scale. Okay, let’s see
[08:26] if this works. I can feel your combined goodwill being sent my way that we’re going to try and make some code work. So, I’m here in Kira. This is my IDE of choice here. And I’ve got a few different samples that we’re just going to race through watching that clock countdown fast. So, um just just make sure that we’re all on the same page here and hopefully you can all see this. Um of the code which I’m about to show you, by the way, one piece of code, not this one, has been generated by Curo. Everything else is either a tool or this
[08:57] one I actually wrote it myself. I didn’t use an agent for this. I know I deserve a round of applause, but it’s okay. [laughter] So, this is uh this is a Strand agent. So, I’ve just taken the Strands agents SDK. Um, and hopefully this kind of thing is kind of familiar. I’ve brought in an agent. I brought in the tool decorator and I’m creating myself an agent. The tool definition is down here. Um, and so I just pass in my system prompt. Things are pretty simple at this stage and I’ve passed in a couple of tools. Calculator is something that’s a library I can install and get time is
[09:31] the one that we always use because I don’t tend to use agents to book flights certainly not ones like this. Um and so I can say something simple here like what is the time? I’m not going to run this because you know the time but you can see generally how this works. Is this a harness? Sort of. There’s not an awful lot to it, right? We’ve got the tools in there. Our loop is being managed for us by the framework. This is pretty cool. So that’s good. But obviously if I was to run this, this is running on my laptop. It’s not running at any particular scale. And we’re missing some of the attributes that I
[10:03] want from the agents that I’m going to deploy. Let me move on to my next agent quickly. So this is also a strand agent, but this one I actually asked Kira to write it for me for this session um because I wanted to include some more stuff. And so inside of this agent, the one main thing that I want to point out is that I am uh included a session manager. So my session manager is helping me to maintain session state between invocations. So this is a sort of memory. It’s a kind of medium-term short-term memory kind of thing. It’s
[10:35] not proper long-term memory, but it is there. And actually, it does store long-term memories in files which are down the side here that it’s uh included for us. So, if I just scroll down here, you can see uh yeah, here’s the agent definition itself. Um, and we’ve got a bit more of a system prompt because Kira couldn’t help itself. Um, and we’ve got some tools here defined. Um, including a remember tool that the agent can decide to use to remember stuff about me. Um, and then I’ve got my uh session manager down there. And that session manager is
[11:06] going to rehydrate the conversation history when I come back to chat to it the next time. and maybe the next time is now. So, let’s see if we can get this working. Now, again, this is running on my local machine. Um, and this is a demo here. So, let’s just type in hello because I’m scared of typing too much and spelling it wrong. Um, and it says, uh, yeah, keep testing me. Bring it on. Excellent. Um, um, who will win the World Cup? So, obviously I need to know
[11:37] this. And, um, what does it say? Yeah. So, while you could just say Australia, it knows I want Australia to win. It’s where I’m currently living. I’m Australia. So, obviously Australia is going to win the World Cup, but why has it got that? It’s because of previous conversations that we’ve had. And obviously, it’s being honest that it has no clue because that’s coming from the large language model, of course. So, okay, looks at a couple of different agents there, blasted through this. This is um running on my machine. So this
[12:07] isn’t really getting me to clouds scale of course and I’m I’m picking up and I’m including various pieces in this like memory. So let’s go next. How do we get to the point where I can deploy something like this if not this actual agent out at cloudscale and take things like memory and deploy that separately so it can scale separately. taking our loop out so it can scale separately and we can then bolt in all kinds of other things as well. So in order to do that I’m going to use something called um agent core um and so we have bedrock
[12:41] agent core. It’s part of the stack that we have at AWS and that’s how I’m doing this and how I’m deploying. So I’ve done that already but I want to show you how to start out with that and how we do this. So if I go to here uh yeah I’m ready to go. So, I have a command line tool on my machine, the agent core command line. Um, and so there’s a QR code at the end, as you might imagine, so that you can get hold of this. Um, but I can use this to help me deploy my agent. Now, this steps me through like many of these types of tools do. Um, and
[13:13] it sort of steps me through what do you want to do? So, this is my woohoo agent. Um, and it’s going to ask me a bunch of stuff. And I wanted to show you some of this as we step through. Now, strangely, I’m not going to select harness. And we’ll come back to why I’m not selecting harness in a second, but I’m saying I wanted to deploy an agent. And what’s going to happen here is this command line tool is actually going to step me through and actually write an entire agent. It’s basically a hello world agent that I can then go and customize myself. Um, and so using this command line is an easy way to get started with
[13:44] agent core. So I’m going to keep the default name. In fact, I’m probably going to keep all the defaults here just so we can see what’s the option. Of course, I can bring code if I want, but I’m going to ask it to create some code for me. So, it says, well, what do you want? Python or TypeScript? And back in the day, I used to do things like activate functions and back propagation in the machine learning space. So, Python it is for me. So, I will choose that. Um, and there’s some deployment options. There’s also this I just want to point this out like how can we actually go and connect into our agent.
[14:15] So, our agent that’s running at scale in the cloud, HTTP is probably the obvious one, but we might want to have it being served behind MCP. We might want to use awesome little things like AGUI so we can make nice interactive chat agents, but I’m going to say HTTP. We can use any um framework we want. I happen to use Strand’s agents SDK, but anything you could write your own framework if you want to um or your own own base code. Any model is supported by this as well. So, we don’t just have to use the Amazon models. Um, and we don’t have to
[14:48] use the ones from Amazon Bedrock, but we can use any model. I’m using the one here. I’m using Sonic 4.5 just because that’s offered to me at default. And here’s memory. So, this is the one thing I wanted to show you. So, I can come in here and ask for long-term and short-term memory to be deployed. And we’ll see what this means in just a second, but it’s basically going to create for us cloud infrastructure which is going to manage those memories for us separately from our running agent running asynchronously from our agent and connected of course. So there’s obviously other kinds of things we can
[15:18] do. We can hit enter and it will start to create the configuration of this agent on my machine. Now I’m going to skip over here and come back to the actual code I have because I’ve already done this of course. Um, and this is the agent that it would be currently deploying. Something like this. So, we’ve built up here. This is a little bit more complex. So, this is a strands agent. You’ll notice that it’s got a few more things added in. So, it’s got the linkage into Amazon Bedrock agent core app, but pretty much apart from that, that’s all you need in order to be able to scale this agent out at runtime and
[15:53] do multi-tenant isolation. So you can write an agent that works for one user and then scale that out without you having to write all the multi-tenented code. It’s a massive saver and from a security and identity perspective, it’s makes it so much simpler. It’s um it’s very very useful. So if I scroll down through here, you can see the rest of it is looking pretty similar. We’ve got some test tools in here. We’ve got a connection to MCP, so we can see how that is done. Um, and we’ve got the uh connection into our session manager and
[16:25] our memory which is all built in here. So, if I scroll down a bit more, we’ll be able to see somewhere where we actually invoke the thing um which is there. Um, and the system prompt is is somewhere at the top. So, we can we can scroll through this code. I’m going through it quickly. You can write your own code and do this with it as well. If I go back over to my um uh code here for just one second. I’m in the folder now that has been created with that code locally, it is actually deployed, but let’s assume it’s not deployed quite yet. I can come back in and type in agentcore dev. And what that’s going to
[16:59] do for me um Wi-Fi permitting is it will spin up for us a web uh browser. And inside of that web browser, we’re now connected to that agent running locally. So if I make updates to that code, we would see that happen in real time here. So I can say hello, I am doing the press now. Um it knows that I’m coming to do a presentation, but I think it does anyway. Um and so yeah, you can interact with the agent here. You can make adjustments to the um to the code and you’ll see it update live here. Um but you can also use this to switch over to
[17:33] the live um deployed version. So with agent core deploy it will use infrastructure as co code like I talked about before to deploy your agent out at scale with the memory with the agent with runtime and with many other components if you choose to do so you can use this interface then to go and look at traces look at memory stored look at all that stuff so that you can debug and see what’s going on. Now, when we stepped through the um the the the console just a second ago through the the CLI app a second ago, we didn’t
[18:05] choose harness. I skipped out on that one and I’m just going to show you that quickly now. So, one thing we can do instead is I think we can get to the point you’ve seen I’ve deployed agents. I didn’t do very much. I just did a system prompt and some tools and go. And there’s an argument to be made that essentially if that’s possible then maybe 80% of um agentic use cases 80% of agent development is kind of solved already. We don’t need to do much more than system prompt connect to some MCP tools and we’ve got what we want. And if that’s the case then we have harness built into agent core. This is the
[18:40] configuration for an agent. I just have a simple JSON which is showing me which model do I want to use and what system prompt do I want to use. Can’t get much more simpler than that system prompt. Um, and then this can also be deployed with agent core deploy. So at this point we don’t have even any agentic code either. We can just deploy it straight out. If you want to know any more about any of this then please do come and see us down on the booth or see me after this session. I’ll be more than happy to talk to you at length about this. 18 minutes is such a short amount of time for me to be able to talk about almost
[19:13] anything. But this is essentially all of these components on here. There’s a mapping somewhere into something that Agent Core has. I apologize for the colors. It seemed like a good idea at the time. Um, but this is an overview of the different capabilities that are composable out of agent core. So, you can take any of these and use any of them together or separately. If you have an agent that’s running in production very happily at the moment, but you like the idea of having long-term memory managed for you serverless, then you can
[19:47] just take that part and integrate it. That’s totally something you can do. Here’s a QR code. Sorry, probably should have put that there a second ago. I’m moving this QR code in just a moment, but Amazon Bedrock agent core is that if you’re interested in the Strands agents, which I happen to be using for this, it’s obviously it’s it’s free because it’s open source. Um, and it’s a um a model first framework for putting together agents. It’s super fast, it’s super powerful, and it’s what I use all the time. Thank you so much for being with me in this presentation. Please feel free to connect with me on
[20:19] LinkedIn. I’d love to carry on the conversation with you. have a fantastic rest of show and have a safe travel as you go home after the event. Thank you so much.