Os agentes gerenciados open source
Autoria: Sam Witteveen · Assistir no YouTube
Vídeo de autoria do canal indicado, não da IANIA; todos os direitos pertencem ao criador. Transcrição, resumo e tradução gerados automaticamente; o conteúdo no idioma original é preservado na versão em idioma original.
Idioma original: inglês
Vídeo original: The OpenSource Managed Agents · Canal: Sam Witteveen · 20:16 · Assistir no YouTube
Tópicos: Agentes de IA, Modelos locais e open source, Open source e ecossistemas de software, Privacidade e proteção de dados
Sam Witteveen apresenta o TrueForge, um harness de execução de agentes autogerenciado, open source e com licença MIT, que pode rodar localmente ou em uma nuvem privada. A proposta é oferecer recursos de agentes gerenciados — como persistência de sessões, execução de ferramentas e uma interface de teste — sem prender o usuário a um provedor ou modelo específico. O vídeo destaca que o harness pode influenciar bastante o custo, pois determina o uso de ferramentas e tokens, e mostra uma demonstração com modelos, conectores e skills configuráveis. A apresentação também aborda limitações atuais, como a configuração de sandboxes, e cita possíveis recursos futuros do projeto.
Pontos-chave
Seção intitulada “Pontos-chave”- O TrueForge é apresentado como uma alternativa open source e com licença MIT aos serviços de managed agents hospedados por provedores.
- O harness pode ser configurado para usar diferentes modelos, ferramentas, MCP servers e skills.
- Segundo um benchmark citado no vídeo, o TrueForge reduziu em 30% o custo por execução em comparação com Claude Managed Agents, mantendo a mesma precisão no teste descrito.
- O harness influencia o custo ao decidir quais ferramentas usar, em que ordem e o que incluir no context window.
- Rodar agentes localmente ou em uma nuvem privada pode ajudar a evitar dependência de um provedor e atender a requisitos de privacidade e conformidade.
- A interface de chat funciona como um ambiente para testar agentes; o runtime também pode ser acessado por HTTP API e TypeScript SDK.
- Na demonstração, o apresentador configura um agente de notícias de IA com DeepSeek Flash 4.1 e Tavily.
- O vídeo aponta a execução local em sandbox como uma área a desenvolver, além de mencionar futuras integrações de gateway.
Capítulos
Seção intitulada “Capítulos”| Início | Capítulo | Resumo |
|---|---|---|
| 00:00 | O que é o TrueForge | O apresentador introduz o TrueForge como um harness autogerenciado, local e open source, e diferencia categorias de harnesses para agentes. |
| 04:18 | Custos e dependência de provedores | O vídeo explica como o harness afeta o uso de tokens e apresenta um benchmark, além de discutir custos, privacidade e lock-in. |
| 09:07 | Configuração e interface | O apresentador descreve a instalação local do TrueForge, seus modos de execução e as opções para configurar modelos, conectores e skills. |
| 14:25 | Demonstração de um agente de notícias | O vídeo mostra a criação de um agente que pesquisa notícias de IA usando Tavily e um modelo DeepSeek. |
| 18:43 | Uso em aplicações e próximos passos | O apresentador demonstra o acesso ao agente por Python e comenta a roadmap, incluindo integrações e execução local em sandbox. |
Citações
Seção intitulada “Citações”Construir um agente é fácil, mas fazê-lo funcionar bem não é. — 03:43
Mesmo modelo, mesmas respostas, com aproximadamente um terço dos tokens. — 06:27
O harness, não o modelo, costuma determinar os custos do agente. — 07:00
A interface de chat é o ambiente de teste. — 09:39
Conceitos e entidades
Seção intitulada “Conceitos e entidades”- TrueForge (repo): Projeto open source com licença MIT para configurar e executar agentes em infraestrutura própria.
- TrueFoundry (empresa): Empresa que criou o TrueForge e patrocinou o vídeo.
- Sam Witteveen (pessoa): Apresentador do vídeo, que demonstra o TrueForge e explica diferentes categorias de harnesses.
- Claude Managed Agents (ferramenta): Serviço de agentes gerenciados usado no vídeo como referência de runtime hospedado.
- Gemini Managed Agents (ferramenta): Serviço de agentes gerenciados do ecossistema Gemini mencionado na comparação.
- LangGraph (ferramenta): Framework citado como exemplo de opção em que o desenvolvedor conecta componentes e implementa o loop do agente.
- DeepSeek V4.1 Flash (modelo): Modelo configurado pelo apresentador para demonstrar o uso do TrueForge.
- Tavily (ferramenta): Ferramenta de busca usada como conector no agente de notícias de IA demonstrado.
- Ollama (ferramenta): Ferramenta mencionada como opção para executar modelos localmente.
- LM Studio (ferramenta): Ferramenta mencionada como opção para executar modelos localmente.
Tradução completa (pt-BR)
Seção intitulada “Tradução completa (pt-BR)”00:00 Certo, então: neutro em relação a fornecedores, licenciado sob MIT, no seu próprio hardware e sem uma conta de runtime. Essas são todas coisas que o Claude Managed Agents não oferece. A nova Agent API da OpenAI e o Gemini Agents também não oferecem essas coisas. Mas todas elas estão presentes no sistema de agent que vou mostrar hoje. Hoje, quero falar sobre uma maneira de executar agents gerenciados totalmente localmente ou na sua própria nuvem privada, com qualquer modelo que você quiser, adicionando as ferramentas que você
00:32 quiser, as skills que você quiser, os MCPs que você quiser, e podendo fazer tudo isso com muita facilidade, sem precisar mexer em código de baixo nível nem ajustar cada tool call ou cada skill que adicionar. Hoje, quero falar sobre um harness de execução de agents autogerenciado chamado Trueforge. Antes de começarmos, este vídeo é patrocinado pela TrueFoundry, criadora do TrueForge. Mas tudo o que vou mostrar hoje está em um repo open source. Não há nenhum plano pago em nada do que você vai ver.
01:02 E o pedido deles é basicamente este: se você achar isso útil e interessante e quiser que eles continuem trabalhando nisso, basta acessar o repo e dar uma estrela. Só isso. Trabalhei com a TrueFoundry no começo do ano e fiz um vídeo sobre a plataforma Gateway deles. Parece que, enquanto desenvolvem coisas para empresas, também estão pensando em como disponibilizar algumas dessas ferramentas legais para a comunidade open source. Neste vídeo, quero tentar esclarecer um pouco isso. Quero falar sobre como você deve pensar nos diferentes tipos
01:32 de harnesses que existem e como pode usá-los nos seus diferentes tipos de projetos. Então, vamos começar pelo termo, porque acho que é aí que surge boa parte da confusão. Quando a maioria das pessoas ouve o termo agent harness hoje em dia, tende a pensar em harnesses de programação. São coisas como Claude Code, Codex, Py, OMP, OpenCode e vários outros. E eles são harnesses, certo? Eles envolvem um modelo, dão a ele um sistema de arquivos, um shell e algumas ferramentas, e executam o loop para você. Mas, na verdade, foram criados para uma única tarefa, certo?
02:04 Que é escrever código. O segundo tipo de harness que existe atualmente é o que eu chamaria de framework para montar por conta própria. É o caso do LangGraph Deep Agents, talvez do Agent SDK ou do ADK. Eles fornecem todas as peças, você escreve um loop e conecta tudo por conta própria, certo? Você decide como o estado será persistido, como funcionam as aprovações e assim por diante. Fiz vários vídeos sobre esses frameworks ao longo dos anos. Mas, hoje em dia, pode ser realmente tedioso usar muitos deles quando você está tentando criar seu próprio harness.
02:36 O terceiro tipo, e o mais recente, é algo sobre o qual acabei de fazer um vídeo: a ideia de um harness com runtime hospedado. É o que as pessoas estão chamando de managed agents. Temos o Claude Managed Agents e o Gemini Managed Agents, e fiz um vídeo inteiro sobre isso, falando dos diferentes tipos de managed agents que existem. Mas a ideia desses serviços é que você define um agent e dá a ele um modelo. Quase certamente, terá que ser o modelo do provedor. Você também precisa fornecer ferramentas, que, novamente, muitas vezes serão fornecidas
03:09 para você, e um system prompt. E então a empresa executa o loop. Sessões, tool calls, sandboxes, aprovações: tudo isso é gerenciado. Você só chama uma API. E essa terceira categoria pode ser muito boa de usar, certo? Já desenvolvi com ela e tudo mais. Mas o ponto é o seguinte: até bem recentemente, essa categoria significava que você só tinha uma opção: ela precisava ser hospedada pelo próprio provedor. E talvez pior ainda, muitas vezes você fica limitado a determinados modelos, que podem simplesmente não ser uma boa escolha para o que está tentando fazer.
03:43 O TrueForge é uma versão open source desse terceiro tipo, e o README deles explica muito bem: “Criar um agent é fácil, mas executá-lo bem não é.” A parte de executá-lo bem envolve streaming, persistência de sessões, servidores de ferramentas, sandboxes, aprovações e uma interface. Honestamente, são coisas que a maioria das pessoas não quer programar, e é por elas que os serviços de managed agents cobram um valor alto. O Trueforge é essa camada, disponibilizada como um repo totalmente open source, licenciado sob MIT,
04:18 que você pode clonar e executar com qualquer modelo que quiser. Certo. Então, a pergunta deveria ser: por que importa qual tipo de managed agent estou usando? E esse é o ponto que acho que muitas pessoas, inclusive eu às vezes, entendem errado: você tende a pensar que o custo de tudo isso está relacionado apenas ao modelo que está usando e ao valor que paga por token. E muitas vezes não pensa no harness e em toda a infraestrutura que está funcionando ao redor dele. Mas, quando você começa a executar managed agents em grande escala, percebe que
04:52 o harness, na verdade, costuma ser o fator principal, porque é ele que decide quantos tool calls você faz, quais tool calls faz e em que ordem, e como decide o que entra no context window. Lembre-se: na verdade, pagamos pelo que está no context window. Então, se há muitos tool calls ali, se há excesso de ferramentas, certo? Quando você tem definições demais de ferramentas e coisas do tipo, e não está usando divulgação progressiva e recursos semelhantes, vai
05:24 acabar pagando muito mais do que pagaria com um harness bem eficiente. E foi nesse contexto que a equipe da TrueFoundry publicou um benchmark que mostra tudo isso. Eles selecionaram 14 tarefas do Enterprise Bench da DevRev. Tarefas em que o agent precisa cruzar dados entre um CRM, um rastreador de issues, um repositório de documentos e vários servidores MCP, tudo com o mesmo prompt. Eles executaram três testes para cada tarefa e usaram um LLM judge às cegas. E o detalhe é que eles nem sequer escolheram modelos mais baratos.
05:56 Na verdade, executaram o Opus com três harnesses diferentes. Como você pode ver neste diagrama, eles mostraram que, com o harness TrueForge, foi possível reduzir o custo em 30% usando o mesmo modelo e mantendo a mesma precisão. Isso porque o Claude Managed Agents usava, em média, 10 milhões de tokens por execução, contra apenas 3,8 milhões no TrueForge. E, claro, quando passaram para um modelo como o GLM 5.2,
06:27 o custo do modelo caiu de repente. Agora, o custo total era 75% menor que o da versão original do Claude Managed Agents. Então, mesmo que deixemos de lado o GLM 5.2 e olhemos apenas para o mesmo modelo, as mesmas respostas e aproximadamente um terço dos tokens, tudo isso foi decidido pelo harness. Portanto, o fato de o TrueForge ser open source significa que você pode escolher qualquer modelo. Pode decidir se prefere um modelo mais caro da Claude ou da OpenAI, por exemplo.
07:00 Mas também pode escolher modelos open mais baratos, como vou mostrar aqui. Então, se você guardar apenas uma coisa deste vídeo, que seja esta: geralmente, é o harness, não o modelo, que determina os custos do seu agent. E o harness é a parte sobre a qual você tem bastante controle, mesmo que não esteja executando seus próprios modelos nas suas próprias GPUs e coisas do tipo. No meu caso, eu diria que, embora a economia de custos seja o destaque aqui, a questão de ficar preso a um fornecedor talvez seja mais importante do que muita gente que está assistindo
07:30 pensa. Só na última semana, vimos várias notícias sobre quais dados de usuários essas empresas estão usando para treinamento e como estão usando os dados dos usuários. Também há questões como a retenção de dados. Se você quiser retenção zero de dados, não pode usar o Claude Managed Agents. Se a definição do seu agent fica dentro de um runtime hospedado, então o system prompt, a configuração das ferramentas, as regras de aprovação, o histórico da sessão: tudo isso fica no produto de outra pessoa. E talvez isso não seja um problema até o dia em que você quiser experimentar outro
08:03 modelo, ou você quer experimentar um ambiente isolado diferente, ou testar uma configuração diferente, etc. Você não quer ficar preso a esses serviços e acabar dependendo deles para muitas coisas além do modelo. Já estamos vendo os modelos open source ficarem tão bons que níveis muito altos de inteligência estão sendo democratizados, e agora você pode acessá-los por meio de muitos provedores diferentes. Mesmo que você tenha objeções ou questões legais relacionadas ao envio dos seus dados para determinados países, o interessante agora é que, com modelos de pesos abertos, há provedores surgindo por toda parte
08:35 que executam os mesmos pesos com os mesmos endpoints de API. Ouço muito isso de pessoas que estão desenvolvendo dentro de empresas maiores. Muitas vezes, elas têm a obrigação de executar as coisas nas próprias instalações ou, pelo menos, dentro da própria conta na nuvem. E um sistema de agent hospedado simplesmente não vai passar pela área de compras nem pela análise de conformidade, por melhor que seja. Então, elas acabam recorrendo à categoria de tentar escrever todo o loop por conta própria. E isso também pode acabar sendo uma opção ineficiente e cara. E, claro, se você tiver algum hardware local em que possa executar alguns
09:07 modelos locais, já estamos vendo os modelos menores ficarem cada vez melhores. E todo esse sistema permite a integração com coisas como Ollama e LM Studio para executar modelos localmente. Certo, o TrueForge é um repo TypeScript com licença MIT, da equipe da True Foundry. Com um comando npx, você basicamente consegue iniciar tudo isso. Ele cuida de um banco de dados SQLite local. Todos os seus dados permanecem localmente, e tudo é executado em um host local. Também há modos hospedados, caso você queira fazer isso com coisas
09:39 como Postgres ou Redis e Docker. Mas o modo local é uma etapa muito deliberada no caminho da TrueFoundry para tornar o início e a experimentação o mais fáceis possível. Eles têm uma interface de chat completa, mas não se deixe enganar pensando que este é mais um chatbot. Não é. A interface de chat é o ambiente de testes. É onde você explora e experimenta com o agent e testa as coisas antes de salvá-lo. O principal aqui é o runtime, que é disponibilizado de algumas maneiras diferentes. Você tem a interface, por onde pode começar, mas também tem um
10:11 endpoint de API HTTP e, além disso, pode usar um SDK de TypeScript. Isso significa que você pode criar algo aqui bem rapidamente, disponibilizar o endpoint de API e, então, fazer com que outros aplicativos se comuniquem com ele. Isso o torna ideal se, por exemplo, você tem pessoas na sua equipe que quer que executem diferentes workflows de agent, mas não quer que elas precisem se preocupar com a configuração das ferramentas, com como escrever o prompt corretamente, nem com nada disso.
10:43 Você pode simplesmente incorporar isso a algo como o Slack, um aplicativo para dispositivos móveis ou qualquer tipo de software que queira que ele escreva. Então, vamos começar e ver como tudo isso é montado. Certo. Para começar, é bem simples. Vamos aos documentos do README e procurar o guia de início rápido. Depois, vou instalar isso localmente para começar. Você pode ver que isso vai instalar basicamente todos os componentes daqui. Tudo, desde recursos para lidar com ambientes isolados, MCPs e skills, até todas essas
11:15 coisas. E agora está tudo sendo executado localmente, então posso começar. Certo. Depois que você estiver na interface, pode acessar as configurações e configurar modelos, conectores, skills e provedores de ambientes isolados. Aqui, em modelos, você tem os modelos padrão, prontos para uso. Se quiser usar Claude, pode usar Claude. Se quiser usar Gemini, pode usar Gemini, etc. Você também tem vários provedores open source ou pode configurar algo totalmente privado. Aqui, configurei meu próprio endpoint de API para executar o DeepSeek Flash 4.1.
11:50 Esse modelo acabou de sair; o 4 Flash anterior era um dos meus modelos favoritos. Então, acho que, como muitas pessoas, estou bem animado para ver como esse novo modelo se sai. Mas você pode configurar muitos modelos diferentes aqui. Em seguida, temos os conectores. Você pode ver que já configurei o Tavily, que é uma ótima ferramenta de busca. Dá para obter chamadas de API gratuitas. Acho que você recebe mil chamadas por mês ou algo assim de graça. O DeepWiki também é um dos que eu gosto, mas há muitos outros aqui. Se eu quisesse adicionar o meu Notion, poderia fazer isso. Se quisesse adicionar o Bright Data para fazer raspagem de dados ou coisas
12:23 desse tipo, eu teria essa opção aqui. Ou posso acessar esta seção e configurar completamente um servidor MCP pessoal. Ele pode ser executado localmente, na nuvem, etc. E depois temos as skills. As skills são, obviamente, uma das melhores maneiras de começar. Então, vou inserir aqui a skill de pesquisa do Tavily. Vou ativá-la para que a pasta contenha o arquivo skill.md. Depois, posso simplesmente importá-la e usá-la também. Por fim, temos os provedores de ambientes isolados. No momento, as opções aqui são um pouco limitadas.
12:53 Acho que a TrueFoundry também tem algumas ideias interessantes relacionadas a ambientes isolados que talvez apareçam em breve. Mas, depois de configurar tudo isso, você pode ver que basta iniciar um novo chat. O ID do chat serve basicamente para permitir que você teste se está tudo conectado e coisas do tipo. Então, você pode ver que estou usando o modelo DeepSeek v4.1 flash. Adicionei o Tavily como ferramenta. E, se eu quiser importar alguns arquivos ou algo assim, posso usar isso
13:24 como uma interface de chat normal. Mas é muito importante entender que este não é o produto, certo? Isto serve apenas para testar o produto. A ideia é que agora eu possa ver que tudo parece estar funcionando. Estou recebendo tokens de raciocínio do 4.1 Flash. Posso ver que ele está executando os diferentes testes e que agora temos a capacidade de executar e ver o que está acontecendo. Você pode ver que o agent começou a agir só porque eu disse que isso
13:55 basicamente era um teste para conectar as coisas. Na verdade, eu só estava planejando testar o próprio LLM, mas ele percorreu o sistema inteiro. E essa é a parte interessante disso, certo? Todas essas coisas agora estão integradas como um agent. Então, ele está agindo como um agent, com essas etapas de uso de ferramentas e esse raciocínio. Ele interpretou isso como minha tarefa: “Ei, queremos verificar se está tudo configurado”. Ele percorreu as etapas e disse: “Certo. Sim, temos a data e a hora. Temos o MCP configurado. Temos a execução de ferramentas.
14:25 Tudo isso está funcionando.” Podemos ver que houve uma falha no ambiente isolado porque ainda não configurei um, certo? Então, é bom saber que isso já está começando a funcionar. Certo, se eu quiser criar um agent novo, digamos que queira criar um agent que busque notícias sobre IA para mim. Vou fazer um bem rápido aqui só para mostrar como seria. Certo, você pode ver que coloquei meu prompt ali. O que estou fazendo aqui é basicamente deixar que ele descubra as diferentes coisas que precisa fazer.
14:58 E o interessante é que ele faz tudo isso em segundo plano. Está usando o Tavily. Não precisei dizer para fazer isso. Ele basicamente descobriu que deveria fazer isso. Também acessou o site VentureBeat, que foi o link que passei, e concluiu que provavelmente queremos a categoria de IA ali. Agora, ainda não configurei um ambiente isolado, então é evidente que ele está percebendo que isso será um problema. Mas você pode ver que, bem rápido, ele descobriu sozinho o que precisa fazer: extrair a página inicial, testar coisas diferentes, etc. E o interessante é que, em seguida, usou o Tavily para fazer buscas,
15:31 passando informações, sabendo que estou procurando apenas as últimas 48 horas. Podemos ver o que ele realmente fez com o Tavily. E dá para ver que, por fim, ele prossegue e encontra, por exemplo, o lançamento do DeepSeek, V4.1 Flash e diferentes lançamentos que saíram, o ChatGPT para serviços financeiros, etc. E, até mesmo para os outros, ele se concentra em verificar a data, certo? Para ver se elas estão corretas. Agora que temos isso, podemos vir até aqui para salvar. Basicamente, inseri minhas instruções, que são como meu
16:03 system prompt para fazer isso. Posso adicionar as skills que quiser. Então vou inserir a skill de pesquisa do Tavily. Depois, preciso decidir algumas coisas, como: quero que o agent faça perguntas para esclarecer? Quero que ele tenha subagents dinâmicos? Quero que ele retorne uma interface generativa? Na verdade, não quero a interface generativa nem as perguntas de esclarecimento neste caso. Só quero acioná-lo e, basicamente, receber o resultado. Agora posso salvar as alterações, e ele vai criar esse agent para mim.
16:39 E dá para ver que, se agora eu quiser experimentar, posso vir até aqui e inserir o prompt para iniciá-lo. E dá para ver que, de fato, ele está trabalhando. Embora eu tenha escrito “Só me traga as notícias”, ele entende que se trata de notícias sobre IA. Na verdade, alterei para 72 horas no system prompt. Ele tem a data de hoje e as diferentes partes que vai buscar. E dá para ver que ele já encontrou várias notícias recentes. Agora, ele vai verificar as datas delas. E tudo isso está
17:12 sendo executado com o modelo DeepSeek, certo? É um modelo bem barato para executar. E dá para ver que o resultado final está sendo retornado com as notícias, os resumos e a URL da fonte de cada uma delas. Isso é bem bom, certo? Se eu verificar algo como isto, de fato, foi escrito no último dia ou por aí. E ele também está incluindo algumas menções honrosas. Certo, então, se eu quiser usar isso com Python, posso vir até aqui e configurar um pequeno projeto UV com apenas um arquivo Python.
17:43 Se olharmos para isto, ele basicamente vai chamar a versão localhost. É aqui que o agent está hospedado no momento. Se quisesse, você poderia executá-lo na nuvem, obviamente. Acho que, daqui para a frente, vocês verão a True Foundry ter suas próprias versões gerenciadas disso, que permitem prototipar tudo localmente e depois enviar para a nuvem deles para executar regularmente e em escala, por assim dizer. Mas dá para ver que, se eu quiser executar isso agora, tudo o que preciso fazer é UV run main.py.
18:13 Ele vai configurar tudo. Vai preparar as diferentes ferramentas, etc., e depois executar a tarefa. Aqui, estou apenas transmitindo tudo de volta. Mas, se quiser, você pode fazer com que ele simplesmente forneça um arquivo de saída ou salve os resultados em um banco de dados, ou algo assim, no final. E dá para ver que ele terminou aqui: recebemos todos os resultados. Temos o lançamento da OpenAI para serviços financeiros. Temos o DeepSeek, v4.1 Flash.
18:43 Para cada um deles, temos o artigo da VentureBeat. Temos a data. Temos as diferentes informações. Para concluir, eu diria que vale muito a pena conferir, se você quiser executar agents localmente, na sua própria máquina, etc. E o legal é que, depois que você cria esses agents, eles ficam salvos ali. Então, você poderia instalar isso na nuvem, importá-los para lá e usá-los. Agora, olhando para o roadmap, parece que há várias coisas a caminho. Dá para ver que planejaram uma integração com gateway, o que faz todo o sentido.
19:14 A TrueFoundry tem vários recursos de gateway, tanto para modelos quanto para MCPs, além de recursos para bloquear coisas desse tipo. Parece que estão resolvendo o que provavelmente é meu maior problema com isso: eu gostaria que tivessem execução em sandbox local, e parece que isso está a caminho. Seria ótimo se também fosse possível restringir isso com sandboxes do Docker, ou algo parecido, para deixar tudo totalmente seguro. E, olhando para o restante do roadmap, tudo parece bem sensato para quem quiser fazer esse tipo de coisa. E boa parte disso talvez seja algo que existe nas versões bloqueadas dos
19:44 managed agents. Então, é ótimo ver que tudo isso está chegando em breve. Vá dar uma estrela no GitHub. Os links estão na descrição. Na verdade, isso oferece todas as vantagens de uma solução gerenciada, sem dependência do fornecedor e sem as desvantagens, etc. Então, me contem nos comentários: quais são os principais recursos que vocês gostariam de ver adicionados? Conversando com a equipe da True Foundry, dá para perceber que eles estão mesmo comprometidos em fazer isso funcionar, tanto para os clientes que usam a solução quanto para a comunidade geral de open source.
20:16 Enfim, como sempre, se você achou o vídeo útil, clique em curtir e inscreva-se no canal. A gente se fala no próximo vídeo. Até mais.
Transcrição original
[00:00] Okay, so vendor-neutral, MIT licensed, on your own hardware without a runtime bill. These are all things that Claude Managed Agents doesn’t have. also the new OpenAI Agent API or Gemini Agents doesn’t have them. But all of these things are the things that the agent system I’m going to show you today actually has. Today, I want to talk about a way to run managed agents fully locally or in your own private cloud with any model that you want, adding in any tools that you
[00:32] want, skills that you want, MCPs that you want, and being able to do it all really easy without you having to go into low-level code and tinker with every tool call or every skill that you add. Today I wanna talk about a self-managed agent execution harness called Trueforge. Now, before we get into it, this video is sponsored by TrueFoundry, the creators of TrueForge. but everything I’m showing you today is in an open source repo. There’s no paid tier in anything that you’ll see.
[01:02] And the ask from them is basically that if you find this useful and interesting and you would like to see them work on it more, just go and star the repo. That’s it. I worked with TrueFoundry earlier on in the year and made a video about their Gateway platform, and it seems to me that as they’re developing things for enterprise, they’re also looking at how they can make some of these cool tools available to the open source community as well. In this video, I want to try and untangle that a little bit. I wanna talk about how you should be thinking about the different kinds
[01:32] of harnesses that are out there and how you can be using them for your different kinds of projects. So let’s start with the word because I think this is where a lot of the confusion is. When most people hear the words agent harness right now, they tend to think of coding harnesses. That’s things like, Claude Code, Codex, Py, OMP, OpenCode, a whole bunch of these. And those are harnesses, right? They wrap a model, they give it a file system, a shell, some tools, and they run the loop for you. But they’re really built for one job, right?
[02:04] which is writing code. The second kind of harness that’s out there at the moment is what I would call the assemble-it-yourself framework. So this is LangGraph Deep Agents, perhaps Agent SDK or ADK. And these give you all the pieces, and you write a loop, and you wire up everything yourself, right? You decide how the state gets persisted, how approvals work, and so on. And I’ve done quite a number of videos on those over the years. But nowadays it can be actually really tedious to use a lot of those frameworks if you’re trying to build your own harness.
[02:36] The third kind and the one that’s most recent is one I actually just made a video about recently, which is the whole idea of a hosted runtime harness. So this is what people are calling managed agents. So you’ve got Claude managed agents, you’ve got Gemini managed agents, and I made a whole video about this, talking about the different kinds of managed agents that are out there. But the whole idea with those is that you define an agent, give it a model, almost certainly it’s going to have to be the provider’s model. You’ll have to give it tools, which again will be often provided
[03:09] for you, and a system prompt. and then that company’s gonna run the loop. So session, tool calls, sandboxes, approval, all of that is handled. You just hit an API. And that third category can be really nice to use, right? I’ve built with it, et cetera. But here’s the thing. Up until pretty recently, that category really meant you only had one choice in that it has to be hosted with the actual provider. And perhaps even worse than that, You’re often just tied down to certain models, that may just be not a great fit for what you’re trying to do.
[03:43] So TrueForge is an open source version of that third kind And their README puts it really nicely: “Building an agent is easy, but running one well is not.” The running it well part is all about streaming, session persistence, tool servers, sandboxes, approvals, a UI. That’s all the stuff that really honestly most people don’t want to write, and it’s the stuff that managed agents have been charging you a premium for. Trueforge is that layer as a repo that’s fully open source, MIT licensed,
[04:18] that you can clone and then run with any particular model that you want to. Alright. So the question should be, why does it matter what kind of managed agent I’m using? And this is the bit that I think many people, even myself at times, have gotten wrong, that you tend to think of the cost of all of this as just being related to which model that you’re using and how much you’re paying per token. And then often you don’t think about the harness and all the plumbing that is actually going on around this. But when you start running managed agents at volume, you start to realize, that
[04:52] actually that harness really is often the key thing because it’s that harness that is actually deciding how many tools calls you make, what tool calls you make in what order, how it’s going to actually decide what goes in the context window. Remember, really what we’re paying for is whatever’s in the context window. So if you’ve got lots of tool calls in there, if you’ve got tool bloat, right? Where you’ve just got so many tool definitions and stuff in there, and you’re not using progressive disclosure and things like that, you’re gonna
[05:24] run up a much bigger bill than you would with a very efficient harness. And this is where the True Foundry team actually put out a benchmark that shows all of this. They took 14 tasks from DevRev’s Enterprise Bench. The kind where the agent has to join data across a CRM, an issue tracker, a document store, multiple, MCP servers, all with the same prompt, and they ran three trials each and used a blind LLM judge. And here’s the thing, they didn’t even go for cheaper models.
[05:56] They actually ran it on Opus through three different harnesses And you can see from this diagram here they basically showed with the actual TrueForge harness that even using the same model, they were able to get the cost down by 30% with the same amount of accuracy. and that’s because Claude Managed Agents was using 10 million tokens per run on average versus only 3.8 million tokens on the TrueForge. And of course, when they moved that to a model like GLM 5.2,
[06:27] suddenly the model cost came down. The whole thing now was down 75% compared to the original Claude Managed Agents version. So even if we skip the GLM 5.2 and just look at, the same model, same answers for roughly a third of the tokens, that was all Harness decided. So the fact that TrueForge is actually open source means that you can pick any model that you want here. You can decide if you want to go for a more expensive, Claude model or OpenAI model, et cetera.
[07:00] But you can also go for much cheaper open models, like I’m going to show you in here. So if you just take one thing away from this video, it’s this: the harness, not the model, is usually what’s driving your agent costs. And the harness is the part that you’ve actually got a lot of control over, even if you’re not running your own models with your own GPUs, et cetera. Now for me, I would say while the cost savings here are the headline, for me the lock-in thing is probably a bigger deal than a lot of people are watching.
[07:30] just in the past week we’ve seen a number of different news items about what user data these people are actually training on and how they’re actually using user data. And you’ve got things like data retention. if you want to have zero-day data retention, you cannot use Claude managed agents. If your agent definition lives inside a hosted runtime, then the system prompt, the tool wiring, the approval rules, the session history, all of that sits on someone else’s product. And perhaps that’s fine up until the day you wanna try a different
[08:03] model, or you wanna try a different sandbox, or you want to try a different configuration, et cetera. You don’t want to get locked into these services where you become dependent on them for a lot of things beyond the model. We’re already seeing, open models get so good that really high levels of intelligence are now being democratized so you can access it over lots of different providers. Even if you have objections or legal things around sending your data to certain countries, the cool thing now is with open weights models, there are providers
[08:35] popping up everywhere that are running the same weights with the same API endpoints And I hear this a lot from people building inside larger companies. They often have a mandate to run things on-prem, or at least inside their own cloud account. And a hosted agent system just isn’t gonna get through procurement, through compliance, no matter how good it is. So they fall back into a category of trying to write the entire loop themselves. And that can also become both an inefficient and expensive option. And then of course, if you do have some local hardware that you can run some
[09:07] local models on, we’re already seeing the smaller models get better and better, And this whole system allows you to integrate with things like Ollama, with things like LM Studio to run models locally. All right, so TrueForge is a MIT license TypeScript repo from the True Foundry team. With one MPX command, you can basically spin this up. It takes care of a local SQLite database. All your data is staying locally, and it’s running on a local host. There are also hosted modes If you want to do it with things
[09:39] like Postgres or Redis and Docker. but the whole local mode is a very deliberate step on Truefoundry’s path to make this as easy as possible for you to get started trying it out. Now they have a whole chat UI, but don’t be fooled into thinking that this is another chatbot. It’s not. The chat interface there is the test bench. It’s where you poke around and play with the agent and test things out before you actually save it. The actual main thing here is the runtime and it’s actually exposed a few different ways. You’ve got the UI, that you can start off with, but you’ve also got an
[10:11] HTTP API endpoint, and then also you can use that with a TypeScript SDK. This means that you can build something in this very quickly, expose the API endpoint, and then have other apps ping it. So this makes it ideal if you’ve got people on your team, for example, that you want them to basically run different agent workflows, but you don’t want them having to worry about how to configure the tools, how to actually prompt it right, how to do all of that.
[10:43] You can actually just bake this into something like Slack, a mobile app, any sort of software that you want it to write. So let’s jump in and have a look at how this actually is all put together Alright. So to get started here, this is pretty simple. We’re just gonna go, to the ReadMe docs and see, go to the quick start, and Then I’m gonna just install this locally, to get started And you can see this, this will basically install all the components in here. Everything from, being able to deal with sandboxes, MCPs, skills, all those
[11:15] sorts of things And it’s actually now running locally so that I can get started Okay. So once you’re in the actual interface in here, you can come into the settings and you can set up models, connectors, skills, and sandboxes. So models here, you’ve got your standard, sort of off-the-shelf models. If you do want to use Claude, you can use Claude. If you want to use Gemini, you can use Gemini, et cetera. you’ve also got a bunch of, open providers, Or you can configure something totally private. Here I’ve configured up my own API endpoint to run DeepSeek Flash 4.1.
[11:50] So this model is just out the previous 4 Flash was one of my favorite models, So I think like a lot of people, I’m quite excited to see how this new model goes. But you could configure lots of different models in here. Next up, you’ve got connectors. So you can see I’ve already gone and configured, Tavily, Which is a really good search tool. you can get a free API call. I think you get 1,000 calls a month or something for free. also DeepWiki, is one of the ones that I like. but there are lots of others in here. So if I wanted to add my Notion, I can go ahead and do that. if I wanted to add Bright Data for doing any sort of, scraping or things
[12:23] like that, I’ve got that in here. Or I can just come in here and totally configure up, a personal MCP server. So that could be running locally, that could be running in the cloud, et cetera. And then you’ve got skills. Now skills is obviously one of the best ways to actually get started. So I’m gonna put in the Tavily, research skill there. So I’m gonna enable that so that the folder contains the skill.md, I can then just import that and use that as well. And then lastly, we’ve got, sandbox providers. So they’re a bit light on this at the moment.
[12:53] I think TrueFoundry’s also got some interesting things around sandboxes that you might see coming in the near future. But once I’ve got this set up, you can see I can just come along and I can do a new chat. Now, the chat ID here is really just to allow you to test that everything’s connected up and stuff like that. So you can see I’ve got my DeepSeek, v4.1 flash model in there. I’ve put on Tavily as a tool in there And if I wanted to import some files or something like that, I can use this
[13:24] just like a normal chat interface. But it’s very important that you understand that this is not the product, right? This is just to basically test the product. so the idea here is that, okay, now I can see that, okay, everything looks like it’s running. I’m getting reasoning tokens back from 4.1 Flash. I can see that, it’s running through the different tests, and we’ve got the ability now to, run and see what actually is going on here. you can see that the agent has gone off and just me saying that this is
[13:55] basically a test to, wire things up. I actually was just planning on testing, the actual LLM, but it’s gone through the whole system, and this is the cool thing of this, right? All of these things are now integrated as an agent. So it’s acting as an agent with these tool steps and with this thinking. So it’s taken this as like my task of that, “Hey, we want to check that everything’s set up.” It’s gone through, it says, “Right. Yep, we’ve got the date, time. We’ve got the, MCP set up. We’ve got our tool execution.
[14:25] Everything on that is working.” we can see it failed on a sandbox because I haven’t set up a sandbox yet, right? So, It’s good to know that this is already starting to work Okay, so if I want to build a new, agent, let’s say I want to build an agent that’s gonna go and get AI news for me. So I’m just gonna do a very quick one here just to sort of show you how you would do it Okay, so you can see I’ve got my, prompt there, and what I’m doing here is basically just going through this, letting it work out, the different things to do.
[14:58] And the cool thing is, it’s doing all this in the background. It’s using Tavily. I didn’t need to tell it to do that. It basically worked out to do that. It’s also then gone to the VentureBeat site, which is the link that I gave it, worked out that, okay, we probably want the category AI, in there. Now I don’t have a sandbox set up, so it’s obviously working out that that’s gonna be an issue But you can see very quickly it’s basically worked out itself what it needs to do, like extracting the homepage, trying out different things, et cetera, for doing this And then the cool thing is it’s then used Tavilly to actually do searches,
[15:31] passing in info knowing that I’m just looking for the last 48 hours We can see, what it’s actually done there with, Tavily And you can see that finally, it goes through, it finds out like the DeepSeek, V4.1 Flash release, different releases that have come out, ChatGPT for financial services, et cetera. And then even for other ones, It’s then focused on checking the date, right? To see if those are right. Now, once we’ve got that, we can then come over here to actually save this. I then basically put in my, instructions, which is like my
[16:03] system prompt here, for doing this. I can add any skills that I want. So I’m gonna put in the actual Tavily research, skill in there And then I’ve got to decide some things like, okay, do I want the agent to ask clarifying questions? Do I want it to have dynamic sub-agents? Do I want it to have basically, like return a generative UI? Actually, I don’t want the generative UI or the clarifying questions on this. I just want to sort of ping it and basically have it return the result. So now I can save the changes, and it will go through and create this agent for me.
[16:39] And you can see Now if I want to basically just try this out, I can come in here and put in, the prompt to kick it off, and you can see sure enough, it’s going off. Even though I wrote, “Just get me the news,” it understands that, this is gonna be AI news. I actually changed it to be, 72 hours in the system prompt there. it’s got today’s date, it’s got the different, parts that it’s going to basically get there. And you can see that already it’s got a bunch of sort of the recent, stories that have come up And so now it’s gonna basically check the dates of those, And All of this is
[17:12] running with the DeepSeek model, right? So this is a very cheap model, to run And you can see that its final output is coming back with the actual stories, with the summary, and with the, the source, URL for each of these. so this is pretty good, right? If I check something like this sure enough, this was written in the past day or so. and then It’s also putting some honorable mentions there Okay, so if I want to use this with Python, I can actually just come in here and basically set up a, a little UV project with just a single Python file.
[17:43] if we look at this, it’s just going to basically call the, local host version of this. This is where the agent is currently being hosted. You could actually have it, running, in the cloud if you wanted to do that, obviously. I think going forward you’ll see True Foundry have their own sort of managed versions of this, which lets you prototype everything locally and then ship it to their cloud to run regularly at scale kind of thing But you can see if I wanna basically run this now, all I have to do is UV run main.py.
[18:13] it will basically set it up. It will go through, setting up the different tools, et cetera, and then it will go off and do the task and here I’m just streaming all the things back. But if you wanted to, you could get it to basically just give you an output file or to save to a database or something like that at the end And you can see now that it’s finished off here, we’ve got all the results back. we’ve got the, OpenAI launches financial services. We’ve got DeepSeek, v4.1 Flash in there.
[18:43] And for each of these, we’ve got the VentureBeat article. We’ve got, the date. We’ve got the different information, in there So just to finish up, I would say This is definitely worth checking out if you wanted to run agents, locally, on your own machine, et cetera. and the cool thing is once you’ve actually created these agents, they’re stored there, so you could actually install this in the cloud and import them in there and use that Now looking at their roadmap, it looks like they’ve got a bunch of things coming up. you can see that they’ve planned to have a gateway integration, which totally makes sense.
[19:14] TrueFoundry has a lot of sort of gateway features, both for models, for MCPs, for locking things down like that. It looks like they’re addressing probably my biggest issue with it is that I would like them to have a local sandbox execution, and it looks like that’s coming. It’d be great if you could also lock that down with Docker sandboxes or something like it just to make it fully safe and secure and looking at the rest of the roadmap, It all seems very sensible stuff if you wanted to do this kind of thing. And a lot of it is perhaps stuff that is in the lockdown versions of
[19:44] managed agents So it’s great to see that this is all coming in the near future So go give it a star on GitHub. The links are in the description. Really, this is giving you all the advantages of a managed solution without the vendor lock-in and without the downsides, et cetera so let me know in the comments, what are the biggest features you would like to see added to this? Talking to the team at True Foundry, They do seem very committed to making this work, both for their customers who are using it, but also for the general open source community.
[20:16] Anyway, as always, if you found the video useful, please click like and subscribe, and I will talk to you in the next video. Bye for now.