[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"article-open-source-ai-agent-frameworks-compared-langfuse-en":3,"article-related-open-source-ai-agent-frameworks-compared-langfuse-en":31,"series-ai-agent-55fc6bbb-4e7d-4f4d-8fa3-3886f4d6f7a1":78},{"id":4,"slug":5,"title":6,"content":7,"summary":8,"source":9,"source_url":10,"author":11,"image_url":12,"cover_image":12,"category":13,"language":14,"translated_content":11,"related_article_id":15,"keywords":16,"key_takeaways":23,"views":27,"created_at":28,"published_at":29,"topic_cluster_id":30},"55fc6bbb-4e7d-4f4d-8fa3-3886f4d6f7a1","open-source-ai-agent-frameworks-compared-langfuse-en","Open-Source AI Agent Frameworks Compared","\u003Cp data-speakable=\"summary\">Open-source \u003Ca href=\"\u002Ftag\u002Fagent\">agent\u003C\u002Fa> frameworks now cover graphs, loops, and typed workflows.\u003C\u002Fp>\u003Cp>If you are choosing an agent framework for a Python or \u003Ca href=\"\u002Ftag\u002Ftypescript\">TypeScript\u003C\u002Fa> project, this guide helps you narrow the field quickly and set up observability from day one. By the end, you will know which framework fits your stack, how to get a first trace into \u003Ca href=\"https:\u002F\u002Flangfuse.com\u002Fdocs\" target=\"_blank\" rel=\"noopener noreferrer\">Langfuse docs\u003C\u002Fa> and the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Flangfuse\u002Flangfuse\" target=\"_blank\" rel=\"noopener noreferrer\">Langfuse GitHub repo\u003C\u002Fa>, and what to verify before \u003Ca href=\"\u002Fnews\u002Ffoundry-ship-agents-without-rewrites-en\">you ship\u003C\u002Fa>.\u003C\u002Fp>\u003Cp>This walkthrough focuses on the frameworks highlighted in Langfuse's comparison post and shows the practical path from selection to tracing. The goal is not to rank every option universally, but to help you match the framework to your runtime, language, and control needs.\u003C\u002Fp>\u003Ch2>Before you start\u003C\u002Fh2>\u003Cul>\u003Cli>Node.js 20+ if you plan to use TypeScript frameworks such as Mastra, Vercel AI SDK, or Strands Agents.\u003C\u002Fli>\u003Cli>Python 3.10+ if you plan to use LangGraph, Claude Agent SDK, Google ADK, Pydantic AI, CrewAI, or Strands Agents.\u003C\u002Fli>\u003Cli>A Langfuse account and project for traces, spans, prompts, and evaluations.\u003C\u002Fli>\u003Cli>API keys for at least one model provider, such as OpenAI, Anthropic, Google Gemini, or AWS Bedrock.\u003C\u002Fli>\u003Cli>Git installed locally so you can clone the sample app or your own agent service.\u003C\u002Fli>\u003Cli>Basic familiarity with tool calling, async code, and environment variables.\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>Step 1: Pick the framework by control style\u003C\u002Fh2>\u003Cp>Goal: choose the framework that matches how much orchestration you want to own. LangGraph and \u003Ca href=\"\u002Ftag\u002Fgoogle\">Google\u003C\u002Fa> ADK suit explicit workflows, \u003Ca href=\"\u002Ftag\u002Fopenai\">OpenAI\u003C\u002Fa> Agents SDK and \u003Ca href=\"\u002Ftag\u002Fclaude\">Claude\u003C\u002Fa> Agent SDK suit managed agent loops, Pydantic AI suits type-driven Python teams, and Mastra or the Vercel AI SDK suit TypeScript-first products.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784401376601-wmu4.png\" alt=\"Open-Source AI Agent Frameworks Compared\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cp>Use this decision rule: if you need branching, retries, and human approval at exact points, start with a graph-based framework. If you want a ready-made loop with minimal assembly, start with a loop-first SDK. If you care most about validation and developer ergonomics, start with Pydantic AI.\u003C\u002Fp>\u003Cp>Verification: you should be able to name one framework in one sentence, such as \"I need explicit state control, so LangGraph is the fit.\"\u003C\u002Fp>\u003Ch2>Step 2: Install the agent SDK and tracing client\u003C\u002Fh2>\u003Cp>Goal: create a working local project that can send traces to Langfuse. Install your chosen framework, then add the Langfuse client or OpenTelemetry integration recommended by that framework's docs.\u003C\u002Fp>\n\u003Cfigure class=\"my-6\">\u003Cimg src=\"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784401376321-rv5x.png\" alt=\"Open-Source AI Agent Frameworks Compared\" class=\"rounded-xl w-full\" loading=\"lazy\" \u002F>\u003C\u002Ffigure>\n\u003Cpre>\u003Ccode>npm install @langfuse\u002Fclient @vercel\u002Fai-sdk\u003C\u002Fcode>\u003C\u002Fpre>\u003Cp>If you are using Python, swap in the framework package and the Langfuse Python SDK instead. Set your environment variables for the Langfuse public key, secret key, and host before you run the app.\u003C\u002Fp>\u003Cp>Verification: you should see the package manager finish without errors and your .env file should contain the keys your framework expects.\u003C\u002Fp>\u003Ch2>Step 3: Build one agent loop with one tool\u003C\u002Fh2>\u003Cp>Goal: prove the framework can call a tool and return a useful answer before you add multi-agent complexity. Keep the first version small: one model, \u003Ca href=\"\u002Fnews\u002Fgrok-4-5-one-prompt-agent-work-en\">one prompt\u003C\u002Fa>, one tool, and one output path.\u003C\u002Fp>\u003Cp>For example, wire a weather lookup, a file read, or a database query into the agent. If your framework supports handoffs, subagents, or workflows, ignore those features for now and confirm the basic loop works first.\u003C\u002Fp>\u003Cp>Verification: you should see a successful agent response that includes the tool result rather than a plain model guess.\u003C\u002Fp>\u003Ch2>Step 4: Trace the run in Langfuse\u003C\u002Fh2>\u003Cp>Goal: capture the agent execution so you can inspect prompts, tool calls, latency, and failures. Add the tracing hooks or middleware shown in the framework's integration guide, then send one test request through the app.\u003C\u002Fp>\u003Cp>Open the Langfuse project and confirm that the trace includes the root run plus child spans for model calls and tools. If the framework supports structured metadata, attach the framework name, model name, and environment so you can filter runs later.\u003C\u002Fp>\u003Cp>Verification: you should see a new trace in Langfuse with at least one model span and one tool span.\u003C\u002Fp>\u003Ch2>Step 5: Add guardrails and workflow controls\u003C\u002Fh2>\u003Cp>Goal: make the agent safer and more predictable before production traffic arrives. Add the framework's native controls, such as input validation, output schemas, permission allowlists, retry logic, checkpoints, or human-in-the-loop interrupts.\u003C\u002Fp>\u003Cp>Use the control style that matches your framework. For Pydantic AI, define typed inputs and outputs. For CrewAI, assign roles and then wrap them in Flows. For LangGraph or Google ADK, add explicit branching and retry paths. For Claude Agent SDK or OpenAI Agents SDK, use hooks, guardrails, or handoffs to constrain behavior.\u003C\u002Fp>\u003Cp>Verification: you should be able to trigger one invalid input and see the agent reject or reroute it instead of failing silently.\u003C\u002Fp>\u003Ch2>Step 6: Compare the trace against a baseline\u003C\u002Fh2>\u003Cp>Goal: use observability to decide whether your first implementation is good enough. Run the same prompt several times, compare the traces, and look for unstable tool use, repeated retries, or unnecessary context growth.\u003C\u002Fp>\u003Cp>Then record a baseline for latency, cost, and success rate so you can compare future changes. Langfuse is most useful when \u003Ca href=\"\u002Fnews\u002Fmimo-code-infrastructure-not-hack-en\">you treat\u003C\u002Fa> traces as a development artifact, not just a production dashboard.\u003C\u002Fp>\u003Cp>Verification: you should have a baseline trace set that shows repeatable behavior and a clear list of improvements for the next iteration.\u003C\u002Fp>\u003Ch2>Common mistakes\u003C\u002Fh2>\u003Cul>\u003Cli>Choosing a framework for brand familiarity instead of control needs. Fix: map your use case to workflow control, type safety, or managed loops first.\u003C\u002Fli>\u003Cli>Adding multi-agent coordination before the single-agent loop works. Fix: get one tool, one prompt, and one trace working before adding handoffs or subagents.\u003C\u002Fli>\u003Cli>Skipping observability until production. Fix: connect Langfuse in the first prototype so you can debug prompts, tools, and retries while the system is still small.\u003C\u002Fli>\u003C\u002Ful>\u003Ch2>What's next\u003C\u002Fh2>\u003Cp>Once the first agent is traced and stable, move on to framework-specific hardening: add evals, define prompt versioning, create regression tests for tool calls, and compare how your chosen framework behaves under retries, memory growth, and human approval flows.\u003C\u002Fp>","Open-source agent frameworks now cover graphs, loops, and typed workflows.","langfuse.com","https:\u002F\u002Flangfuse.com\u002Fblog\u002F2025-03-19-ai-agent-comparison",null,"https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784401376601-wmu4.png","ai-agent","en","520bcebc-da4d-4846-8438-73fbf26a0d57",[17,18,19,20,21,22],"Langfuse","LangGraph","Pydantic AI","CrewAI","OpenAI Agents SDK","TypeScript",[24,25,26],"Match the framework to your control style before you optimize for features.","Trace the first working agent in Langfuse before adding multi-agent complexity.","Use guardrails, typed outputs, and retries to harden the agent loop.",0,"2026-07-18T19:02:26.466149+00:00","2026-07-18T19:02:26.46+00:00","a9bee732-b07c-4e5b-a0e6-3048577e32a7",{"tags":32,"relatedLang":37,"relatedPosts":41},[33,35],{"name":18,"slug":34},"langgraph",{"name":20,"slug":36},"crewai",{"id":15,"slug":38,"title":39,"language":40},"open-source-ai-agent-frameworks-compared-langfuse-zh","開源 AI Agent 框架實作比較與追蹤","zh",[42,48,54,60,66,72],{"id":43,"slug":44,"title":45,"cover_image":46,"image_url":46,"created_at":47,"category":13},"d53bdddf-05eb-4eca-b53b-8439ee35acda","codex-micro-macropad-ai-control-deck-en","Codex Micro turns a macropad into an AI control deck","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784291596349-nxpa.png","2026-07-17T12:32:45.841021+00:00",{"id":49,"slug":50,"title":51,"cover_image":52,"image_url":52,"created_at":53,"category":13},"ae8b2df7-05be-4377-8fa8-00856625839e","automate-web3-grant-screening-ai-scoring-en","Automate Web3 Grant Screening With AI Scoring","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784187177735-071f.png","2026-07-16T07:32:24.390132+00:00",{"id":55,"slug":56,"title":57,"cover_image":58,"image_url":58,"created_at":59,"category":13},"5115e111-8a16-41df-a00b-529be3f2c3c9","anthropic-models-build-better-agent-endurance-en","Anthropic Models: Build Better Agent Endurance","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784102584376-pw9z.png","2026-07-15T08:02:32.41246+00:00",{"id":61,"slug":62,"title":63,"cover_image":64,"image_url":64,"created_at":65,"category":13},"6a959f48-0c84-4717-a858-d02c8bd26fce","googles-gemini-enterprise-agent-platform-cloud-service-en","Google’s Gemini Enterprise Agent Platform makes agents a cloud servic…","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1784059365473-8gbb.png","2026-07-14T20:02:25.392208+00:00",{"id":67,"slug":68,"title":69,"cover_image":70,"image_url":70,"created_at":71,"category":13},"3f5dcc12-bb78-4102-817b-f08f9adbe974","workbuddy-harness-engineering-matters-more-than-model-size-en","WorkBuddy Proves Harness Engineering Matters More Than Model Size","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1783987381886-gvmo.png","2026-07-14T00:02:31.980136+00:00",{"id":73,"slug":74,"title":75,"cover_image":76,"image_url":76,"created_at":77,"category":13},"9c82943c-4f7b-4ada-8498-ce42b951a381","perplexity-teammate-coding-agent-strategy-en","Perplexity should build Teammate as a coding agent, not a copilot","https:\u002F\u002Fxxdpdyhzhpamafnrdkyq.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Fcovers\u002Finline-1783589576551-x3my.png","2026-07-09T09:32:26.11108+00:00",[79,84,89,94,99,104,109,114,119,124],{"id":80,"slug":81,"title":82,"created_at":83},"03db8de8-8dc2-4ac1-9cf7-898782efbb1f","anthropic-claude-ai-agent-task-automation-en","Anthropic's Claude AI Agent: A New Era of Task Automation","2026-03-25T16:25:06.513026+00:00",{"id":85,"slug":86,"title":87,"created_at":88},"045d1abc-190d-4594-8c95-91e2a26f0c5a","googles-2026-ai-agent-report-decoded-en","Google’s 2026 AI Agent Report, Decoded","2026-03-26T11:15:23.046616+00:00",{"id":90,"slug":91,"title":92,"created_at":93},"e64aba21-254b-4f93-aa21-837484bb52ec","kimi-k25-review-stronger-still-not-legend-en","Kimi K2.5 review: stronger, still not a legend","2026-03-27T07:15:55.385951+00:00",{"id":95,"slug":96,"title":97,"created_at":98},"30dfb781-a1b2-4add-aebe-b3df40247c37","claude-code-controls-mac-desktop-en","Claude Code now controls your Mac desktop","2026-03-28T03:01:59.384091+00:00",{"id":100,"slug":101,"title":102,"created_at":103},"254405b6-7833-4800-8e13-f5196deefbe6","cloudflare-100x-faster-ai-agent-sandbox-en","Cloudflare’s 100x Faster AI Agent Sandbox","2026-03-28T03:09:44.356437+00:00",{"id":105,"slug":106,"title":107,"created_at":108},"04f29b7f-9b91-4306-89a7-97d725e6e1ba","openai-backs-isara-agent-swarm-bet-en","OpenAI backs Isara’s agent-swarm bet","2026-03-28T03:15:27.849766+00:00",{"id":110,"slug":111,"title":112,"created_at":113},"3b0bf479-e4ae-4703-9666-721a7e0cdb91","openai-plan-automated-ai-researcher-en","OpenAI’s plan for an automated AI researcher","2026-03-28T03:17:42.312819+00:00",{"id":115,"slug":116,"title":117,"created_at":118},"fe91bce0-b85d-4efa-a207-24ae9939c29f","harness-engineering-ai-agent-reliability-2026","Harness Engineering: From Bridle to Operating System, The Missing Link in AI Agent Reliability","2026-03-31T06:36:55.648751+00:00",{"id":120,"slug":121,"title":122,"created_at":123},"7a09007d-820f-43b3-8607-8ad1bfcb94c8","mcp-explained-from-prompts-to-production-en","MCP Explained: From Prompts to Production","2026-04-01T09:24:40.089177+00:00",{"id":125,"slug":126,"title":127,"created_at":128},"116d5ee9-a4f1-4b5a-aac5-5d035dd22bbe","amazon-bedrock-agents-multi-agent-workflows-en","Amazon Bedrock Agents Gets Multi-Agent Workflows","2026-04-01T09:30:30.197685+00:00"]