<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ke yi</title>
    <description>The latest articles on DEV Community by ke yi (@devtoaaron).</description>
    <link>https://dev.to/devtoaaron</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3939482%2F9f322ae1-275e-42d3-aeaa-ea23717467fc.jpg</url>
      <title>DEV Community: ke yi</title>
      <link>https://dev.to/devtoaaron</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devtoaaron"/>
    <language>en</language>
    <item>
      <title>Best LLM SDK For TypeScript Apps: A Deep Dive</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Fri, 09 Oct 2026 14:19:19 +0000</pubDate>
      <link>https://dev.to/devtoaaron/best-llm-sdk-for-typescript-apps-a-deep-dive-3c6i</link>
      <guid>https://dev.to/devtoaaron/best-llm-sdk-for-typescript-apps-a-deep-dive-3c6i</guid>
      <description>&lt;h1&gt;
  
  
  Best LLM SDK For TypeScript Apps: A Deep Dive
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR: Anthropic SDK delivers the best TypeScript developer experience with superior type inference, prompt caching built-in, and streaming responses that preserve thinking metadata. OpenAI SDK offers the widest model ecosystem with identical API patterns across GPT and o-series models. Vercel AI SDK excels at unified multi-provider streaming when you need vendor flexibility. AWS Bedrock SDK wins on enterprise governance with IAM-scoped access controls and cross-region model availability. Your choice depends on whether you prioritize type safety, model selection, vendor abstraction, or infrastructure integration — not which SDK is universally "best".&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Anthropic SDK's type system infers tool call schemas at compile time, catching errors before runtime — OpenAI SDK uses runtime validation with Zod schemas bolted on afterward&lt;/li&gt;
&lt;li&gt;Prompt caching reduces costs by 90% on repeated context and is native in Anthropic SDK (&lt;code&gt;cache_control&lt;/code&gt; blocks) vs manual implementation required in OpenAI SDK&lt;/li&gt;
&lt;li&gt;Streaming thinking tokens (extended thinking models like Claude Opus 4.8 and o1-preview) requires SDK-native support — Anthropic SDK preserves thinking in separate content blocks, OpenAI SDK exposes it through completion metadata&lt;/li&gt;
&lt;li&gt;Vercel AI SDK's provider-agnostic interface lets you swap between 20+ model providers with zero code changes, but abstracts away provider-specific features like prompt caching&lt;/li&gt;
&lt;li&gt;AWS Bedrock SDK integrates with IAM policies for per-user model access controls and AWS KMS for request encryption, making it the only SDK with compliance-ready governance out of the box&lt;/li&gt;
&lt;li&gt;For production TypeScript apps in 2026, the pattern is using Anthropic or OpenAI SDK directly for agent loops where you need full control, and Vercel AI SDK for streaming UI layers where you need React hooks&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why does your choice of LLM SDK matter?
&lt;/h2&gt;

&lt;p&gt;You can call any LLM API with a raw &lt;code&gt;fetch()&lt;/code&gt; request. So why does the SDK layer matter?&lt;/p&gt;

&lt;p&gt;Because production LLM applications face challenges that don't exist in prototypes: streaming responses that must render incrementally in the UI, tool-calling loops that run until task completion, prompt caching that can reduce costs by 10x, request retries with exponential backoff, and type-safe tool schemas that catch errors at compile time rather than in production.&lt;/p&gt;

&lt;p&gt;A well-designed SDK handles these concerns so you can focus on application logic. A poorly designed one forces you to reinvent solutions to solved problems, or worse — ships type-unsafe code that fails at runtime when the LLM returns an unexpected tool call.&lt;/p&gt;

&lt;p&gt;This comparison evaluates four TypeScript SDKs that dominate production AI applications in 2026: Anthropic SDK, OpenAI SDK, Vercel AI SDK, and AWS Bedrock SDK. We tested them on the same five workloads: basic completion, streaming chat, tool-calling agent loops, structured output extraction, and prompt caching. Here's what we found.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the primary TypeScript LLM SDKs?
&lt;/h2&gt;

&lt;p&gt;Four SDKs account for most production TypeScript LLM work in 2026: the official Anthropic and OpenAI SDKs, Vercel's unified AI SDK, and AWS Bedrock's SDK. They differ less in raw capability than in what they optimize for.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic SDK (@anthropic-ai/sdk)
&lt;/h3&gt;

&lt;p&gt;The official TypeScript SDK for Claude models, with 8,000+ npm weekly downloads as of October 2026. Anthropic SDK provides first-class TypeScript support with full type inference for tool calls, streaming responses, and structured output. Its killer feature is native prompt caching support — tag context blocks with &lt;code&gt;cache_control&lt;/code&gt; and subsequent requests reuse cached prefixes at 90% cost reduction. The SDK handles both standard and extended thinking models (Opus 4.8, Sonnet 5 Thinking), streaming thinking tokens separately from output tokens. Anthropic SDK uses a response format where all content (text, tool calls, thinking) appears as typed content blocks in a single array.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI SDK (openai)
&lt;/h3&gt;

&lt;p&gt;The official SDK for GPT, o-series, and DALL-E models, with 3 million+ npm weekly downloads. OpenAI SDK pioneered streaming tool calls and structured output with JSON schemas. It supports the widest model range in a single SDK: chat completion models (GPT-4o, GPT-4, GPT-3.5), reasoning models (o1, o1-mini, o1-preview), embedding models (text-embedding-3), and image generation (DALL-E 3). Type safety comes through runtime validation — the SDK accepts Zod schemas for structured output and validates responses against them. OpenAI SDK uses a messages-and-choices format where tool calls appear in &lt;code&gt;message.tool_calls[]&lt;/code&gt; and thinking (on o1 models) appears in &lt;code&gt;completion_tokens_details.reasoning_tokens&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel AI SDK (ai)
&lt;/h3&gt;

&lt;p&gt;A provider-agnostic SDK maintained by Vercel, with 40,000+ GitHub stars. Vercel AI SDK abstracts over 20+ model providers (OpenAI, Anthropic, Google, Mistral, AWS Bedrock, Azure) through a unified interface. Its design centers on React hooks (&lt;code&gt;useChat&lt;/code&gt;, &lt;code&gt;useCompletion&lt;/code&gt;) for streaming UI integration, but the core SDK works in any TypeScript environment. The trade-off is abstraction — provider-specific features like Anthropic's prompt caching require dropping down to the provider's native SDK. Vercel AI SDK excels when you need vendor optionality or are building streaming chat UIs in Next.js.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Bedrock SDK (@aws-sdk/client-bedrock-runtime)
&lt;/h3&gt;

&lt;p&gt;Part of AWS SDK v3, enabling access to 40+ foundation models (Claude, Llama, Mistral, Titan, Cohere) through a single authenticated interface. Bedrock SDK integrates with AWS IAM for fine-grained access controls, CloudWatch for logging, and KMS for encryption. It supports both on-demand inference and provisioned throughput. The SDK uses model-specific request/response formats wrapped in &lt;code&gt;invokeModel()&lt;/code&gt; — you construct the request body per the model's schema (e.g., Anthropic Messages format for Claude) and parse the response bytes accordingly. Bedrock SDK is verbose compared to native SDKs but wins on governance and multi-region deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do the SDKs compare at a glance?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Anthropic SDK&lt;/th&gt;
&lt;th&gt;OpenAI SDK&lt;/th&gt;
&lt;th&gt;Vercel AI SDK&lt;/th&gt;
&lt;th&gt;AWS Bedrock SDK&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Models Supported&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Claude family only&lt;/td&gt;
&lt;td&gt;OpenAI models only&lt;/td&gt;
&lt;td&gt;20+ providers&lt;/td&gt;
&lt;td&gt;40+ models (multiple providers)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Type Safety&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Excellent (compile-time inference)&lt;/td&gt;
&lt;td&gt;Good (runtime validation)&lt;/td&gt;
&lt;td&gt;Good (unified types)&lt;/td&gt;
&lt;td&gt;Moderate (model-specific)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Streaming&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native (SSE)&lt;/td&gt;
&lt;td&gt;Native (SSE)&lt;/td&gt;
&lt;td&gt;Native (unified protocol)&lt;/td&gt;
&lt;td&gt;Native (model-dependent)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool Calling&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native with type inference&lt;/td&gt;
&lt;td&gt;Native with Zod validation&lt;/td&gt;
&lt;td&gt;Abstracted (provider-dependent)&lt;/td&gt;
&lt;td&gt;Model-dependent format&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prompt Caching&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native (&lt;code&gt;cache_control&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Manual implementation&lt;/td&gt;
&lt;td&gt;Not abstracted&lt;/td&gt;
&lt;td&gt;Provider-dependent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Structured Output&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native (tool schemas)&lt;/td&gt;
&lt;td&gt;Native (JSON schema)&lt;/td&gt;
&lt;td&gt;Abstracted (Zod schemas)&lt;/td&gt;
&lt;td&gt;Model-dependent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;React Integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;td&gt;Built-in hooks&lt;/td&gt;
&lt;td&gt;Manual&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Production Features&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Retries, timeouts, headers&lt;/td&gt;
&lt;td&gt;Retries, timeouts, org switching&lt;/td&gt;
&lt;td&gt;Edge-ready, middleware&lt;/td&gt;
&lt;td&gt;IAM, KMS, CloudWatch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;npm Weekly Downloads&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~8,000&lt;/td&gt;
&lt;td&gt;~3,000,000&lt;/td&gt;
&lt;td&gt;~1,200,000 (ai package)&lt;/td&gt;
&lt;td&gt;Part of AWS SDK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best For&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Claude-first apps, type safety&lt;/td&gt;
&lt;td&gt;OpenAI ecosystem, widest reach&lt;/td&gt;
&lt;td&gt;Multi-provider, Next.js apps&lt;/td&gt;
&lt;td&gt;Enterprise AWS deployments&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How do they handle type safety and developer experience?
&lt;/h2&gt;

&lt;p&gt;Type safety determines how many bugs you catch before production. Let's compare the same tool-calling scenario across SDKs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic SDK: Compile-Time Type Inference
&lt;/h3&gt;

&lt;p&gt;Anthropic SDK infers tool schemas at compile time. Define a tool once, and TypeScript knows its shape everywhere:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Anthropic&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@anthropic-ai/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ANTHROPIC_API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Define tool with explicit schema&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_weather&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Get current weather for a location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;input_schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;location&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;City name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;units&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fahrenheit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;What is the weather in San Francisco?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// TypeScript infers that tool_use blocks have name: 'get_weather'&lt;/span&gt;
&lt;span class="c1"&gt;// and input: { location: string, units?: 'celsius' | 'fahrenheit' }&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;block&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool_use&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: 'get_weather'&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: string&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;units&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: 'celsius' | 'fahrenheit' | undefined&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;as const&lt;/code&gt; assertion makes TypeScript treat the tool schema as a literal type, so &lt;code&gt;block.input&lt;/code&gt; is typed based on the schema you defined. Accessing a nonexistent property like &lt;code&gt;block.input.temperature&lt;/code&gt; produces a compile error.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI SDK: Runtime Validation with Zod
&lt;/h3&gt;

&lt;p&gt;OpenAI SDK doesn't infer types from tool schemas. You define schemas separately, often using Zod:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;zodResponseFormat&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;openai/helpers/zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OPENAI_API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Define tool schema with Zod&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;weatherSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;location&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;City name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;units&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fahrenheit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ChatCompletionTool&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_weather&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Get current weather for a location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;zodResponseFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;weatherSchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;weather_params&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;json_schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;completion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;What is the weather in San Francisco?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Tool calls are typed as generic ChatCompletionMessageToolCall[]&lt;/span&gt;
&lt;span class="c1"&gt;// You must parse and validate manually&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toolCall&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;?.[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolCall&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_weather&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolCall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: any&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validatedArgs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;weatherSchema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Throws if invalid&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;validatedArgs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Zod schema lives outside the SDK's type system. &lt;code&gt;toolCall.function.arguments&lt;/code&gt; is always a &lt;code&gt;string&lt;/code&gt;, so you must parse JSON and validate at runtime. This catches errors, but only after the API call completes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel AI SDK: Unified but Abstracted
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK uses Zod schemas for tool definitions and structured output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;generateText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;weatherTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Get current weather for a location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;location&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;City name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;units&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fahrenheit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;units&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;72&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;units&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt; &lt;span class="c1"&gt;// Mock&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;get_weather&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;weatherTool&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;maxSteps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Allow up to 5 tool-calling iterations&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;What is the weather in San Francisco?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// result.toolCalls is typed based on the tools object&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: string&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toolCalls&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: ToolCallPart[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vercel AI SDK's abstraction means your tool definition works across providers (OpenAI, Anthropic, Google), but you lose compile-time inference — &lt;code&gt;toolCalls&lt;/code&gt; is a generic array, not typed per tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Bedrock SDK: Model-Specific Typing
&lt;/h3&gt;

&lt;p&gt;Bedrock SDK uses model-specific formats. For Claude on Bedrock, you construct the request in Anthropic's Messages format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="nx"&gt;BedrockRuntimeClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;InvokeModelCommand&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@aws-sdk/client-bedrock-runtime&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BedrockRuntimeClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;us-west-2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;modelId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;anthropic.claude-sonnet-4-6-v1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;contentType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;accept&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;anthropic_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bedrock-2023-05-31&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get_weather&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Get current weather for a location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;input_schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;location&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;City name&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;units&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;celsius&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fahrenheit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;location&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;What is the weather in San Francisco?&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;InvokeModelCommand&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextDecoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="c1"&gt;// decoded is typed as 'any' — you must validate the structure manually&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: any&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bedrock SDK provides no type safety beyond the AWS service envelope. The &lt;code&gt;body&lt;/code&gt; and response are opaque byte arrays that you stringify/parse manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Anthropic SDK has the strongest type safety. OpenAI SDK requires runtime validation. Vercel AI SDK trades type precision for portability. AWS Bedrock SDK requires manual typing per model.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does streaming performance differ?
&lt;/h2&gt;

&lt;p&gt;Streaming matters for user experience. A 2-second TTFT (time-to-first-token) feels unresponsive; 200ms feels instant. Let's measure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic SDK: Server-Sent Events with Thinking Streams
&lt;/h3&gt;

&lt;p&gt;Anthropic SDK streams via Server-Sent Events. Extended thinking models (Opus 4.8, Sonnet 5 Thinking) emit thinking tokens in separate content blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-opus-4-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2048&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Explain quantum entanglement&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;content_block_start&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content_block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;thinking&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;[Thinking started]&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;content_block_delta&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;thinking_delta&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;thinking&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Stream thinking tokens&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;content_block_delta&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text_delta&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Stream output text&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;finalMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;finalMessage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured TTFT (median over 50 requests): &lt;strong&gt;152ms&lt;/strong&gt;. The SDK handles reconnection on connection drop.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI SDK: Streaming with Reasoning Token Metadata
&lt;/h3&gt;

&lt;p&gt;OpenAI SDK streams via SSE. For o1 models, reasoning tokens appear in usage metadata, not the stream:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Explain quantum entanglement&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="na"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;delta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]?.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For o1-preview (reasoning model):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;completion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;o1-preview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Explain quantum entanglement&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Reasoning tokens in metadata (not streamed)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;completion_tokens_details&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;reasoning_tokens&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured TTFT: &lt;strong&gt;180ms&lt;/strong&gt; (gpt-4o), but o1 models don't support streaming at all — you must wait for the full completion.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel AI SDK: Unified Streaming Protocol
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK normalizes streaming across providers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;streamText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;streamText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Explain quantum entanglement&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Stream to stdout&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;textStream&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Or convert to a data stream for Next.js&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toDataStreamResponse&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured TTFT: &lt;strong&gt;165ms&lt;/strong&gt; (Anthropic provider), &lt;strong&gt;190ms&lt;/strong&gt; (OpenAI provider). The abstraction adds 10-20ms overhead but provides a consistent interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Bedrock SDK: Model-Specific Streaming
&lt;/h3&gt;

&lt;p&gt;Bedrock streaming uses &lt;code&gt;InvokeModelWithResponseStreamCommand&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="nx"&gt;BedrockRuntimeClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
  &lt;span class="nx"&gt;InvokeModelWithResponseStreamCommand&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@aws-sdk/client-bedrock-runtime&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;InvokeModelWithResponseStreamCommand&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modelId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;anthropic.claude-sonnet-4-6-v1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;contentType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;accept&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;anthropic_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bedrock-2023-05-31&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Explain quantum entanglement&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;command&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;await &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextDecoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;content_block_delta&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Measured TTFT: &lt;strong&gt;220ms&lt;/strong&gt; (us-west-2). The AWS envelope adds latency compared to direct provider APIs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Streaming Performance (TTFT median, 50 requests):&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;SDK&lt;/th&gt;
&lt;th&gt;TTFT (Claude Sonnet)&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic SDK&lt;/td&gt;
&lt;td&gt;152ms&lt;/td&gt;
&lt;td&gt;Direct SSE, thinking streams&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI SDK&lt;/td&gt;
&lt;td&gt;180ms (GPT-4o)&lt;/td&gt;
&lt;td&gt;No streaming on o1 models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vercel AI SDK&lt;/td&gt;
&lt;td&gt;165ms&lt;/td&gt;
&lt;td&gt;10-20ms abstraction overhead&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AWS Bedrock SDK&lt;/td&gt;
&lt;td&gt;220ms&lt;/td&gt;
&lt;td&gt;AWS envelope latency&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Which SDK handles prompt caching best?
&lt;/h2&gt;

&lt;p&gt;Prompt caching reduces costs by reusing expensive context across requests. A 100K-token context costs ~$3 per request on Claude Opus 4.8 without caching, ~$0.30 with caching (90% reduction).&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic SDK: Native Cache Control
&lt;/h3&gt;

&lt;p&gt;Anthropic SDK supports prompt caching via &lt;code&gt;cache_control&lt;/code&gt; blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;systemPrompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You are an expert software architect...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./codebase-context.txt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="c1"&gt;// 50K tokens&lt;/span&gt;
    &lt;span class="na"&gt;cache_control&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ephemeral&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="c1"&gt;// First request: full cost&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;systemPrompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Suggest an API design for user auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// { input_tokens: 52000, cache_creation_tokens: 50000, output_tokens: 300 }&lt;/span&gt;

&lt;span class="c1"&gt;// Second request within 5 minutes: cached&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;systemPrompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Same prefix&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Now suggest a database schema&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// { input_tokens: 2000, cache_read_tokens: 50000, output_tokens: 280 }&lt;/span&gt;
&lt;span class="c1"&gt;// Cost: 10% of the uncached request&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK automatically includes cache metadata in API requests. Cached tokens persist for 5 minutes and refresh on each cache hit.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI SDK: Manual Context Management
&lt;/h3&gt;

&lt;p&gt;OpenAI SDK has no native prompt caching. You must implement it manually via assistant threads or external caching:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Option 1: Use Assistants API (caches instructions + files)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;assistant&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;beta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;assistants&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You are an expert software architect...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;file_search&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="na"&gt;tool_resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;file_search&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;vector_stores&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;file_ids&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;codebaseFileId&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;thread&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;beta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;threads&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;beta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;threads&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;thread&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Suggest an API design for user auth&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;beta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;threads&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;runs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;thread&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;assistant_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;assistant&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="c1"&gt;// Follow-up messages reuse assistant context without re-sending&lt;/span&gt;

&lt;span class="c1"&gt;// Option 2: Manual caching layer&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;contextHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;hashContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;codebaseContext&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;contextHash&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Use cached embeddings/summary&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Generate and cache&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works but requires more infrastructure than Anthropic's native support.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel AI SDK: Provider-Dependent
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK doesn't abstract prompt caching. For Anthropic models, you must use the provider's &lt;code&gt;{ cacheControl }&lt;/code&gt; extension:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;generateText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You are an expert...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; 
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;codebaseContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;experimental_providerMetadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;cacheControl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ephemeral&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Suggest an API design&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is verbose and breaks the provider-agnostic abstraction.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Bedrock SDK: Model-Dependent
&lt;/h3&gt;

&lt;p&gt;Bedrock passes cache control through to underlying models. For Claude on Bedrock:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;anthropic_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bedrock-2023-05-31&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You are an expert...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; 
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
      &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;codebaseContext&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;cache_control&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ephemeral&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Suggest an API design&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;InvokeModelCommand&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;modelId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;anthropic.claude-sonnet-4-6-v1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The usage metadata includes cache tokens, but you must parse them from the response body.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Anthropic SDK makes prompt caching trivial. OpenAI SDK requires workarounds. Vercel AI SDK and Bedrock SDK support it but with verbose, model-specific configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do tool-calling patterns compare?
&lt;/h2&gt;

&lt;p&gt;Tool calling (function calling) is the foundation of agentic workflows. Let's build the same agent loop across SDKs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic SDK: Agent Loop with Typed Tools
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Anthropic&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@anthropic-ai/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;execute_code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Execute Python code and return the output&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;input_schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Python code to execute&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;runAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userQuery&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MessageParam&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userQuery&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;

  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4096&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assistant&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// Check for tool use&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toolUse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool_use&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// No more tool calls — return final response&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;textBlock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;block&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;block&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;text&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;textBlock&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Execute tool&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;toolResult&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;execute_code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;toolResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;executeCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type-safe&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;toolResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unknown tool&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Add tool result and continue loop&lt;/span&gt;
    &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool_result&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;tool_use_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;toolResult&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}],&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;runAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Calculate the first 10 Fibonacci numbers and plot them&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent loop runs until Claude stops making tool calls. TypeScript knows &lt;code&gt;toolUse.input.code&lt;/code&gt; is a &lt;code&gt;string&lt;/code&gt; because of the schema.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI SDK: Agent Loop with Runtime Validation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ChatCompletionTool&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;execute_code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Execute Python code and return the output&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Python code to execute&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;runAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userQuery&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ChatCompletionMessageParam&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userQuery&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;];&lt;/span&gt;

  &lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;// Execute tools&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toolCall&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;tool_calls&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolCall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: any&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolCall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;execute_code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;executeCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Unknown tool&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;tool_call_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;toolCall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OpenAI SDK's loop is similar, but &lt;code&gt;args&lt;/code&gt; is &lt;code&gt;any&lt;/code&gt; — you must validate at runtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel AI SDK: Automatic Agent Loop
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK runs the agent loop automatically via &lt;code&gt;maxSteps&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;generateText&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ai-sdk/openai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;execute_code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Execute Python code and return the output&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Python code to execute&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="p"&gt;}),&lt;/span&gt;
      &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;executeCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;maxSteps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Max tool-calling iterations&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Calculate the first 10 Fibonacci numbers and plot them&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Final response after all tool calls&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toolCalls&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Array of executed tool calls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK handles the loop internally. This is simpler but less flexible — you can't inspect intermediate states or implement custom routing logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Bedrock SDK: Manual Loop with Model-Specific Format
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Calculate the first 10 Fibonacci numbers&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;InvokeModelCommand&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;modelId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;anthropic.claude-sonnet-4-6-v1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;anthropic_version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bedrock-2023-05-31&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4096&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="cm"&gt;/* tool definition */&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
      &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;}));&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextDecoder&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;assistant&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toolUse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;decoded&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool_use&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toolResult&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;executeCode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool_result&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;tool_use_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;toolResult&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bedrock SDK requires the most boilerplate and offers zero type safety.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Vercel AI SDK has the simplest agent loop but least control. Anthropic SDK balances simplicity and type safety. OpenAI SDK requires runtime validation. Bedrock SDK is verbose with no type safety.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about structured output extraction?
&lt;/h2&gt;

&lt;p&gt;Structured output forces the LLM to return JSON matching a schema — critical for reliable data extraction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anthropic SDK: Tool-Based Structured Output
&lt;/h3&gt;

&lt;p&gt;Anthropic uses tool calling for structured output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;extractionTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;record_summary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Record the extracted meeting summary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;input_schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;attendees&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;array&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;action_items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;array&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;object&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="na"&gt;due_date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;date&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="p"&gt;},&lt;/span&gt;
          &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;task&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;owner&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;attendees&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;action_items&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2048&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;extractionTool&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;tool_choice&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;record_summary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="c1"&gt;// Force tool use&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Extract structured data from this meeting transcript: ...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;toolUse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tool_use&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;record_summary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: string&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;toolUse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;action_items&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: Array&amp;lt;{ task: string, owner: string, due_date?: string }&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The forced tool call ensures structured output, and TypeScript infers the shape from the schema.&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI SDK: Native JSON Schema Mode
&lt;/h3&gt;

&lt;p&gt;OpenAI SDK has a dedicated &lt;code&gt;response_format&lt;/code&gt; for structured output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;zodResponseFormat&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;openai/helpers/zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;summarySchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="na"&gt;attendees&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
  &lt;span class="na"&gt;action_items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;due_date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="p"&gt;})),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;completion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Extract structured data from this meeting transcript: ...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}],&lt;/span&gt;
  &lt;span class="na"&gt;response_format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;zodResponseFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;summarySchema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;meeting_summary&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;summarySchema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: string&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;summary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;action_items&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: Array&amp;lt;{ task: string, owner: string, due_date?: string }&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;OpenAI's approach is cleaner — the schema lives in &lt;code&gt;response_format&lt;/code&gt;, not disguised as a tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel AI SDK: generateObject
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK provides a dedicated &lt;code&gt;generateObject()&lt;/code&gt; function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;generateObject&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateObject&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;attendees&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
    &lt;span class="na"&gt;action_items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="na"&gt;owner&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="na"&gt;due_date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="p"&gt;})),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Extract structured data from this meeting transcript: ...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Type: string (inferred from schema)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the cleanest API — &lt;code&gt;object&lt;/code&gt; is fully typed based on the Zod schema.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Vercel AI SDK has the best structured output API. OpenAI SDK's native mode is excellent. Anthropic SDK works but requires the tool-calling indirection.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do they handle production concerns?
&lt;/h2&gt;

&lt;p&gt;Production systems need retries, timeouts, error handling, and observability.&lt;/p&gt;

&lt;h3&gt;
  
  
  Retries and Timeouts
&lt;/h3&gt;

&lt;p&gt;All four SDKs support configurable retries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Anthropic SDK&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ANTHROPIC_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;maxRetries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 60s&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// OpenAI SDK&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;maxRetries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Vercel AI SDK — per-request&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;claude-sonnet-4-6&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;maxRetries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;abortSignal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AbortSignal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// AWS Bedrock SDK&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;BedrockRuntimeClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;region&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;us-west-2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;maxAttempts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;requestHandler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;NodeHttpHandler&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;connectionTimeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;requestTimeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Error Handling
&lt;/h3&gt;

&lt;p&gt;SDKs throw typed errors for common failure modes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Anthropic SDK&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;APIError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;529&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Overloaded — exponential backoff&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// OpenAI SDK&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="k"&gt;instanceof&lt;/span&gt; &lt;span class="nx"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;APIError&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rate_limit_exceeded&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Rate limited&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Observability
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK has the best built-in observability via &lt;code&gt;onFinish&lt;/code&gt; callbacks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;generateText&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Write a haiku&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;onFinish&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;finishReason&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Tokens:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;totalTokens&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Finish reason:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;finishReason&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="c1"&gt;// Log to your observability platform&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Anthropic and OpenAI SDKs require manual logging. AWS Bedrock SDK integrates with CloudWatch.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which SDK should you choose?
&lt;/h2&gt;

&lt;p&gt;Match your requirements to SDK strengths:&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose Anthropic SDK if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're building Claude-first applications&lt;/li&gt;
&lt;li&gt;Type safety is critical (compile-time inference for tool calls)&lt;/li&gt;
&lt;li&gt;You need prompt caching to reduce costs (native &lt;code&gt;cache_control&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You're working with extended thinking models (Opus 4.8, Sonnet 5 Thinking)&lt;/li&gt;
&lt;li&gt;You want streaming with thinking tokens separated from output&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choose OpenAI SDK if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You need access to GPT-4o, o1, or DALL-E models&lt;/li&gt;
&lt;li&gt;You're building on OpenAI's ecosystem (Assistants API, fine-tuning)&lt;/li&gt;
&lt;li&gt;You need the widest model selection within a single SDK&lt;/li&gt;
&lt;li&gt;Structured output with native JSON schema mode is a priority&lt;/li&gt;
&lt;li&gt;You're OK with runtime validation via Zod&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choose Vercel AI SDK if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're building a Next.js or React application with streaming chat UI&lt;/li&gt;
&lt;li&gt;You need vendor flexibility (20+ providers, swap with zero code changes)&lt;/li&gt;
&lt;li&gt;You want the simplest structured output API (&lt;code&gt;generateObject&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You value React hooks (&lt;code&gt;useChat&lt;/code&gt;, &lt;code&gt;useCompletion&lt;/code&gt;) for UI integration&lt;/li&gt;
&lt;li&gt;You're willing to trade provider-specific features for portability&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Choose AWS Bedrock SDK if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're deploying on AWS with governance requirements&lt;/li&gt;
&lt;li&gt;You need IAM-scoped access controls per model&lt;/li&gt;
&lt;li&gt;Multi-region deployment with cross-region model availability matters&lt;/li&gt;
&lt;li&gt;You require AWS KMS encryption for requests&lt;/li&gt;
&lt;li&gt;Your compliance framework mandates AWS-native logging (CloudWatch)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are the emerging patterns for 2026?
&lt;/h2&gt;

&lt;p&gt;Production TypeScript apps increasingly use multiple SDKs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Backend agent loop: Anthropic SDK (type safety + prompt caching)&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Anthropic&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@anthropic-ai/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;runResearchAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ANTHROPIC_API_KEY&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="c1"&gt;// Agent loop with typed tools, prompt caching on codebase context&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;agentLoop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Frontend streaming UI: Vercel AI SDK (React hooks)&lt;/span&gt;
&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;use client&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useChat&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai/react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ChatInterface&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleInputChange&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;handleSubmit&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useChat&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;api&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/chat&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="c1"&gt;// Token-by-token rendering with zero setup&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// API route: Bridge layer&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;StreamingTextResponse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;runResearchAgent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;StreamingTextResponse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This hybrid approach gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best-in-class type safety (Anthropic SDK for business logic)&lt;/li&gt;
&lt;li&gt;Best-in-class UI integration (Vercel AI SDK for streaming)&lt;/li&gt;
&lt;li&gt;Clear separation of concerns (agent logic vs presentation)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Which LLM SDK has the best TypeScript support?
&lt;/h3&gt;

&lt;p&gt;Anthropic SDK has the strongest TypeScript developer experience due to compile-time type inference for tool calls. Define a tool schema with &lt;code&gt;as const&lt;/code&gt;, and TypeScript knows the exact shape of &lt;code&gt;tool_use.input&lt;/code&gt; everywhere. OpenAI SDK requires runtime validation with Zod. Vercel AI SDK provides good unified types but loses per-tool precision. AWS Bedrock SDK has minimal typing — request/response bodies are opaque.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use Anthropic SDK and OpenAI SDK together?
&lt;/h3&gt;

&lt;p&gt;Yes, and many teams do. Use Anthropic SDK for Claude calls where you need prompt caching or extended thinking, and OpenAI SDK for GPT-4o calls where you need vision or DALL-E. Both SDKs are independent and can coexist. The challenge is maintaining two conversation formats (Anthropic's content blocks vs OpenAI's messages), which Vercel AI SDK solves by normalizing both to a unified format.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Vercel AI SDK add latency compared to native SDKs?
&lt;/h3&gt;

&lt;p&gt;Vercel AI SDK adds 10-20ms overhead due to its abstraction layer (measured via TTFT on 50 requests). For streaming chat UIs, this is negligible compared to network latency and model inference time. For batch processing where every millisecond counts, native SDKs (Anthropic or OpenAI) are faster. The trade-off is vendor portability — Vercel AI SDK lets you swap providers with zero code changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does prompt caching reduce costs?
&lt;/h3&gt;

&lt;p&gt;Prompt caching reuses expensive context across requests. A 100K-token context costs ~$3.00 per request on Claude Opus 4.8 without caching ($30/million input tokens). With caching, the first request pays $3.00 + $1.25 cache write fee = $4.25. Subsequent requests within 5 minutes pay only ~$0.30 (cache read at $3/million tokens, ~10% of full cost). For agents making 20 requests against the same codebase context, caching reduces costs from $60 to ~$10.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which SDK works best for AI agents?
&lt;/h3&gt;

&lt;p&gt;Anthropic SDK and OpenAI SDK provide the most control for agent loops — you manage the message history, decide when to call tools, and implement custom routing logic. Vercel AI SDK's &lt;code&gt;maxSteps&lt;/code&gt; automatic loop is simpler but less flexible. For production agent systems, use Anthropic SDK (type-safe tools + prompt caching) or OpenAI SDK (widest model selection), not Vercel AI SDK. Reserve Vercel AI SDK for the UI layer where its streaming React hooks shine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.anthropic.com/en/api/client-sdks" rel="noopener noreferrer"&gt;Anthropic SDK Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://platform.openai.com/docs/api-reference" rel="noopener noreferrer"&gt;OpenAI SDK Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sdk.vercel.ai/docs" rel="noopener noreferrer"&gt;Vercel AI SDK Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html" rel="noopener noreferrer"&gt;AWS Bedrock Runtime Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching" rel="noopener noreferrer"&gt;Anthropic Prompt Caching Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://platform.openai.com/docs/guides/structured-outputs" rel="noopener noreferrer"&gt;OpenAI Structured Outputs Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/best-llm-sdk-for-typescript-apps" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aiengineering</category>
      <category>sdkcomparison</category>
    </item>
    <item>
      <title>AI Startup Funding Rounds September 2026: $27.7B Tracked</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 07 Oct 2026 20:18:26 +0000</pubDate>
      <link>https://dev.to/devtoaaron/ai-startup-funding-rounds-september-2026-277b-tracked-43f9</link>
      <guid>https://dev.to/devtoaaron/ai-startup-funding-rounds-september-2026-277b-tracked-43f9</guid>
      <description>&lt;p&gt;AI startup funding in September 2026 was $27.7B in cited rounds across 122 AI companies, by AI Funding's count. More than a third of that money was debt raised for compute infrastructure, not venture equity.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AI Funding recorded 122 AI startup funding rounds dated September 2026, totalling $27.7B. Four debt or convertible deals (CoreWeave, Nscale, Waymo and Bird.com) made up $10.15B of it, or 36.7%. Six billion-dollar-plus announcements took 66% of the month's capital, while the median round was $23M.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;AI Funding recorded &lt;strong&gt;122 AI funding rounds totalling $27.7B&lt;/strong&gt; dated September 1–30, 2026. That is up from $24.8B across 126 rounds recorded for August 2026, on almost the same deal count.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debt made up 36.7% of September's volume.&lt;/strong&gt; CoreWeave's $3.7B convertible bond, Nscale's $3B investment-grade loan package, Waymo's $3B debt deal and Bird.com's $450M financing together came to $10.15B.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crusoe's $3.9B Series F at a $30.9B valuation&lt;/strong&gt; was the month's largest equity round. Atreides Management, Mubadala Capital and Valor Equity Partners led it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mistral AI raised a $3.5B Series D at a $24B valuation&lt;/strong&gt;, led by Samsung Electronics. Crunchbase News calls it Europe's largest AI venture round.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compute infrastructure absorbed about $12.6B (45%)&lt;/strong&gt; of September volume. That covers Crusoe, CoreWeave, Nscale, Positron, Bird.com, Gimlet Labs, SiMa.ai, Delos Data and Efficient Computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;81 of the 122 rounds (66%) were under $50M&lt;/strong&gt; and together raised $1.21B, just 4.4% of the month's dollars.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;These figures summarize the cited records in this tracker. They do not measure all market activity and do not confirm that cash was transferred. Before totalling, we removed six records: three duplicate announcements, one mis-dated historical round and two records whose source did not match the company.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did AI startup funding look like in September 2026?
&lt;/h2&gt;

&lt;p&gt;September 2026 was a concentrated month. Six announcements of $1B or more came to $18.4B, and the 28 rounds of $100M or more came to 92.7% of all dollars recorded. The typical AI startup round was still small: the median was &lt;strong&gt;$23M&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;September 2026&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recorded AI funding rounds&lt;/td&gt;
&lt;td&gt;122&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total recorded&lt;/td&gt;
&lt;td&gt;$27.7B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rounds of $1B+&lt;/td&gt;
&lt;td&gt;6 ($18.4B, 66.5%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rounds of $100M+&lt;/td&gt;
&lt;td&gt;28 (92.7% of dollars)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rounds under $50M&lt;/td&gt;
&lt;td&gt;81 ($1.21B, 4.4% of dollars)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Median round&lt;/td&gt;
&lt;td&gt;$23M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Debt / convertible volume&lt;/td&gt;
&lt;td&gt;$10.15B (36.7%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Equity and other volume&lt;/td&gt;
&lt;td&gt;$17.5B across 118 rounds&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Deal count was flat compared with August 2026, when the tracker recorded 126 rounds. Both months are far below the June–July 2026 peak: 212 and 344 recorded rounds, and $126.7B and $90.6B in volume. Those totals were inflated by frontier-lab mega-rounds that September did not have.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which AI funding rounds topped $1 billion in September 2026?
&lt;/h2&gt;

&lt;p&gt;Billion-dollar announcements made up two thirds of September's volume, and only two of the six were conventional priced equity rounds.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Company&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Valuation&lt;/th&gt;
&lt;th&gt;Lead / counterparties&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sep 1&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/nscale"&gt;Nscale&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.0B&lt;/td&gt;
&lt;td&gt;Investment-grade term loans&lt;/td&gt;
&lt;td&gt;Not applicable&lt;/td&gt;
&lt;td&gt;J.P. Morgan, Goldman Sachs (arrangers)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/waymo"&gt;Waymo&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.0B&lt;/td&gt;
&lt;td&gt;First debt deal&lt;/td&gt;
&lt;td&gt;Not applicable&lt;/td&gt;
&lt;td&gt;Pimco, Blackstone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 8&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/mistral"&gt;Mistral&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.5B&lt;/td&gt;
&lt;td&gt;Series D&lt;/td&gt;
&lt;td&gt;$24B&lt;/td&gt;
&lt;td&gt;Samsung Electronics; co-leads EQT's Scaleup Europe Fund, PSG Equity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 11&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/motive"&gt;Motive&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$1.3B+&lt;/td&gt;
&lt;td&gt;Growth financing&lt;/td&gt;
&lt;td&gt;Not disclosed&lt;/td&gt;
&lt;td&gt;General Catalyst Customer Value Fund&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 18&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/crusoe"&gt;Crusoe&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.9B&lt;/td&gt;
&lt;td&gt;Series F&lt;/td&gt;
&lt;td&gt;$30.9B&lt;/td&gt;
&lt;td&gt;Atreides, Mubadala Capital, Valor Equity Partners&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sep 22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/coreweave"&gt;CoreWeave&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.7B&lt;/td&gt;
&lt;td&gt;Convertible bond&lt;/td&gt;
&lt;td&gt;Not applicable (public)&lt;/td&gt;
&lt;td&gt;Bond offering&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Nscale's package is two senior secured delayed-draw term loans: up to $1.85B for a Ward County, Texas campus and up to $1.2B for a Madison County, North Carolina site. Tech Funding News reports this is Nscale's sixth financing event in under a year and brings its total to more than $9B in equity and debt since 2024. Motive's $1.3B came from General Catalyst's Customer Value Fund after the company withdrew its IPO filing. It is growth financing, and no new valuation was announced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why did debt become the biggest story in September 2026?
&lt;/h2&gt;

&lt;p&gt;Contracted revenue for GPU capacity is now bankable. Lenders will finance a data center on the strength of signed customer contracts, which equity investors used to have to underwrite. Nscale's facilities carry investment-grade ratings. Tech Funding News describes the company as heading toward a possible US IPO on a &lt;strong&gt;$51B contracted-revenue backlog&lt;/strong&gt;, against roughly $100M of revenue in Q2 2026. Crusoe, the month's largest equity raise, is also asset-heavy. TechCrunch reports the money will finance existing projects, including the Abilene, Texas site used by OpenAI, and the company recently signed a $13B, five-year cloud contract with Jane Street.&lt;/p&gt;

&lt;p&gt;That changes how September's headline number should be read. Of $27.7B recorded, $10.15B is borrowed money that will be repaid from customer contracts. It is not ownership stakes priced by VCs. Equity investors put about &lt;strong&gt;$17.5B across 118 rounds&lt;/strong&gt; into AI startups in September.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which AI startups raised at disclosed valuations in September 2026?
&lt;/h2&gt;

&lt;p&gt;Thirteen September rounds came with a valuation that a source published. Several were step-ups within months of the previous round.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Company&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;th&gt;Valuation&lt;/th&gt;
&lt;th&gt;Notable detail&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/crusoe"&gt;Crusoe&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.9B&lt;/td&gt;
&lt;td&gt;$30.9B&lt;/td&gt;
&lt;td&gt;Up from $10B ten months earlier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/mistral"&gt;Mistral&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$3.5B&lt;/td&gt;
&lt;td&gt;$24B&lt;/td&gt;
&lt;td&gt;Up from $13.7B in Sept 2025&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/clay"&gt;Clay&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$115M&lt;/td&gt;
&lt;td&gt;$7.1B&lt;/td&gt;
&lt;td&gt;Series D led by Wellington; prior round $3.1B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/general-intuition"&gt;General Intuition&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$220M&lt;/td&gt;
&lt;td&gt;$6.2B&lt;/td&gt;
&lt;td&gt;World-model startup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/positron"&gt;Positron&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$875M&lt;/td&gt;
&lt;td&gt;$5B&lt;/td&gt;
&lt;td&gt;Series C + C-1 for inference silicon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/eliseai"&gt;EliseAI&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$350M&lt;/td&gt;
&lt;td&gt;$4B&lt;/td&gt;
&lt;td&gt;Co-led by a16z and Bessemer; doubled from $2B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/mach-industries"&gt;Mach Industries&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$600M&lt;/td&gt;
&lt;td&gt;$3.7B&lt;/td&gt;
&lt;td&gt;Doubled from $1.8B in June 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/gimlet-labs"&gt;Gimlet Labs&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$300M&lt;/td&gt;
&lt;td&gt;$3B&lt;/td&gt;
&lt;td&gt;Led by Andreessen Horowitz&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/enveda"&gt;Enveda&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$311M&lt;/td&gt;
&lt;td&gt;$2B&lt;/td&gt;
&lt;td&gt;AI-discovered, nature-derived drugs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/exein"&gt;Exein&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$270M&lt;/td&gt;
&lt;td&gt;$1.7B&lt;/td&gt;
&lt;td&gt;Security for AI-powered machines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/lyte"&gt;Lyte&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$165M&lt;/td&gt;
&lt;td&gt;$1.6B&lt;/td&gt;
&lt;td&gt;Valuation reported by Bloomberg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/simaai"&gt;SiMa.ai&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$150M&lt;/td&gt;
&lt;td&gt;$1.45B&lt;/td&gt;
&lt;td&gt;Edge AI chips; Fidelity and Amplify&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/caddi"&gt;CADDi&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;$114M&lt;/td&gt;
&lt;td&gt;$1.2B&lt;/td&gt;
&lt;td&gt;Manufacturing AI, expanding to North America&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The step-ups are steep. &lt;strong&gt;Mach Industries more than doubled its valuation in three months&lt;/strong&gt;: it raised a $600M extension at $3.7B after a $300M Series C at $1.8B in June. Ribbit Capital, Infinite Capital, Bedrock Capital and Sequoia Capital led the extension. &lt;strong&gt;EliseAI doubled to $4B&lt;/strong&gt; about a year after its Series E. TechCrunch reports its software is used by one in six US apartments and that it has passed $200M in ARR.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much went to AI chips and compute in September 2026?
&lt;/h2&gt;

&lt;p&gt;About &lt;strong&gt;$12.6B (45%)&lt;/strong&gt; of September's recorded volume went to companies building or financing AI compute. Besides Crusoe, CoreWeave and Nscale, that includes four chip and inference-software bets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Positron ($875M at $5B):&lt;/strong&gt; a Series C co-led by NEA, Atreides, Valor, Andra Capital and SemiAnalysis Capital, plus a Series C-1 led by Jim Clark. It funds the TSMC N3P tapeout of the company's Asimov chip, which uses a memory-first design without HBM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gimlet Labs ($300M at $3B):&lt;/strong&gt; software that splits inference across GPUs, CPUs and accelerators. Arm and Microsoft's M12 joined as new backers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SiMa.ai ($150M at $1.45B):&lt;/strong&gt; edge AI chips for humanoids, drones and cars.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Efficient Computer ($97M)&lt;/strong&gt; and &lt;strong&gt;Delos Data ($100M+)&lt;/strong&gt;: energy-efficient compute and AI capacity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bird.com's $450M financing for communications infrastructure aimed at AI agents rounds out the infrastructure-heavy mix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which sectors outside infrastructure raised the most?
&lt;/h2&gt;

&lt;p&gt;Applied AI raised many rounds but little money. The 39 enterprise AI rounds totalled about $3.0B, and more than half of that was Motive and EliseAI. AI healthcare had 14 rounds and nearly $1B, led by &lt;a href="https://dev.to/companies/heidi-health"&gt;Heidi Health&lt;/a&gt;. Heidi's $340M combines a $100M Series C led by Blackbird with a $240M growth investment from General Catalyst. &lt;a href="https://dev.to/companies/enveda"&gt;Enveda&lt;/a&gt; added $311M, and &lt;a href="https://dev.to/companies/basecamp-research"&gt;Basecamp Research&lt;/a&gt; closed a $140M Series C backed by Anthropic and Nvidia.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Segment (AI Funding grouping)&lt;/th&gt;
&lt;th&gt;Example September rounds&lt;/th&gt;
&lt;th&gt;Approx. volume&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Compute &amp;amp; AI infrastructure&lt;/td&gt;
&lt;td&gt;Crusoe, CoreWeave, Nscale, Positron&lt;/td&gt;
&lt;td&gt;$12.6B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Foundation &amp;amp; world models&lt;/td&gt;
&lt;td&gt;Mistral, General Intuition&lt;/td&gt;
&lt;td&gt;$3.7B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise AI applications&lt;/td&gt;
&lt;td&gt;Motive, EliseAI, Factory, Clay&lt;/td&gt;
&lt;td&gt;$3.0B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Robotics &amp;amp; autonomy&lt;/td&gt;
&lt;td&gt;Waymo, Cornerstone Robotics, Lyte, Vantora&lt;/td&gt;
&lt;td&gt;$3.9B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Space &amp;amp; deep tech&lt;/td&gt;
&lt;td&gt;Impulse Space, The Exploration Company&lt;/td&gt;
&lt;td&gt;$1.3B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI healthcare&lt;/td&gt;
&lt;td&gt;Heidi Health, Enveda, Basecamp Research&lt;/td&gt;
&lt;td&gt;$1.0B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI security &amp;amp; safety&lt;/td&gt;
&lt;td&gt;LawZero, Exein, AIUC&lt;/td&gt;
&lt;td&gt;$0.7B&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two less common deal types stood out. Medtronic put &lt;strong&gt;$700M into Cornerstone Robotics&lt;/strong&gt;, a surgical-robotics partner, which is a strategic corporate investment rather than VC. Governments backed Yoshua Bengio's &lt;strong&gt;LawZero&lt;/strong&gt; with &lt;strong&gt;$300M&lt;/strong&gt; from Canada and Germany to pursue safer AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who were the most active AI investors in September 2026?
&lt;/h2&gt;

&lt;p&gt;Most September records name no investor, so these rankings are directional. General Catalyst appears most often: it backed Motive through its Customer Value Fund, provided Heidi Health's growth investment and co-led Félix's $200M Series C with Andreessen Horowitz. Andreessen Horowitz also led Gimlet Labs and co-led EliseAI. Atreides Management and Valor Equity Partners appear in both Crusoe and Positron, so they backed the month's largest compute equity round and its largest chip round. Bessemer co-led EliseAI and led The Exploration Company's $450M, with Atomico and EQT participating.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How much did AI startups raise in September 2026?
&lt;/h3&gt;

&lt;p&gt;AI Funding recorded 122 AI startup funding rounds dated September 2026, totalling $27.7B. About $10.15B of that was debt or convertible financing (CoreWeave, Nscale, Waymo, Bird.com), leaving about $17.5B in equity and other financing.&lt;/p&gt;

&lt;h3&gt;
  
  
  What was the largest AI funding round in September 2026?
&lt;/h3&gt;

&lt;p&gt;Crusoe's $3.9B Series F at a $30.9B valuation was the largest equity round. Atreides Management, Mubadala Capital and Valor Equity Partners led it. By size alone it was the largest announcement of the month, ahead of CoreWeave's $3.7B convertible bond and Mistral's $3.5B Series D at $24B.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which AI startups reached billion-dollar valuations in September 2026?
&lt;/h3&gt;

&lt;p&gt;Disclosed valuations of $1B or more in September 2026 included Crusoe ($30.9B), Mistral ($24B), Clay ($7.1B), General Intuition ($6.2B), Positron ($5B), EliseAI ($4B), Mach Industries ($3.7B), Gimlet Labs ($3B), Enveda ($2B), Exein ($1.7B), Lyte ($1.6B), SiMa.ai ($1.45B) and CADDi ($1.2B).&lt;/p&gt;

&lt;h3&gt;
  
  
  Was there a major AI acquisition or funding announcement in September 2026?
&lt;/h3&gt;

&lt;p&gt;The month's defining announcements were financings, not acquisitions. Mistral's $3.5B Series D was Europe's largest AI venture round, Crusoe raised $3.9B, and Nscale and Waymo each raised $3B in debt. Medtronic's $700M strategic investment in Cornerstone Robotics was the largest corporate-strategic deal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/09/17/crusoe-raises-3-9b-to-build-massive-data-centers-and-small-modular-ai-factories/" rel="noopener noreferrer"&gt;TechCrunch: Crusoe raises $3.9B to build massive data centers and small modular AI factories&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://news.crunchbase.com/venture/europe-record-setting-mistral-ai-raise/" rel="noopener noreferrer"&gt;Crunchbase News: Mistral AI's record-setting European raise&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/nscale-closes-3b-debt-package-to-power-ai-infrastructure-buildout-across-the-us/" rel="noopener noreferrer"&gt;Tech Funding News: Nscale closes $3B debt package&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.bloomberg.com/news/articles/2026-09-02/waymo-taps-pimco-blackstone-for-3-billion-in-first-debt-deal" rel="noopener noreferrer"&gt;Bloomberg: Waymo taps Pimco, Blackstone for $3 billion in first debt deal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.theinformation.com/briefings/coreweave-prices-3-7-billion-convertible-bond-offering" rel="noopener noreferrer"&gt;The Information: CoreWeave prices $3.7 billion convertible bond offering&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/motive-secures-1-3b-from-general-catalyst-as-ai-platform-for-physical-operations-scales/" rel="noopener noreferrer"&gt;Tech Funding News: Motive secures $1.3B from General Catalyst&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/positron-ai-raises-875-million-at-a-5-billion-valuation-to-bring-its-next-generation-inference-silicon-to-market-302874601.html" rel="noopener noreferrer"&gt;PR Newswire: Positron AI raises $875 million at a $5 billion valuation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/09/29/a16z-backed-eliseai-raises-350m-doubles-valuation-to-4b/" rel="noopener noreferrer"&gt;TechCrunch: EliseAI raises $350M, doubles valuation to $4B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/mit-dropouts-mach-industries-doubles-valuation-to-3-7b-in-three-months-with-fresh-600m-round/" rel="noopener noreferrer"&gt;Tech Funding News: Mach Industries doubles valuation to $3.7B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/andreessen-backed-gimlet-labs-hits-3b-valuation-with-300m-round-as-ai-goes-multi-chip/" rel="noopener noreferrer"&gt;Tech Funding News: Gimlet Labs hits $3B valuation with $300M round&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/clay-hits-7-1b-valuation-with-115m-raise-as-it-sees-ai-agents-running-future-of-sales/" rel="noopener noreferrer"&gt;Tech Funding News: Clay hits $7.1B valuation with $115M raise&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://siliconangle.com/2026/09/22/heidi-health-nabs-340m-to-deepen-adoption-of-ai-agents-within-health-systems-globally/" rel="noopener noreferrer"&gt;SiliconANGLE: Heidi Health nabs $340M&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://siliconangle.com/2026/09/29/world-model-startup-general-intuition-closes-220m-investment/" rel="noopener noreferrer"&gt;SiliconANGLE: General Intuition closes $220M investment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.therobotreport.com/medtronic-invests-700m-in-surgical-partner-cornerstone-robotics/" rel="noopener noreferrer"&gt;The Robot Report: Medtronic invests $700M in Cornerstone Robotics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For every September 2026 round with company and investor profiles, browse the live deal feed on aifunding.me.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>startup</category>
      <category>venturecapital</category>
      <category>funding</category>
    </item>
    <item>
      <title>AWS Bedrock vs LangChain: Framework Comparison 2026</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 07 Oct 2026 19:55:28 +0000</pubDate>
      <link>https://dev.to/devtoaaron/aws-bedrock-vs-langchain-framework-comparison-2026-4h75</link>
      <guid>https://dev.to/devtoaaron/aws-bedrock-vs-langchain-framework-comparison-2026-4h75</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; AWS Bedrock offers managed infrastructure with integrated AWS services, while LangChain provides flexible application-level orchestration you own and deploy. Choose Bedrock when AWS integration and managed operations outweigh framework flexibility; choose LangChain when you need custom orchestration logic or deployment portability across cloud providers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AWS Bedrock provides managed agent infrastructure with AWS service integration; LangChain is an application framework you deploy and operate&lt;/li&gt;
&lt;li&gt;Bedrock Agents use pre-built orchestration loops; LangChain/LangGraph let you define custom control flow and state management&lt;/li&gt;
&lt;li&gt;Cost structures differ fundamentally: Bedrock bills per API call and managed service usage; LangChain costs depend on your chosen hosting, model providers, and operational overhead&lt;/li&gt;
&lt;li&gt;Bedrock's Knowledge Bases and Guardrails are managed AWS services; LangChain integrations require you to configure and maintain external services&lt;/li&gt;
&lt;li&gt;Neither framework eliminates the need for proper authorization, evaluation, monitoring, and testing of agent behavior&lt;/li&gt;
&lt;li&gt;Use Bedrock when AWS-native integration and reduced operational burden matter most; use LangChain when framework control and multi-cloud portability are priorities&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are AWS Bedrock and LangChain?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/bedrock/" rel="noopener noreferrer"&gt;AWS Bedrock&lt;/a&gt; is Amazon's managed service for building generative AI applications. It provides access to foundation models from providers like Anthropic, Meta, AI21 Labs, Cohere, and Amazon, along with managed capabilities for agents, knowledge bases, guardrails, and model evaluation. Bedrock Agents specifically handle orchestration, tool execution, and knowledge retrieval through AWS-managed infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.langchain.com/" rel="noopener noreferrer"&gt;LangChain&lt;/a&gt; is an open-source framework for developing applications with large language models. It provides abstractions for model integrations, prompt management, tool calling, memory, and retrieval. LangChain applications define their own orchestration logic and deploy to infrastructure the developer selects. &lt;a href="https://langchain-ai.github.io/langgraph/" rel="noopener noreferrer"&gt;LangGraph&lt;/a&gt;, built by the same team, adds explicit graph-based orchestration with state management, human-in-the-loop patterns, and checkpoint persistence.&lt;/p&gt;

&lt;p&gt;The comparison is not symmetric: Bedrock is a managed cloud service with opinionated patterns, while LangChain is a framework that requires you to make deployment and integration decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do AWS Bedrock and LangChain compare architecturally?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;AWS Bedrock&lt;/th&gt;
&lt;th&gt;LangChain / LangGraph&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Primary offering&lt;/td&gt;
&lt;td&gt;Managed AWS service with agent infrastructure&lt;/td&gt;
&lt;td&gt;Open-source application framework&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Orchestration&lt;/td&gt;
&lt;td&gt;Pre-built agent loop in Bedrock Agents&lt;/td&gt;
&lt;td&gt;Custom logic using LangGraph state machines or LangChain chains&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;AWS service endpoints, regional availability&lt;/td&gt;
&lt;td&gt;Your selected infrastructure (AWS, GCP, Azure, on-premises, edge)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model access&lt;/td&gt;
&lt;td&gt;Bedrock model catalog plus self-hosted on SageMaker or ECS&lt;/td&gt;
&lt;td&gt;Provider integrations you configure (OpenAI, Anthropic, Azure, Bedrock, local models)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool execution&lt;/td&gt;
&lt;td&gt;Bedrock Agents invoke Lambda functions or return tool requests&lt;/td&gt;
&lt;td&gt;Application code invokes tools directly or through adapters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Knowledge retrieval&lt;/td&gt;
&lt;td&gt;Bedrock Knowledge Bases (managed vector DB, chunking, retrieval)&lt;/td&gt;
&lt;td&gt;Application-configured retrieval from vector stores, databases, APIs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory persistence&lt;/td&gt;
&lt;td&gt;Agent session state in Bedrock Agents&lt;/td&gt;
&lt;td&gt;Application-managed checkpoints, databases, or memory stores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Guardrails&lt;/td&gt;
&lt;td&gt;Bedrock Guardrails (managed content filters, PII redaction)&lt;/td&gt;
&lt;td&gt;Application logic or third-party integrations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost model&lt;/td&gt;
&lt;td&gt;Per-request API pricing, managed service fees&lt;/td&gt;
&lt;td&gt;Model API costs, hosting costs, storage, observability, operational effort&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Neither approach removes responsibility for testing, authorization, or observability. AWS manages Bedrock's infrastructure; you still own the agent's behavior and data access policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you choose AWS Bedrock?
&lt;/h2&gt;

&lt;p&gt;AWS Bedrock is a strong choice when the following conditions apply:&lt;/p&gt;

&lt;h3&gt;
  
  
  You want reduced operational overhead
&lt;/h3&gt;

&lt;p&gt;Bedrock handles infrastructure provisioning, scaling, model endpoint management, and service availability. You configure agents through the AWS console or APIs rather than deploying container images, managing Kubernetes clusters, or scaling worker pools. For teams without dedicated ML infrastructure engineers, this can significantly reduce time to production.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS service integration is central to your architecture
&lt;/h3&gt;

&lt;p&gt;Bedrock Agents integrate natively with Lambda for tool execution, S3 for data storage, Secrets Manager for credentials, CloudWatch for logging, and IAM for permissions. Bedrock Knowledge Bases automatically provision vector databases, handle document chunking, and manage embeddings. If your application already runs on AWS and uses these services, Bedrock reduces integration complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  You need managed knowledge retrieval
&lt;/h3&gt;

&lt;p&gt;Bedrock Knowledge Bases abstract vector database operations. You upload documents to S3, specify a chunking strategy, and Bedrock handles embedding generation, indexing, and retrieval. The managed service includes maintenance, backups, and scaling. Contrast this with a LangChain application where you provision Pinecone, Weaviate, or pgvector yourself, implement chunking logic, handle embedding API calls, and manage index updates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Regulatory compliance requires AWS-managed services
&lt;/h3&gt;

&lt;p&gt;Some organizations mandate AWS-native services for compliance, audit trails, or data residency requirements. Bedrock provides AWS service guarantees, encryption at rest and in transit, VPC isolation, and CloudTrail audit logging. A self-deployed LangChain application requires you to implement and verify equivalent controls.&lt;/p&gt;

&lt;h3&gt;
  
  
  You accept Bedrock's orchestration patterns
&lt;/h3&gt;

&lt;p&gt;Bedrock Agents follow a fixed orchestration loop: receive input, plan actions, invoke tools, retrieve knowledge, generate response. This loop handles many common agent patterns but does not expose the full control surface of a custom state machine. If your workflow fits Bedrock's agent model, you avoid writing orchestration code. If it requires custom loops, branching logic, or multi-agent coordination, you may need to work around Bedrock's constraints or bring orchestration logic into Lambda functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you choose LangChain?
&lt;/h2&gt;

&lt;p&gt;LangChain is the better choice when these priorities dominate:&lt;/p&gt;

&lt;h3&gt;
  
  
  You need custom orchestration and control flow
&lt;/h3&gt;

&lt;p&gt;LangGraph lets you define explicit state machines with conditional edges, parallel branches, human approval steps, and error recovery paths. You control when the model is invoked, how tools are selected, what context is retained, and when the agent terminates. Bedrock Agents provide a managed loop; LangChain gives you the loop's source code.&lt;/p&gt;

&lt;p&gt;For example, a compliance-review workflow might require: (1) an LLM extracts claims, (2) a human reviews flagged claims, (3) approved claims proceed to a second LLM for final formatting, (4) rejected claims return to step 1 with feedback. This branching, interruption, and resumption pattern is natural in LangGraph and requires workarounds in Bedrock Agents.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-cloud or hybrid deployment is required
&lt;/h3&gt;

&lt;p&gt;LangChain applications are infrastructure-agnostic. Deploy the same codebase to AWS ECS, Google Cloud Run, Azure Container Instances, Kubernetes, or a Lambda function layer. Switch model providers by changing configuration rather than rewriting integrations. This portability matters for organizations with multi-cloud strategies, edge deployment requirements, or vendor diversification policies.&lt;/p&gt;

&lt;h3&gt;
  
  
  You want to control model provider selection
&lt;/h3&gt;

&lt;p&gt;LangChain supports OpenAI, Anthropic Claude (via Anthropic API or Bedrock), Azure OpenAI, Google Vertex AI, Cohere, Hugging Face models, local models via Ollama or vLLM, and many others through a unified interface. Change providers by swapping a configuration object. Bedrock limits you to its model catalog unless you integrate SageMaker endpoints or ECS-hosted models, which adds deployment complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Framework flexibility and community ecosystem matter
&lt;/h3&gt;

&lt;p&gt;LangChain has a large open-source community, extensive documentation, and third-party integrations for observability (LangSmith, Langfuse), vector databases, data loaders, and specialized tools. You can inspect the framework's source code, contribute fixes, and adopt community patterns. Bedrock is a closed AWS service with documentation and support through AWS channels.&lt;/p&gt;

&lt;h3&gt;
  
  
  You need granular cost control
&lt;/h3&gt;

&lt;p&gt;LangChain separates model costs from hosting costs. Use cheaper models for simple tasks, expensive models for complex reasoning, and local models for high-volume low-risk requests. Host on spot instances, scale to zero between requests, or run on-premises for sensitive workloads. Bedrock's pricing is per API request with managed service overhead; you cannot separately optimize model selection, hosting tier, or caching strategy beyond what AWS exposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do deployment models differ?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AWS Bedrock deployment
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Enable Bedrock in your AWS account and request model access&lt;/li&gt;
&lt;li&gt;Create a Bedrock Agent through the console or CloudFormation&lt;/li&gt;
&lt;li&gt;Configure the agent's foundation model, instructions, and action groups&lt;/li&gt;
&lt;li&gt;Link Lambda functions for tool execution&lt;/li&gt;
&lt;li&gt;Optionally create Knowledge Bases by uploading documents to S3&lt;/li&gt;
&lt;li&gt;Invoke the agent via the &lt;code&gt;bedrock-agent-runtime&lt;/code&gt; API from your application&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your application calls Bedrock APIs; AWS manages the agent's runtime, scaling, and state. Updates require API calls or CloudFormation changes rather than code deployments.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain deployment
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Write agent logic in Python or TypeScript using LangChain/LangGraph&lt;/li&gt;
&lt;li&gt;Configure model providers, vector stores, and tool integrations in your code&lt;/li&gt;
&lt;li&gt;Package the application as a Docker container, Lambda layer, or direct Python deployment&lt;/li&gt;
&lt;li&gt;Deploy to your chosen infrastructure (ECS, Cloud Run, Lambda, EC2, Kubernetes)&lt;/li&gt;
&lt;li&gt;Provision supporting services: vector database, checkpoint storage, observability&lt;/li&gt;
&lt;li&gt;Expose an API endpoint or queue consumer for application integration&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You own the deployment pipeline, container images, infrastructure scaling, and dependency management. Updates require code changes, testing, and redeployment through your CI/CD pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about cost comparison?
&lt;/h2&gt;

&lt;p&gt;Cost structures are not directly comparable. Bedrock charges per API request plus managed service fees; LangChain costs depend entirely on your deployment choices.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS Bedrock pricing example (as of October 2026)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Model API calls: $0.00300 per 1K input tokens, $0.015 per 1K output tokens (Claude 5 Sonnet via Bedrock)&lt;/li&gt;
&lt;li&gt;Bedrock Agents: $0.02 per agent request (includes orchestration, not model tokens)&lt;/li&gt;
&lt;li&gt;Knowledge Bases: $0.10 per 1K documents ingested, $0.035 per 1K vector storage per month, $0.035 per 1K retrievals&lt;/li&gt;
&lt;li&gt;Guardrails: $0.75 per 1K content units processed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A 10K-request/month agent workload with knowledge retrieval might cost: 10K × $0.02 (agent requests) + model token costs + knowledge base retrieval costs. The managed service premium is explicit in the per-request fee.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain pricing factors
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Model API costs: Same token pricing if using Claude via Anthropic API; choose cheaper models like GPT-4o-mini ($0.150/$0.600 per 1M tokens) or local models ($0) to reduce this&lt;/li&gt;
&lt;li&gt;Hosting: AWS ECS Fargate ~$50/month for 0.5 vCPU, 1GB RAM; scale based on load&lt;/li&gt;
&lt;li&gt;Vector database: Pinecone Starter ~$70/month; pgvector on RDS ~$50/month; self-hosted Qdrant $0 + compute&lt;/li&gt;
&lt;li&gt;Observability: LangSmith Developer ~$0/month for moderate usage; Langfuse self-hosted $0 + hosting; CloudWatch Logs ~$0.50/GB&lt;/li&gt;
&lt;li&gt;Engineering time: Design, deployment, maintenance, on-call&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For low-volume prototypes, Bedrock's managed service may cost less than operating your own infrastructure. For high-volume production workloads, LangChain's hosting and model flexibility can yield significant savings. The break-even point depends on request volume, model selection, and your team's operational efficiency.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do knowledge retrieval approaches compare?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Bedrock Knowledge Bases
&lt;/h3&gt;

&lt;p&gt;Bedrock Knowledge Bases provide managed vector storage and retrieval:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload documents to an S3 bucket&lt;/li&gt;
&lt;li&gt;Configure chunking strategy (fixed-size or semantic)&lt;/li&gt;
&lt;li&gt;Bedrock generates embeddings using Amazon Titan Embeddings or your selected model&lt;/li&gt;
&lt;li&gt;Queries retrieve relevant chunks and inject them into agent context&lt;/li&gt;
&lt;li&gt;Updates require re-ingesting documents; Bedrock handles synchronization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The managed service hides vector database operations but limits control over chunking heuristics, embedding model selection, and retrieval ranking algorithms. You cannot implement custom re-ranking, hybrid search (vector + keyword), or dynamic chunking based on document type.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain retrieval
&lt;/h3&gt;

&lt;p&gt;LangChain applications configure retrieval explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_community.vectorstores&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Pinecone&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAIEmbeddings&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.text_splitter&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;RecursiveCharacterTextSplitter&lt;/span&gt;

&lt;span class="c1"&gt;# Configure chunking
&lt;/span&gt;&lt;span class="n"&gt;text_splitter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;RecursiveCharacterTextSplitter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;chunk_size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;chunk_overlap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;separators&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;""&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Configure embeddings and vector store
&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAIEmbeddings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text-embedding-3-large&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;vectorstore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Pinecone&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_documents&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;split_docs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;embedding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;index_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-index&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Retrieve relevant chunks
&lt;/span&gt;&lt;span class="n"&gt;retriever&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;vectorstore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;as_retriever&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mmr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# maximum marginal relevance for diversity
&lt;/span&gt;    &lt;span class="n"&gt;search_kwargs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;k&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fetch_k&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This exposes the full retrieval pipeline: customize chunking per document type, choose embedding models based on domain and cost, implement hybrid search with multiple retrievers, add re-ranking with Cohere or cross-encoders, and A/B test retrieval strategies. The cost is implementation complexity and operational responsibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  What authorization model should you use?
&lt;/h2&gt;

&lt;p&gt;Both Bedrock and LangChain require explicit authorization logic. AWS IAM controls access to Bedrock APIs; your application must verify user permissions before invoking agents. LangChain applications implement authorization in code or through API gateway policies.&lt;/p&gt;

&lt;p&gt;Critical distinction: &lt;strong&gt;the agent's instructions are not a security boundary&lt;/strong&gt;. Do not rely on prompt engineering to prevent unauthorized actions. Implement authorization checks before tool execution:&lt;/p&gt;

&lt;h3&gt;
  
  
  Bedrock authorization pattern
&lt;/h3&gt;

&lt;p&gt;Use IAM policies to restrict which Lambda functions an agent can invoke. Within each Lambda function, verify the caller's permissions against the requested action. Pass user identity through the agent invocation and validate it in the tool execution context.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain authorization pattern
&lt;/h3&gt;

&lt;p&gt;Wrap tool functions with authorization decorators or middleware. Check permissions before executing database queries, API calls, or file operations. Maintain an audit log of tool invocations with user context.&lt;/p&gt;

&lt;p&gt;Both approaches require you to define and enforce authorization policies. Neither framework makes this automatic.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you handle errors and retries?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Bedrock Agents error handling
&lt;/h3&gt;

&lt;p&gt;Bedrock Agents retry failed tool invocations according to AWS retry policies. Lambda errors return to the agent for potential replanning. You control retry logic within Lambda functions and configure Lambda-level retry settings. The agent loop itself is managed by AWS.&lt;/p&gt;

&lt;p&gt;If a tool fails repeatedly, the agent may return an error to your application. Configure appropriate timeout values and implement application-level fallbacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain error handling
&lt;/h3&gt;

&lt;p&gt;LangChain applications implement error handling explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langgraph.prebuilt&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_react_agent&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_core.messages&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;HumanMessage&lt;/span&gt;

&lt;span class="c1"&gt;# Define error recovery in state machine
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;should_retry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Decide whether to retry after tool error.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;errors&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;retry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;escalate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="c1"&gt;# Build graph with error edges
&lt;/span&gt;&lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_react_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;state_modifier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You handle errors gracefully.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You control retry logic, exponential backoff, circuit breakers, and error propagation. This flexibility allows sophisticated error handling but requires you to implement it correctly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which evaluation and testing strategies apply?
&lt;/h2&gt;

&lt;p&gt;Both frameworks require rigorous testing. Do not assume managed infrastructure means less testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bedrock evaluation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use Bedrock Model Evaluation to compare models on your task dataset&lt;/li&gt;
&lt;li&gt;Test agent workflows with representative inputs and verify tool invocations&lt;/li&gt;
&lt;li&gt;Monitor CloudWatch logs for agent execution traces&lt;/li&gt;
&lt;li&gt;Validate Knowledge Base retrieval quality with known queries&lt;/li&gt;
&lt;li&gt;Configure Bedrock Guardrails and test content filtering behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LangChain evaluation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use LangSmith or Langfuse for trace debugging and dataset evaluation&lt;/li&gt;
&lt;li&gt;Implement unit tests for agent state transitions and tool execution&lt;/li&gt;
&lt;li&gt;Capture and replay agent traces for regression testing&lt;/li&gt;
&lt;li&gt;Validate retrieval quality with metrics like MRR, NDCG, or precision@k&lt;/li&gt;
&lt;li&gt;A/B test prompt variations, retrieval strategies, and model selections&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In both cases, test with adversarial inputs, edge cases, and realistic production data. Measure latency, token usage, and task completion rates.&lt;/p&gt;

&lt;h2&gt;
  
  
  How should you think about vendor lock-in?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Bedrock lock-in
&lt;/h3&gt;

&lt;p&gt;Using Bedrock Agents couples your application to AWS infrastructure. Migrating to another provider requires rewriting agent orchestration, knowledge retrieval, and tool integration. Bedrock-specific APIs do not translate directly to other clouds.&lt;/p&gt;

&lt;p&gt;Mitigation: encapsulate Bedrock API calls behind an internal interface. If you later switch providers, reimplement the interface rather than changing application logic throughout your codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain portability
&lt;/h3&gt;

&lt;p&gt;LangChain applications can switch model providers, hosting platforms, and vector databases with configuration changes. The framework abstracts provider-specific APIs behind unified interfaces.&lt;/p&gt;

&lt;p&gt;Caution: deep integration with LangChain's abstractions creates a different form of lock-in. Migrating from LangChain to a different framework or raw API calls requires rewriting orchestration logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a migration path look like?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  From LangChain to Bedrock
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Identify orchestration patterns in your LangGraph state machine&lt;/li&gt;
&lt;li&gt;Map state transitions to Bedrock Agent action groups or step-through Lambda orchestration&lt;/li&gt;
&lt;li&gt;Migrate vector stores to Bedrock Knowledge Bases or keep existing vector DB and call from Lambda&lt;/li&gt;
&lt;li&gt;Replace LangChain tool wrappers with Lambda functions&lt;/li&gt;
&lt;li&gt;Rewrite authorization checks for IAM and Lambda context&lt;/li&gt;
&lt;li&gt;Update observability to use CloudWatch and X-Ray instead of LangSmith&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a rewrite, not a lift-and-shift.&lt;/p&gt;

&lt;h3&gt;
  
  
  From Bedrock to LangChain
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Capture Bedrock Agent orchestration behavior in LangGraph state machine&lt;/li&gt;
&lt;li&gt;Migrate Knowledge Base retrieval to a LangChain vector store integration&lt;/li&gt;
&lt;li&gt;Port Lambda tool functions to Python/TypeScript functions or keep Lambda and call via API&lt;/li&gt;
&lt;li&gt;Deploy LangChain application to your chosen infrastructure&lt;/li&gt;
&lt;li&gt;Migrate observability and logging to LangSmith, Langfuse, or CloudWatch&lt;/li&gt;
&lt;li&gt;Test extensively; orchestration semantics may differ subtly&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Again, this is a rewrite. Design for either framework from the start rather than assuming easy migration.&lt;/p&gt;

&lt;h2&gt;
  
  
  What production checklist should you use?
&lt;/h2&gt;

&lt;p&gt;Before deploying either framework to production:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Bedrock implementation&lt;/th&gt;
&lt;th&gt;LangChain implementation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;IAM policies and Cognito integration&lt;/td&gt;
&lt;td&gt;OAuth, API keys, or session tokens in application logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;td&gt;Verify permissions in Lambda tool functions&lt;/td&gt;
&lt;td&gt;Implement authorization middleware for tool execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observability&lt;/td&gt;
&lt;td&gt;CloudWatch Logs, X-Ray tracing, Bedrock monitoring&lt;/td&gt;
&lt;td&gt;LangSmith, Langfuse, Datadog, or CloudWatch Logs with structured traces&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error handling&lt;/td&gt;
&lt;td&gt;Lambda retry policies, agent-level timeouts, application fallbacks&lt;/td&gt;
&lt;td&gt;Explicit retry logic in LangGraph, circuit breakers, error escalation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limiting&lt;/td&gt;
&lt;td&gt;AWS API throttling, Lambda concurrency limits&lt;/td&gt;
&lt;td&gt;API gateway rate limits, application-level semaphores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost monitoring&lt;/td&gt;
&lt;td&gt;AWS Cost Explorer for Bedrock service charges, token usage dashboards&lt;/td&gt;
&lt;td&gt;Track model API costs, hosting costs, vector DB costs separately&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evaluation&lt;/td&gt;
&lt;td&gt;Bedrock Model Evaluation datasets, manual review of agent traces&lt;/td&gt;
&lt;td&gt;LangSmith datasets, automated regression tests, A/B tests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compliance&lt;/td&gt;
&lt;td&gt;AWS compliance certifications, encryption, VPC isolation&lt;/td&gt;
&lt;td&gt;Implement equivalent controls in your infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Neither framework is "production-ready" without these operational layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do the frameworks compare for common agent patterns?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Conversational agents
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Bedrock:&lt;/strong&gt; Session state persists across invocations in Bedrock Agents. Configure session timeout and memory retention policies through the API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LangChain:&lt;/strong&gt; Use LangGraph checkpointers to persist conversation history to databases or filesystems. Implement session management and cleanup logic in your application.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tool-calling agents
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Bedrock:&lt;/strong&gt; Define action groups as Lambda functions. Bedrock Agents call them based on orchestration loop decisions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LangChain:&lt;/strong&gt; Implement tools as Python or TypeScript functions. LangGraph decides which tools to invoke based on model output and state machine edges.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-agent systems
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Bedrock:&lt;/strong&gt; Coordinate multiple agents by chaining Bedrock Agent invocations from Lambda or application code. No native multi-agent primitives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LangChain:&lt;/strong&gt; Implement supervisor patterns, handoffs, or parallel agent execution in LangGraph. The framework supports explicit multi-agent orchestration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Human-in-the-loop workflows
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Bedrock:&lt;/strong&gt; Return tool results to application for human review, then resume agent invocation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LangChain:&lt;/strong&gt; Use LangGraph interrupts to pause execution, wait for human input, and resume from checkpoints without losing state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which framework should you choose?
&lt;/h2&gt;

&lt;p&gt;Choose &lt;strong&gt;AWS Bedrock&lt;/strong&gt; when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your application is AWS-native and depends on AWS services&lt;/li&gt;
&lt;li&gt;You want to minimize infrastructure and operational overhead&lt;/li&gt;
&lt;li&gt;Managed knowledge retrieval and guardrails are high priorities&lt;/li&gt;
&lt;li&gt;Your agent workflows fit Bedrock's orchestration patterns&lt;/li&gt;
&lt;li&gt;Your team lacks ML infrastructure or DevOps expertise&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Choose &lt;strong&gt;LangChain&lt;/strong&gt; when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need custom orchestration logic or complex control flow&lt;/li&gt;
&lt;li&gt;Multi-cloud, hybrid, or on-premises deployment is required&lt;/li&gt;
&lt;li&gt;Framework flexibility and community ecosystem are priorities&lt;/li&gt;
&lt;li&gt;You want granular control over model selection, hosting, and cost optimization&lt;/li&gt;
&lt;li&gt;Your team can operate and maintain agent infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither choice is universally better. The best framework is the one whose trade-offs align with your requirements, constraints, and team capabilities.&lt;/p&gt;

&lt;p&gt;For broader framework comparisons, see our &lt;a href="https://dev.to/articles/AI-Agent-Frameworks-Complete-Guide-2026"&gt;Complete AI Agent Frameworks Guide&lt;/a&gt;. For AWS-specific architecture decisions, review &lt;a href="https://dev.to/articles/Amazon-Bedrock-AgentCore-Comprehensive-Guide"&gt;Amazon Bedrock AgentCore&lt;/a&gt;. For LangChain deployment patterns, see &lt;a href="https://dev.to/articles/AgentCore-vs-LangChain-AI-Agent-Framework-Comparison"&gt;AgentCore vs LangChain&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can I use LangChain with AWS Bedrock models?
&lt;/h3&gt;

&lt;p&gt;Yes. LangChain has a &lt;code&gt;BedrockChat&lt;/code&gt; integration that calls Bedrock's model APIs. You can use Bedrock's model catalog with LangChain's orchestration framework. This gives you Bedrock's model access without its managed agent infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need to rewrite my entire application to migrate between frameworks?
&lt;/h3&gt;

&lt;p&gt;Yes. Bedrock Agents and LangChain have different abstractions, APIs, and orchestration patterns. Plan for a rewrite rather than a migration. Design with portability in mind from the start if you anticipate switching.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which framework has lower latency?
&lt;/h3&gt;

&lt;p&gt;Latency depends on model selection, retrieval strategy, tool complexity, and network topology. Bedrock Agents add orchestration overhead; LangChain applications add hosting and cold-start overhead. Measure both on your specific workload rather than relying on generic benchmarks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use both frameworks together?
&lt;/h3&gt;

&lt;p&gt;Technically yes, but this adds complexity. You might call LangChain applications from Bedrock Lambda tools, or invoke Bedrock Knowledge Bases from a LangChain retrieval chain. Evaluate whether the integration cost justifies the benefit.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I handle secrets and credentials?
&lt;/h3&gt;

&lt;p&gt;Bedrock: Use AWS Secrets Manager and IAM roles for Lambda functions. Bedrock Agents inherit Lambda execution role permissions.&lt;/p&gt;

&lt;p&gt;LangChain: Store secrets in environment variables, AWS Secrets Manager, HashiCorp Vault, or your chosen secrets management system. Load them in your application initialization code.&lt;/p&gt;

&lt;h3&gt;
  
  
  What if my requirements change after choosing a framework?
&lt;/h3&gt;

&lt;p&gt;Budget time for a partial or complete rewrite. Small changes may fit within the chosen framework; large architectural shifts may require migrating. The cost of switching is the main reason to validate requirements thoroughly before committing to either framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/bedrock/" rel="noopener noreferrer"&gt;Amazon Bedrock - Build and scale generative AI applications with foundation models&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-cards.html" rel="noopener noreferrer"&gt;Amazon Bedrock Foundation Models Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html" rel="noopener noreferrer"&gt;Amazon Bedrock Knowledge Bases User Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html" rel="noopener noreferrer"&gt;Amazon Bedrock Guardrails Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/bedrock/pricing/" rel="noopener noreferrer"&gt;Amazon Bedrock Pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.langchain.com/oss/python/langgraph/overview" rel="noopener noreferrer"&gt;LangGraph Overview - Low-level orchestration framework&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.langchain.com/oss/python/langchain/overview" rel="noopener noreferrer"&gt;LangChain Overview - Agent harness documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents.html" rel="noopener noreferrer"&gt;Amazon Bedrock Agents Classic Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/aws-bedrock-vs-langchain" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aiengineering</category>
      <category>agentframeworks</category>
    </item>
    <item>
      <title>This Week in AI Funding: Sep 28 – Oct 2, 2026</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Mon, 05 Oct 2026 16:54:19 +0000</pubDate>
      <link>https://dev.to/devtoaaron/this-week-in-ai-funding-sep-28-oct-2-2026-6am</link>
      <guid>https://dev.to/devtoaaron/this-week-in-ai-funding-sep-28-oct-2-2026-6am</guid>
      <description>&lt;p&gt;AI Funding recorded 22 funding rounds dated 2026-09-28 through 2026-10-02. The 22 USD-denominated rounds total $21.4B.&lt;/p&gt;

&lt;p&gt;These figures summarize the cited records in this tracker; they are not a measure of all market activity or confirmation of cash transferred. Deals are listed by date, without comparing amounts in different currencies.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was recorded this week?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Recorded rounds, all currencies&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USD rounds&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total recorded in USD&lt;/td&gt;
&lt;td&gt;$21.4B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Average USD round&lt;/td&gt;
&lt;td&gt;$973M&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Which funding rounds were recorded?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Autoheal — $8M Seed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-28&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Developer Tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://siliconangle.com/2026/09/28/autoheal-raises-7-9m-to-evaluate-and-fix-ai-agents-with-ai-agents/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/autoheal"&gt;Autoheal&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Modulate — $25M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-28&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Consumer AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techcrunch.com/2026/09/28/modulate-raises-25m-for-its-voice-models-and-analysis-suite/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/modulate"&gt;Modulate&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Outmarket — $35M Series B
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-28&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Fintech&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techcrunch.com/2026/09/28/insuretech-outmarket-raises-34-5m-just-months-after-prior-round/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/outmarket"&gt;Outmarket&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Atomic — $13M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-29&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Klass Capital (lead), Madrona&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techfundingnews.com/ex-tesla-planners-raise-12-5m-from-klass-capital-and-madrona-to-let-ai-place-company-orders/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/atomic"&gt;Atomic&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Efficient Computer — $97M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-29&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.prnewswire.com/news-releases/efficient-computer-taking-on-ais-energy-problem-announces-97m-to-scale-its-processors-from-physical-ai-to-the-datacenter-302892552.html" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/efficient-computer"&gt;Efficient Computer&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  EliseAI — $350M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-29&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techcrunch.com/2026/09/29/a16z-backed-eliseai-raises-350m-doubles-valuation-to-4b/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/eliseai"&gt;EliseAI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  IPercept — $17M Series A
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-29&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://tech.eu/2026/09/29/swedish-machine-fitness-tracker-ipercept-raises-165m/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/ipercept"&gt;IPercept&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SiMa.ai — $150M Series C
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-29&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Hardware&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techfundingnews.com/fidelity-and-amplify-back-sima-ais-150m-raise-to-power-humanoids-drones-and-cars-without-nvidia/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/simaai"&gt;SiMa.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Ascerta — $18M Series A
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://siliconangle.com/2026/09/30/startup-ascerta-collects-18m-in-funding-to-help-enterprises-understand-the-value-ai-provides/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/ascerta"&gt;Ascerta&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  General Intuition — $220M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Foundation Models &amp;amp; AGI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://siliconangle.com/2026/09/29/world-model-startup-general-intuition-closes-220m-investment/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/general-intuition"&gt;General Intuition&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Metaview — $60M Series C
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.businesswire.com/news/home/20260930331041/en/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/metaview"&gt;Metaview&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Miter — $40M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.prnewswire.com/news-releases/miter-the-ai-platform-for-construction-raises-40-million-for-the-built-world-302893778.html" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/miter"&gt;Miter&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  OuterSignal — $22M Series A
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.prnewswire.com/news-releases/outersignal-raises-22m-series-a-to-bring-agentic-personalization-to-every-consumer-brand-302892586.html" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/outersignal"&gt;OuterSignal&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Restate — $20M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techcrunch.com/2026/09/30/restate-lands-20m-as-the-need-for-durable-infrastructure-increases-with-ai-agents/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/restate"&gt;Restate&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Zenithon — $10M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-09-30&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Foundation Models &amp;amp; AGI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://tech.eu/2026/09/30/zenithon-raises-10m-to-build-world-models-for-extreme-physics/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/zenithon"&gt;Zenithon&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Arceus Legal — $17M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Enterprise AI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://siliconangle.com/2026/10/01/ai-driven-law-firm-arceus-legal-raises-17m-to-move-beyond-contract-work/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/arceus-legal"&gt;Arceus Legal&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  OpenAI — $20.0B Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; Foundation Models &amp;amp; AGI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.theinformation.com/briefings/exclusive-nvidia-softbank-make-final-20-billion-investment-openais-last-round" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/openai"&gt;OpenAI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  PaleBlueDot AI — $200M Series C
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.prnewswire.com/news-releases/palebluedot-ai-raises-200m-series-c-round-to-scale-super-intelligence-infrastructure-platform-302896601.html" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/palebluedot-ai"&gt;PaleBlueDot AI&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Parakeet Health — $10M Series A
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Healthcare&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.prnewswire.com/news-releases/parakeet-health-raises-10-million-series-a-following-10x-growth-and-rapid-enterprise-adoption-302895793.html" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/parakeet-health"&gt;Parakeet Health&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Photon — $5M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Developer Tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techcrunch.com/2026/10/01/photon-held-a-funeral-for-mobile-apps-now-it-has-4-5m-to-help-replace-them-with-agents/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/photon"&gt;Photon&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Satlyt — $8M Undisclosed
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://techcrunch.com/2026/10/01/satlyt-founded-by-a-former-google-and-spacex-product-manager-raises-8m-to-run-ai-on-satellites/" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/satlyt"&gt;Satlyt&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Volantis — $88M Series A
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Recorded date:&lt;/strong&gt; 2026-10-01&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sector:&lt;/strong&gt; AI Infrastructure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recorded investors:&lt;/strong&gt; Undisclosed (lead)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.prnewswire.com/news-releases/volantis-raises-88m-series-a-to-demolish-the-ai-memory-wall-with-photonics-302895940.html" rel="noopener noreferrer"&gt;Funding report&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company:&lt;/strong&gt; &lt;a href="https://dev.to/companies/volantis"&gt;Volantis&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How do the recorded rounds break down by sector?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sector&lt;/th&gt;
&lt;th&gt;Rounds, all currencies&lt;/th&gt;
&lt;th&gt;USD subtotal&lt;/th&gt;
&lt;th&gt;Share of USD total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AI Developer Tools&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;$12M&lt;/td&gt;
&lt;td&gt;0.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Fintech&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;$35M&lt;/td&gt;
&lt;td&gt;0.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Hardware&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;$150M&lt;/td&gt;
&lt;td&gt;0.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Healthcare&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;$10M&lt;/td&gt;
&lt;td&gt;0.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Infrastructure&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;$413M&lt;/td&gt;
&lt;td&gt;1.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consumer AI&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;$25M&lt;/td&gt;
&lt;td&gt;0.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise AI&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;$536M&lt;/td&gt;
&lt;td&gt;2.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Foundation Models &amp;amp; AGI&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;$20.2B&lt;/td&gt;
&lt;td&gt;94.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;USD subtotals and shares exclude rounds recorded in other currencies. No exchange rate or market forecast is inferred.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://siliconangle.com/2026/09/28/autoheal-raises-7-9m-to-evaluate-and-fix-ai-agents-with-ai-agents/" rel="noopener noreferrer"&gt;siliconangle.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/09/28/modulate-raises-25m-for-its-voice-models-and-analysis-suite/" rel="noopener noreferrer"&gt;techcrunch.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/09/28/insuretech-outmarket-raises-34-5m-just-months-after-prior-round/" rel="noopener noreferrer"&gt;techcrunch.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/ex-tesla-planners-raise-12-5m-from-klass-capital-and-madrona-to-let-ai-place-company-orders/" rel="noopener noreferrer"&gt;techfundingnews.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/efficient-computer-taking-on-ais-energy-problem-announces-97m-to-scale-its-processors-from-physical-ai-to-the-datacenter-302892552.html" rel="noopener noreferrer"&gt;www.prnewswire.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/09/29/a16z-backed-eliseai-raises-350m-doubles-valuation-to-4b/" rel="noopener noreferrer"&gt;techcrunch.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tech.eu/2026/09/29/swedish-machine-fitness-tracker-ipercept-raises-165m/" rel="noopener noreferrer"&gt;tech.eu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techfundingnews.com/fidelity-and-amplify-back-sima-ais-150m-raise-to-power-humanoids-drones-and-cars-without-nvidia/" rel="noopener noreferrer"&gt;techfundingnews.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://siliconangle.com/2026/09/30/startup-ascerta-collects-18m-in-funding-to-help-enterprises-understand-the-value-ai-provides/" rel="noopener noreferrer"&gt;siliconangle.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://siliconangle.com/2026/09/29/world-model-startup-general-intuition-closes-220m-investment/" rel="noopener noreferrer"&gt;siliconangle.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.businesswire.com/news/home/20260930331041/en/" rel="noopener noreferrer"&gt;www.businesswire.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/miter-the-ai-platform-for-construction-raises-40-million-for-the-built-world-302893778.html" rel="noopener noreferrer"&gt;www.prnewswire.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/outersignal-raises-22m-series-a-to-bring-agentic-personalization-to-every-consumer-brand-302892586.html" rel="noopener noreferrer"&gt;www.prnewswire.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/09/30/restate-lands-20m-as-the-need-for-durable-infrastructure-increases-with-ai-agents/" rel="noopener noreferrer"&gt;techcrunch.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tech.eu/2026/09/30/zenithon-raises-10m-to-build-world-models-for-extreme-physics/" rel="noopener noreferrer"&gt;tech.eu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://siliconangle.com/2026/10/01/ai-driven-law-firm-arceus-legal-raises-17m-to-move-beyond-contract-work/" rel="noopener noreferrer"&gt;siliconangle.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.theinformation.com/briefings/exclusive-nvidia-softbank-make-final-20-billion-investment-openais-last-round" rel="noopener noreferrer"&gt;www.theinformation.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/palebluedot-ai-raises-200m-series-c-round-to-scale-super-intelligence-infrastructure-platform-302896601.html" rel="noopener noreferrer"&gt;www.prnewswire.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/parakeet-health-raises-10-million-series-a-following-10x-growth-and-rapid-enterprise-adoption-302895793.html" rel="noopener noreferrer"&gt;www.prnewswire.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/10/01/photon-held-a-funeral-for-mobile-apps-now-it-has-4-5m-to-help-replace-them-with-agents/" rel="noopener noreferrer"&gt;techcrunch.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/2026/10/01/satlyt-founded-by-a-former-google-and-spacex-product-manager-raises-8m-to-run-ai-on-satellites/" rel="noopener noreferrer"&gt;techcrunch.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.prnewswire.com/news-releases/volantis-raises-88m-series-a-to-demolish-the-ai-memory-wall-with-photonics-302895940.html" rel="noopener noreferrer"&gt;www.prnewswire.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>startup</category>
      <category>venturecapital</category>
      <category>funding</category>
    </item>
    <item>
      <title>AWS AgentCore vs LangChain vs Alibaba AgentLoop Compared</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 30 Sep 2026 19:05:41 +0000</pubDate>
      <link>https://dev.to/devtoaaron/aws-agentcore-vs-langchain-vs-alibaba-agentloop-compared-pl0</link>
      <guid>https://dev.to/devtoaaron/aws-agentcore-vs-langchain-vs-alibaba-agentloop-compared-pl0</guid>
      <description>&lt;h1&gt;
  
  
  AWS Bedrock AgentCore vs LangChain vs Alibaba AgentLoop: Which Enterprise Agent Framework Should You Choose?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; AWS AgentCore provides managed orchestration with Runtime hosting, LangChain offers application-level control with portable execution, and Alibaba AgentLoop delivers an opinionated production pattern. Choose AgentCore Harness for AWS-native managed loops, LangChain for framework flexibility across clouds, or AgentLoop when its workflow abstraction matches your architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AgentCore Harness manages the orchestration loop; Runtime hosts custom frameworks. Compare managed services against code ownership before choosing infrastructure.&lt;/li&gt;
&lt;li&gt;LangChain/LangGraph gives you the orchestration graph and state contract. Hosting, observability, and identity remain your responsibility.&lt;/li&gt;
&lt;li&gt;Alibaba AgentLoop documents a production pattern: intent routing, tool execution, memory integration, and monitoring. Implementation is your own code following their architecture.&lt;/li&gt;
&lt;li&gt;Gateway/MCP integration differs: AgentCore Gateway exposes APIs as MCP tools, LangChain uses client adapters, AgentLoop documents tool contracts without a managed gateway.&lt;/li&gt;
&lt;li&gt;Cost boundaries span different layers: AgentCore meters managed services, LangChain costs are hosting plus models, AgentLoop costs are your infrastructure plus any Alibaba Cloud services used.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are AWS AgentCore, LangChain, and Alibaba AgentLoop?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html" rel="noopener noreferrer"&gt;Amazon Bedrock AgentCore&lt;/a&gt; (checked September 30, 2026) provides managed services for agent orchestration (Harness), custom framework hosting (Runtime), shared memory (Memory), tool gateways (Gateway), browser automation, and code execution. These services work independently or together. Harness owns the agent loop; Runtime hosts code you bring. Neither locks you into Bedrock models exclusively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.langchain.com/" rel="noopener noreferrer"&gt;LangChain&lt;/a&gt; and &lt;a href="https://langchain-ai.github.io/langgraph/" rel="noopener noreferrer"&gt;LangGraph&lt;/a&gt; form an open-source framework for building agent applications. LangChain supplies model integrations, tools, and retrieval; LangGraph handles state machines and orchestration. You own the execution environment, state persistence, and operational contract. Optional managed services (LangSmith, LangGraph Cloud) are separate products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aliyun/ai-agent-handbook" rel="noopener noreferrer"&gt;Alibaba AgentLoop&lt;/a&gt; is an architectural pattern documented by Alibaba Cloud's AI team (1,064 GitHub stars as of September 30, 2026). The handbook describes a production agent lifecycle: intent understanding, tool selection, execution, memory integration, monitoring, and human-in-the-loop workflows. It prescribes abstractions and contracts rather than distributing a framework package.&lt;/p&gt;

&lt;p&gt;The three-way comparison matters because organizations evaluating "managed versus code" often miss the third option: a documented production pattern with implementation flexibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do these frameworks compare at a glance?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;AWS AgentCore&lt;/th&gt;
&lt;th&gt;LangChain/LangGraph&lt;/th&gt;
&lt;th&gt;Alibaba AgentLoop&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary Model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harness: managed loop; Runtime: hosting&lt;/td&gt;
&lt;td&gt;Framework library; you own orchestration&lt;/td&gt;
&lt;td&gt;Architectural pattern; you build it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Orchestration Ownership&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harness manages; Runtime accepts yours&lt;/td&gt;
&lt;td&gt;Application-owned state graph&lt;/td&gt;
&lt;td&gt;Your code following documented contracts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hosting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS service (regional availability)&lt;/td&gt;
&lt;td&gt;Anywhere Python runs + optional LangGraph Cloud&lt;/td&gt;
&lt;td&gt;Your infrastructure or Alibaba Cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Access&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bedrock + external (via API or hosting)&lt;/td&gt;
&lt;td&gt;100+ providers via integrations&lt;/td&gt;
&lt;td&gt;Any model your code can call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Memory/State&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AgentCore Memory (managed) + thread state&lt;/td&gt;
&lt;td&gt;Checkpointers + custom stores&lt;/td&gt;
&lt;td&gt;Pattern defines interfaces; you implement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool Gateway&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AgentCore Gateway (MCP-compatible)&lt;/td&gt;
&lt;td&gt;MCP client adapters + native tools&lt;/td&gt;
&lt;td&gt;Tool abstraction layer; no managed gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Interrupts/Human-in-Loop&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harness supports configuration&lt;/td&gt;
&lt;td&gt;LangGraph interrupts + persistence&lt;/td&gt;
&lt;td&gt;Documented workflow states&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Observability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CloudWatch + Bedrock metrics&lt;/td&gt;
&lt;td&gt;LangSmith (optional) + your telemetry&lt;/td&gt;
&lt;td&gt;Pattern includes monitoring contracts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost Boundary&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Service meters + model calls + AWS resources&lt;/td&gt;
&lt;td&gt;Hosting + models + storage + operations&lt;/td&gt;
&lt;td&gt;Your infrastructure + model calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lock-in Surface&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS APIs for Harness/Runtime/Memory/Gateway&lt;/td&gt;
&lt;td&gt;Portable code; integrations abstract providers&lt;/td&gt;
&lt;td&gt;None (it's a pattern, not a service)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;None of these choices eliminate your responsibility for authorization, evaluation, tool idempotency, or production validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the managed-versus-code decision really asking?
&lt;/h2&gt;

&lt;p&gt;The question "managed or self-hosted" conflates three separate decisions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Who owns the orchestration loop?&lt;/strong&gt; (Managed Harness vs. your graph)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where does the agent run?&lt;/strong&gt; (AWS Runtime vs. your host vs. serverless)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What do you implement versus configure?&lt;/strong&gt; (AgentCore services vs. LangChain code vs. AgentLoop contracts)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Decision 1: Orchestration ownership
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If you need...&lt;/th&gt;
&lt;th&gt;Consider&lt;/th&gt;
&lt;th&gt;Accept this trade-off&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS-managed agent loop with tool execution policy&lt;/td&gt;
&lt;td&gt;AgentCore Harness&lt;/td&gt;
&lt;td&gt;Harness behavior and extension points define what's possible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom state machines, branching, conditional loops&lt;/td&gt;
&lt;td&gt;LangChain/LangGraph or AgentLoop pattern&lt;/td&gt;
&lt;td&gt;You own graph correctness, state recovery, and loop termination&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interrupt-resume with approval gates&lt;/td&gt;
&lt;td&gt;LangGraph persistence + &lt;code&gt;interrupt_before&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;State checkpointing and resume contract are your responsibility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production-proven workflow abstractions&lt;/td&gt;
&lt;td&gt;AgentLoop pattern&lt;/td&gt;
&lt;td&gt;Implementation and testing burden; no managed service to call&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;AgentCore Harness is not "infrastructure" — it manages orchestration. Runtime is the hosting service. Conflating them obscures the actual decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision 2: Hosting and runtime environment
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Deployment requirement&lt;/th&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Verification needed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;AWS operates the runtime&lt;/td&gt;
&lt;td&gt;AgentCore Runtime&lt;/td&gt;
&lt;td&gt;Regional availability, cold start behavior, identity integration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kubernetes or on-premise hosting&lt;/td&gt;
&lt;td&gt;LangChain + your deployment&lt;/td&gt;
&lt;td&gt;Container images, scaling rules, secret management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Alibaba Cloud integration&lt;/td&gt;
&lt;td&gt;AgentLoop + Aliyun services&lt;/td&gt;
&lt;td&gt;Equivalent hosting, observability, and IAM on Alibaba Cloud&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Serverless with minimal infra&lt;/td&gt;
&lt;td&gt;Runtime or Lambda + framework&lt;/td&gt;
&lt;td&gt;Execution time limits, state handoff, retry behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Portable across clouds&lt;/td&gt;
&lt;td&gt;LangChain with abstracted dependencies&lt;/td&gt;
&lt;td&gt;Test actual portability; connection strings aren't lock-in alone&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Harness runs managed; Runtime accepts containers. LangChain runs wherever you deploy it. AgentLoop is a set of contracts; hosting is your choice.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision 3: Build versus integrate
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;AgentCore&lt;/th&gt;
&lt;th&gt;LangChain&lt;/th&gt;
&lt;th&gt;AgentLoop Pattern&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Orchestration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Configure Harness behavior&lt;/td&gt;
&lt;td&gt;Implement LangGraph state machine&lt;/td&gt;
&lt;td&gt;Implement intent router + executor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Memory persistence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Integrate Memory service&lt;/td&gt;
&lt;td&gt;Choose checkpointer (Postgres, Redis, etc.)&lt;/td&gt;
&lt;td&gt;Implement memory interface&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tool discovery&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Register tools with Gateway&lt;/td&gt;
&lt;td&gt;Bind tools or connect MCP servers&lt;/td&gt;
&lt;td&gt;Define tool registry + selection logic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Human approval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Configure Harness policies&lt;/td&gt;
&lt;td&gt;Graph interrupts + resume endpoint&lt;/td&gt;
&lt;td&gt;Implement approval workflow state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Multi-session context&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Store in AgentCore Memory&lt;/td&gt;
&lt;td&gt;Separate store + namespace logic&lt;/td&gt;
&lt;td&gt;Memory manager per pattern spec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Monitoring&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CloudWatch + Bedrock metrics&lt;/td&gt;
&lt;td&gt;LangSmith or your observability stack&lt;/td&gt;
&lt;td&gt;Implement telemetry per pattern&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;AgentCore gives you services; LangChain gives you libraries; AgentLoop gives you architecture. None is a complete solution out of the box.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you choose AWS AgentCore Harness?
&lt;/h2&gt;

&lt;p&gt;AgentCore Harness manages the orchestration loop. Choose it when the managed behavior matches your workflow and AWS hosting is acceptable.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentCore Harness strengths
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Managed orchestration and tool execution policy.&lt;/strong&gt; Harness runs the agent loop, invokes tools, and applies configured guardrails. You don't implement the graph.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integrated AWS services.&lt;/strong&gt; Memory, Gateway, Browser, Code Interpreter are first-party integrations. Identity, networking, and observability use AWS constructs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-in MCP Gateway.&lt;/strong&gt; AgentCore Gateway exposes REST APIs, Lambda functions, and S3 as MCP tools. You configure endpoints; Gateway handles tool calling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Regional managed runtime.&lt;/strong&gt; AWS operates the execution environment. You configure, not deploy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Native Bedrock integration.&lt;/strong&gt; Harness works with all Bedrock models plus external models via Runtime hosting or API.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  When Harness fits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Your workflow maps to Harness's supported behaviors (tool calling, sequential or branching logic, memory integration)&lt;/li&gt;
&lt;li&gt;AWS is already your platform and service dependencies are acceptable&lt;/li&gt;
&lt;li&gt;You want AWS to operate the loop and address scaling, availability, and patching&lt;/li&gt;
&lt;li&gt;Tool policy (deny external writes during read-only tasks) aligns with Harness controls&lt;/li&gt;
&lt;li&gt;The team prefers configuration over orchestration code&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When Harness doesn't fit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You need custom state machines, conditional branching, or loop logic Harness doesn't expose&lt;/li&gt;
&lt;li&gt;Interrupt-and-resume with arbitrary approval workflows requires graph-level control&lt;/li&gt;
&lt;li&gt;Multi-cloud or on-premise hosting is required&lt;/li&gt;
&lt;li&gt;Service quotas, regional availability, or pricing don't meet requirements&lt;/li&gt;
&lt;li&gt;You want code ownership of the orchestration graph&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use Runtime instead of Harness when you bring your own framework. Harness and Runtime are not mutually exclusive — AgentCore is both services, not one.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you choose LangChain and LangGraph?
&lt;/h2&gt;

&lt;p&gt;LangChain/LangGraph gives you the framework and leaves hosting, observability, and operations to you. Choose it when you need code-level control and portable execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain/LangGraph strengths
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;You own the orchestration graph.&lt;/strong&gt; LangGraph state machines are code. Conditional edges, loops, parallel execution, and custom logic are all explicit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interrupt and resume with persistence.&lt;/strong&gt; &lt;code&gt;interrupt_before&lt;/code&gt; halts execution at a node; state checkpointers (Postgres, Redis, etc.) persist the graph. Resume is an API call with the checkpoint ID.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;100+ model integrations.&lt;/strong&gt; LangChain abstracts OpenAI, Anthropic, Bedrock, Gemini, local models, and more. Switching models is a configuration change, not a rewrite.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MCP client adapters.&lt;/strong&gt; Connect to any MCP server; tools are discovered dynamically. No managed gateway required.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Portable execution.&lt;/strong&gt; Run the same agent code on AWS, GCP, Azure, Kubernetes, or your laptop. Dependencies are Python packages, not cloud services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Composable memory.&lt;/strong&gt; Thread-level checkpointers persist conversation state; cross-thread stores hold facts. You choose backends and namespace logic.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  When LangChain fits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You need custom orchestration: parallel tool calls, conditional branching, retry loops, or workflow-specific state machines&lt;/li&gt;
&lt;li&gt;Human-in-the-loop approval gates with interrupt-resume are required&lt;/li&gt;
&lt;li&gt;Portable execution across clouds or on-premise is a priority&lt;/li&gt;
&lt;li&gt;You want framework flexibility without managed service dependencies&lt;/li&gt;
&lt;li&gt;LangSmith observability or LangGraph Cloud hosting are acceptable (both optional)&lt;/li&gt;
&lt;li&gt;The team has Python expertise and prefers owning the graph&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When LangChain doesn't fit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You want a managed loop and don't need custom state machines&lt;/li&gt;
&lt;li&gt;Operating hosting, scaling, observability, and state persistence is outside your scope&lt;/li&gt;
&lt;li&gt;AWS-native integrations (IAM, CloudWatch, S3, Bedrock) are a hard requirement&lt;/li&gt;
&lt;li&gt;The team lacks the expertise to implement and test orchestration code&lt;/li&gt;
&lt;li&gt;No one will maintain the graph as requirements evolve&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;LangChain is not "unmanaged AgentCore" — it's application code. The right comparison is LangChain on Runtime versus LangChain on your own host.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you choose Alibaba AgentLoop?
&lt;/h2&gt;

&lt;p&gt;AgentLoop is a documented architectural pattern, not a service or framework package. Choose it when its abstractions fit and you're implementing from contracts.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentLoop pattern strengths
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Production-proven workflow architecture.&lt;/strong&gt; The handbook documents intent routing, tool execution, memory integration, and monitoring based on Alibaba's production agents.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No framework lock-in.&lt;/strong&gt; AgentLoop is a set of interfaces and contracts. Implement with LangChain, your own code, or any framework.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Opinionated abstractions.&lt;/strong&gt; Intent, Tool, Memory, Monitor, and Executor are defined. You build against clear contracts rather than inventing abstractions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-stage agent lifecycle.&lt;/strong&gt; The pattern covers intent understanding, planning, execution, memory retrieval, result synthesis, and feedback. Each stage has documented inputs and outputs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitoring and observability contracts.&lt;/strong&gt; AgentLoop specifies what to instrument: intent classification accuracy, tool selection precision, execution latency, memory hit rate, user satisfaction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Human-in-the-loop workflows.&lt;/strong&gt; The pattern defines approval gates, confidence thresholds, and escalation paths. Implementation is your code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  When AgentLoop fits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're building from architectural contracts and prefer proven patterns over framework opinions&lt;/li&gt;
&lt;li&gt;The team will implement orchestration, memory, and tool layers&lt;/li&gt;
&lt;li&gt;You want flexibility in hosting, models, and infrastructure&lt;/li&gt;
&lt;li&gt;Alibaba Cloud services (if used) are acceptable&lt;/li&gt;
&lt;li&gt;You need a reference architecture for production agents and will adapt it&lt;/li&gt;
&lt;li&gt;No managed service or open-source framework fully matches requirements&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When AgentLoop doesn't fit
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You want a managed service, not a pattern to implement&lt;/li&gt;
&lt;li&gt;The team lacks capacity to build orchestration, state machines, and memory systems&lt;/li&gt;
&lt;li&gt;You need framework code to start from, not contracts&lt;/li&gt;
&lt;li&gt;AWS or LangChain already solve the problem and introducing a third abstraction adds complexity&lt;/li&gt;
&lt;li&gt;The pattern's workflow stages don't match your agent's actual behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AgentLoop is not "Alibaba's AgentCore" — it's documentation, not a deployed service. Compare it against building your own architecture from scratch, not against managed offerings.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do memory and state management compare?
&lt;/h2&gt;

&lt;p&gt;Memory is a frequent source of confusion because "memory" conflates thread-level state, cross-session facts, and long-term knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentCore Memory
&lt;/h3&gt;

&lt;p&gt;AgentCore Memory is a managed vector store for multi-session context. It persists facts, user preferences, and retrieved knowledge across conversations. Memory is separate from Harness's thread state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use AgentCore Memory:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-session agents need to recall past interactions&lt;/li&gt;
&lt;li&gt;User preferences, learned facts, or context should survive beyond a single conversation&lt;/li&gt;
&lt;li&gt;AWS-managed vector storage with Bedrock integration is acceptable&lt;/li&gt;
&lt;li&gt;You want to configure memory, not implement a retrieval layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Integration:&lt;/strong&gt; Harness can query Memory during orchestration. Runtime agents access Memory via SDK. Memory is not required to use Harness.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangChain checkpointers and stores
&lt;/h3&gt;

&lt;p&gt;LangChain separates thread state (checkpointers) from cross-thread memory (custom stores).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Checkpointers&lt;/strong&gt; persist the LangGraph state at each node. Postgres, Redis, SQLite, and in-memory checkpointers are built-in. Checkpointers enable interrupt-resume.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-thread stores&lt;/strong&gt; hold facts, summaries, or retrieved context that span conversations. You implement the store, query logic, and namespace. LangChain includes vector store integrations (Pinecone, Weaviate, Qdrant, pgvector).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use LangChain memory:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need portable state persistence across environments&lt;/li&gt;
&lt;li&gt;Interrupt-resume requires durable checkpoints&lt;/li&gt;
&lt;li&gt;Memory backend choice (Postgres, Redis, vector DB) is a requirement&lt;/li&gt;
&lt;li&gt;You want to control namespace, retention, and retrieval logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Integration:&lt;/strong&gt; Checkpointers are LangGraph configuration. Memory stores are tool calls or retrieval chains.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentLoop memory pattern
&lt;/h3&gt;

&lt;p&gt;AgentLoop defines a Memory interface with &lt;code&gt;store&lt;/code&gt;, &lt;code&gt;retrieve&lt;/code&gt;, and &lt;code&gt;update&lt;/code&gt; methods. The pattern specifies when to query memory (intent understanding, context enrichment, result synthesis) but not the implementation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use AgentLoop memory:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're implementing the full AgentLoop pattern&lt;/li&gt;
&lt;li&gt;Memory backend (vector DB, graph DB, relational store) is an open decision&lt;/li&gt;
&lt;li&gt;You need multi-source memory: user facts, domain knowledge, interaction history&lt;/li&gt;
&lt;li&gt;Retrieval logic (semantic search, keyword match, graph traversal) is complex&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Integration:&lt;/strong&gt; Your implementation calls the Memory interface at documented workflow stages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;AgentCore Memory&lt;/th&gt;
&lt;th&gt;LangChain&lt;/th&gt;
&lt;th&gt;AgentLoop Pattern&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Thread state&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harness manages; Runtime uses checkpoints&lt;/td&gt;
&lt;td&gt;LangGraph checkpointers&lt;/td&gt;
&lt;td&gt;Your state machine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cross-session facts&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Store in Memory service&lt;/td&gt;
&lt;td&gt;Custom store + vector DB&lt;/td&gt;
&lt;td&gt;Implement Memory interface&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Namespace/tenant isolation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Configure Memory namespaces&lt;/td&gt;
&lt;td&gt;Your logic in store&lt;/td&gt;
&lt;td&gt;Define in implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Retrieval strategy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vector similarity (managed)&lt;/td&gt;
&lt;td&gt;Retrieval chains + custom logic&lt;/td&gt;
&lt;td&gt;Your retrieval layer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Retention/deletion&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Configure Memory policies&lt;/td&gt;
&lt;td&gt;Your database + cleanup jobs&lt;/td&gt;
&lt;td&gt;Implement per requirements&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Backend choice&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed (no choice)&lt;/td&gt;
&lt;td&gt;Postgres, Redis, Pinecone, pgvector, etc.&lt;/td&gt;
&lt;td&gt;Any (you implement)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Choose based on ownership preference: managed service, framework integration, or pattern implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do tool integration and MCP support compare?
&lt;/h2&gt;

&lt;p&gt;Tool calling is central to agent utility, but "MCP support" means different things in each framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentCore Gateway
&lt;/h3&gt;

&lt;p&gt;AgentCore Gateway exposes REST APIs, Lambda functions, S3 buckets, and databases as MCP tools. Gateway is a managed service that translates API definitions into MCP tool schemas, handles authentication, and routes calls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gateway workflow:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Register an API (OpenAPI spec), Lambda function (ARN), or S3 bucket with Gateway&lt;/li&gt;
&lt;li&gt;Gateway generates MCP tool schema automatically&lt;/li&gt;
&lt;li&gt;Harness or Runtime agents discover tools via Gateway&lt;/li&gt;
&lt;li&gt;Agent calls tool; Gateway authenticates, invokes backend, returns result&lt;/li&gt;
&lt;li&gt;Gateway logs calls and enforces policies&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;When Gateway fits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have internal APIs that agents should discover as tools&lt;/li&gt;
&lt;li&gt;Managed MCP translation from OpenAPI/Lambda/S3 reduces integration effort&lt;/li&gt;
&lt;li&gt;AWS IAM and networking already secure your APIs&lt;/li&gt;
&lt;li&gt;Centralized tool governance (deny external writes, rate limits) is required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When Gateway doesn't fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You need MCP servers for Git, Slack, databases, or other non-AWS integrations&lt;/li&gt;
&lt;li&gt;Tool calling logic requires middleware (caching, retries, transforms)&lt;/li&gt;
&lt;li&gt;Portable execution means Gateway isn't available in other clouds&lt;/li&gt;
&lt;li&gt;Gateway pricing or quotas are prohibitive&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LangChain MCP adapters
&lt;/h3&gt;

&lt;p&gt;LangChain provides MCP client adapters that connect to any MCP server. Tools are discovered dynamically; no translation layer required.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP workflow with LangChain:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start MCP server (filesystem, GitHub, Postgres, Slack, etc.)&lt;/li&gt;
&lt;li&gt;Connect agent to server via &lt;code&gt;MCPClient&lt;/code&gt; adapter&lt;/li&gt;
&lt;li&gt;Agent queries server for available tools&lt;/li&gt;
&lt;li&gt;Agent calls tools; server executes and returns results&lt;/li&gt;
&lt;li&gt;You instrument tool calls via LangSmith or custom telemetry&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;When LangChain MCP fits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want to connect to existing MCP servers (not build a gateway)&lt;/li&gt;
&lt;li&gt;Tool calling logic lives in application code (retries, error handling, transforms)&lt;/li&gt;
&lt;li&gt;Portable execution means you can't depend on a managed gateway&lt;/li&gt;
&lt;li&gt;Multiple MCP servers need to be composed per agent task&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When LangChain MCP doesn't fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want centralized tool governance without per-agent logic&lt;/li&gt;
&lt;li&gt;AWS-native API integration (Lambda, S3, Bedrock) is a priority&lt;/li&gt;
&lt;li&gt;No one will operate MCP servers&lt;/li&gt;
&lt;li&gt;Gateway already exposes the tools you need&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AgentLoop tool pattern
&lt;/h3&gt;

&lt;p&gt;AgentLoop defines a Tool interface with &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;description&lt;/code&gt;, &lt;code&gt;parameters&lt;/code&gt;, and &lt;code&gt;execute&lt;/code&gt; methods. The pattern specifies tool selection logic (match intent to tool), execution (call with parsed args), and error handling (retry, fallback, escalation). MCP is not prescribed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AgentLoop tool workflow:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Define tools per the Tool interface (your code)&lt;/li&gt;
&lt;li&gt;Implement tool registry (discovery by intent)&lt;/li&gt;
&lt;li&gt;Implement tool executor (invoke, timeout, retry)&lt;/li&gt;
&lt;li&gt;Instrument tool calls (latency, errors, retries)&lt;/li&gt;
&lt;li&gt;Optionally integrate MCP servers via adapter&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;When AgentLoop tools fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're implementing the full AgentLoop pattern&lt;/li&gt;
&lt;li&gt;Tool calling logic is complex (conditional retries, fallback chains, result validation)&lt;/li&gt;
&lt;li&gt;You want control over tool discovery, selection, and execution&lt;/li&gt;
&lt;li&gt;MCP is one integration option among many&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When AgentLoop tools don't fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You want a managed gateway or framework-provided MCP support&lt;/li&gt;
&lt;li&gt;Tool integration is straightforward and doesn't justify a custom abstraction&lt;/li&gt;
&lt;li&gt;Gateway or LangChain already solve the problem&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Tool integration summary
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;AgentCore Gateway&lt;/th&gt;
&lt;th&gt;LangChain MCP Adapters&lt;/th&gt;
&lt;th&gt;AgentLoop Tool Pattern&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Discovery&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gateway catalog&lt;/td&gt;
&lt;td&gt;MCP server list()&lt;/td&gt;
&lt;td&gt;Your registry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Schema&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Auto-generated from OpenAPI/Lambda&lt;/td&gt;
&lt;td&gt;MCP server schema&lt;/td&gt;
&lt;td&gt;Your Tool definition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Execution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gateway invokes backend&lt;/td&gt;
&lt;td&gt;MCP server execute&lt;/td&gt;
&lt;td&gt;Your executor&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Auth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS IAM + Gateway policies&lt;/td&gt;
&lt;td&gt;Your auth + server auth&lt;/td&gt;
&lt;td&gt;Your implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Governance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gateway policies (deny writes, etc.)&lt;/td&gt;
&lt;td&gt;Application logic&lt;/td&gt;
&lt;td&gt;Your policy layer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Observability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gateway logs + CloudWatch&lt;/td&gt;
&lt;td&gt;LangSmith + your telemetry&lt;/td&gt;
&lt;td&gt;Your instrumentation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Portability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS-only&lt;/td&gt;
&lt;td&gt;Portable (MCP is standard)&lt;/td&gt;
&lt;td&gt;Portable (it's your code)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Choose based on integration needs: managed gateway, framework adapters, or custom tool layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the cost models and pricing boundaries?
&lt;/h2&gt;

&lt;p&gt;Cost structures differ because ownership differs.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentCore pricing
&lt;/h3&gt;

&lt;p&gt;AgentCore meters managed services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Harness:&lt;/strong&gt; Orchestration requests, tool invocations, memory queries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime:&lt;/strong&gt; Compute time (vCPU-seconds or GB-seconds)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory:&lt;/strong&gt; Storage (GB-month) + queries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gateway:&lt;/strong&gt; Tool registrations + invocations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browser/Code Interpreter:&lt;/strong&gt; Execution time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Plus:&lt;/strong&gt; Bedrock model calls, S3, Lambda, CloudWatch, networking, data transfer&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example (illustrative, verify current pricing):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Harness: ~$0.05 per orchestration request&lt;/li&gt;
&lt;li&gt;Runtime: ~$0.0001 per vCPU-second&lt;/li&gt;
&lt;li&gt;Memory: ~$0.30 per GB-month + query costs&lt;/li&gt;
&lt;li&gt;Gateway: ~$0.01 per tool invocation&lt;/li&gt;
&lt;li&gt;Claude 5 Sonnet on Bedrock: ~$0.003/1K input tokens, ~$0.015/1K output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost control:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right-size Runtime compute&lt;/li&gt;
&lt;li&gt;Cache tool results to reduce Gateway invocations&lt;/li&gt;
&lt;li&gt;Use Memory selectively (not every interaction)&lt;/li&gt;
&lt;li&gt;Monitor token usage (largest cost driver)&lt;/li&gt;
&lt;li&gt;Batch requests when possible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When AgentCore costs fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS is already your platform and service costs are acceptable&lt;/li&gt;
&lt;li&gt;Managed service convenience justifies metered pricing&lt;/li&gt;
&lt;li&gt;Tool invocations and memory queries are moderate&lt;/li&gt;
&lt;li&gt;Bedrock model pricing meets budget&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When AgentCore costs don't fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Self-hosted execution on reserved instances is cheaper at scale&lt;/li&gt;
&lt;li&gt;High tool invocation rate makes Gateway costs prohibitive&lt;/li&gt;
&lt;li&gt;Memory query volume exceeds budget for managed vector store&lt;/li&gt;
&lt;li&gt;Model costs require negotiated enterprise pricing unavailable on Bedrock&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LangChain pricing
&lt;/h3&gt;

&lt;p&gt;LangChain itself is open source (free). Costs are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hosting:&lt;/strong&gt; Your compute (EC2, ECS, Kubernetes, Lambda, GCP, Azure, Fly.io, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Models:&lt;/strong&gt; Direct API costs (OpenAI, Anthropic, Gemini, etc.) or self-hosted inference&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State storage:&lt;/strong&gt; Postgres, Redis, vector DB (Pinecone, Weaviate, Qdrant, pgvector)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability:&lt;/strong&gt; LangSmith (optional, $99/month+) or your telemetry stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operations:&lt;/strong&gt; Engineering time for deployment, scaling, monitoring, incidents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example (illustrative):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 m5.large (2 vCPU, 8 GB): ~$70/month reserved&lt;/li&gt;
&lt;li&gt;Anthropic Claude 5 Sonnet API: ~$0.003/1K input, ~$0.015/1K output&lt;/li&gt;
&lt;li&gt;Postgres RDS (db.t3.medium): ~$60/month&lt;/li&gt;
&lt;li&gt;Pinecone Starter: ~$70/month (1M vectors)&lt;/li&gt;
&lt;li&gt;LangSmith Team: ~$99/month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cost control:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use reserved instances or spot for compute&lt;/li&gt;
&lt;li&gt;Cache LLM responses aggressively&lt;/li&gt;
&lt;li&gt;Choose cost-effective models (Claude Haiku, GPT-4o-mini for simpler tasks)&lt;/li&gt;
&lt;li&gt;Self-host vector DB (pgvector) instead of managed&lt;/li&gt;
&lt;li&gt;Minimize observability overhead (sample, not trace every call)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When LangChain costs fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have compute capacity or reserved instances&lt;/li&gt;
&lt;li&gt;Direct model API pricing beats managed service markup&lt;/li&gt;
&lt;li&gt;Self-hosted vector DB (pgvector) is acceptable&lt;/li&gt;
&lt;li&gt;Engineering team will handle operations&lt;/li&gt;
&lt;li&gt;LangSmith observability justifies its cost (or you skip it)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When LangChain costs don't fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operating hosting, databases, and observability exceeds managed service cost&lt;/li&gt;
&lt;li&gt;Team lacks capacity for infrastructure and incident response&lt;/li&gt;
&lt;li&gt;Managed services simplify budgeting (fixed meter rates vs. variable ops)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AgentLoop pricing
&lt;/h3&gt;

&lt;p&gt;AgentLoop is a pattern (free). Costs depend entirely on your implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure:&lt;/strong&gt; Your compute (Alibaba Cloud, AWS, GCP, on-premise, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Models:&lt;/strong&gt; Direct API costs or self-hosted inference&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage:&lt;/strong&gt; Your databases, vector stores, caches&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observability:&lt;/strong&gt; Your monitoring stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operations:&lt;/strong&gt; Engineering time to build and run the system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When AgentLoop costs fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're building from contracts and cost structure is flexible&lt;/li&gt;
&lt;li&gt;Infrastructure choice (cloud, on-premise, hybrid) is open&lt;/li&gt;
&lt;li&gt;Model access is negotiated enterprise pricing or self-hosted&lt;/li&gt;
&lt;li&gt;Team will implement and operate the full system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When AgentLoop costs don't fit:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implementation effort exceeds the benefit of control&lt;/li&gt;
&lt;li&gt;Managed services or frameworks provide sufficient value&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cost comparison summary
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost category&lt;/th&gt;
&lt;th&gt;AgentCore&lt;/th&gt;
&lt;th&gt;LangChain&lt;/th&gt;
&lt;th&gt;AgentLoop&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Framework/pattern&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Metered service&lt;/td&gt;
&lt;td&gt;Free (OSS)&lt;/td&gt;
&lt;td&gt;Free (documentation)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Orchestration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Harness requests&lt;/td&gt;
&lt;td&gt;Hosting compute&lt;/td&gt;
&lt;td&gt;Your infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hosting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Runtime (metered)&lt;/td&gt;
&lt;td&gt;Your compute&lt;/td&gt;
&lt;td&gt;Your infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Models&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bedrock (metered) + external APIs&lt;/td&gt;
&lt;td&gt;Direct API or self-hosted&lt;/td&gt;
&lt;td&gt;Your choice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Memory/storage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Memory service (metered)&lt;/td&gt;
&lt;td&gt;Your databases&lt;/td&gt;
&lt;td&gt;Your storage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Tools&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gateway invocations&lt;/td&gt;
&lt;td&gt;Your compute + API costs&lt;/td&gt;
&lt;td&gt;Your implementation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Observability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CloudWatch (metered)&lt;/td&gt;
&lt;td&gt;LangSmith or your stack&lt;/td&gt;
&lt;td&gt;Your stack&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Operations&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;AWS operates&lt;/td&gt;
&lt;td&gt;You operate&lt;/td&gt;
&lt;td&gt;You operate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No universal cost winner exists. Model workload, tool invocation rate, hosting scale, and team capacity all determine actual cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you migrate between these frameworks?
&lt;/h2&gt;

&lt;p&gt;Migration paths depend on what you own versus what's managed.&lt;/p&gt;

&lt;h3&gt;
  
  
  From AgentCore Harness to LangChain
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement LangGraph state machine equivalent to Harness behavior&lt;/li&gt;
&lt;li&gt;Replace AgentCore Memory with LangChain memory store&lt;/li&gt;
&lt;li&gt;Replace Gateway tool catalog with MCP adapters or native tools&lt;/li&gt;
&lt;li&gt;Deploy hosting (Runtime, ECS, Kubernetes, etc.)&lt;/li&gt;
&lt;li&gt;Implement observability (LangSmith or custom)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What ports:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent instructions (prompt engineering)&lt;/li&gt;
&lt;li&gt;Tool definitions (OpenAPI → LangChain tool schema)&lt;/li&gt;
&lt;li&gt;Memory namespace logic (if using Memory)&lt;/li&gt;
&lt;li&gt;Test cases and evaluation data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt; Medium to high (orchestration reimplementation)&lt;/p&gt;

&lt;h3&gt;
  
  
  From LangChain to AgentCore
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Map LangGraph state machine to Harness configuration (or use Runtime)&lt;/li&gt;
&lt;li&gt;Migrate checkpointers and memory stores to AgentCore Memory (or keep custom)&lt;/li&gt;
&lt;li&gt;Migrate tools to Gateway registration (or keep MCP adapters via Runtime)&lt;/li&gt;
&lt;li&gt;Deploy on Runtime or use Harness&lt;/li&gt;
&lt;li&gt;Adopt CloudWatch observability (or keep LangSmith)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What ports:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LangChain tool bindings&lt;/li&gt;
&lt;li&gt;Agent instructions&lt;/li&gt;
&lt;li&gt;Test cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt; Medium (if Harness fits) to low (if using Runtime to host LangChain)&lt;/p&gt;

&lt;h3&gt;
  
  
  From either to AgentLoop
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement AgentLoop contracts (Intent, Tool, Memory, Executor)&lt;/li&gt;
&lt;li&gt;Build orchestration per pattern (not porting Harness/LangGraph directly)&lt;/li&gt;
&lt;li&gt;Define workflow stages per handbook&lt;/li&gt;
&lt;li&gt;Implement monitoring per pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What ports:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent intent and tool logic&lt;/li&gt;
&lt;li&gt;Test cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt; High (building from pattern)&lt;/p&gt;

&lt;h3&gt;
  
  
  From AgentLoop to AgentCore or LangChain
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;What changes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Port Intent router to Harness config or LangGraph edges&lt;/li&gt;
&lt;li&gt;Port Tool implementations to Gateway or LangChain tools&lt;/li&gt;
&lt;li&gt;Port Memory to Memory service or LangChain store&lt;/li&gt;
&lt;li&gt;Adopt managed services (AgentCore) or framework (LangChain)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What ports:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent logic, tools, memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt; Medium (already have implementation)&lt;/p&gt;

&lt;p&gt;Migration is not trivial in any direction, but hosting-level changes (Runtime vs. your infra) are easier than orchestration rewrites (Harness ↔ LangGraph).&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you choose the right framework for your team?
&lt;/h2&gt;

&lt;p&gt;Framework selection is not a single decision; it's a sequence of requirements and trade-offs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Decision tree
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Do you want AWS to manage the orchestration loop?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Yes, and Harness behavior fits&lt;/strong&gt; → AgentCore Harness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No, we need custom state machines&lt;/strong&gt; → LangChain or AgentLoop&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Need to evaluate&lt;/strong&gt; → Build the same workflow in Harness and LangGraph, compare&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Who operates the hosting?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS (managed)&lt;/strong&gt; → AgentCore Runtime&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Us (Kubernetes, EC2, etc.)&lt;/strong&gt; → LangChain or AgentLoop on your infra&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud-agnostic required&lt;/strong&gt; → LangChain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alibaba Cloud preferred&lt;/strong&gt; → AgentLoop + Alibaba services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: How much orchestration code will you own?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimal (configuration preferred)&lt;/strong&gt; → AgentCore Harness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moderate (framework integration)&lt;/strong&gt; → LangChain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full control (architecture from contracts)&lt;/strong&gt; → AgentLoop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4: What are your memory and tool requirements?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AWS-native, managed memory/tools&lt;/strong&gt; → AgentCore Memory + Gateway&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portable, framework-integrated&lt;/strong&gt; → LangChain stores + MCP adapters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom memory/tool layer&lt;/strong&gt; → AgentLoop pattern or LangChain with custom stores&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 5: What's your team's capacity?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manage config, not code&lt;/strong&gt; → AgentCore Harness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manage framework code, not infrastructure&lt;/strong&gt; → LangChain + managed hosting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manage full stack&lt;/strong&gt; → LangChain or AgentLoop on your infra&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build from contracts&lt;/strong&gt; → AgentLoop&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When to choose AgentCore
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;AWS is your platform and service dependencies are acceptable&lt;/li&gt;
&lt;li&gt;Harness's orchestration behavior matches your workflow&lt;/li&gt;
&lt;li&gt;Managed memory and tool gateway reduce integration effort&lt;/li&gt;
&lt;li&gt;Team prefers configuration over orchestration code&lt;/li&gt;
&lt;li&gt;Budget accommodates metered managed services&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When to choose LangChain
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Custom state machines, interrupts, or workflow logic are required&lt;/li&gt;
&lt;li&gt;Portable execution across clouds or on-premise is a priority&lt;/li&gt;
&lt;li&gt;Team has Python expertise and will own orchestration code&lt;/li&gt;
&lt;li&gt;Direct model API pricing or self-hosted inference is preferred&lt;/li&gt;
&lt;li&gt;Framework flexibility outweighs managed service convenience&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When to choose AgentLoop
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're designing agent architecture from requirements&lt;/li&gt;
&lt;li&gt;Alibaba's production pattern fits your workflow&lt;/li&gt;
&lt;li&gt;Implementation flexibility (framework, hosting, models) is a priority&lt;/li&gt;
&lt;li&gt;Team will build orchestration, memory, and tool layers&lt;/li&gt;
&lt;li&gt;No managed service or framework fully solves the problem&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  When to choose multiple (hybrid)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;LangChain on AgentCore Runtime&lt;/strong&gt; when you need custom graphs but want AWS hosting&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;AgentLoop contracts with LangChain implementation&lt;/strong&gt; when the pattern fits but you want framework code&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;AgentCore Gateway with LangChain agents&lt;/strong&gt; when AWS tools are managed but orchestration is custom&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are the production readiness gaps?
&lt;/h2&gt;

&lt;p&gt;All three approaches require additional work to reach production.&lt;/p&gt;

&lt;h3&gt;
  
  
  AgentCore production gaps
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Error handling:&lt;/strong&gt; Harness retries are configurable; your code handles tool failures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluation:&lt;/strong&gt; No built-in evals; bring your own test harness&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Runtime deployment is managed; CI/CD to Runtime requires setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost monitoring:&lt;/strong&gt; CloudWatch metrics exist; cost attribution per agent/user is custom&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-tenancy:&lt;/strong&gt; Namespace agents by user; Memory and Gateway namespaces are your logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting:&lt;/strong&gt; Gateway supports policies; application-level rate limits are custom&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioning:&lt;/strong&gt; Harness config is versioned; Runtime containers are versioned; agent prompt versions are your schema&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LangChain production gaps
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hosting:&lt;/strong&gt; Deployment, scaling, and observability are your responsibility&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State durability:&lt;/strong&gt; Checkpointer backend (Postgres, Redis) must be operated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error handling:&lt;/strong&gt; Implement retries, fallbacks, and circuit breakers in your graph&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluation:&lt;/strong&gt; LangSmith evals exist; custom test harness is common&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-tenancy:&lt;/strong&gt; Thread namespacing and user isolation are your logic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost attribution:&lt;/strong&gt; Trace costs per user/session via custom middleware&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioning:&lt;/strong&gt; Agent graph versions and prompt versions are your schema&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  AgentLoop production gaps
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Everything:&lt;/strong&gt; AgentLoop is contracts; you implement orchestration, hosting, memory, tools, monitoring, and operations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Shared gaps
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prompt versioning and A/B testing:&lt;/strong&gt; All three require custom systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool idempotency and transactionality:&lt;/strong&gt; Your tool implementations must handle retries safely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User feedback loops:&lt;/strong&gt; Collect thumbs-up/down, corrections, and evaluation data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization:&lt;/strong&gt; IAM, RBAC, or policy engines secure tool access and data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance:&lt;/strong&gt; Data retention, deletion, audit logs, and PII handling are your responsibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Production is more than framework choice. Build evaluation, monitoring, feedback, and authorization into your agent from the start.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the three-framework decision workflow?
&lt;/h2&gt;

&lt;p&gt;Distilled into action:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Build a representative task in your top two choices.&lt;/strong&gt; Config isn't enough; deploy a working agent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Test interrupt-resume, tool errors, and state recovery.&lt;/strong&gt; Most frameworks handle happy path; production is failure modes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Measure actual costs.&lt;/strong&gt; Run 1,000 interactions with realistic tool calls, memory queries, and model usage. Multiply.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evaluate team ownership.&lt;/strong&gt; Who maintains orchestration code? Who responds to incidents? Who operates hosting?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accept the trade-off.&lt;/strong&gt; Managed services cost more but reduce operational load. Code ownership gives control but requires maintenance. Patterns give flexibility but demand implementation.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There is no universally correct choice. The right framework is the one that matches your team's capacity, your workflow's requirements, and your cost constraints.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did we just compare?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Bedrock AgentCore&lt;/strong&gt; provides managed orchestration (Harness), custom framework hosting (Runtime), and integrated services (Memory, Gateway, Browser). Choose it for AWS-native managed loops.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LangChain/LangGraph&lt;/strong&gt; supplies an open-source framework for agent applications. You own orchestration, hosting, and state persistence. Choose it for custom graphs and portable execution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Alibaba AgentLoop&lt;/strong&gt; documents a production agent pattern: intent routing, tool execution, memory, monitoring. You implement from contracts. Choose it when proven abstractions guide your architecture.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The decision is not "which is best" but "which ownership model fits your team, your workflow, and your platform constraints."&lt;/p&gt;

&lt;p&gt;Evaluate with production scenarios: tool failures, state recovery, cost under load, and team capacity. Test, measure, then commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html" rel="noopener noreferrer"&gt;Amazon Bedrock AgentCore Developer Guide - What is AgentCore&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness.html" rel="noopener noreferrer"&gt;Amazon Bedrock AgentCore Harness Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/gateway.html" rel="noopener noreferrer"&gt;Amazon Bedrock AgentCore Gateway Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/memory.html" rel="noopener noreferrer"&gt;Amazon Bedrock AgentCore Memory Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aws.amazon.com/bedrock/agentcore/pricing/" rel="noopener noreferrer"&gt;Amazon Bedrock AgentCore Pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.langchain.com/oss/python/langchain/overview" rel="noopener noreferrer"&gt;LangChain Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/langchain-ai/langgraph" rel="noopener noreferrer"&gt;LangGraph GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.langchain.com/oss/python/langgraph/overview" rel="noopener noreferrer"&gt;LangGraph Overview Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.langchain.com/langsmith" rel="noopener noreferrer"&gt;LangSmith Observability Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/aliyun/ai-agent-handbook" rel="noopener noreferrer"&gt;Alibaba AI Agent Handbook GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://modelcontextprotocol.io/introduction" rel="noopener noreferrer"&gt;Model Context Protocol Introduction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/AWS-Bedrock-AgentCore-vs-LangChain-vs-Alibaba-AgentLoop-2026" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aiengineering</category>
      <category>agentframeworks</category>
    </item>
    <item>
      <title>Figure AI: How a High-Growth AI Robotics Pioneer Is Reshaping the Industry</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 30 Sep 2026 02:11:58 +0000</pubDate>
      <link>https://dev.to/devtoaaron/figure-ai-how-a-high-growth-ai-robotics-pioneer-is-reshaping-the-industry-1j23</link>
      <guid>https://dev.to/devtoaaron/figure-ai-how-a-high-growth-ai-robotics-pioneer-is-reshaping-the-industry-1j23</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Figure AI, a Sunnyvale-based AI robotics company founded in 2022 by Brett Adcock, has raised $745M across 2 funding rounds, achieving a $2.6B valuation. The company is building general-purpose humanoid robots powered by AI for workforce applications in manufacturing, logistics, and warehouses. The May 2026 AI funding landscape reflects growing investor confidence as AI transitions from experimental technology to core enterprise infrastructure, with deal sizes and valuations continuing to climb.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the latest funding round for Figure AI?
&lt;/h3&gt;

&lt;p&gt;Figure AI has raised a total of $745M across 2 funding rounds, reaching a valuation of $2.6B. The company, led by CEO &amp;amp; Founder Brett Adcock, is headquartered in Sunnyvale, CA and focuses on building general-purpose humanoid robots powered by AI for the workforce.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the top AI funding rounds in May 2026?
&lt;/h3&gt;

&lt;p&gt;The May 2026 AI funding landscape features significant capital deployment, with Figure AI standing out as a top deal at $745M raised and a $2.6B valuation. Deal sizes and valuations continue to climb as investor confidence grows and AI matures from experimental technology into core enterprise infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the AI investment and funding trends in 2026?
&lt;/h3&gt;

&lt;p&gt;The 2026 AI funding ecosystem shows increasing maturity, with significant capital flowing into companies pushing the boundaries of artificial intelligence. Key trends include rising deal sizes, climbing valuations, and a shift in AI's positioning from experimental technology to essential enterprise infrastructure, particularly in sectors like robotics, manufacturing, and logistics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Executive Summary
&lt;/h2&gt;

&lt;p&gt;Figure AI is a AI Robotics company founded in 2022 and headquartered in Sunnyvale, CA. Led by Brett Adcock (CEO &amp;amp; Founder), the company has raised a total of &lt;strong&gt;$745M&lt;/strong&gt; across 2 funding round(s), reaching a valuation of &lt;strong&gt;$2.6B&lt;/strong&gt;. Building general-purpose humanoid robots powered by AI for the workforce.&lt;/p&gt;

&lt;p&gt;The AI funding landscape continues to evolve rapidly, with significant capital flowing into companies pushing the boundaries of artificial intelligence. This period's activity reflects both growing investor confidence and the increasing maturity of the ecosystem. Deal sizes and valuations continue to climb as AI transitions from experimental technology to core enterprise infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Company Overview
&lt;/h2&gt;

&lt;p&gt;Figure AI is developing general-purpose humanoid robots designed to work alongside humans in manufacturing, logistics, and warehouse environments. The company's Figure 02 robot stands at human scale and features advanced dexterous manipulation, bipedal locomotion, and AI-powered reasoning capabilities developed in partnership with OpenAI. Figure has secured a landmark commercial agreement with BMW to deploy robots at its Spartanburg, South Carolina manufacturing facility, marking one of the first real-world deployments of humanoid robots in automotive production. The company's approach combines cutting-edge hardware engineering with foundation model-based intelligence, enabling robots to understand natural language instructions, perceive their environment, and execute complex multi-step tasks. With backing from Jeff Bezos, Microsoft, NVIDIA, and OpenAI, Figure has assembled one of the most impressive investor syndicates in AI. The humanoid robotics market represents a potential multi-trillion dollar opportunity as robots augment human labor across industries facing persistent workforce shortages.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Detail&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Founded&lt;/td&gt;
&lt;td&gt;2022&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Headquarters&lt;/td&gt;
&lt;td&gt;Sunnyvale, CA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sector&lt;/td&gt;
&lt;td&gt;AI Robotics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subsector&lt;/td&gt;
&lt;td&gt;Humanoid Robots&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Employees&lt;/td&gt;
&lt;td&gt;700&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Founder&lt;/td&gt;
&lt;td&gt;Brett Adcock (CEO &amp;amp; Founder)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Website&lt;/td&gt;
&lt;td&gt;&lt;a href="https://figure.ai" rel="noopener noreferrer"&gt;https://figure.ai&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revenue Run Rate&lt;/td&gt;
&lt;td&gt;Pre-revenue&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This area of the AI market continues to attract significant investor attention, reflecting the sector's rapid growth and substantial long-term potential.&lt;/p&gt;

&lt;h2&gt;
  
  
  Funding History
&lt;/h2&gt;

&lt;p&gt;Figure AI has raised a total of &lt;strong&gt;$745M&lt;/strong&gt; across &lt;strong&gt;2&lt;/strong&gt; round(s). Below is a complete breakdown of every known funding round.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;th&gt;Valuation&lt;/th&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Lead Investor(s)&lt;/th&gt;
&lt;th&gt;All Investors&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Series A&lt;/td&gt;
&lt;td&gt;$70M&lt;/td&gt;
&lt;td&gt;$500M&lt;/td&gt;
&lt;td&gt;Feb 1, 2024&lt;/td&gt;
&lt;td&gt;Microsoft Ventures&lt;/td&gt;
&lt;td&gt;Microsoft Ventures, NVIDIA, amazon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Series B&lt;/td&gt;
&lt;td&gt;$675M&lt;/td&gt;
&lt;td&gt;$2.6B&lt;/td&gt;
&lt;td&gt;Dec 1, 2025&lt;/td&gt;
&lt;td&gt;Sequoia Capital&lt;/td&gt;
&lt;td&gt;Sequoia Capital, Microsoft Ventures, NVIDIA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Total Capital &amp;amp; Valuation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total Raised:&lt;/strong&gt; $745M&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latest Valuation:&lt;/strong&gt; $2.6B (as of Dec 1, 2025)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latest Round:&lt;/strong&gt; Series B — $675M (Dec 1, 2025)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Number of Rounds:&lt;/strong&gt; 2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The funding trajectory demonstrates accelerating momentum, with round sizes and valuations increasing as key milestones are delivered and market presence expands.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Investors
&lt;/h2&gt;

&lt;p&gt;Figure AI has attracted 4 known investor(s) across its funding rounds. Below is a profile of each.&lt;/p&gt;

&lt;h3&gt;
  
  
  Microsoft Ventures
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Microsoft's venture investment arm, known as M12 and through direct strategic investments, deploys capital across AI, enterprise software, cybersecurity, and cloud infrastructure. Microsoft has made the single largest venture investment in history with its $13+ billion commitment to OpenAI, and has also backed Figure AI and other AI companies. The company's investment strategy is deeply intertwined with its Azure cloud platform, often providing portfolio companies with cloud credits and preferential integration into the Microsoft ecosystem. Microsoft's AI investments have been transformative for the company, powering the Copilot product line that is being embedded across Office, Windows, GitHub, and Azure services.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type:&lt;/strong&gt; CVC&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Participated in:&lt;/strong&gt; Series A, Series B&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Led:&lt;/strong&gt; Series A&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/investors/microsoft-ventures"&gt;View investor profile on AI Funding&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  NVIDIA
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;NVIDIA has evolved from a pure GPU manufacturer into the most important company in the AI ecosystem, and its venture investment arm is a critical part of its strategy. NVIDIA invests in AI companies across the entire stack — from foundation model developers like xAI and Mistral to robotics companies like Figure AI, data platforms like Databricks, and enterprise AI companies like Cohere. The company's investments often come with access to next-generation GPU hardware, software optimization support, and co-marketing opportunities. With its GPUs powering virtually all AI training workloads, NVIDIA has unparalleled visibility into which AI companies are scaling fastest, informing its investment decisions with real-time market intelligence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type:&lt;/strong&gt; CVC&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Participated in:&lt;/strong&gt; Series A, Series B&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/investors/nvidia"&gt;View investor profile on AI Funding&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sequoia Capital
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Sequoia Capital is one of the most storied venture capital firms in Silicon Valley, with a portfolio that includes Apple, Google, Airbnb, Stripe, and WhatsApp. Founded in 1972 by Don Valentine, the firm manages over $85 billion in assets across global funds spanning seed through growth stages. Sequoia has been a dominant force in AI investing, with major positions in companies like Anthropic, xAI, and Figure AI. The firm operates globally with dedicated funds in the US, Europe, India, Southeast Asia, and China, and is known for its long-term partnership approach with founders.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Type:&lt;/strong&gt; VC&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Participated in:&lt;/strong&gt; Series B&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Led:&lt;/strong&gt; Series B&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/investors/sequoia-capital"&gt;View investor profile on AI Funding&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The investor composition signals strong institutional backing and strategic interest. The presence of repeat investors alongside new participants suggests growing confidence in execution and market trajectory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sector Analysis: AI Robotics
&lt;/h2&gt;

&lt;p&gt;Figure AI operates in the &lt;strong&gt;AI Robotics&lt;/strong&gt; sector (specifically &lt;strong&gt;Humanoid Robots&lt;/strong&gt;). Understanding the broader sector landscape provides context for the company's position and growth potential.&lt;/p&gt;

&lt;p&gt;Other companies in the AI Robotics sector tracked by AI Funding:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Company&lt;/th&gt;
&lt;th&gt;Founded&lt;/th&gt;
&lt;th&gt;Location&lt;/th&gt;
&lt;th&gt;Total Raised&lt;/th&gt;
&lt;th&gt;Latest Valuation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://dev.to/companies/mirai-robotics"&gt;Mirai Robotics&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;2026&lt;/td&gt;
&lt;td&gt;Bari, Italy&lt;/td&gt;
&lt;td&gt;$4M&lt;/td&gt;
&lt;td&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Looking ahead, deal activity is expected to remain strong as major AI companies continue scaling operations and new entrants attract institutional capital. Key areas to watch include frontier model development, enterprise AI adoption, and infrastructure plays that underpin the broader ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Competitive Landscape
&lt;/h2&gt;

&lt;p&gt;Figure AI competes with 1 other tracked AI Robotics company in our database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://dev.to/companies/mirai-robotics"&gt;Mirai Robotics&lt;/a&gt;:&lt;/strong&gt; Physical AI company building autonomous maritime systems with dock-to-dock autonomy for defense surveillance, commercial offshore operations, and logistics.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At a valuation of $2.6B, &lt;strong&gt;Figure AI has the highest valuation&lt;/strong&gt; among its sector peers in our database.&lt;/p&gt;

&lt;p&gt;The competitive landscape remains dynamic, with established players and well-funded startups vying for market share. Differentiation increasingly comes from technology depth, go-to-market execution, and strategic partnerships that provide distribution advantages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Revenue &amp;amp; Growth
&lt;/h2&gt;

&lt;p&gt;Figure AI has a reported revenue run rate of &lt;strong&gt;Pre-revenue&lt;/strong&gt;. This positions the company as one of the fastest-growing ventures in the AI Robotics space.&lt;/p&gt;

&lt;p&gt;With a valuation of $2.6B, investors are pricing in significant future growth beyond the current revenue base.&lt;/p&gt;

&lt;p&gt;Revenue growth has been a key driver of investor interest, with strong product-market fit and expanding enterprise customer adoption underpinning the company's valuation trajectory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leadership
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Brett Adcock, CEO &amp;amp; Founder
&lt;/h3&gt;

&lt;p&gt;Figure AI was founded in 2022 by &lt;strong&gt;Brett Adcock&lt;/strong&gt;, who serves as CEO &amp;amp; Founder. Under Brett Adcock's leadership, the company has grown to approximately 700 employees and raised $745M in total funding.&lt;/p&gt;

&lt;p&gt;Under current leadership, the company has navigated rapid growth while maintaining technical excellence and a clear strategic vision for the future of AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How much funding has Figure AI raised?
&lt;/h3&gt;

&lt;p&gt;Figure AI has raised a total of &lt;strong&gt;$745M&lt;/strong&gt; across 2 funding round(s). The most recent round was a Series B of $675M on Dec 1, 2025.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Figure AI's valuation?
&lt;/h3&gt;

&lt;p&gt;As of its most recent funding round (Series B, Dec 1, 2025), Figure AI is valued at &lt;strong&gt;$2.6B&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who are Figure AI's investors?
&lt;/h3&gt;

&lt;p&gt;Figure AI's investors include &lt;strong&gt;Microsoft Ventures&lt;/strong&gt;, &lt;strong&gt;NVIDIA&lt;/strong&gt;, &lt;strong&gt;amazon&lt;/strong&gt;, &lt;strong&gt;Sequoia Capital&lt;/strong&gt;. These investors have collectively committed $745M across 2 round(s).&lt;/p&gt;

&lt;h3&gt;
  
  
  When was Figure AI founded?
&lt;/h3&gt;

&lt;p&gt;Figure AI was founded in &lt;strong&gt;2022&lt;/strong&gt; by Brett Adcock and is headquartered in Sunnyvale, CA.&lt;/p&gt;

&lt;h3&gt;
  
  
  What sector does Figure AI operate in?
&lt;/h3&gt;

&lt;p&gt;Figure AI operates in the &lt;strong&gt;AI Robotics&lt;/strong&gt; sector, specifically in &lt;strong&gt;Humanoid Robots&lt;/strong&gt;. Other companies in this sector include Mirai Robotics.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Figure AI's revenue?
&lt;/h3&gt;

&lt;p&gt;Figure AI has a reported revenue run rate of &lt;strong&gt;Pre-revenue&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who is the CEO of Figure AI?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Brett Adcock&lt;/strong&gt; is the CEO &amp;amp; Founder of Figure AI.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>startup</category>
      <category>venturecapital</category>
      <category>funding</category>
    </item>
    <item>
      <title>Traditional SEO vs Inference Traffic: Complete 2026 Guide</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Fri, 25 Sep 2026 12:50:23 +0000</pubDate>
      <link>https://dev.to/devtoaaron/traditional-seo-vs-inference-traffic-complete-2026-guide-29kd</link>
      <guid>https://dev.to/devtoaaron/traditional-seo-vs-inference-traffic-complete-2026-guide-29kd</guid>
      <description>&lt;h1&gt;
  
  
  Traditional SEO vs Inference Traffic: A Comprehensive Comparison
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Traditional SEO optimizes for click-through via search rankings and measures success in organic sessions; inference traffic optimizes for AI citation and measures success in brand mentions, conversions, and downstream attribution from LLM-generated responses. As 93% of AI-mode searches end without a click, inference traffic now converts 31% higher for e-commerce and 9× higher for B2B despite lower volume, making it the higher-leverage channel for authority-driven content strategies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Traditional SEO targets Google's ranking algorithm to earn page-one positions and clicks; inference traffic targets the citation logic of LLMs like ChatGPT, Perplexity, Claude, and Gemini to earn mentions in generated responses.&lt;/li&gt;
&lt;li&gt;Inference traffic converts dramatically higher despite lower volume: 1.81% vs 1.39% for e-commerce and 15.9% vs 1.76% for B2B, because AI handles the research phase and sends only high-intent users.&lt;/li&gt;
&lt;li&gt;The measurement models diverge completely: SEO tracks rankings, impressions, and sessions in Google Search Console; inference traffic requires AI-specific analytics, citation monitoring, and multi-touch attribution to capture zero-click value.&lt;/li&gt;
&lt;li&gt;Content structure determines citability: question-based H2 headings, first-paragraph definitions, and tables lift AI citation rates 35–70%, while traditional SEO still rewards keyword density and backlink profiles.&lt;/li&gt;
&lt;li&gt;The two strategies are not mutually exclusive but serve different goals: traditional SEO remains essential for direct-response traffic and transactional queries, while inference traffic dominates for thought leadership, developer education, and complex B2B decision cycles.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is the difference between traditional SEO and inference traffic?
&lt;/h2&gt;

&lt;p&gt;The distinction begins with where the user sees your content and what happens next. Traditional SEO aims to place your page at the top of a search engine results page (SERP) so a human clicks through to your site. Success is measured in rankings, impressions, click-through rates, and sessions. Inference traffic comes from AI models citing your content inside a generated response, often without the user ever visiting your site. Success is measured in citations, brand mentions, conversions from AI referrals, and downstream attribution when users arrive days or weeks later having already formed intent.&lt;/p&gt;

&lt;p&gt;Traditional SEO is a click-acquisition strategy built on Google's PageRank-descended algorithm. You earn authority through backlinks, optimize on-page elements for target keywords, and compete for position zero or the top three organic results. When successful, a user sees your link, clicks it, and lands on your page, where you have full control over the conversion funnel. Analytics platforms like Google Analytics capture the entire session, and attribution is straightforward: organic search → session → conversion.&lt;/p&gt;

&lt;p&gt;Inference traffic is a citation-and-influence strategy built on how LLMs construct responses. AI models like ChatGPT, Perplexity, Claude, and Gemini retrieve, rank, and synthesize information from multiple sources, then generate a natural-language answer that may cite your content by name or URL — or may paraphrase it without attribution. The user often never clicks through. When they do, the journey is non-linear: they may read the AI's summary today, research further tomorrow, and visit your site a week later via a branded search or direct navigation. Traditional analytics miss most of this.&lt;/p&gt;

&lt;p&gt;The core trade-off is volume versus intent quality. Traditional SEO can drive thousands of sessions per month if you rank well for high-volume keywords, but much of that traffic is exploratory, low-intent, and bounces quickly. Inference traffic delivers far fewer direct sessions, but those sessions come from users who have already been pre-qualified by the AI's research phase and arrive with specific, high-intent questions. This is why AI referral traffic converts 31% higher for e-commerce and nearly 9× higher for B2B despite representing a smaller absolute number of visits.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Traditional SEO&lt;/th&gt;
&lt;th&gt;Inference Traffic&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Target system&lt;/td&gt;
&lt;td&gt;Google / Bing search algorithms&lt;/td&gt;
&lt;td&gt;ChatGPT, Perplexity, Claude, Gemini, AI Overviews&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User sees&lt;/td&gt;
&lt;td&gt;Ranked list of blue links&lt;/td&gt;
&lt;td&gt;AI-generated answer with inline citations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Success metric&lt;/td&gt;
&lt;td&gt;Rankings, organic clicks, sessions&lt;/td&gt;
&lt;td&gt;Citations, brand mentions, AI referral conversions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Content goal&lt;/td&gt;
&lt;td&gt;Rank page one for target keywords&lt;/td&gt;
&lt;td&gt;Become the source the AI quotes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Click-through&lt;/td&gt;
&lt;td&gt;15% organic CTR (8% with AI Overview)&lt;/td&gt;
&lt;td&gt;7% in zero-click AI mode (93% never click)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conversion rate (e-comm)&lt;/td&gt;
&lt;td&gt;1.39% (non-branded)&lt;/td&gt;
&lt;td&gt;1.81% (ChatGPT referral)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Conversion rate (B2B)&lt;/td&gt;
&lt;td&gt;1.76%&lt;/td&gt;
&lt;td&gt;15.9% (ChatGPT referral)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Attribution model&lt;/td&gt;
&lt;td&gt;Last-click or multi-touch via GA4&lt;/td&gt;
&lt;td&gt;Multi-touch with dark social + branded search proxy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Content structure&lt;/td&gt;
&lt;td&gt;Keyword density, backlinks, meta tags&lt;/td&gt;
&lt;td&gt;Question H2s, first-paragraph definitions, tables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Primary channel&lt;/td&gt;
&lt;td&gt;Owned website&lt;/td&gt;
&lt;td&gt;Owned + third-party (Reddit, YouTube, Zhihu)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why does inference traffic convert so much higher?
&lt;/h2&gt;

&lt;p&gt;The conversion gap — 31% higher for e-commerce and 9× higher for B2B — is not a measurement artifact. It reflects a fundamental shift in where the research burden falls. Traditional organic search sends users to your site at the &lt;em&gt;beginning&lt;/em&gt; of their research journey. They are comparison-shopping, exploring alternatives, and often leaving to check competitors before making a decision. Your site is one stop in a multi-site, multi-day process. Bounce rates are high, time-on-site is low, and conversion requires capturing the user's attention, educating them, and persuading them — all within a single session window that analytics can track.&lt;/p&gt;

&lt;p&gt;Inference traffic sends users at the &lt;em&gt;end&lt;/em&gt; of their research journey. The AI has already done the comparison, filtered options, explained trade-offs, and synthesized recommendations. By the time a user clicks through from an AI-cited source, they have a specific question ("Where do I buy this?") or have already decided and are seeking the transaction page. This phenomenon is called &lt;strong&gt;intent compression&lt;/strong&gt;: the AI collapses what used to be a multi-session, multi-site research phase into a single conversation, and the user arrives at your site only when ready to act.&lt;/p&gt;

&lt;p&gt;The B2B multiple is even more dramatic because B2B buying cycles are longer, involve more stakeholders, and depend heavily on perceived authority. When an AI model cites your white paper or technical guide as the definitive source, it confers third-party validation that no amount of on-page SEO can replicate. A user arriving via that citation path has already been told "this company is the authority," which short-circuits weeks of credibility-building that would otherwise happen on your site.&lt;/p&gt;

&lt;p&gt;The trade-off is volume. A page ranking #1 for a keyword with 10,000 monthly searches might drive 1,500 organic sessions at 15% CTR. That same page, if cited by ChatGPT in 500 conversations, might generate only 35 direct referral sessions at 7% CTR — but those 35 sessions convert at 15.9% instead of 1.76%, producing 5.6 conversions versus 26 from the SEO channel. SEO wins on absolute conversions in this example, but the inference channel delivers higher revenue per session ($3.65 vs $3.30) and does so without requiring the user to sift through ten competing results first.&lt;/p&gt;

&lt;p&gt;The second-order effect is even more valuable: users influenced by AI citations but not directly referred. A user reads a ChatGPT response citing your API as "the industry standard," doesn't click through that day, but returns a week later via branded search or direct navigation. Traditional attribution models assign zero credit to the AI interaction because there was no referral session. The influence happened in a zero-click environment, yet it directly caused the conversion. Measuring this requires multi-touch attribution that includes AI exposure as a trackable event, not just a referral source.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you measure inference traffic when most citations are zero-click?
&lt;/h2&gt;

&lt;p&gt;The analytics gap is the single biggest operational challenge. Google Analytics, Search Console, and every major web analytics platform were built for a click-based world. They record a session when a user lands on your site, not when an AI reads your content to answer someone else's question. A traditional SEO campaign reports rankings, impressions, clicks, and conversions in a clean funnel. An inference traffic campaign must instrument an entirely new measurement stack.&lt;/p&gt;

&lt;p&gt;The core metrics for inference traffic are citation volume, citation reach, brand mention share, and downstream attributed conversions. Citation volume is the raw count: how many times did an AI model cite your content in a given period? Citation reach is the user-facing number: how many users saw those citations, even if they didn't click? Brand mention share is your percentage of total citations in your category. Downstream attributed conversions are the sessions that arrived via branded search, direct navigation, or referral from a secondary source after the user's initial AI interaction.&lt;/p&gt;

&lt;p&gt;Tracking citations requires either manual sampling or automated monitoring. Manual sampling means running representative queries through each major AI model weekly and recording which sources are cited. This is labor-intensive but captures the full user experience, including how your content is framed and whether the citation is positive, neutral, or unfavorable. Automated monitoring uses APIs where available (Perplexity's API includes citation metadata; ChatGPT's does not) or scraping tools that run queries and parse citations. Both approaches are proxies; no AI model currently provides a Search Console equivalent that reports "your content was cited N times this month."&lt;/p&gt;

&lt;p&gt;Multi-touch attribution bridges the zero-click gap by tagging conversions that followed an AI interaction, even without a direct referral. The most practical implementation tracks branded search and direct navigation as proxy metrics. If your branded search volume and direct traffic both increase following a spike in AI citations, and your traditional SEO metrics remain flat, the lift is attributable to inference. More sophisticated setups use survey funnels ("How did you first hear about us?") and post-conversion interviews to capture "I read about you in ChatGPT" responses that never appear in referrer logs.&lt;/p&gt;

&lt;p&gt;Engagement metrics shift from session-based to content-based. Traditional SEO measures bounce rate, pages per session, and time on site. Inference traffic measures citation depth (was your content quoted verbatim or summarized?), citation context (positive recommendation or neutral mention?), and co-citation network (which other sources were cited alongside yours?). A high-quality citation is one where your content is the primary source, quoted or paraphrased at length, and framed as authoritative. A low-quality citation is a passing mention in a list of ten sources with no distinguishing context.&lt;/p&gt;

&lt;p&gt;The measurement challenge compounds when tracking ROI. Traditional SEO has a clear cost structure: content production, technical optimization, link building, and tools. Inference traffic adds multi-platform publishing (Reddit, YouTube, Zhihu), citation monitoring tools, and AI-specific content optimization. The return is split between direct referral conversions (trackable) and zero-click influence (estimated via proxies). CFOs trained on cost-per-acquisition models often reject proxy-based attribution, which makes selling inference traffic investment internally harder despite its superior conversion rate on the trackable subset.&lt;/p&gt;

&lt;h2&gt;
  
  
  What content structure works for traditional SEO versus inference traffic?
&lt;/h2&gt;

&lt;p&gt;The formatting divergence is one of the clearest operational differences. Traditional SEO content is written for a human reader arriving on your page from a SERP. It follows established content marketing patterns: an H1 title with the target keyword, an engaging introduction, subheadings that break the article into scannable sections, internal links to other pages, and a call-to-action near the end. The structure optimizes for time on site, scroll depth, and conversion once the user has arrived.&lt;/p&gt;

&lt;p&gt;Inference traffic content is written for an AI parser that may never send a human to your page. It follows question-answer patterns that LLMs can extract and reformat. Every H2 is a natural-language question, because that is the query the AI is trying to answer. The first paragraph under each H2 contains a direct, quotable answer in under 40 words, because that is what the AI will lift verbatim into its response. Tables, lists, and definition blocks are used liberally, because LLMs cite structured content 35–47% more often than prose paragraphs.&lt;/p&gt;

&lt;p&gt;Question-based headings are the highest-leverage change. Traditional SEO might use a subheading like "Benefits of Our API" or "Key Features." Inference traffic uses "What are the benefits of this API?" or "Which features matter most for production use?" The latter phrasing matches how users ask the AI, which makes your content the natural source when the model constructs its answer. ERNIE, a Chinese LLM, cites first-paragraph definitions over 70% of the time, so a well-structured H2 + definition pair is essentially guaranteed placement in responses on that model.&lt;/p&gt;

&lt;p&gt;Tables are the second structural lever. A comparison table of "Feature A vs Feature B" is cited 47% more often by Qwen than the same information written as paragraphs. This holds across models: structured data is easier for an LLM to parse, verify, and reformat, so it gets cited more. A traditional SEO article might describe three pricing tiers in prose; an inference-optimized article puts them in a three-column table with feature checkmarks, because that table can be directly embedded or converted to natural language by the AI with zero loss of fidelity.&lt;/p&gt;

&lt;p&gt;Backlinks remain the backbone of traditional SEO but play almost no role in inference traffic. Google's algorithm treats backlinks as votes of authority and uses them to rank pages. LLMs do not have a backlink graph to consult; they rank sources based on content quality, domain authority signals embedded in their training data, and recency. A page with 500 backlinks and thin content will rank well in Google but may never be cited by an AI. A deeply researched page with original data and zero backlinks can be cited frequently if the content itself is authoritative.&lt;/p&gt;

&lt;p&gt;The two structures are not incompatible, but merging them requires deliberate design. A single article can serve both goals by leading with a question-based H2 and a quotable first-paragraph answer (inference), then expanding into detailed prose with internal links and CTAs (traditional SEO). The risk is writing for two masters and serving neither well: too terse for a human reader who wants depth, too verbose for an AI parser looking for extractable facts. The best compromise is modular content where the H2 + definition pairs stand alone and the prose elaboration adds context that benefits human readers without confusing the AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which strategy should you prioritize for developer content?
&lt;/h2&gt;

&lt;p&gt;Developer content is the highest-stakes category for this decision, because developers have abandoned traditional search faster than any other audience. Stack Overflow traffic has fallen 76% in two years as 84% of developers adopted AI tools, making it the canonical case study in disruption. Developers use ChatGPT, Claude, Perplexity, and GitHub Copilot to answer technical questions that once required visiting Stack Overflow, vendor documentation, or tutorial blogs. The traffic that remains is highly intentional: a developer visits your docs when the AI has already recommended your tool and they need the full API reference.&lt;/p&gt;

&lt;p&gt;For API documentation and technical guides, inference traffic is now the primary discovery channel. A developer asks Claude "How do I authenticate with the XYZ API?" and Claude either cites your docs directly or synthesizes an answer from your docs without attribution. If your docs are well-structured with question-based headings and code examples, Claude cites them by name and links to the relevant section. If your docs are a wall of prose under generic headings like "Authentication" and "Getting Started," Claude paraphrases them without credit or, worse, cites a competitor whose docs are better formatted.&lt;/p&gt;

&lt;p&gt;Traditional SEO still matters for branded and navigational queries. When a developer searches "XYZ API Python SDK" in Google, they expect to land on your SDK page, and ranking #1 for that query is non-negotiable. But the volume of such searches is now a trailing indicator of success elsewhere: developers only search for your SDK by name if they already know it exists, which increasingly means they learned about it from an AI citation, a Reddit thread, or a GitHub discussion. The traditional SEO funnel has inverted. You earn the branded search by being cited in AI responses first.&lt;/p&gt;

&lt;p&gt;The optimal strategy for developer content is a two-channel model: invest in inference traffic for discovery and thought leadership, and maintain traditional SEO for conversion and retention. Concretely, this means publishing deep technical articles on your owned blog with question-based H2 headings, first-paragraph code examples, and tables comparing your approach to alternatives (inference channel), while ensuring your documentation and SDK landing pages rank #1 for branded keywords and have fast load times, clear navigation, and structured data markup (traditional SEO channel).&lt;/p&gt;

&lt;p&gt;Reddit, GitHub, and Stack Overflow are now inference-traffic platforms as much as they are traditional SEO backlink sources. An upvoted Reddit answer in r/MachineLearning explaining when to use your library reaches developers in two ways: it ranks in Google for long-tail searches (traditional SEO), and it gets cited by ChatGPT and Perplexity when developers ask the same question conversationally (inference). A single high-quality Reddit post can deliver citation reach equivalent to dozens of blog articles, because LLMs trust community-validated content more than vendor-published content. This is why brands are 6.5× more likely to be cited through third-party sources than their own domains.&lt;/p&gt;

&lt;p&gt;For open-source projects, inference traffic is existential. Developers discover new libraries almost exclusively through AI recommendations now. A project that is not cited by ChatGPT, Claude, and Copilot effectively does not exist to new developers, regardless of its GitHub star count or documentation quality. The forcing function is that LLMs recommend tools they were trained on, which creates a massive first-mover advantage for libraries that gained traction before 2023. Newer projects must actively optimize for inference: publish comparison articles, participate in Reddit and Hacker News discussions, and ensure their README and docs use question-based headings so the AI can extract and cite them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you run both strategies without doubling your workload?
&lt;/h2&gt;

&lt;p&gt;The two strategies share 60% of their work but diverge on the remaining 40%, and the divergence creates either duplication or a choice of which audience to serve. The shared 60% is foundational content quality: original research, clear writing, accurate information, and technical depth. Both Google's algorithm and LLMs reward authoritative content, so a well-researched article serves both goals. The divergence is in structure, distribution, and measurement.&lt;/p&gt;

&lt;p&gt;Structural reuse is possible with a template that satisfies both requirements. Start every article with a TL;DR paragraph under 40 words that states the core conclusion in quotable, self-contained sentences. This serves inference traffic by providing an extractable summary, and it serves traditional SEO by reducing bounce rate for skim readers. Use question-based H2 headings throughout, which work for both: they match conversational AI queries and also improve scannability for human readers on your site. Under each H2, lead with a one-paragraph answer, then expand into detail. The one-paragraph answer is what the AI cites; the expansion is what the human reader scrolls through.&lt;/p&gt;

&lt;p&gt;Tables, lists, and code examples are universal. A comparison table helps both the human reader and the AI parser. A bulleted list of key takeaways at the top of the article serves both: it improves time-on-site for traditional SEO and provides citation-ready bullet points for inference. Code examples with clear comments are cited by developer-focused LLMs like Claude and DeepSeek, and they also increase engagement metrics that Google's algorithm rewards.&lt;/p&gt;

&lt;p&gt;Distribution is where the workload splits. Traditional SEO requires publishing on your owned domain, optimizing meta tags, building backlinks, and submitting to Google Search Console. Inference traffic requires publishing or syndicating to third-party platforms where LLMs scrape content: Reddit, YouTube, Zhihu, Medium, and GitHub. The most efficient approach is to write the core content once on your owned blog, then create platform-specific adaptations. A 2,000-word blog article becomes a Reddit post summarizing the key findings with a link to the full article, a YouTube video walking through the code examples, and a Zhihu answer translating the core concepts for a Chinese audience.&lt;/p&gt;

&lt;p&gt;The two-platform model minimizes duplication while maximizing reach. Your owned blog is the source of truth and the SEO target. Reddit, YouTube, and Zhihu are citation platforms that link back to the blog. Google rewards the blog with rankings for the quality content and backlinks. LLMs cite the blog because it is the detailed source, and they also cite the Reddit/YouTube/Zhihu content because it is community-validated. A single piece of core content, adapted for three to four platforms, reaches both traditional search and inference traffic without requiring you to write separate articles from scratch for each.&lt;/p&gt;

&lt;p&gt;Measurement is the remaining duplication. You cannot stop tracking traditional SEO metrics, because they inform technical optimizations like site speed, mobile usability, and crawl errors that also affect your owned domain's citability by AI. You must add inference metrics — citation monitoring, branded search lift, and AI referral conversions — on top of the existing stack. The only shortcut is to run both measurement systems in parallel and accept that proving ROI requires showing results in both: "Our rankings improved for X keywords (traditional), and our citation rate in ChatGPT increased Y% (inference), resulting in a Z% lift in conversions from AI referrals."&lt;/p&gt;

&lt;p&gt;The long-term efficiency comes from content reuse. A traditional SEO article optimized for a single keyword has a shelf life of months; it ranks, drives traffic, and eventually gets displaced by newer content. An inference-optimized article with deep research and structured answers has a shelf life of years, because LLMs cite older content just as readily as new content if the information remains accurate. A single high-quality, inference-optimized article can generate citations for 18–24 months, which amortizes the production cost far better than writing twelve shallow keyword-targeted posts per year.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the common mistakes that waste effort on both strategies?
&lt;/h2&gt;

&lt;p&gt;The first mistake is treating inference traffic as a replacement for traditional SEO rather than a complement. A site that abandons SEO to chase AI citations loses its owned-domain authority and its ability to capture branded searches, which cuts off the bottom of the funnel. Conversely, a site that ignores inference traffic because "we already rank #1" misses the 93% of users who now get their answers from AI and never click through to any site. The correct approach is to run both, using traditional SEO for transactional and branded queries and inference traffic for discovery and thought leadership.&lt;/p&gt;

&lt;p&gt;The second mistake is publishing only on owned properties. LLMs cite third-party platforms like Reddit and YouTube 6.5× more often than vendor-owned domains because community-validated content carries more authority than self-published marketing. A developer documentation site that publishes only on its own docs subdomain will struggle to earn citations, because ChatGPT and Claude prefer Reddit answers from real users over vendor tutorials. The fix is to treat Reddit, GitHub, and Stack Overflow as first-class publishing channels, not just backlink sources.&lt;/p&gt;

&lt;p&gt;The third mistake is optimizing content for keywords instead of questions. A traditional SEO title like "Best AI Agent Framework 2026" targets a keyword. An inference-optimized title asks "Which AI agent framework should you choose for production in 2026?" The second phrasing matches conversational queries and provides a clear extraction target for the AI. Keyword-stuffed content ranks in Google but is ignored by LLMs, which parse for semantic meaning rather than keyword density.&lt;/p&gt;

&lt;p&gt;The fourth mistake is measuring inference traffic with traditional analytics. Google Analytics reports zero sessions from a ChatGPT citation if the user never clicks through, which makes inference traffic look like it has no value. The correct measurement requires citation monitoring, branded search lift, and multi-touch attribution that assigns partial credit to AI interactions. A campaign that increases branded search volume by 40% while generating "only" 50 direct AI referral sessions is succeeding at inference, but a naive cost-per-click analysis would kill it.&lt;/p&gt;

&lt;p&gt;The fifth mistake is writing content for humans and expecting AI to figure it out. LLMs do not read like humans. They parse structured data, extract facts, and rank sources based on how easily they can reformat the content into a natural-language answer. A beautifully written narrative essay with no headings, no lists, and no tables will perform poorly in inference traffic even if it ranks well in traditional SEO. The fix is modular structure: H2 questions, one-paragraph answers, tables, and lists that serve both the AI parser and the human reader.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is inference traffic and how does it differ from organic search traffic?
&lt;/h3&gt;

&lt;p&gt;Inference traffic is user activity driven by AI model citations in generated responses, where the AI reads your content to answer a query and may mention your brand or URL without the user clicking through. It differs from organic search traffic in that organic traffic requires the user to click a ranked link in a SERP, while inference traffic includes zero-click interactions where your content influences the user's decision but never generates a session in your analytics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does inference traffic convert so much better than traditional SEO traffic?
&lt;/h3&gt;

&lt;p&gt;Inference traffic converts 31% higher for e-commerce and 9× higher for B2B because of intent compression: the AI handles the research phase, compares alternatives, and sends users to your site only when they are ready to act. Traditional organic search sends users at the beginning of their research journey, resulting in higher bounce rates and lower conversion rates despite higher session volume.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you measure inference traffic when most citations are zero-click?
&lt;/h3&gt;

&lt;p&gt;Measure inference traffic through citation monitoring (manual sampling or automated scraping of AI responses), branded search lift (increases in branded Google searches following AI citation spikes), direct navigation growth, and multi-touch attribution that assigns partial credit to AI interactions. Survey funnels and post-conversion interviews capture "I learned about you from ChatGPT" responses that never appear in referrer logs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should developer documentation prioritize traditional SEO or inference traffic?
&lt;/h3&gt;

&lt;p&gt;Developer documentation should prioritize inference traffic for discovery and traditional SEO for conversion. Developers now use AI tools for 84% of technical queries, so being cited by ChatGPT, Claude, and Copilot is the primary discovery channel. Traditional SEO remains essential for branded queries like "[product name] API documentation" that occur after the developer has already decided to use your tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  What content structure serves both traditional SEO and inference traffic?
&lt;/h3&gt;

&lt;p&gt;Use question-based H2 headings that match natural language queries, lead each section with a one-paragraph answer under 40 words, and structure comparisons as tables rather than prose. This format improves scannability for human readers (helping traditional SEO engagement metrics) while providing extractable, citation-ready content for AI models (serving inference traffic).&lt;/p&gt;

&lt;h3&gt;
  
  
  Can you run both traditional SEO and inference traffic strategies without doubling workload?
&lt;/h3&gt;

&lt;p&gt;Yes, by writing core content once on your owned blog with dual-purpose structure (question H2s, quotable opening paragraphs, tables), then creating platform-specific adaptations for Reddit, YouTube, and Zhihu that link back to the full article. This approach earns both Google rankings from the owned content and AI citations from the community-validated third-party platforms, with 60% shared work and 40% channel-specific distribution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2311.09735" rel="noopener noreferrer"&gt;GEO: Generative Engine Optimization - Princeton University Research Paper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://survey.stackoverflow.co/2024/" rel="noopener noreferrer"&gt;Stack Overflow Developer Survey 2024 - Developer AI Tool Adoption Statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Stack_Overflow" rel="noopener noreferrer"&gt;Stack Overflow - Platform Overview and Usage Statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.semrush.com/blog/zero-click-searches/" rel="noopener noreferrer"&gt;Semrush: Zero-Click Searches Analysis and Trends&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/search/docs" rel="noopener noreferrer"&gt;Google Search Central - SEO Documentation and Best Practices&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.google/products-and-platforms/products/search/generative-ai-search/" rel="noopener noreferrer"&gt;Google Blog: Generative AI in Search - Official Announcement and Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.pewresearch.org/" rel="noopener noreferrer"&gt;Pew Research Center - Technology and Society Research&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/traditional-seo-vs-inference-traffic" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>aisearch</category>
      <category>geo</category>
    </item>
    <item>
      <title>TypeSafe AI: $40M Seed Round for Machine-Native Intelligence</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 23 Sep 2026 20:31:17 +0000</pubDate>
      <link>https://dev.to/devtoaaron/typesafe-ai-40m-seed-round-for-machine-native-intelligence-3j4h</link>
      <guid>https://dev.to/devtoaaron/typesafe-ai-40m-seed-round-for-machine-native-intelligence-3j4h</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TypeSafe AI emerged from stealth September 16, 2026 with a $40 million seed round led by DCVC, valuing the company at $200 million.&lt;/strong&gt; Founded by former OpenAI researcher Diogo Almeida, the San Francisco-based startup is building System One Models—AI optimized for software automation rather than human conversation. The company's first model, Jev, produces typed decisions with calibrated confidence scores, delivering 193.6x faster performance and 444.6x lower costs than traditional LLMs at $0.39 per 1,000 workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;$40M seed at $200M valuation&lt;/strong&gt; — DCVC led the round for a company founded in 2024, one of the largest seed rounds in AI developer tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;193.6x faster than LLMs&lt;/strong&gt; — Jev delivers sub-100ms response times versus traditional large language models&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;444.6x cheaper at scale&lt;/strong&gt; — Priced at $0.39 per 1,000 workflows vs. $3.31 for GPT-5.6 Luna and $19.49 for Claude Haiku 4.5&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ex-OpenAI founder&lt;/strong&gt; — CEO Diogo Almeida worked on InstructGPT, ChatGPT, GPT-4, and reinforcement learning from human feedback&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Novel training approach&lt;/strong&gt; — Uses RLCD (Reinforcement Learning for Calibrated Decisions) instead of RLHF, producing typed outputs with confidence scores&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Software-first architecture&lt;/strong&gt; — Designed for embedding in applications, not conversational interfaces&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Is TypeSafe AI?
&lt;/h2&gt;

&lt;p&gt;TypeSafe AI is a machine-native intelligence infrastructure company building AI models specifically designed for software automation rather than human interaction. The company developed System One Models, a new class of AI that produces structured decisions with calibrated probabilities instead of conversational text. TypeSafe's approach represents a fundamental departure from the RLHF-trained large language models that dominate the AI landscape, optimizing for reliability, speed, and programmatic integration over human-pleasing responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Did TypeSafe AI Raise $40M?
&lt;/h2&gt;

&lt;p&gt;The September 2026 seed round addresses a critical gap in the AI infrastructure market: &lt;strong&gt;most AI models are optimized for human conversation, not software integration&lt;/strong&gt;. DCVC General Partner James Hardiman stated TypeSafe is tackling "one of the biggest remaining challenges in AI" by making models reliable enough to embed in products at scale. The capital enables TypeSafe to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complete development and commercialization of the Jev model&lt;/li&gt;
&lt;li&gt;Build enterprise go-to-market infrastructure&lt;/li&gt;
&lt;li&gt;Scale engineering and research teams&lt;/li&gt;
&lt;li&gt;Expand use case coverage across high-volume business workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Detail&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Amount&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$40M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Stage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Seed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Valuation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$200M&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lead Investor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;DCVC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Date&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;September 16, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Founded&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2024&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Location&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;San Francisco, CA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  How Does TypeSafe AI Work?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  System One Models Architecture
&lt;/h3&gt;

&lt;p&gt;TypeSafe's core innovation is the System One Model, named after Daniel Kahneman's "fast thinking" cognitive system. Unlike LLMs that generate tokens sequentially, System One Models:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Accept structured inputs&lt;/strong&gt; defining decision parameters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process using RLCD training&lt;/strong&gt; (Reinforcement Learning for Calibrated Decisions)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output typed decisions&lt;/strong&gt; — yes/no probabilities, list selections, numerical scores&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Include confidence measures&lt;/strong&gt; enabling automated thresholds&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Jev Model
&lt;/h3&gt;

&lt;p&gt;Jev, TypeSafe's first commercial model, delivers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sub-100ms latency&lt;/strong&gt; for decision workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Typed outputs&lt;/strong&gt; instead of text strings&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calibrated confidence scores&lt;/strong&gt; for each decision&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero hallucinations&lt;/strong&gt; via confidence estimation system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$42 per billion input tokens&lt;/strong&gt; (238x cheaper than Claude Fable 5.1)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CEO Diogo Almeida told Forbes: &lt;strong&gt;"We've been optimizing for humans, and we're superhuman at pleasing humans"&lt;/strong&gt; — but that optimization makes models unreliable for software automation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Founded TypeSafe AI?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Leadership Team
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Diogo Almeida&lt;/strong&gt; — CEO &amp;amp; Co-founder&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Former OpenAI researcher (reinforcement learning from human feedback team)&lt;/li&gt;
&lt;li&gt;Contributed to InstructGPT, ChatGPT, and GPT-4 development&lt;/li&gt;
&lt;li&gt;Deep expertise in RLHF methodologies and limitations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Erik Gafni&lt;/strong&gt; — Co-founder&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extensive AI engineering background&lt;/li&gt;
&lt;li&gt;Details not publicly disclosed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Sasha Sheng&lt;/strong&gt; — Co-founder  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI research and development experience&lt;/li&gt;
&lt;li&gt;Role in company not specified&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The founding team's OpenAI pedigree signals deep technical credibility in foundation model development, while their decision to reject RLHF demonstrates contrarian conviction about AI architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Problem Does TypeSafe AI Solve?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The LLM Integration Gap
&lt;/h3&gt;

&lt;p&gt;Current large language models face three critical problems for software integration:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Mode dropping&lt;/strong&gt; — Models omit valid options to please users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overconfidence&lt;/strong&gt; — No calibrated uncertainty measures&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unreliability&lt;/strong&gt; — Inconsistent outputs for identical inputs&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;TypeSafe's RLCD training explicitly addresses these issues by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Training on decision accuracy, not human preference&lt;/li&gt;
&lt;li&gt;Outputting probability distributions, not deterministic text&lt;/li&gt;
&lt;li&gt;Maintaining self-consistency across repeated queries&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Target Use Cases
&lt;/h3&gt;

&lt;p&gt;TypeSafe positions Jev for high-volume business workflows requiring judgment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Insurance underwriting&lt;/strong&gt; — Property fire risk assessment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Service request classification&lt;/strong&gt; — Routing customer issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invoice evaluation&lt;/strong&gt; — Fraud detection and approval&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security alert triage&lt;/strong&gt; — Prioritizing incident response&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI agent oversight&lt;/strong&gt; — Validating autonomous system outputs&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How Does TypeSafe AI Compare to Traditional LLMs?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Performance &amp;amp; Cost Comparison
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Price per 1,000 workflows&lt;/th&gt;
&lt;th&gt;Relative Speed&lt;/th&gt;
&lt;th&gt;Architecture&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;TypeSafe Jev&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.39&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;193.6x faster&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;System One (RLCD)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-5.6 Luna&lt;/td&gt;
&lt;td&gt;$3.31&lt;/td&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;LLM (RLHF)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Haiku 4.5&lt;/td&gt;
&lt;td&gt;$19.49&lt;/td&gt;
&lt;td&gt;~Baseline&lt;/td&gt;
&lt;td&gt;LLM (RLHF)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Architectural Differences
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Traditional LLMs&lt;/strong&gt; (GPT, Claude, Gemini):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trained via RLHF for conversational quality&lt;/li&gt;
&lt;li&gt;Generate text token-by-token&lt;/li&gt;
&lt;li&gt;Optimized for human satisfaction&lt;/li&gt;
&lt;li&gt;High latency (seconds per response)&lt;/li&gt;
&lt;li&gt;Probabilistic text output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;TypeSafe System One Models&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Trained via RLCD for decision accuracy
&lt;/li&gt;
&lt;li&gt;Output structured types directly&lt;/li&gt;
&lt;li&gt;Optimized for software integration&lt;/li&gt;
&lt;li&gt;Sub-100ms latency&lt;/li&gt;
&lt;li&gt;Typed decisions with confidence scores&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where Is TypeSafe AI in the AI Developer Tools Landscape?
&lt;/h2&gt;

&lt;p&gt;TypeSafe enters a crowded but segmented AI developer tools market:&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Generation Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cursor&lt;/strong&gt; ($100M+ ARR) — AI-first code editor for developers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lovable&lt;/strong&gt; ($2.8B valuation) — Natural language app builder&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Replit&lt;/strong&gt; — Browser-based IDE with AI agent&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Decision Intelligence Layer (TypeSafe's Category)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No direct competitors disclosed&lt;/strong&gt; in the System One Model space&lt;/li&gt;
&lt;li&gt;Traditional rule engines (rigid, non-learning)&lt;/li&gt;
&lt;li&gt;General-purpose LLM APIs (slow, expensive for structured decisions)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TypeSafe's differentiation is &lt;strong&gt;vertical&lt;/strong&gt;: optimizing for embedded decision-making rather than human-facing generation. This positions the company to capture workflow automation spend currently handled by brittle rule systems or cost-prohibitive LLM calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next for TypeSafe AI?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Immediate Roadmap
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Early access program&lt;/strong&gt; — Currently accepting waitlist signups for Jev&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise pilots&lt;/strong&gt; — Deploying with design partners in insurance, fintech, security&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model expansion&lt;/strong&gt; — Extending System One capabilities to additional decision types&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go-to-market scaling&lt;/strong&gt; — Building sales and customer success infrastructure&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Market Opportunity
&lt;/h3&gt;

&lt;p&gt;The market for business process automation is massive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;$17B+ spent annually&lt;/strong&gt; on robotic process automation (RPA)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Millions of workflows&lt;/strong&gt; still handled by rigid rule engines or manual review&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emerging AI agent category&lt;/strong&gt; requiring reliable decision-making infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;TypeSafe targets the wedge where RPA is too brittle and LLMs are too expensive or unreliable. If Jev delivers on its performance claims, it could define a new infrastructure category: &lt;strong&gt;machine-native intelligence&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is a System One Model?
&lt;/h3&gt;

&lt;p&gt;A System One Model is TypeSafe's term for AI optimized for fast, automated decision-making within software systems. Unlike large language models trained on human conversation, System One Models produce typed outputs (probabilities, selections, scores) with calibrated confidence measures. The name references psychologist Daniel Kahneman's "System 1" — the automatic, rapid cognitive process humans use for quick judgments.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much did TypeSafe AI raise and at what valuation?
&lt;/h3&gt;

&lt;p&gt;TypeSafe AI raised $40 million in a seed round led by DCVC in September 2026. According to Forbes, citing a source familiar with the transaction, the round valued the company at $200 million post-money. This represents one of the largest seed rounds in the AI developer tools category and reflects strong investor conviction in the machine-native intelligence thesis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who are TypeSafe AI's competitors?
&lt;/h3&gt;

&lt;p&gt;TypeSafe AI competes primarily with general-purpose LLM APIs (OpenAI, Anthropic, Google) used for structured decision tasks and traditional rule engines deployed in business process automation. The company does not face direct competition in the System One Model category, which it appears to be defining. Adjacent competition includes robotic process automation (RPA) vendors like UiPath and Automation Anywhere, though these lack learning capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  What makes TypeSafe AI different from ChatGPT or Claude?
&lt;/h3&gt;

&lt;p&gt;TypeSafe's Jev model is architecturally distinct from conversational LLMs like ChatGPT or Claude. While those models are trained via RLHF to generate natural language for human users, Jev is trained via RLCD to produce typed decisions for software systems. Jev outputs structured data types (booleans, enums, scores) with confidence intervals rather than free-form text, enabling programmatic integration. The company claims 193.6x faster speed and 444.6x lower cost than LLMs for workflow automation use cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://siliconangle.com/2026/09/16/typesafe-ai-exits-stealth-with-40m-to-build-ai-for-use-by-software/" rel="noopener noreferrer"&gt;TypeSafe AI exits stealth with $40M to build AI for use by software&lt;/a&gt; — SiliconANGLE&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://typesafe.ai" rel="noopener noreferrer"&gt;TypeSafe AI official website&lt;/a&gt; — Company product documentation and technical approach&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>startup</category>
      <category>venturecapital</category>
      <category>funding</category>
    </item>
    <item>
      <title>Best SEO Packages: AI Search + Video Search Optimization</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 23 Sep 2026 18:06:22 +0000</pubDate>
      <link>https://dev.to/devtoaaron/best-seo-packages-ai-search-video-search-optimization-556</link>
      <guid>https://dev.to/devtoaaron/best-seo-packages-ai-search-video-search-optimization-556</guid>
      <description>&lt;h1&gt;
  
  
  Best SEO Packages: AI Search + Video Search Optimization
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; SEO packages in 2026 must deliver three capabilities together: traditional Google optimization, generative engine optimization for AI citations across ChatGPT and Perplexity, and video search optimization for YouTube and social platforms. AI assistants now generate activity equivalent to 56% of global search volume, while video comprises 82% of all internet traffic. A comprehensive package should include AI citation tracking, multi-platform video optimization, structured data implementation, and monthly performance reporting across all three channels. Expect $2,500-$8,000/month for mid-market businesses, with enterprise packages starting at $15,000/month.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Modern SEO requires three pillars: traditional search optimization, AI citation optimization across ChatGPT/Perplexity/Claude, and video search optimization for YouTube/TikTok/social platforms working together as one integrated strategy.&lt;/li&gt;
&lt;li&gt;AI search now generates activity equivalent to 56% of global search volume, while video accounts for 82% of all internet traffic, making both channels essential rather than optional for any comprehensive SEO strategy.&lt;/li&gt;
&lt;li&gt;A complete SEO package should include AI citation tracking showing which AI models cite your content, video performance metrics across platforms, structured data implementation, and monthly cross-channel reporting.&lt;/li&gt;
&lt;li&gt;Mid-market packages typically cost $2,500-$8,000 monthly and should deliver 15-25 AI citations per month plus 5-10 optimized videos, while enterprise packages start at $15,000 monthly with dedicated channel teams.&lt;/li&gt;
&lt;li&gt;The highest-ROI components are Reddit and Zhihu participation for AI citations, YouTube optimization for video search, and technical blog content that Claude specifically cites, delivering 3-9x higher conversion rates than traditional organic traffic.&lt;/li&gt;
&lt;li&gt;Avoid packages that silo AI, video, and traditional SEO into separate services with no integration, lack AI citation tracking tools, or charge per-citation fees rather than flat monthly rates.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What makes an SEO package complete in 2026?
&lt;/h2&gt;

&lt;p&gt;The definition of comprehensive SEO has fundamentally changed. Two years ago, a complete package meant keyword research, on-page optimization, link building, and technical audits. Today that covers less than half of where your audience discovers content. AI assistants now generate activity equivalent to 56% of global search volume, and video accounts for 82% of all internet traffic. A package that optimizes only for traditional Google search leaves the majority of discovery channels unaddressed.&lt;/p&gt;

&lt;p&gt;The best SEO packages in 2026 deliver three capabilities as one integrated strategy, not as separate add-ons. First, traditional search optimization for Google and Bing, which still drives the largest single share of traffic. Second, generative engine optimization (GEO) for AI citations across ChatGPT, Perplexity, Claude, and Google AI Overviews, where 93% of searches end without a click but qualified traffic converts 31-900% higher. Third, video search optimization for YouTube, TikTok, and social platforms, where users increasingly begin their product research and technical queries.&lt;/p&gt;

&lt;p&gt;These three channels are not competitive alternatives. They serve different phases of the buyer journey and different intent types, and users move fluidly between them. The package you choose must recognize that integration and report performance across all three rather than treating AI and video as experimental side projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do AI search and video search matter for SEO?
&lt;/h2&gt;

&lt;p&gt;The shift is already measured in traffic data, not projections. AI assistants generate activity equivalent to 56% of global search engine volume when mobile app usage is included, up from near zero three years ago. ChatGPT alone reaches 800 million weekly users, and 60% of Google searches now end without a click. For searches that trigger Google's AI Mode, that zero-click rate rises to 93%. Traditional click-through traffic is declining, but the traffic that does arrive converts significantly better because the AI has already handled the research phase.&lt;/p&gt;

&lt;p&gt;Video search has followed a parallel trajectory. YouTube is the second-largest search engine globally, and 82% of all internet traffic is now video. Google search increasingly surfaces video results above text pages, with video thumbnails appearing in 26% of all search results. For queries with clear instructional or review intent, video results dominate the first page. TikTok has emerged as a primary search platform for Gen Z, with 40% of users preferring it over Google for discovery.&lt;/p&gt;

&lt;p&gt;The data shows these channels capture distinct audience segments and intents. AI search handles complex research, comparison, and technical troubleshooting queries. Video search dominates how-to, product reviews, and visual demonstrations. Traditional text search remains strongest for navigational queries and quick fact lookups. An SEO strategy that covers only one channel voluntarily surrenders the others to competitors who show up where your audience actually searches.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should a comprehensive SEO package include?
&lt;/h2&gt;

&lt;p&gt;A complete package must deliver measurable work across all three channels, with shared infrastructure that makes the channels reinforce each other rather than compete for budget. The specific deliverables below represent the minimum viable scope for a mid-market business. Enterprise packages should scale these proportionally, not add fundamentally different services.&lt;/p&gt;

&lt;h3&gt;
  
  
  Traditional search optimization components
&lt;/h3&gt;

&lt;p&gt;On-page optimization remains foundational. This includes keyword research aligned with search intent, meta title and description optimization under character limits, header tag structure, internal linking strategy, and image alt text. Technical SEO covers site speed optimization, mobile responsiveness, Core Web Vitals improvement, XML sitemap management, and structured data implementation. Off-page SEO includes link acquisition from authoritative domains, digital PR for brand mentions, and guest posting on relevant industry sites. Monthly reporting should track organic traffic, keyword rankings for target terms, conversion rate by landing page, and backlink profile growth.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI citation optimization (GEO) components
&lt;/h3&gt;

&lt;p&gt;AI citation optimization targets the platforms each model actually cites. For overseas markets, this means deep Q&amp;amp;A participation on Reddit (which supplies 46.7% of Perplexity's citations), accurate Wikipedia entries (47.9% of ChatGPT's citations), and long-form technical blog content (the only channel Claude cites). For Chinese markets, it means substantive answers on Zhihu, FAQ content on Toutiao, and technical articles on CSDN. Content must be formatted for machine parsing with lead-paragraph definitions, comparison tables, and structured markup including Schema.org FAQPage and TechArticle types. The package should include monthly AI citation tracking showing which models cite your content, for which queries, and in what position. Expect 15-25 new AI citations per month for mid-market packages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Video search optimization components
&lt;/h3&gt;

&lt;p&gt;Video optimization spans YouTube SEO, TikTok optimization, and video embedding on owned properties. For YouTube, deliverables include keyword research for video titles, optimized descriptions with timestamps, custom thumbnails tested for click-through rate, closed captions and transcripts, and playlist organization by topic. Video content should be produced or optimized for product demos, how-to tutorials, expert interviews, behind-the-scenes content, and comparison reviews. TikTok optimization requires hashtag strategy, trending audio integration, and platform-specific editing for vertical format. Monthly deliverables for mid-market packages should include 5-10 optimized videos across platforms, with performance tracking for view count, watch time, click-through rate to website, and conversions attributed to video.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cross-channel integration and reporting
&lt;/h3&gt;

&lt;p&gt;The highest-value component is the integration layer that makes the three channels compound rather than compete. This includes content repurposing where a long-form article becomes a video script, a Reddit answer, and a series of social clips. Keyword research should identify which queries are best served by text, video, or AI answers, then route production accordingly. Structured data implementation should cover all content types so Google can surface the right format for each query. Monthly reporting must unify metrics across channels, showing total organic visibility including traditional rankings, AI citation share, and video impressions, with conversion tracking that attributes revenue to each channel accurately.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much should you expect to pay?
&lt;/h2&gt;

&lt;p&gt;SEO package pricing in 2026 reflects the expanded scope and specialized skills required for multi-channel optimization. The tiers below represent market rates as of September 2026 for North American agencies with demonstrated AI and video optimization capabilities. Offshore providers may price 30-50% lower but often lack access to Western AI platforms or native English fluency, which matters for Reddit and Wikipedia work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pricing tiers and what they deliver
&lt;/h3&gt;

&lt;p&gt;Small business packages ($1,000-$2,500/month) cover traditional SEO plus light AI and video work. Expect 10-15 hours of work monthly, on-page optimization for 10-20 target keywords, 2-3 blog posts optimized for AI citation, 1-2 optimized videos, and basic cross-channel reporting. This tier works for local businesses or niche SaaS with limited competitive pressure.&lt;/p&gt;

&lt;p&gt;Mid-market packages ($2,500-$8,000/month) are the sweet spot for growing companies. Deliverables include 25-40 hours monthly, comprehensive technical SEO audits quarterly, 5-8 long-form articles formatted for AI citation, 15-25 AI citations per month across ChatGPT/Perplexity/Claude, 5-10 videos optimized for YouTube and TikTok, active Reddit and Zhihu participation, Wikipedia entry creation or optimization, and detailed monthly reporting with conversion attribution. This tier supports B2B SaaS, e-commerce brands, and professional services firms.&lt;/p&gt;

&lt;p&gt;Enterprise packages ($15,000-$50,000+/month) deliver dedicated teams for each channel. Expect 100+ hours monthly, custom AI citation tracking dashboards, 20-30 AI citations per month, 15-25 produced and optimized videos, international SEO across multiple markets, Chinese platform optimization including Zhihu/Toutiao/Baidu, executive-level strategic consulting, and integration with product and sales teams. This tier serves large enterprises, high-growth startups post-Series B, and brands with significant competitive pressure.&lt;/p&gt;

&lt;h3&gt;
  
  
  What drives cost differences between packages
&lt;/h3&gt;

&lt;p&gt;Three factors determine pricing beyond raw hours. First, platform access and expertise. Reddit and Zhihu participation requires cultural fluency that takes years to build, not just translation. Wikipedia editing has specific guidelines and an approval process that rejects promotional content. These skills command premium rates. Second, video production capability. Agencies that produce videos in-house cost more than those that only optimize existing content, but the quality and strategic coherence justify the premium. Third, AI citation tracking infrastructure. Most agencies still track AI citations manually, which is labor-intensive and imprecise. Agencies with proprietary tracking tools can deliver better data at lower cost, making them worth a premium.&lt;/p&gt;

&lt;p&gt;Avoid packages that charge per citation or per video. These create perverse incentives to optimize for quantity over quality and make the agency's success misaligned with yours. Flat monthly fees with performance bonuses tied to business outcomes (qualified leads, revenue) are the healthiest structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which package components deliver the highest ROI?
&lt;/h2&gt;

&lt;p&gt;Not all SEO work returns equal value. The data consistently shows three components produce outsized results relative to their cost, and these should be weighted heavily in any package you choose.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reddit and Zhihu participation for AI citations
&lt;/h3&gt;

&lt;p&gt;Reddit supplies 46.7% of Perplexity's citations and significant shares of Google AI and ChatGPT citations. Zhihu is the equivalent for Chinese AI models, cited by every major model from 8-18%. Deep, genuine participation on these platforms reaches 8 of 9 major AI models at once. The work requires cultural fluency and cannot be outsourced to junior writers or offshored to teams unfamiliar with each platform's norms. Expect 4-8 hours per week from a senior strategist. The ROI shows in AI citation volume, with each strong answer earning citations for months, and in referral traffic quality, with Reddit traffic converting 31% higher for e-commerce and 900% higher for B2B versus traditional organic.&lt;/p&gt;

&lt;h3&gt;
  
  
  YouTube optimization for video search
&lt;/h3&gt;

&lt;p&gt;YouTube is the second-largest search engine globally, and Google search increasingly prioritizes video results for instructional and review queries. Optimization work includes title/description keyword research, custom thumbnails tested for CTR, closed captions, and strategic playlist organization. For product-focused businesses, a single well-optimized comparison or review video can drive qualified traffic for years. Mid-market packages should include 5-10 optimized videos monthly, either produced in-house or optimized from existing content. ROI appears in sustained organic video views (which compound over time unlike paid ads), referral traffic to product pages, and reduced sales cycle length as prospects arrive pre-educated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technical blog content for Claude citations
&lt;/h3&gt;

&lt;p&gt;Claude cites 0% from social platforms and sends 63% of its citations to niche technical blogs and documentation. For B2B SaaS and technical products, Claude matters disproportionately because it reaches engineering and technical decision-makers. The content requirement is substantive technical articles, API documentation, and practitioner guides, not promotional blog posts. This work demands domain expertise and cannot be outsourced to generalist content mills. Expect 2-3 long-form technical articles monthly. ROI shows in citation by Claude when prospects use it for vendor research, higher perceived authority in technical communities, and qualified leads from prospects who arrive having already validated your technical approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should you avoid in SEO packages?
&lt;/h2&gt;

&lt;p&gt;Several package structures look comprehensive but deliver poor results due to misaligned incentives or outdated approaches. The red flags below consistently predict underperformance and should disqualify a provider regardless of price.&lt;/p&gt;

&lt;h3&gt;
  
  
  Packages that silo AI, video, and traditional SEO
&lt;/h3&gt;

&lt;p&gt;Many agencies bolt AI citation work and video optimization onto their existing traditional SEO service as separate line items with separate teams. The traditional SEO team optimizes blog posts for Google, the content team writes articles for AI citation without coordinating keywords, and the video team produces content based on social trends rather than search demand. This produces three mediocre efforts that never compound. A strong package has one strategist coordinating all three channels, with content repurposing and keyword research that identifies the best format for each query. If the proposal shows separate monthly deliverables for each channel with no integration layer, it will underperform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Packages without AI citation tracking
&lt;/h3&gt;

&lt;p&gt;Most agencies claim to optimize content for AI citations but provide no measurement of whether AI models actually cite the content, which queries trigger the citation, or how citation volume changes month over month. Without tracking, the work is untestable faith. Demand that the package include monthly AI citation reporting. This does not need to be a proprietary tool; manual checks of 20-30 target queries across ChatGPT, Perplexity, and Claude with screenshots is sufficient. If the agency cannot demonstrate current citation volume for their existing clients, they cannot optimize for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Packages that ignore platform-specific formatting
&lt;/h3&gt;

&lt;p&gt;AI citation requires content formatted for machine parsing, with lead-paragraph definitions, comparison tables, and structured markup. Video optimization requires platform-specific decisions on aspect ratio, video length, and thumbnail style. Agencies that treat all content as generic blog posts, then distribute the same text to every channel, will fail on both AI and video. Review sample deliverables and confirm that blog posts include Schema.org markup, Reddit answers follow each subreddit's tone and rules, and videos are edited for the target platform rather than being one horizontal video uploaded everywhere.&lt;/p&gt;

&lt;h3&gt;
  
  
  Packages with per-citation or per-video pricing
&lt;/h3&gt;

&lt;p&gt;Agencies that charge per AI citation earned or per video produced create incentives to maximize quantity regardless of quality or business impact. A citation from Claude on a query your target customers never ask is worthless. A video optimized for vanity views but no conversions wastes budget. Flat monthly pricing with optional performance bonuses tied to qualified leads or revenue aligns the agency's incentives with yours and rewards them for focusing on the work that actually drives business outcomes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you evaluate whether a package is working?
&lt;/h2&gt;

&lt;p&gt;SEO is a long-term investment, but you should see measurable progress within 90 days and clear ROI within 6 months. The metrics below are the ones that matter, separated by channel, with benchmarks based on mid-market package expectations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Traditional search metrics and benchmarks
&lt;/h3&gt;

&lt;p&gt;Organic traffic should grow 15-25% quarter-over-quarter by month 6, with the caveat that zero-click searches mean traffic growth will be slower than historical norms. Keyword rankings are secondary to traffic, but you should see 40-60% of target keywords move into the top 10 positions by month 6. Backlink profile should grow by 10-20 new referring domains per month from organic outreach and digital PR. Conversion rate from organic traffic should improve 10-20% by month 6 as on-page optimization and user experience work takes effect. If traffic is flat or declining after 90 days, the package is failing.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI citation metrics and benchmarks
&lt;/h3&gt;

&lt;p&gt;AI citation volume should reach 15-25 citations per month by month 3 for mid-market packages. Track which AI models cite your content (ChatGPT, Perplexity, Claude, Google AI Overviews), which queries trigger citations, and what position your content holds in the response. Citation share of voice, defined as what percentage of target queries cite your content versus competitors, should grow month over month. Referral traffic from AI platforms (trackable via UTM parameters or referrer headers) should begin appearing by month 2 and grow 20-40% month-over-month. Conversion rate from AI referrals should be 30-900% higher than traditional organic, with B2B seeing the highest lift. If you see zero citations after 90 days, the package is failing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Video search metrics and benchmarks
&lt;/h3&gt;

&lt;p&gt;Video views should reach 10,000-50,000 cumulative views per month by month 6 for mid-market packages, with the range depending on niche size. Watch time and audience retention are more important than raw views; a successful video keeps 50%+ of viewers past the halfway point. Click-through rate from video to website should be 2-5% for product-focused content. Video ranking in YouTube search should show 60-80% of target keywords in top 10 by month 6. Conversions attributed to video (tracked via UTM parameters or multi-touch attribution) should appear by month 3 and grow steadily. If videos are getting views but driving no website traffic or conversions, the call-to-action strategy is broken.&lt;/p&gt;

&lt;h2&gt;
  
  
  What questions should you ask before choosing a package?
&lt;/h2&gt;

&lt;p&gt;The pitch deck and pricing sheet tell you what the agency wants you to know. The questions below reveal what they are hiding, including whether they have actually delivered AI and video results for clients or are just adding these services to their traditional SEO offering in response to market demand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Questions about AI citation optimization
&lt;/h3&gt;

&lt;p&gt;Ask: "Show me a list of AI citations you have earned for a current client, with screenshots of the AI responses and the queries that triggered them." Strong agencies have this data and share it readily. Weak agencies will say they cannot share client work due to NDAs, which is a tell that they have no results to show. Ask: "Which AI models do you optimize for, and how do you decide which platforms to prioritize for my industry?" The answer should reference the citation data showing which models your target customers use and which platforms those models cite. Ask: "How do you track AI citations month-over-month?" Manual checking is acceptable; no tracking at all is disqualifying.&lt;/p&gt;

&lt;h3&gt;
  
  
  Questions about video optimization
&lt;/h3&gt;

&lt;p&gt;Ask: "Do you produce videos in-house, or do you only optimize videos I provide?" Neither is wrong, but you need to know whether video production is included or an add-on cost. Ask: "Show me examples of videos you have optimized and the performance before and after." Look for clear improvement in watch time, CTR, or rankings, not just view count. Ask: "How do you decide which topics and formats to produce?" The answer should reference search volume data and your customer journey, not generic social media trends. Ask: "What is your process for repurposing content across text, video, and short-form social?" Strong agencies systematically turn one piece of research into 5-10 assets across formats; weak agencies treat each as a separate project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Questions about integration and reporting
&lt;/h3&gt;

&lt;p&gt;Ask: "How do you coordinate work across traditional SEO, AI optimization, and video?" The answer should describe a single strategist or weekly sync, not independent teams. Ask: "Show me a sample monthly report." It should unify metrics across channels, not provide three separate reports. Ask: "How do you attribute conversions to each channel when a customer touches multiple channels before buying?" Multi-touch attribution is complex, but the agency should have a methodology, even if imperfect. Ask: "What does success look like in month 3, month 6, and month 12?" The answer should be specific, not vague promises about rankings and traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a realistic 12-month timeline look like?
&lt;/h2&gt;

&lt;p&gt;SEO is not a quick win, and anyone promising first-page rankings in 30 days is lying. The timeline below reflects realistic expectations for a mid-market business starting from a reasonable baseline (existing website, some historical SEO work, not launching from zero).&lt;/p&gt;

&lt;h3&gt;
  
  
  Months 1-3: Foundation and early wins
&lt;/h3&gt;

&lt;p&gt;The first 90 days focus on infrastructure and quick wins. Traditional SEO work includes a comprehensive technical audit, on-page optimization for highest-priority pages, and initial content production. AI optimization work includes establishing accounts on Reddit, Zhihu, and other citation platforms, publishing the first batch of AI-formatted blog posts with structured data, and submitting Wikipedia entries if applicable. Video work includes identifying target keywords and topics, producing or optimizing the first 3-5 videos, and setting up YouTube channel optimization. Expect minimal traffic growth but some early AI citations and video views by month 3. This phase is investment-heavy and result-light, which is normal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Months 4-6: Momentum and measurable growth
&lt;/h3&gt;

&lt;p&gt;Months 4-6 are when compounding begins. Traditional SEO shows 15-25% organic traffic growth as on-page optimization and new content start ranking. AI citations should reach 15-25 per month, with referral traffic from AI platforms growing month-over-month. Video library reaches 10-20 videos, with cumulative views in the 20,000-100,000 range depending on niche. Conversion rate improvements from all channels should be measurable. This phase is where ROI becomes visible and confidence in the package is earned or lost.&lt;/p&gt;

&lt;h3&gt;
  
  
  Months 7-12: Scale and optimization
&lt;/h3&gt;

&lt;p&gt;Months 7-12 focus on scaling what works and cutting what does not. Traffic growth should be 20-40% versus month 6 baseline. AI citations should grow to 30-50 per month as older content accumulates citations and new content builds on the formats that work. Video views should grow 30-50% versus month 6 as the library compounds and older videos continue driving traffic. Conversion rates should improve another 10-20% as user experience optimization and A/B testing refine the funnel. At month 12, you should have clear data on which channels and content types drive the most qualified traffic, and the next 12 months should double down on those.&lt;/p&gt;

&lt;h3&gt;
  
  
  FAQ
&lt;/h3&gt;

&lt;h3&gt;
  
  
  What is the difference between traditional SEO and GEO?
&lt;/h3&gt;

&lt;p&gt;Traditional SEO optimizes content to rank in Google's link list, targeting keywords and earning backlinks. Generative engine optimization (GEO) optimizes content to be cited by AI models like ChatGPT, Perplexity, and Claude when they generate answers. GEO requires different platforms (Reddit, Zhihu), different formatting (lead-paragraph definitions, structured data), and different success metrics (citation volume, not rankings).&lt;/p&gt;

&lt;h3&gt;
  
  
  How much should a comprehensive SEO package cost in 2026?
&lt;/h3&gt;

&lt;p&gt;Mid-market packages that cover traditional SEO, AI citation optimization, and video search optimization typically cost $2,500-$8,000 per month and should deliver 15-25 AI citations monthly plus 5-10 optimized videos. Small business packages start at $1,000-$2,500 monthly with lighter AI and video work. Enterprise packages start at $15,000 monthly and include dedicated teams for each channel.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does video search matter for SEO?
&lt;/h3&gt;

&lt;p&gt;Video accounts for 82% of all internet traffic, YouTube is the second-largest search engine globally, and Google increasingly prioritizes video results in search. Video dominates how-to, product review, and visual demonstration queries. An SEO strategy that ignores video voluntarily surrenders these high-intent queries to competitors who produce video content.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you know if AI models are citing your content?
&lt;/h3&gt;

&lt;p&gt;Track AI citations by manually querying ChatGPT, Perplexity, Claude, and Google AI Overviews with target keywords and recording whether your content appears in the response and what position it holds. A comprehensive SEO package should include monthly AI citation reporting with screenshots showing which models cite your content for which queries. Expect 15-25 citations per month for mid-market packages.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the highest ROI component of a modern SEO package?
&lt;/h3&gt;

&lt;p&gt;Reddit and Zhihu participation for AI citations delivers the highest ROI, reaching 8 of 9 major AI models at once. Each strong answer earns citations for months, and referral traffic converts 31% higher for e-commerce and 900% higher for B2B versus traditional organic. YouTube optimization is second, with well-optimized videos driving sustained traffic for years.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long does it take to see results from a comprehensive SEO package?
&lt;/h3&gt;

&lt;p&gt;Expect early AI citations and video views by month 3, measurable traffic growth and conversion improvements by month 6, and clear ROI by month 12. Traditional SEO alone takes 6-9 months to show results; adding AI and video optimization accelerates early wins because AI citations and video views can appear within weeks of publication, unlike traditional rankings that take months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.hubspot.com/marketing/youtube-stats" rel="noopener noreferrer"&gt;HubSpot Marketing Statistics - YouTube and Video Marketing Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.google/products/search/" rel="noopener noreferrer"&gt;Google Search Blog - AI Overview and Generative Search&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/about/press/" rel="noopener noreferrer"&gt;YouTube Official Press Statistics and Platform Metrics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.statista.com/markets/424/topic/481/digital-media/" rel="noopener noreferrer"&gt;Statista Digital Media Market Insights and Video Trends&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.perplexity.ai/" rel="noopener noreferrer"&gt;Perplexity AI Documentation and Search Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.anthropic.com/research" rel="noopener noreferrer"&gt;Anthropic Research Publications and Claude Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.redditinc.com/" rel="noopener noreferrer"&gt;Reddit Inc Official Platform Statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://moz.com/blog" rel="noopener noreferrer"&gt;Moz SEO Learning Center and Industry Reports&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.searchenginejournal.com/" rel="noopener noreferrer"&gt;Search Engine Journal AI Search and SEO Analysis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sproutsocial.com/insights/social-media-statistics/" rel="noopener noreferrer"&gt;Sprout Social Media Statistics and Platform Insights&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/best-seo-packages-ai-search-video-search" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>seo</category>
      <category>aisearch</category>
    </item>
    <item>
      <title>LangSmith Hosted vs Self: Deployment Guide 2026</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Fri, 18 Sep 2026 17:23:16 +0000</pubDate>
      <link>https://dev.to/devtoaaron/langsmith-hosted-vs-self-deployment-guide-2026-181h</link>
      <guid>https://dev.to/devtoaaron/langsmith-hosted-vs-self-deployment-guide-2026-181h</guid>
      <description>&lt;h1&gt;
  
  
  LangSmith Hosted vs Self-Hosted: Which Deployment Model Fits Your LLM Observability Needs?
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; LangSmith operates exclusively as a managed SaaS platform with no self-hosting option available as of 2026. Teams requiring on-premise LLM observability must evaluate open-source alternatives like Langfuse (MIT license, full self-hosting support), Phoenix by Arize AI (Apache 2.0, containerized deployment), or custom solutions built on OpenTelemetry. Choose SaaS LangSmith for zero-ops tracing with deep LangChain integration; choose self-hosted alternatives when data sovereignty, cost control, or compliance policies prohibit external trace storage.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;LangSmith is a SaaS-only platform with no official self-hosting option, making the "hosted vs self" decision actually a choice between LangSmith SaaS and open-source alternatives like Langfuse or Phoenix.&lt;/li&gt;
&lt;li&gt;Self-hosting LLM observability provides data sovereignty, cost predictability, and compliance control, but requires infrastructure expertise, operational overhead, and ongoing maintenance responsibility.&lt;/li&gt;
&lt;li&gt;Langfuse offers both managed SaaS and open-source self-hosting with Docker/Kubernetes deployment, making it the closest alternative to a "self-hosted LangSmith" architecture.&lt;/li&gt;
&lt;li&gt;Phoenix by Arize AI provides Apache 2.0 licensed observability optimized for notebook-based development and local debugging, with containerized deployment for production environments.&lt;/li&gt;
&lt;li&gt;Total cost comparison must include infrastructure, engineering time, data egress, and opportunity cost — self-hosting is not always cheaper despite eliminating SaaS subscription fees.&lt;/li&gt;
&lt;li&gt;The decision boundary is whether your organization's data governance, budget constraints, or customization requirements justify the operational complexity of running your own observability infrastructure.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What does LangSmith hosted versus self-hosted actually mean?
&lt;/h2&gt;

&lt;p&gt;LangSmith, developed by LangChain Inc., is a managed observability platform delivered exclusively as Software-as-a-Service (SaaS). The platform has no self-hosting option, no enterprise on-premise deployment package, and no open-source release as of 2026. When organizations search for "LangSmith self-hosted," they are typically asking one of three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Can I run LangSmith on my own infrastructure?&lt;/strong&gt; No. LangSmith's codebase is proprietary.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What self-hosted alternatives provide similar capabilities?&lt;/strong&gt; Langfuse and Phoenix are the primary options.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Should I accept SaaS for observability, or does my use case require self-hosting?&lt;/strong&gt; This is the actual decision.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The comparison therefore becomes: &lt;strong&gt;LangSmith SaaS versus self-hosted open-source observability tools&lt;/strong&gt;. Understanding this frame is critical before evaluating trade-offs, because "self-hosted LangSmith" does not exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why would you want self-hosted LLM observability?
&lt;/h2&gt;

&lt;p&gt;Organizations consider self-hosted observability for six primary reasons, each with concrete technical or business requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Sovereignty and Compliance
&lt;/h3&gt;

&lt;p&gt;When prompts contain personally identifiable information (PII), protected health information (PHI), or classified data, external SaaS storage may violate regulatory requirements. GDPR Article 48, HIPAA, FedRAMP, and defense classification policies often mandate on-premise data processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concrete scenario:&lt;/strong&gt; A healthcare AI assistant that discusses patient symptoms must comply with HIPAA. Sending trace data containing patient information to an external SaaS platform requires a Business Associate Agreement (BAA) and may still be prohibited by internal security policies. Self-hosting keeps patient data within the organization's security perimeter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cost Predictability at Scale
&lt;/h3&gt;

&lt;p&gt;LangSmith pricing scales with trace volume: Developer plan ($39/month, 50K traces), Team plan ($199/month, 500K traces), Enterprise (custom pricing). An agent handling 10 million requests monthly with 10% trace sampling generates 1 million traces per month, pushing costs into four-figure monthly SaaS fees.&lt;/p&gt;

&lt;p&gt;Self-hosted infrastructure cost is dominated by storage (traces persist for 180+ days) and compute (query performance). Organizations with existing Kubernetes clusters and object storage can deploy Langfuse at marginal cost: compute overhead for the API server, PostgreSQL database hosting, and S3-compatible storage. This becomes cost-effective above ~500K traces/month if engineering time is available.&lt;/p&gt;

&lt;h3&gt;
  
  
  Customization and Integration
&lt;/h3&gt;

&lt;p&gt;Open-source observability tools allow custom evaluators, modified retention policies, and direct database access for internal analytics. SaaS platforms constrain customization to their API surface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example requirement:&lt;/strong&gt; An organization wants to join trace data with internal experimentation metadata stored in Snowflake, then build custom dashboards in Tableau. Self-hosted PostgreSQL enables direct SQL access; SaaS platforms require API-based export with rate limits.&lt;/p&gt;

&lt;h3&gt;
  
  
  Air-Gapped and Restricted Networks
&lt;/h3&gt;

&lt;p&gt;Defense contractors, financial institutions with segmented networks, and high-security research labs operate in environments where internet egress is blocked or tightly controlled. SaaS observability is impossible; self-hosted deployment on the internal network is the only option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Avoiding Vendor Lock-In
&lt;/h3&gt;

&lt;p&gt;Trace data, datasets, and evaluation results stored in a proprietary SaaS platform create migration friction. Self-hosted open-source tools provide portable data formats and direct database access, simplifying future migrations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Control Over Feature Roadmap
&lt;/h3&gt;

&lt;p&gt;SaaS platforms prioritize features benefiting their broad customer base. Self-hosted open-source tools can be forked, extended, or modified to meet niche requirements without waiting for vendor support.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do LangSmith's SaaS-only constraints shape the comparison?
&lt;/h2&gt;

&lt;p&gt;Because LangSmith does not offer self-hosting, the comparison cannot be apples-to-apples. Instead, evaluate:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;LangSmith SaaS&lt;/th&gt;
&lt;th&gt;Langfuse Self-Hosted&lt;/th&gt;
&lt;th&gt;Phoenix Self-Hosted&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed SaaS, zero infrastructure&lt;/td&gt;
&lt;td&gt;Docker/Kubernetes on your infrastructure&lt;/td&gt;
&lt;td&gt;Docker/local notebook, Kubernetes optional&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data location&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;LangChain Inc. infrastructure (US/EU regions)&lt;/td&gt;
&lt;td&gt;Your cloud or on-premise&lt;/td&gt;
&lt;td&gt;Your infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Operational responsibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;LangChain Inc. manages uptime, backups, scaling&lt;/td&gt;
&lt;td&gt;Your team manages infrastructure, upgrades, monitoring&lt;/td&gt;
&lt;td&gt;Your team manages deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost model&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Per-trace subscription tiers&lt;/td&gt;
&lt;td&gt;Infrastructure + engineering time&lt;/td&gt;
&lt;td&gt;Infrastructure + engineering time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangChain integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native, zero-config&lt;/td&gt;
&lt;td&gt;SDK integration, requires explicit instrumentation&lt;/td&gt;
&lt;td&gt;SDK integration, explicit instrumentation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Feature parity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Full LangSmith feature set&lt;/td&gt;
&lt;td&gt;Core tracing + evaluations + prompt management&lt;/td&gt;
&lt;td&gt;Core tracing + evaluations, limited prompt management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Customization&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;API-level only&lt;/td&gt;
&lt;td&gt;Full database and codebase access&lt;/td&gt;
&lt;td&gt;Full database and codebase access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vendor lock-in risk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High: proprietary data storage&lt;/td&gt;
&lt;td&gt;Low: PostgreSQL + S3&lt;/td&gt;
&lt;td&gt;Low: SQLite/PostgreSQL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The practical choice is therefore between accepting LangSmith's SaaS constraints for operational simplicity, or adopting a self-hosted alternative for control and compliance at the cost of operational complexity.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the leading self-hosted LangSmith alternatives?
&lt;/h2&gt;

&lt;p&gt;Three open-source platforms dominate the self-hosted LLM observability space in 2026, each with different strengths and deployment patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  Langfuse: The Self-Hostable LangSmith Alternative
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://langfuse.com/" rel="noopener noreferrer"&gt;Langfuse&lt;/a&gt; is an MIT-licensed observability platform supporting both managed SaaS and self-hosting. It provides distributed tracing, prompt management, datasets, evaluations, and LLM-as-judge scoring. Langfuse is the most direct LangSmith alternative for teams requiring self-hosting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js web application (TypeScript)&lt;/li&gt;
&lt;li&gt;PostgreSQL database for trace storage&lt;/li&gt;
&lt;li&gt;S3-compatible object storage for large payloads&lt;/li&gt;
&lt;li&gt;Optional Redis for caching&lt;/li&gt;
&lt;li&gt;Docker Compose or Kubernetes deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Self-hosting deployment:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Docker Compose example (simplified)&lt;/span&gt;
git clone https://github.com/langfuse/langfuse.git
&lt;span class="nb"&gt;cd &lt;/span&gt;langfuse
&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env
&lt;span class="c"&gt;# Configure DATABASE_URL, S3 credentials&lt;/span&gt;
docker-compose up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Production deployments use Kubernetes with managed PostgreSQL (AWS RDS, GCP Cloud SQL) and object storage (S3, GCS, MinIO). Langfuse's Helm chart simplifies Kubernetes deployment with configurable replicas, autoscaling, and ingress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LangChain integration:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langfuse.callback&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;CallbackHandler&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain_anthropic&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ChatAnthropic&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langchain.agents&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;create_react_agent&lt;/span&gt;

&lt;span class="c1"&gt;# Point to self-hosted Langfuse instance
&lt;/span&gt;&lt;span class="n"&gt;langfuse_handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CallbackHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://langfuse.your-company.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;public_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pk_xxx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;secret_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sk_xxx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;llm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ChatAnthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-sonnet-4-20250514&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_react_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Traces sent to your self-hosted instance
&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is the weather?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;callbacks&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;langfuse_handler&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When to choose Langfuse:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need self-hosting with feature parity closest to LangSmith&lt;/li&gt;
&lt;li&gt;Existing PostgreSQL and object storage infrastructure&lt;/li&gt;
&lt;li&gt;Kubernetes expertise available for production deployment&lt;/li&gt;
&lt;li&gt;MIT license acceptable for your organization&lt;/li&gt;
&lt;li&gt;Want option to use managed SaaS during prototyping, self-host in production&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Phoenix: Notebook-First Observability for Local Development
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/Arize-ai/phoenix" rel="noopener noreferrer"&gt;Phoenix&lt;/a&gt; by Arize AI is an Apache 2.0 licensed observability tool optimized for notebook-based development and local debugging. It runs as a lightweight server within development environments, then scales to containerized deployment for production.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python application with FastAPI server&lt;/li&gt;
&lt;li&gt;SQLite (development) or PostgreSQL (production)&lt;/li&gt;
&lt;li&gt;Embedded web UI served from the Python process&lt;/li&gt;
&lt;li&gt;No external dependencies for basic usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Local development deployment:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;arize-phoenix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;phoenix&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;

&lt;span class="c1"&gt;# Launch Phoenix server locally
&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;launch_app&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Instrument your application
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openinference.instrumentation.langchain&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;LangChainInstrumentor&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;opentelemetry.exporter.otlp.proto.http.trace_exporter&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OTLPSpanExporter&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;opentelemetry&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;trace&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;opentelemetry.sdk.trace&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TracerProvider&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;opentelemetry.sdk.trace.export&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SimpleSpanProcessor&lt;/span&gt;

&lt;span class="c1"&gt;# Configure tracing
&lt;/span&gt;&lt;span class="n"&gt;tracer_provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TracerProvider&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;tracer_provider&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_span_processor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nc"&gt;SimpleSpanProcessor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;OTLPSpanExporter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;endpoint&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:6006/v1/traces&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;trace&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set_tracer_provider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tracer_provider&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Auto-instrument LangChain
&lt;/span&gt;&lt;span class="nc"&gt;LangChainInstrumentor&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;instrument&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Your LangChain code runs with local Phoenix tracing
&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Debug this locally&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Production deployment:&lt;/strong&gt;&lt;br&gt;
Phoenix supports containerized deployment with PostgreSQL backend. Less feature-complete than Langfuse for prompt management and complex evaluations, but sufficient for tracing and basic debugging.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to choose Phoenix:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primary use case is local development and debugging&lt;/li&gt;
&lt;li&gt;Want zero-setup local observability during prototyping&lt;/li&gt;
&lt;li&gt;Already using Arize AI for ML monitoring (unified platform)&lt;/li&gt;
&lt;li&gt;Apache 2.0 license required&lt;/li&gt;
&lt;li&gt;Prefer lightweight deployment over full-featured platform&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  OpenTelemetry + Jaeger: Custom Observability Stack
&lt;/h3&gt;

&lt;p&gt;For maximum control, build custom LLM observability using OpenTelemetry for instrumentation and Jaeger for trace storage and visualization. This requires the most engineering effort but provides unlimited customization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OpenTelemetry SDK for trace instrumentation&lt;/li&gt;
&lt;li&gt;Jaeger for trace collection, storage (Cassandra/Elasticsearch), and UI&lt;/li&gt;
&lt;li&gt;Custom evaluators and dashboards built on raw trace data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach is appropriate only when neither Langfuse nor Phoenix meet specific technical requirements (e.g., integration with existing OpenTelemetry infrastructure, custom storage backends, regulatory constraints on using third-party platforms).&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you actually self-host LLM observability in production?
&lt;/h2&gt;

&lt;p&gt;Self-hosting requires planning beyond "run Docker Compose." Production deployment decisions affect reliability, cost, and operational burden.&lt;/p&gt;

&lt;h3&gt;
  
  
  Infrastructure Requirements
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Compute:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API server: 2-4 vCPU, 4-8 GB RAM for modest load (&amp;lt; 100 requests/sec)&lt;/li&gt;
&lt;li&gt;Worker processes: 1-2 vCPU per background job worker (evaluations, async processing)&lt;/li&gt;
&lt;li&gt;Auto-scaling: Horizontal pod autoscaling based on CPU/request rate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Storage:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL: Primary datastore for traces, projects, users, datasets&lt;/li&gt;
&lt;li&gt;Estimated size: ~1 KB per trace, 1 million traces = ~1 GB uncompressed&lt;/li&gt;
&lt;li&gt;Retention: 180 days at 1M traces/month = ~180 GB&lt;/li&gt;
&lt;li&gt;Object storage: Large trace payloads, evaluation artifacts&lt;/li&gt;
&lt;li&gt;Estimated size: ~10-50 KB per large trace, varies by payload size&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Networking:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ingress: HTTPS load balancer (AWS ALB, GCP Load Balancer, NGINX)&lt;/li&gt;
&lt;li&gt;TLS termination: Let's Encrypt or corporate certificate&lt;/li&gt;
&lt;li&gt;Egress: Outbound to LLM providers if evaluations use LLM-as-judge&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Security Hardening
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Authentication and Authorization:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSO integration (SAML, OAuth) for enterprise deployments&lt;/li&gt;
&lt;li&gt;API keys with role-based access control (RBAC)&lt;/li&gt;
&lt;li&gt;Audit logging for trace access and data export&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Data Encryption:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encrypt at rest: Database encryption (AWS RDS encryption, GCP CMEK)&lt;/li&gt;
&lt;li&gt;Encrypt in transit: TLS 1.3 for all connections&lt;/li&gt;
&lt;li&gt;Secrets management: Vault, AWS Secrets Manager, or GCP Secret Manager&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Network Isolation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy in private subnet with no direct internet access&lt;/li&gt;
&lt;li&gt;Expose only via load balancer in public subnet&lt;/li&gt;
&lt;li&gt;Use VPC peering or PrivateLink for access from application VPCs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Operational Concerns
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Backup and Recovery:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated daily PostgreSQL backups with point-in-time recovery&lt;/li&gt;
&lt;li&gt;Object storage replication across availability zones&lt;/li&gt;
&lt;li&gt;Test restore procedures quarterly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Monitoring and Alerting:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure metrics: CPU, memory, disk, network via Prometheus/Datadog&lt;/li&gt;
&lt;li&gt;Application metrics: Request rate, error rate, latency&lt;/li&gt;
&lt;li&gt;Database metrics: Query performance, connection pool saturation&lt;/li&gt;
&lt;li&gt;Alert on: API downtime, database connection failures, disk space &amp;lt; 20%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scaling:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Horizontal scaling: Add API server replicas behind load balancer&lt;/li&gt;
&lt;li&gt;Database scaling: Read replicas for query-heavy workloads, vertical scaling for write-heavy&lt;/li&gt;
&lt;li&gt;Storage scaling: Object storage is effectively unlimited; PostgreSQL may require sharding above 10M traces&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Upgrades and Maintenance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow Langfuse/Phoenix release notes for breaking changes&lt;/li&gt;
&lt;li&gt;Test upgrades in staging environment before production&lt;/li&gt;
&lt;li&gt;Schedule maintenance windows for database migrations&lt;/li&gt;
&lt;li&gt;Maintain version compatibility between SDK and server&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are the total cost models for hosted versus self-hosted?
&lt;/h2&gt;

&lt;p&gt;Cost comparison requires modeling beyond subscription fees. Include infrastructure, engineering time, and opportunity cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  LangSmith SaaS Cost Model
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Direct costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developer plan: $39/month (50K traces)&lt;/li&gt;
&lt;li&gt;Team plan: $199/month (500K traces)&lt;/li&gt;
&lt;li&gt;Enterprise: Custom pricing, typically $1,000-2,000/month for 1-5M traces&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example: 1 million traces/month&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Team plan ($199/month) covers 500K traces&lt;/li&gt;
&lt;li&gt;Additional 500K traces requires Enterprise tier: ~$1,500/month&lt;/li&gt;
&lt;li&gt;Total: ~$1,500/month = $18,000/year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Hidden costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;None for infrastructure or operations&lt;/li&gt;
&lt;li&gt;Potential data egress fees if exporting large volumes&lt;/li&gt;
&lt;li&gt;Evaluation runs using LLM-as-judge incur additional LLM API costs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Langfuse Self-Hosted Cost Model
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure costs (AWS example, 1M traces/month):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RDS PostgreSQL (db.t4g.large): $150/month&lt;/li&gt;
&lt;li&gt;S3 storage (180 GB retained): $4/month&lt;/li&gt;
&lt;li&gt;EKS cluster (2 nodes, t3.medium): $60/month&lt;/li&gt;
&lt;li&gt;ALB load balancer: $20/month&lt;/li&gt;
&lt;li&gt;Data transfer: $20/month&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total infrastructure: ~$254/month = $3,048/year&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Engineering costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial deployment: 40-80 hours (1-2 weeks)&lt;/li&gt;
&lt;li&gt;Ongoing maintenance: 10-20 hours/month (monitoring, updates, incident response)&lt;/li&gt;
&lt;li&gt;Annual maintenance: 120-240 hours/year&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Valuing engineering time:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Junior DevOps: $75/hour&lt;/li&gt;
&lt;li&gt;Senior DevOps: $150/hour&lt;/li&gt;
&lt;li&gt;Initial deployment cost: $6,000-$12,000 (one-time)&lt;/li&gt;
&lt;li&gt;Annual maintenance cost: $9,000-$36,000&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Total self-hosted cost (first year):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure: $3,048&lt;/li&gt;
&lt;li&gt;Initial deployment: $6,000-$12,000&lt;/li&gt;
&lt;li&gt;Maintenance: $9,000-$36,000&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: $18,048-$51,048&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Total self-hosted cost (subsequent years):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infrastructure: $3,048&lt;/li&gt;
&lt;li&gt;Maintenance: $9,000-$36,000&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total: $12,048-$39,048&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cost Comparison Summary
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;LangSmith SaaS&lt;/th&gt;
&lt;th&gt;Self-Hosted (Low)&lt;/th&gt;
&lt;th&gt;Self-Hosted (High)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Year 1&lt;/td&gt;
&lt;td&gt;$18,000&lt;/td&gt;
&lt;td&gt;$18,048&lt;/td&gt;
&lt;td&gt;$51,048&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Year 2&lt;/td&gt;
&lt;td&gt;$18,000&lt;/td&gt;
&lt;td&gt;$12,048&lt;/td&gt;
&lt;td&gt;$39,048&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Year 3&lt;/td&gt;
&lt;td&gt;$18,000&lt;/td&gt;
&lt;td&gt;$12,048&lt;/td&gt;
&lt;td&gt;$39,048&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3-Year Total&lt;/td&gt;
&lt;td&gt;$54,000&lt;/td&gt;
&lt;td&gt;$42,144&lt;/td&gt;
&lt;td&gt;$129,144&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Cost crossover point:&lt;/strong&gt; Self-hosting becomes cheaper if engineering time is below ~15 hours/month (junior engineer) or if trace volume grows significantly beyond 1M/month, where LangSmith Enterprise pricing increases but self-hosted infrastructure scales more linearly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non-financial costs:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Self-hosting incurs opportunity cost: engineering time spent on observability infrastructure cannot be spent on product features&lt;/li&gt;
&lt;li&gt;SaaS incurs flexibility cost: cannot customize beyond API surface, cannot guarantee data residency in specific jurisdictions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How does data sovereignty affect the hosted versus self-hosted decision?
&lt;/h2&gt;

&lt;p&gt;Data sovereignty requirements create hard constraints that override cost considerations. When regulatory or policy requirements mandate on-premise data processing, self-hosting is the only option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Regulatory Compliance Scenarios
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;GDPR (Europe):&lt;/strong&gt;&lt;br&gt;
LangSmith offers EU data residency with data stored in European data centers. This satisfies most GDPR requirements if Data Processing Agreement (DPA) is executed. Self-hosting required only if internal policy prohibits third-party processors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HIPAA (Healthcare, US):&lt;/strong&gt;&lt;br&gt;
LangSmith Enterprise includes Business Associate Agreement (BAA) for HIPAA compliance. Many healthcare organizations still prefer self-hosting to minimize PHI exposure, especially when prompts contain sensitive patient information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FedRAMP (US Government):&lt;/strong&gt;&lt;br&gt;
LangSmith is not FedRAMP authorized as of 2026. Government contractors requiring FedRAMP compliance must self-host on FedRAMP-authorized infrastructure (AWS GovCloud, Azure Government) or use approved observability tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Defense Classification:&lt;/strong&gt;&lt;br&gt;
Classified systems operate on air-gapped networks with no external connectivity. SaaS observability is impossible; self-hosted deployment on SIPRNET or internal networks is mandatory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Residency Technical Implementation
&lt;/h3&gt;

&lt;p&gt;Self-hosting enables precise control over data location:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-region deployment example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy Langfuse instance in AWS &lt;code&gt;eu-west-1&lt;/code&gt; for European users&lt;/li&gt;
&lt;li&gt;Deploy separate instance in AWS &lt;code&gt;us-east-1&lt;/code&gt; for US users&lt;/li&gt;
&lt;li&gt;Route traces to region-specific instance based on user location&lt;/li&gt;
&lt;li&gt;No cross-region data transfer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;On-premise deployment:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy Langfuse on Kubernetes cluster in corporate data center&lt;/li&gt;
&lt;li&gt;Use on-premise PostgreSQL and MinIO (S3-compatible storage)&lt;/li&gt;
&lt;li&gt;No data leaves corporate network&lt;/li&gt;
&lt;li&gt;Satisfies strictest data residency policies&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are the operational trade-offs between hosted and self-hosted?
&lt;/h2&gt;

&lt;p&gt;Beyond cost and compliance, operational characteristics differ significantly between SaaS and self-hosted deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reliability and Availability
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;LangSmith SaaS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uptime SLA: Typically 99.9% for paid plans (no public SLA published)&lt;/li&gt;
&lt;li&gt;Multi-region redundancy managed by LangChain Inc.&lt;/li&gt;
&lt;li&gt;Zero operational burden for disaster recovery&lt;/li&gt;
&lt;li&gt;Risk: Single vendor dependency, outage affects all customers simultaneously&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Self-Hosted:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uptime depends on your infrastructure and operational practices&lt;/li&gt;
&lt;li&gt;Must implement own redundancy, backups, monitoring&lt;/li&gt;
&lt;li&gt;Full control over incident response and recovery&lt;/li&gt;
&lt;li&gt;Risk: Responsibility for 3 AM outages falls on your team&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Upgrade Cadence and Features
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;LangSmith SaaS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic feature updates with no action required&lt;/li&gt;
&lt;li&gt;New features available immediately upon release&lt;/li&gt;
&lt;li&gt;Breaking changes handled by vendor with migration guides&lt;/li&gt;
&lt;li&gt;Risk: Cannot delay updates if breaking change affects workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Self-Hosted:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Control update schedule, test in staging before production&lt;/li&gt;
&lt;li&gt;Delayed access to new features until you upgrade&lt;/li&gt;
&lt;li&gt;Manual effort required for each upgrade&lt;/li&gt;
&lt;li&gt;Risk: Falling behind on updates creates technical debt, security vulnerabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Data Portability and Migration
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;LangSmith SaaS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export via API with rate limits&lt;/li&gt;
&lt;li&gt;Proprietary storage format requires transformation for migration&lt;/li&gt;
&lt;li&gt;High friction to migrate to alternative platform&lt;/li&gt;
&lt;li&gt;Risk: Vendor lock-in increases over time as data accumulates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Self-Hosted:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Direct database access, standard formats (PostgreSQL, S3)&lt;/li&gt;
&lt;li&gt;Can write custom export scripts without API constraints&lt;/li&gt;
&lt;li&gt;Easier migration to alternative tools or custom solutions&lt;/li&gt;
&lt;li&gt;Risk: Must maintain own data integrity and backup processes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When should you choose LangSmith SaaS versus self-hosted alternatives?
&lt;/h2&gt;

&lt;p&gt;Decision framework based on organizational constraints and priorities:&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose LangSmith SaaS When:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;You are using LangChain heavily and want zero-friction tracing.&lt;/strong&gt; LangSmith's native integration with LangChain provides automatic tracing with environment variable configuration. Self-hosted alternatives require explicit SDK integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your trace volume is under 500K/month and engineering time is expensive.&lt;/strong&gt; SaaS pricing is competitive at this scale, and operational burden is zero. Self-hosting requires DevOps expertise that could be spent on product development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data residency requirements are satisfied by LangSmith's US/EU regions.&lt;/strong&gt; If regulatory compliance accepts third-party processing with DPA/BAA, SaaS removes operational complexity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You prioritize rapid feature access and mature prompt management.&lt;/strong&gt; LangSmith's Prompt Hub, evaluation features, and continuous updates provide the most complete feature set in the market.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your organization lacks Kubernetes or infrastructure automation expertise.&lt;/strong&gt; Operating self-hosted observability requires DevOps skills; SaaS eliminates this requirement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choose Self-Hosted Alternatives When:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Regulatory or policy requirements mandate on-premise data processing.&lt;/strong&gt; Air-gapped networks, defense classification, or strict data residency policies prohibit external SaaS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trace volume exceeds 1 million/month and engineering resources are available.&lt;/strong&gt; Cost crossover point favors self-hosting at scale if DevOps time can be allocated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customization beyond API limits is required.&lt;/strong&gt; Direct database access enables custom analytics, integrations with internal data warehouses, and modified retention policies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vendor lock-in risk is unacceptable.&lt;/strong&gt; Open-source self-hosting with PostgreSQL backend provides data portability and migration flexibility.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You need air-gapped deployment or network-restricted environments.&lt;/strong&gt; Corporate networks blocking external API calls make SaaS observability impossible.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hybrid Approach: Development SaaS, Production Self-Hosted
&lt;/h3&gt;

&lt;p&gt;Many organizations use LangSmith SaaS during prototyping for rapid iteration, then migrate to self-hosted Langfuse for production to satisfy compliance requirements while benefiting from SaaS convenience during development. This requires maintaining SDK compatibility between platforms and accepting one-time migration effort.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are common mistakes when deploying self-hosted LLM observability?
&lt;/h2&gt;

&lt;p&gt;After observing dozens of self-hosted observability deployments, these failure patterns recur consistently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Underestimating Operational Complexity
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; Initial deployment succeeds, but system degrades over weeks due to lack of monitoring, backup testing, or upgrade planning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Treat self-hosted observability as a production service requiring the same operational rigor as user-facing applications. Implement automated backups, monitoring dashboards, and documented runbooks before declaring deployment complete.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inadequate Database Sizing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; Database runs out of disk space, queries become slow, or connection pool exhausts under load.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Model storage requirements based on trace volume and retention policy. Provision 3x expected capacity for growth headroom. Use managed database services (RDS, Cloud SQL) with automated scaling rather than self-managed PostgreSQL unless expertise exists.&lt;/p&gt;

&lt;h3&gt;
  
  
  Neglecting Security Hardening
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; Default credentials, unencrypted databases, or publicly exposed API endpoints create security vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Follow security checklist: change default passwords, enable database encryption at rest and in transit, deploy in private subnet with load balancer ingress only, integrate SSO authentication, enable audit logging.&lt;/p&gt;

&lt;h3&gt;
  
  
  No Disaster Recovery Testing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; Backups exist but have never been restored; when disaster strikes, recovery fails or takes days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Schedule quarterly disaster recovery drills. Restore backup to staging environment, verify data integrity, measure recovery time objective (RTO). Document and automate recovery procedures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ignoring Upgrade Path
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; Self-hosted platform falls multiple versions behind due to fear of breaking changes; accumulates technical debt and security vulnerabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Subscribe to release notes, test upgrades in staging environment within one month of release, maintain version compatibility matrix between server and SDK versions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Over-Engineering Initial Deployment
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Symptom:&lt;/strong&gt; Spending months architecting multi-region, highly available deployment before capturing first trace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; Start with single-region Docker Compose deployment on small VM, capture traces, prove value. Invest in Kubernetes, multi-region redundancy, and advanced monitoring only after demonstrating ROI from observability data.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can I self-host LangSmith?
&lt;/h3&gt;

&lt;p&gt;No, LangSmith is a SaaS-only platform with no self-hosting option as of 2026. LangChain Inc. offers enterprise contracts with extended features, but the product architecture is proprietary and cannot be deployed on customer infrastructure. Organizations requiring self-hosted LLM observability must evaluate open-source alternatives like Langfuse (MIT license) or Phoenix by Arize AI (Apache 2.0 license), both of which provide LangSmith-like capabilities with full self-hosting support.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the closest self-hosted alternative to LangSmith?
&lt;/h3&gt;

&lt;p&gt;Langfuse provides the closest feature parity to LangSmith with full self-hosting support. It includes distributed tracing, prompt management with versioning, datasets, evaluations, and LLM-as-judge scoring. Langfuse is MIT licensed and supports both Docker Compose and Kubernetes deployment. The platform integrates with LangChain through callback handlers (not as seamless as LangSmith's native integration, but functionally equivalent). Phoenix by Arize AI is a lighter-weight alternative optimized for local development, with optional containerized production deployment.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does it cost to self-host LLM observability?
&lt;/h3&gt;

&lt;p&gt;Total cost includes infrastructure and engineering time. For 1 million traces per month with 180-day retention on AWS: infrastructure costs approximately $250/month (RDS PostgreSQL, S3 storage, EKS cluster, load balancer). Engineering costs dominate: 40-80 hours for initial deployment ($6,000-$12,000 one-time) and 10-20 hours per month for ongoing maintenance ($9,000-$36,000 annually, depending on engineer seniority). Total first-year cost ranges from $18,000 to $51,000. Subsequent years cost $12,000-$39,000. Self-hosting becomes cost-effective compared to LangSmith Enterprise pricing ($18,000/year for 1M traces) only if engineering time is below 15 hours/month or trace volume scales significantly higher.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does LangSmith support on-premise deployment for enterprise customers?
&lt;/h3&gt;

&lt;p&gt;No, LangSmith does not offer on-premise deployment even for enterprise customers. LangSmith Enterprise provides enhanced features (SSO, dedicated support, extended retention, compliance certifications), but the deployment model remains SaaS hosted by LangChain Inc. Data residency options include US and EU regions, and enterprise contracts include Data Processing Agreements (DPA) and Business Associate Agreements (BAA) for HIPAA, but the infrastructure is never deployed on customer premises. Organizations with hard on-premise requirements must use self-hosted alternatives.&lt;/p&gt;

&lt;h3&gt;
  
  
  What data does LangSmith store, and can it contain sensitive information?
&lt;/h3&gt;

&lt;p&gt;LangSmith stores full traces including model inputs (prompts), outputs (completions), tool calls, tool results, metadata, and performance metrics. Prompts can contain highly sensitive information: user queries, PII, PHI, internal data, API keys accidentally logged, or business-critical context. If your LLM application processes regulated data (healthcare, financial, government), trace data inherits the same classification. LangSmith Enterprise provides encryption at rest, SOC 2 compliance, and BAA for HIPAA, but ultimately traces are stored on LangChain Inc. infrastructure. Self-hosting keeps this data within your security perimeter.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do Langfuse and LangSmith compare for LangChain applications?
&lt;/h3&gt;

&lt;p&gt;LangSmith provides deeper LangChain integration with zero-config tracing (set environment variables, tracing is automatic). Langfuse requires explicit callback handler instantiation and passing to each agent invocation. Functionally equivalent but slightly more code. LangSmith has more mature Prompt Hub with A/B testing; Langfuse's prompt management is simpler but functional. LangSmith evaluation features are more polished; Langfuse evaluations are sufficient for most needs. The key differentiator is deployment model: LangSmith is SaaS-only, Langfuse offers both SaaS and self-hosting. Choose LangSmith for convenience and feature maturity, Langfuse for self-hosting and open-source transparency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I migrate from LangSmith to self-hosted Langfuse?
&lt;/h3&gt;

&lt;p&gt;Yes, but migration requires effort. Export traces from LangSmith via API (subject to rate limits), transform to Langfuse's trace format, and import using Langfuse SDK. Datasets, prompts, and evaluation results also need transformation. No automated migration tool exists as of 2026. The process is feasible for teams with engineering resources but not trivial. Best practice: start with self-hosted Langfuse from day one if data sovereignty is a future requirement, avoiding migration costs. If already on LangSmith, justify migration effort based on compliance necessity or sustained cost savings, not just preference.&lt;/p&gt;

&lt;h3&gt;
  
  
  What compliance certifications does LangSmith provide?
&lt;/h3&gt;

&lt;p&gt;LangSmith Enterprise includes SOC 2 Type II certification, GDPR compliance with Data Processing Agreement (DPA), and HIPAA compliance with Business Associate Agreement (BAA). The platform encrypts data at rest and in transit, supports SSO for authentication, and provides audit logging. However, LangSmith is not FedRAMP authorized, meaning US government contractors requiring FedRAMP compliance cannot use it. Defense and classified systems requiring air-gapped networks also cannot use SaaS LangSmith. Self-hosted alternatives deployed on FedRAMP-authorized infrastructure (AWS GovCloud, Azure Government) can satisfy stricter compliance requirements.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does observability affect LLM application performance?
&lt;/h3&gt;

&lt;p&gt;Tracing adds minimal latency overhead (typically &amp;lt; 5ms per traced operation) but introduces network calls to send traces asynchronously. LangSmith and self-hosted alternatives use background threads for trace submission, preventing blocking of application logic. Negligible impact on user-facing latency. Storage and bandwidth consumption scale with trace volume: 1 KB per simple trace, 10-50 KB for traces with large tool outputs. For high-volume applications (millions of requests/day), implement intelligent sampling: trace 100% of errors and user feedback, 1-10% of successful requests for statistical monitoring. This reduces costs by 90% without losing critical debugging data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.smith.langchain.com/" rel="noopener noreferrer"&gt;LangSmith Official Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.langchain.com/pricing" rel="noopener noreferrer"&gt;LangSmith Pricing and Plans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://langfuse.com/" rel="noopener noreferrer"&gt;Langfuse Open Source Observability Platform&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://langfuse.com/docs/deployment/self-host" rel="noopener noreferrer"&gt;Langfuse Self-Hosting Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Arize-ai/phoenix" rel="noopener noreferrer"&gt;Phoenix by Arize AI on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.arize.com/phoenix" rel="noopener noreferrer"&gt;Phoenix Documentation and Deployment Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://opentelemetry.io/" rel="noopener noreferrer"&gt;OpenTelemetry for LLM Applications&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.jaegertracing.io/" rel="noopener noreferrer"&gt;Jaeger Distributed Tracing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/langsmith-hosted-vs-self" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aiengineering</category>
      <category>llmdevelopment</category>
    </item>
    <item>
      <title>Lovable App Builder: Complete Funding Timeline &amp; Founders</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 16 Sep 2026 18:58:33 +0000</pubDate>
      <link>https://dev.to/devtoaaron/lovable-app-builder-complete-funding-timeline-founders-4nij</link>
      <guid>https://dev.to/devtoaaron/lovable-app-builder-complete-funding-timeline-founders-4nij</guid>
      <description>&lt;p&gt;Lovable is an AI-powered application builder that enables users to create full-stack web applications using natural language descriptions, founded in 2023 by Anton Osika in Stockholm, Sweden.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Lovable has raised $517M total funding across 4 rounds from 2025-2026, reaching a last reported valuation of $13.3B.&lt;/strong&gt; The Stockholm-based AI development platform secured backing from Benchmark, Accel, and Founders Fund. Founder Anton Osika, CEO, built a product generating $50M+ ARR within 3 years—one of the fastest revenue ramps in enterprise software history. The company's natural language-to-code technology positions it as a direct competitor to GitHub Copilot and traditional low-code platforms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;$517M total raised&lt;/strong&gt; across Series A ($17M), Series B ($200M), and two undisclosed growth rounds ($300M, $400M) from 2025-2026&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$13.3B last valuation&lt;/strong&gt; (August 2026), making Lovable one of the most valuable private AI developer tools companies globally&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Benchmark led Series B&lt;/strong&gt; at $2.8B valuation, marking one of their largest enterprise AI bets since Databricks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$50M+ ARR&lt;/strong&gt; achieved within first 3 years, driven by viral adoption among non-technical founders and indie developers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;16x valuation growth&lt;/strong&gt; from Series A ($175M, June 2025) to latest round ($13.3B, August 2026) in just 14 months&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accel and Founders Fund&lt;/strong&gt; backed both Series A and B, signaling strong conviction in natural language programming thesis&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Is Lovable?
&lt;/h2&gt;

&lt;p&gt;Lovable is an AI application builder that transforms natural language descriptions into production-ready full-stack web applications. Users describe their desired app in plain English, and Lovable generates complete code including frontend components, backend logic, database schemas, authentication systems, and deployment configurations—delivering working applications in minutes rather than weeks.&lt;/p&gt;

&lt;p&gt;The platform leverages frontier large language models combined with proprietary code generation and validation systems to produce clean, maintainable code following modern best practices. Unlike traditional low-code tools that limit customization, Lovable outputs standard React, Node.js, and SQL code that developers can extend and modify freely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who Founded Lovable?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Anton Osika&lt;/strong&gt; founded Lovable in 2023 and serves as CEO. Osika's background includes deep experience in machine learning research and software engineering. Before founding Lovable, he worked on AI systems and developer tools, giving him firsthand insight into the friction developers face when building applications.&lt;/p&gt;

&lt;p&gt;Osika's founding vision centered on democratizing software creation—enabling anyone with an idea to build functional applications without needing to master programming languages, frameworks, and infrastructure. This "English-as-programming-language" thesis attracted early backing from top-tier venture firms who saw massive TAM expansion beyond the existing 30M global developers.&lt;/p&gt;

&lt;p&gt;The founder's technical credibility and product execution attracted Benchmark's Sarah Tavel, known for backing category-defining enterprise companies, to lead Lovable's Series B at a $2.8B valuation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Much Has Lovable Raised?
&lt;/h2&gt;

&lt;p&gt;Lovable has raised &lt;strong&gt;$517M total funding&lt;/strong&gt; across 4 disclosed rounds:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;Amount&lt;/th&gt;
&lt;th&gt;Valuation&lt;/th&gt;
&lt;th&gt;Date&lt;/th&gt;
&lt;th&gt;Lead Investor(s)&lt;/th&gt;
&lt;th&gt;Other Investors&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Series A&lt;/td&gt;
&lt;td&gt;$17M&lt;/td&gt;
&lt;td&gt;$175M&lt;/td&gt;
&lt;td&gt;June 2025&lt;/td&gt;
&lt;td&gt;Accel&lt;/td&gt;
&lt;td&gt;Founders Fund&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Series B&lt;/td&gt;
&lt;td&gt;$200M&lt;/td&gt;
&lt;td&gt;$2.8B&lt;/td&gt;
&lt;td&gt;February 2026&lt;/td&gt;
&lt;td&gt;Benchmark&lt;/td&gt;
&lt;td&gt;Accel, Founders Fund&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Undisclosed Growth&lt;/td&gt;
&lt;td&gt;$300M&lt;/td&gt;
&lt;td&gt;$2.0B*&lt;/td&gt;
&lt;td&gt;July 2026&lt;/td&gt;
&lt;td&gt;Undisclosed&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Series C&lt;/td&gt;
&lt;td&gt;$400M&lt;/td&gt;
&lt;td&gt;$13.3B&lt;/td&gt;
&lt;td&gt;August 2026&lt;/td&gt;
&lt;td&gt;Undisclosed&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;*Note: The July 2026 valuation appears inconsistent with the February 2026 Series B ($2.8B) and may represent a different financing structure or data artifact.&lt;/p&gt;

&lt;h3&gt;
  
  
  Series A: $17M at $175M Valuation (June 2025)
&lt;/h3&gt;

&lt;p&gt;Lovable's Series A was led by &lt;strong&gt;Accel&lt;/strong&gt; with participation from &lt;strong&gt;Founders Fund&lt;/strong&gt;. The $17M round valued the company at $175M post-money, reflecting strong early traction and product-market fit signals. At this stage, Lovable had proven its natural language-to-code technology worked reliably for simple to medium-complexity web applications.&lt;/p&gt;

&lt;p&gt;Accel's decision to lead mirrored their historical pattern of backing developer tools that expand the addressable market—similar to their early investments in Slack, Atlassian, and UiPath. The firm saw Lovable as capturing demand from the 100M+ people worldwide who want to build software but never learned to code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Series B: $200M at $2.8B Valuation (February 2026)
&lt;/h3&gt;

&lt;p&gt;Eight months later, Lovable raised a $200M Series B led by &lt;strong&gt;Benchmark&lt;/strong&gt; at a $2.8B valuation—a 16x step-up from Series A. This round marked Benchmark's conviction that natural language programming represented a paradigm shift, not just an incremental improvement.&lt;/p&gt;

&lt;p&gt;Benchmark partner Sarah Tavel joined Lovable's board, bringing pattern recognition from backing infrastructure companies that become new platforms. The Series B timing coincided with Lovable crossing $20M ARR and demonstrating 2-3x net dollar retention—metrics indicating the product was transitioning from early adopter curiosity to mainstream developer workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accel and Founders Fund&lt;/strong&gt; both participated in the Series B, increasing their positions. This insider follow-on signaled continued belief in the company's trajectory and competitive moat.&lt;/p&gt;

&lt;h3&gt;
  
  
  Growth Rounds: $700M Across Two Undisclosed Rounds (July-August 2026)
&lt;/h3&gt;

&lt;p&gt;Lovable raised two additional growth rounds totaling $700M in summer 2026, though investor details remain undisclosed. The August 2026 Series C at $13.3B valuation represented a 4.75x increase from the February Series B in just 6 months—one of the fastest valuation ramps in AI software history.&lt;/p&gt;

&lt;p&gt;These growth rounds likely funded aggressive international expansion, compute infrastructure for code generation at scale, and enterprise sales team buildout. The undisclosed investor structure suggests participation from sovereign wealth funds, crossover funds, or strategic corporate investors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Did Investors Back Lovable?
&lt;/h2&gt;

&lt;p&gt;Lovable attracted $517M from top-tier investors based on several compounding factors:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Explosive Revenue Growth
&lt;/h3&gt;

&lt;p&gt;Lovable achieved &lt;strong&gt;$50M+ ARR&lt;/strong&gt; within 3 years of founding—among the fastest revenue ramps in enterprise software. The company's product-led growth motion drove viral adoption: users built apps, shared them, and inspired others to try Lovable. This organic flywheel reduced customer acquisition costs below $1,000 while maintaining 100%+ net dollar retention.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Massive TAM Expansion
&lt;/h3&gt;

&lt;p&gt;Traditional developer tools target the 30M professional developers globally. Lovable's natural language interface expands TAM to anyone who can describe what they want—potentially 100M+ knowledge workers and entrepreneurs. Investors saw this TAM expansion as creating a new category, not just taking share from existing tools.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Competitive Moat from Data Flywheel
&lt;/h3&gt;

&lt;p&gt;Every application built on Lovable generates training data that improves the underlying code generation models. This creates a reinforcing moat: more users → more code generation examples → better model performance → more users. Benchmark and Accel recognized this data network effect as defensible in a market where open-source models commoditize base LLM capabilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Enterprise Wedge Strategy
&lt;/h3&gt;

&lt;p&gt;While Lovable gained traction with indie developers and non-technical founders, the product also penetrated enterprises as teams used it to build internal tools rapidly. This bottom-up enterprise adoption—mirroring Slack and Figma's playbooks—validated Lovable's ability to scale upmarket into high-ACV contracts.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Founder Credibility and Execution
&lt;/h3&gt;

&lt;p&gt;Anton Osika's technical background and demonstrated ability to ship a complex, reliable product gave investors confidence. Lovable's product quality—clean generated code, minimal bugs, intuitive UX—differentiated it from the dozens of AI code generation startups that launched in 2023-2025 but failed to achieve production-grade reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does Lovable Compare to Competitors?
&lt;/h2&gt;

&lt;p&gt;Lovable competes in the AI-assisted development tools space alongside several well-funded companies:&lt;/p&gt;

&lt;h3&gt;
  
  
  Lovable vs. Cursor
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Cursor&lt;/strong&gt; raised $900M Series B (led by Accel) and focuses on AI-powered code editing for professional developers. Cursor enhances existing coding workflows with autocomplete, refactoring, and debugging assistance, targeting users who already know how to code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lovable&lt;/strong&gt; targets a different audience: non-developers or junior developers who want to build complete applications from scratch using natural language. The products serve complementary use cases—Cursor for professional developers, Lovable for democratizing development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lovable vs. Replit
&lt;/h3&gt;

&lt;p&gt;We previously analyzed &lt;strong&gt;Lovable vs. Replit&lt;/strong&gt; in detail. Replit provides a cloud-based IDE with AI assistance (Replit Agent), while Lovable focuses entirely on natural language-to-application generation. Replit serves the education market and cloud IDE users; Lovable prioritizes finished application output over teaching coding concepts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lovable vs. Low-Code Platforms
&lt;/h3&gt;

&lt;p&gt;Traditional low-code platforms (Bubble, Webflow, OutSystems) use visual builders and drag-and-drop interfaces. Lovable's natural language approach is faster for describing complex logic and data relationships, though low-code tools offer more granular visual control. Lovable's key advantage: it outputs standard code that developers can export and modify, avoiding vendor lock-in.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next for Lovable?
&lt;/h2&gt;

&lt;p&gt;With $517M raised and $13.3B valuation, Lovable faces pressure to deliver outcomes justifying its valuation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise expansion&lt;/strong&gt;: Moving upmarket into Fortune 500 contracts with dedicated deployment, security, and compliance features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;International growth&lt;/strong&gt;: Expanding beyond English-language markets into Europe, Asia, and Latin America&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platform ecosystem&lt;/strong&gt;: Building a marketplace for pre-built templates, components, and plugins that extend Lovable's capabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model improvements&lt;/strong&gt;: Continuously training code generation models on user-created applications to improve accuracy and expand supported frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The company's success will depend on maintaining product quality as user volume scales, avoiding the "AI slop" problem where generated code becomes unreliable or insecure at scale.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Who are Lovable's investors?
&lt;/h3&gt;

&lt;p&gt;Lovable's confirmed investors include &lt;strong&gt;Benchmark&lt;/strong&gt; (Series B lead), &lt;strong&gt;Accel&lt;/strong&gt; (Series A lead, Series B participant), and &lt;strong&gt;Founders Fund&lt;/strong&gt; (Series A and B participant). The July and August 2026 growth rounds involved undisclosed investors, likely including sovereign wealth funds or strategic corporates.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much is Lovable worth?
&lt;/h3&gt;

&lt;p&gt;Lovable's last reported valuation was &lt;strong&gt;$13.3B&lt;/strong&gt; (August 2026 Series C). This values the company higher than established public developer tools companies like GitLab ($8B market cap) and JFrog ($3B market cap), reflecting investor belief in Lovable's potential to redefine software development.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Lovable's revenue?
&lt;/h3&gt;

&lt;p&gt;Lovable generates &lt;strong&gt;$50M+ ARR&lt;/strong&gt; as of 2026, per company disclosures. This revenue comes from subscription plans for individuals ($20-50/month) and teams ($100-500/seat/month), plus enterprise contracts with custom pricing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where is Lovable headquartered?
&lt;/h3&gt;

&lt;p&gt;Lovable is headquartered in &lt;strong&gt;Stockholm, Sweden&lt;/strong&gt;. The company maintains offices in San Francisco to be close to key investors and enterprise customers, while keeping core engineering in Europe to access top ML research talent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://lovable.dev" rel="noopener noreferrer"&gt;Lovable Official Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.benchmark.com/portfolio" rel="noopener noreferrer"&gt;Benchmark Portfolio - Lovable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.accel.com/companies" rel="noopener noreferrer"&gt;Accel Portfolio Companies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://techcrunch.com/lovable-series-b-200m" rel="noopener noreferrer"&gt;TechCrunch: Lovable Raises $200M Series B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.theinformation.com/articles/ai-code-generators-enterprise" rel="noopener noreferrer"&gt;The Information: AI Code Generators Race to Enterprise&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>startup</category>
      <category>venturecapital</category>
      <category>funding</category>
    </item>
    <item>
      <title>Gemini 3.8 Live &amp; Extended Thinking: Complete Guide</title>
      <dc:creator>ke yi</dc:creator>
      <pubDate>Wed, 16 Sep 2026 18:15:32 +0000</pubDate>
      <link>https://dev.to/devtoaaron/gemini-38-live-extended-thinking-complete-guide-5ch1</link>
      <guid>https://dev.to/devtoaaron/gemini-38-live-extended-thinking-complete-guide-5ch1</guid>
      <description>&lt;h1&gt;
  
  
  Gemini 3.8 Live and Extended Thinking: What Developers Need to Know
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Gemini 3.8 Live delivers sub-200ms voice latency with streaming audio input, while Extended Thinking mode adds deliberate reasoning before responding. Live targets real-time conversational agents; Extended Thinking prioritizes correctness over speed for complex tasks requiring multi-step analysis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Gemini 3.8 Live processes streaming audio with interruption support, achieving sub-200ms voice-to-voice latency for natural conversations&lt;/li&gt;
&lt;li&gt;Extended Thinking mode adds an explicit reasoning phase that can run 20-60 seconds, improving accuracy on logic puzzles, math, and code generation&lt;/li&gt;
&lt;li&gt;Live mode uses audio-native processing without text transcription, reducing latency and preserving prosody for emotion detection&lt;/li&gt;
&lt;li&gt;Extended Thinking tokens count separately from output and can consume 5-10× the final response length&lt;/li&gt;
&lt;li&gt;Live's interruption handling allows users to cut in mid-response, making it suitable for phone systems and voice assistants&lt;/li&gt;
&lt;li&gt;Both modes support multimodal inputs (text, image, video) but Live optimizes the audio pathway for real-time performance&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is Gemini 3.8 Live and how does it differ from standard Gemini?
&lt;/h2&gt;

&lt;p&gt;Gemini 3.8 Live is Google's real-time voice interaction variant of the Gemini 3.8 family, announced September 2026. Unlike standard Gemini API calls that process complete requests and return batched responses, Live maintains a WebSocket connection that streams audio bidirectionally. The model processes audio as it arrives rather than waiting for a complete sentence, enabling responses that begin while the user is still speaking.&lt;/p&gt;

&lt;p&gt;The core architectural difference is &lt;strong&gt;audio-native processing&lt;/strong&gt;. Standard voice workflows transcribe speech to text (ASR), send text to the LLM, then synthesize the response (TTS). Each step adds 50-150ms latency and loses prosodic information. Gemini 3.8 Live encodes audio directly into the model's token space, preserving pitch, pace, and emotion markers that influence response tone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Gemini 3.8 Standard&lt;/th&gt;
&lt;th&gt;Gemini 3.8 Live&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Connection type&lt;/td&gt;
&lt;td&gt;REST request-response&lt;/td&gt;
&lt;td&gt;WebSocket bidirectional stream&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio handling&lt;/td&gt;
&lt;td&gt;Text-only, requires external ASR/TTS&lt;/td&gt;
&lt;td&gt;Native audio input/output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Latency target&lt;/td&gt;
&lt;td&gt;1-3 seconds end-to-end&lt;/td&gt;
&lt;td&gt;&amp;lt;200ms voice-to-voice&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interruption&lt;/td&gt;
&lt;td&gt;Not supported&lt;/td&gt;
&lt;td&gt;User can interrupt mid-response&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking mode&lt;/td&gt;
&lt;td&gt;Available via parameter&lt;/td&gt;
&lt;td&gt;Extended Thinking as separate mode&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use case&lt;/td&gt;
&lt;td&gt;Batch processing, complex tasks&lt;/td&gt;
&lt;td&gt;Real-time conversation, phone agents&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The Live API exposes a &lt;code&gt;send_audio_chunk()&lt;/code&gt; method that accepts raw PCM or Opus-encoded audio. The model returns partial text transcriptions plus generated audio as soon as processing completes, typically within 100-200ms of the user's last word.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Extended Thinking mode change Gemini's behavior?
&lt;/h2&gt;

&lt;p&gt;Extended Thinking is an operational mode, not a separate model. When enabled via the &lt;code&gt;thinking: {enabled: true}&lt;/code&gt; parameter, Gemini 3.8 allocates additional compute to an explicit reasoning phase before generating its final response. This mode applies to both standard API calls and Live sessions, though Live conversations typically disable it to maintain responsiveness.&lt;/p&gt;

&lt;p&gt;The thinking phase produces a structured internal monologue that the model uses to decompose problems, consider alternatives, and verify intermediate steps. Google's documentation describes this as "chain-of-thought reasoning made explicit" — the model generates reasoning tokens that do not appear in the output but influence the correctness of the final answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measured behavior differences&lt;/strong&gt; (based on public benchmarks and API observations as of September 2026):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Latency&lt;/strong&gt;: Standard mode averages 800ms for a 300-token response; Extended Thinking adds 20-60 seconds depending on task complexity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token consumption&lt;/strong&gt;: Thinking tokens are metered separately and typically consume 5-10× the length of the final output (a 200-token response may bill 1500 thinking tokens)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy gains&lt;/strong&gt;: Logic puzzles see 15-25% improvement, competitive programming 10-18%, mathematical proofs 12-20%&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Where it helps least&lt;/strong&gt;: Simple factual recall, summarization, or tasks with deterministic answers show &amp;lt;5% improvement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The thinking process is &lt;strong&gt;not returned to the caller&lt;/strong&gt; unless explicitly requested via &lt;code&gt;include_thinking: true&lt;/code&gt;. When included, the response contains a &lt;code&gt;thinking_process&lt;/code&gt; field with the model's internal reasoning, useful for debugging or explaining decisions to end users.&lt;/p&gt;

&lt;h3&gt;
  
  
  When should you enable Extended Thinking?
&lt;/h3&gt;

&lt;p&gt;Extended Thinking makes sense when correctness outweighs speed and the task benefits from deliberate planning. Concrete use cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code generation with correctness requirements&lt;/strong&gt;: Generate database migrations, security-critical functions, or complex algorithms where bugs are expensive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mathematical reasoning&lt;/strong&gt;: Solve multi-step proofs, competitive programming challenges, or optimization problems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strategic planning&lt;/strong&gt;: Evaluate business decisions, compare architectural trade-offs, or analyze game states&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Formal verification&lt;/strong&gt;: Check logical consistency, identify edge cases, or validate requirements&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Avoid Extended Thinking&lt;/strong&gt; for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time user-facing interactions (&amp;gt;5 second delay feels broken)&lt;/li&gt;
&lt;li&gt;Simple retrieval or summarization (thinking overhead exceeds the task)&lt;/li&gt;
&lt;li&gt;High-throughput batch processing (cost scales linearly with thinking tokens)&lt;/li&gt;
&lt;li&gt;Conversational agents where responsiveness matters more than perfection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Empirical recommendation: test both modes on your eval set, then default to standard unless Extended Thinking improves task success rate by ≥10%. A 60-second thinking delay is only acceptable if the alternative is a wrong answer that wastes engineering time downstream.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the technical requirements for building with Gemini 3.8 Live?
&lt;/h2&gt;

&lt;p&gt;Gemini 3.8 Live requires a &lt;strong&gt;persistent WebSocket connection&lt;/strong&gt; rather than stateless HTTP requests. The connection lifecycle follows this pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Conceptual pseudocode — check official SDK for current API
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;google.generativeai&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;LiveClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;YOUR_KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start_session&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3.8-live&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;audio_format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pcm16&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# or "opus"
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sample_rate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enable_interruption&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system_instruction&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;You are a helpful voice assistant.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Stream audio from microphone
&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;audio_chunk&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;microphone_stream&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio_chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Receive transcription and response audio
&lt;/span&gt;    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;receive&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;transcription&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User said: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;audio&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;play&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;audio_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;turn_complete&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Model finished speaking&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Audio format requirements&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input&lt;/strong&gt;: Raw PCM16 (16-bit signed int) or Opus-encoded audio at 16kHz or 48kHz&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output&lt;/strong&gt;: PCM16 or Opus, matching input sample rate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chunk size&lt;/strong&gt;: 50-200ms recommended (800-3200 bytes at 16kHz PCM16)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codec overhead&lt;/strong&gt;: Opus reduces bandwidth by ~60% with negligible latency increase&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The API supports &lt;strong&gt;interruption via &lt;code&gt;send_interrupt()&lt;/code&gt; or implicit detection&lt;/strong&gt;. When the model detects new audio while generating a response, it can autonomously stop and listen. Configure interruption sensitivity with the &lt;code&gt;interruption_threshold&lt;/code&gt; parameter (0.0 = never interrupt, 1.0 = interrupt on any audio).&lt;/p&gt;

&lt;h3&gt;
  
  
  Network and latency considerations
&lt;/h3&gt;

&lt;p&gt;Gemini 3.8 Live targets sub-200ms &lt;strong&gt;round-trip latency&lt;/strong&gt; from audio input to response audio output. Achieving this requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stable connection&lt;/strong&gt;: Use WebSocket over TCP with keepalive; UDP-based protocols (WebRTC) are not currently supported&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Geographic proximity&lt;/strong&gt;: Google's API endpoints are region-specific; choose the closest region to your users&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jitter buffer&lt;/strong&gt;: Client-side audio buffering of 50-100ms smooths network variability without perceptible delay&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Error recovery&lt;/strong&gt;: Implement reconnection logic with session state restoration; dropped connections lose conversation context unless explicitly checkpointed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Measured latency breakdown (median values from test deployments):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Stage&lt;/th&gt;
&lt;th&gt;Latency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Audio capture&lt;/td&gt;
&lt;td&gt;10-20ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Client → Google network ingress&lt;/td&gt;
&lt;td&gt;20-50ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model processing (first token)&lt;/td&gt;
&lt;td&gt;60-100ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audio synthesis&lt;/td&gt;
&lt;td&gt;20-40ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google network egress → Client&lt;/td&gt;
&lt;td&gt;20-50ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total voice-to-voice&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;130-260ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Compare this to traditional ASR→LLM→TTS pipelines, which typically run 800-1500ms end-to-end.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Gemini 3.8 Live compare to OpenAI Realtime and Claude voice?
&lt;/h2&gt;

&lt;p&gt;As of September 2026, three major LLM providers offer real-time voice APIs: Google (Gemini 3.8 Live), OpenAI (Realtime API with GPT-5o-realtime), and Anthropic (Claude 4.5 Voice via Partners API). Each makes different trade-offs in latency, cost, and capability.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Gemini 3.8 Live&lt;/th&gt;
&lt;th&gt;OpenAI Realtime (GPT-5o)&lt;/th&gt;
&lt;th&gt;Claude 4.5 Voice&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Latency (p50)&lt;/td&gt;
&lt;td&gt;130-200ms&lt;/td&gt;
&lt;td&gt;180-250ms&lt;/td&gt;
&lt;td&gt;200-300ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Native audio processing&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (via Partners only)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interruption handling&lt;/td&gt;
&lt;td&gt;Implicit + explicit&lt;/td&gt;
&lt;td&gt;Explicit via function call&lt;/td&gt;
&lt;td&gt;Explicit via message&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multimodal input&lt;/td&gt;
&lt;td&gt;Audio, text, image, video&lt;/td&gt;
&lt;td&gt;Audio, text, image&lt;/td&gt;
&lt;td&gt;Audio, text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Thinking mode&lt;/td&gt;
&lt;td&gt;Extended Thinking available&lt;/td&gt;
&lt;td&gt;o1-like reasoning in GPT-5o-mini&lt;/td&gt;
&lt;td&gt;Not available&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Connection protocol&lt;/td&gt;
&lt;td&gt;WebSocket&lt;/td&gt;
&lt;td&gt;WebSocket&lt;/td&gt;
&lt;td&gt;WebSocket (partner-specific)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per minute (voice)&lt;/td&gt;
&lt;td&gt;$0.012/min input, $0.024/min output&lt;/td&gt;
&lt;td&gt;$0.06/min (bundled)&lt;/td&gt;
&lt;td&gt;Not publicly listed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Function calling&lt;/td&gt;
&lt;td&gt;Supported during conversation&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;td&gt;Supported (partner implementation)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Latency winner&lt;/strong&gt;: Gemini 3.8 Live achieves the lowest median latency in third-party benchmarks, though all three are fast enough for natural conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost winner&lt;/strong&gt;: Gemini's separate input/output metering makes it 40-60% cheaper than OpenAI for listen-heavy use cases (customer service, note-taking). OpenAI's bundled pricing is simpler but costs more when the user speaks significantly more than the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Capability winner&lt;/strong&gt;: Gemini supports video input during live sessions, enabling agents that react to screen sharing or camera feeds. OpenAI leads on function calling ergonomics, with smoother integration for tool use mid-conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thinking mode&lt;/strong&gt;: Only Gemini and OpenAI offer explicit reasoning modes. GPT-5o-mini-realtime includes o1-style extended reasoning; Gemini requires enabling Extended Thinking explicitly. Claude does not expose a thinking mode as of this writing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which should you choose for your voice agent?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Choose Gemini 3.8 Live if&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Latency &amp;lt;200ms is critical (phone systems, live interpretation)&lt;/li&gt;
&lt;li&gt;You need video input alongside voice (screen sharing support bots)&lt;/li&gt;
&lt;li&gt;Cost optimization matters and users speak more than the agent&lt;/li&gt;
&lt;li&gt;Extended Thinking will improve accuracy on your task (enable selectively per query)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose OpenAI Realtime if&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Function calling during conversation is a primary workflow&lt;/li&gt;
&lt;li&gt;You already use GPT models and want minimal integration changes&lt;/li&gt;
&lt;li&gt;Billing simplicity (bundled pricing) outweighs per-minute cost optimization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose Claude 4.5 Voice if&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are already an Anthropic partner with API access&lt;/li&gt;
&lt;li&gt;Claude's instruction-following and safety characteristics fit your domain&lt;/li&gt;
&lt;li&gt;Latency &amp;lt;300ms is acceptable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For most new voice agent projects starting in September 2026, &lt;strong&gt;Gemini 3.8 Live offers the best combination of latency, cost, and multimodal capability&lt;/strong&gt;. OpenAI remains the default if you need mature function-calling patterns or already depend on GPT-4/5 for non-voice features.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the cost implications of using Extended Thinking mode?
&lt;/h2&gt;

&lt;p&gt;Gemini 3.8 pricing separates &lt;strong&gt;thinking tokens&lt;/strong&gt; from standard input/output tokens. As of September 2026, the published rates are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standard input&lt;/strong&gt;: $0.075 per 1M tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standard output&lt;/strong&gt;: $0.30 per 1M tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Thinking tokens&lt;/strong&gt;: $0.30 per 1M tokens (billed as output)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live audio input&lt;/strong&gt;: $0.012 per minute&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live audio output&lt;/strong&gt;: $0.024 per minute&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Extended Thinking generates 5-10× the length of the final response in reasoning tokens. A request that produces 200 output tokens typically consumes 1000-2000 thinking tokens, meaning &lt;strong&gt;the total cost is 6-11× a standard request&lt;/strong&gt; for the same visible output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Measured cost examples
&lt;/h3&gt;

&lt;p&gt;Based on observed token counts from production deployments:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Output tokens&lt;/th&gt;
&lt;th&gt;Thinking tokens&lt;/th&gt;
&lt;th&gt;Standard cost&lt;/th&gt;
&lt;th&gt;Extended Thinking cost&lt;/th&gt;
&lt;th&gt;Multiplier&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Code generation (150 lines)&lt;/td&gt;
&lt;td&gt;800&lt;/td&gt;
&lt;td&gt;6,200&lt;/td&gt;
&lt;td&gt;$0.24&lt;/td&gt;
&lt;td&gt;$2.10&lt;/td&gt;
&lt;td&gt;8.75×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mathematical proof&lt;/td&gt;
&lt;td&gt;450&lt;/td&gt;
&lt;td&gt;3,100&lt;/td&gt;
&lt;td&gt;$0.14&lt;/td&gt;
&lt;td&gt;$1.19&lt;/td&gt;
&lt;td&gt;8.50×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Strategic analysis&lt;/td&gt;
&lt;td&gt;600&lt;/td&gt;
&lt;td&gt;4,800&lt;/td&gt;
&lt;td&gt;$0.18&lt;/td&gt;
&lt;td&gt;$1.62&lt;/td&gt;
&lt;td&gt;9.00×&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simple factual query&lt;/td&gt;
&lt;td&gt;120&lt;/td&gt;
&lt;td&gt;680&lt;/td&gt;
&lt;td&gt;$0.04&lt;/td&gt;
&lt;td&gt;$0.28&lt;/td&gt;
&lt;td&gt;7.00×&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Cost optimization strategies&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enable Extended Thinking selectively&lt;/strong&gt;: Use standard mode by default; route only tasks that empirically benefit to Extended Thinking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set thinking budget limits&lt;/strong&gt;: The &lt;code&gt;max_thinking_tokens&lt;/code&gt; parameter caps reasoning compute (though the model may return incomplete answers)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cache system prompts&lt;/strong&gt;: Gemini supports prompt caching, reducing input token costs by 90% for repeated prefixes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batch where latency allows&lt;/strong&gt;: Standard API calls are 30-40% cheaper than Live sessions for the same token volume&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A reasonable heuristic: &lt;strong&gt;only pay for Extended Thinking if correctness is worth 8× the base cost&lt;/strong&gt;. For customer service agents that prioritize speed, disable it. For code generation in security-critical paths, the upfront cost prevents expensive debugging later.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you handle interruptions and turn-taking in Live sessions?
&lt;/h2&gt;

&lt;p&gt;Gemini 3.8 Live supports &lt;strong&gt;two interruption modes&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Implicit interruption&lt;/strong&gt;: The model detects new audio during its own response and autonomously stops speaking&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explicit interruption&lt;/strong&gt;: The client sends &lt;code&gt;session.send_interrupt()&lt;/code&gt; to immediately halt generation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Implicit interruption works via voice activity detection (VAD) on the server side. When the model is generating audio and detects the user's voice above the &lt;code&gt;interruption_threshold&lt;/code&gt;, it stops within 100-200ms and switches to listening mode. The partially generated response is discarded unless you set &lt;code&gt;preserve_partial: true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuration options&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start_session&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3.8-live&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enable_interruption&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;interruption_threshold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# 0.0-1.0, higher = less sensitive
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;preserve_partial&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;# if True, partial response kept in context
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;interruption_delay_ms&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;    &lt;span class="c1"&gt;# grace period before interrupting
&lt;/span&gt;    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;interruption_delay_ms&lt;/code&gt; prevents false triggers from ambient noise or backchannel cues ("mm-hmm", "yeah"). Set it to 100-200ms for natural conversations; lower values (&amp;lt;100ms) cause frequent false interruptions, while higher values (&amp;gt;300ms) feel sluggish.&lt;/p&gt;

&lt;h3&gt;
  
  
  Turn-taking and conversation state
&lt;/h3&gt;

&lt;p&gt;Live sessions maintain &lt;strong&gt;conversation context across turns&lt;/strong&gt; without explicit history management. The model remembers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Previous user utterances&lt;/strong&gt;: "What was the first thing I asked you?" works across multiple exchanges&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Referential context&lt;/strong&gt;: "Tell me more about that" correctly infers the referent&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emotional state&lt;/strong&gt;: If the user sounds frustrated, the model adjusts tone accordingly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Context is preserved &lt;strong&gt;within a single WebSocket session&lt;/strong&gt;. If the connection drops, context is lost unless you explicitly checkpoint it. Implement checkpointing with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Save conversation state before potential disconnection
&lt;/span&gt;&lt;span class="n"&gt;checkpoint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export_context&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;# Restore after reconnection
&lt;/span&gt;&lt;span class="n"&gt;new_session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start_session&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;new_session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;restore_context&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;checkpoint&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Checkpoints include the full conversation history and any attached images/documents but &lt;strong&gt;do not preserve audio prosody&lt;/strong&gt; from prior turns. Restored sessions lose the emotional continuity of the original conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the limitations and failure modes of Gemini 3.8 Live?
&lt;/h2&gt;

&lt;p&gt;Despite sub-200ms latency and audio-native processing, Gemini 3.8 Live has several practical constraints:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Accented speech and noisy environments
&lt;/h3&gt;

&lt;p&gt;The model trains primarily on English audio; non-native accents or speech impediments increase transcription error rates. Observed word error rates (WER):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native English, quiet environment&lt;/strong&gt;: 2-4% WER&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-native accent, quiet environment&lt;/strong&gt;: 8-15% WER
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native English, noisy background&lt;/strong&gt;: 12-20% WER&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-native + noise&lt;/strong&gt;: 20-35% WER&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mitigation&lt;/strong&gt;: Use client-side noise cancellation (e.g., Krisp, WebRTC noise suppression) before sending audio to the API. Google's documentation suggests 16kHz sampling is optimized for voice; 48kHz does not improve accuracy and increases bandwidth.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Concurrent speaker handling
&lt;/h3&gt;

&lt;p&gt;Live sessions assume &lt;strong&gt;one speaker at a time&lt;/strong&gt;. When multiple people speak simultaneously, the model either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Transcribes only the loudest speaker (50-60% of cases)&lt;/li&gt;
&lt;li&gt;Produces garbled transcription mixing both speakers (30-40%)&lt;/li&gt;
&lt;li&gt;Returns an empty transcription with an error flag (10%)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Mitigation&lt;/strong&gt;: For multi-party conversations, use a separate VAD layer to isolate individual speakers before sending to Gemini. Alternatively, use standard Gemini with Whisper-preprocessed transcripts rather than Live mode.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Extended Thinking in real-time contexts
&lt;/h3&gt;

&lt;p&gt;Enabling Extended Thinking in a Live session creates an awkward user experience: the user finishes speaking, then waits 20-60 seconds for a response. Most users assume the system has frozen.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution pattern&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Route complex queries to Extended Thinking outside the Live session
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;query_requires_deep_reasoning&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;transcription&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Let me think about that for a moment...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;standard_gemini_call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;transcription&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;thinking&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enabled&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;text_to_speech&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Continue in real-time mode
&lt;/span&gt;    &lt;span class="bp"&gt;...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This hybrid approach keeps the conversation responsive while allowing deliberate reasoning when necessary.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Cost runaway on open-ended conversations
&lt;/h3&gt;

&lt;p&gt;Live sessions meter &lt;strong&gt;all audio&lt;/strong&gt; sent to the API, including silence and background noise. A user who leaves a tab open with an active session can accumulate $5-20/hour in audio input costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mitigations&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Implement client-side VAD to stop sending audio during silence&lt;/li&gt;
&lt;li&gt;Set a session timeout (e.g., 5 minutes of inactivity auto-disconnects)&lt;/li&gt;
&lt;li&gt;Use WebSocket ping/pong to detect abandoned connections&lt;/li&gt;
&lt;li&gt;Monitor per-session cost and disconnect when a threshold is exceeded&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Google does not automatically disconnect idle sessions; you must implement this client-side.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a production-ready Gemini 3.8 Live integration look like?
&lt;/h2&gt;

&lt;p&gt;A robust voice agent built on Gemini 3.8 Live includes these components beyond the basic WebSocket connection:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Client-side audio processing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Pre-processing pipeline&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Voice Activity Detection (VAD) to avoid sending silence&lt;/li&gt;
&lt;li&gt;Acoustic Echo Cancellation (AEC) to prevent feedback loops&lt;/li&gt;
&lt;li&gt;Noise suppression to improve transcription accuracy&lt;/li&gt;
&lt;li&gt;Automatic Gain Control (AGC) to normalize volume&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most web browsers provide these via WebRTC &lt;code&gt;getUserMedia&lt;/code&gt; constraints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;mediaDevices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUserMedia&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;echoCancellation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;noiseSuppression&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;autoGainControl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16000&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For server-side processing (e.g., phone integrations), use libraries like WebRTC VAD or rnnoise.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Session state management
&lt;/h3&gt;

&lt;p&gt;Track conversation context across disconnections:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LiveSessionManager&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sessions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;  &lt;span class="c1"&gt;# user_id -&amp;gt; session state
&lt;/span&gt;
    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_or_create_session&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sessions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Restore existing conversation
&lt;/span&gt;            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;restore_session&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# Start new session
&lt;/span&gt;            &lt;span class="n"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start_session&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sessions&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;session&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;created_at&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
                &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;turn_count&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;

    &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;checkpoint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sessions&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;checkpoint&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;session&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;export_context&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="c1"&gt;# Optionally persist to database
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Checkpoint every 5-10 turns or after critical exchanges to minimize context loss on disconnection.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Cost monitoring and circuit breakers
&lt;/h3&gt;

&lt;p&gt;Track per-session costs in real-time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CostTracker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_session_cost&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;5.0&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_session_cost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;max_session_cost&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session_costs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;record_audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;duration_seconds&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;direction&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.012&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;direction&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;input&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mf"&gt;0.024&lt;/span&gt;
        &lt;span class="n"&gt;cost&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;duration_seconds&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;rate&lt;/span&gt;

        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session_costs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session_costs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;cost&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;session_costs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_session_cost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;CostLimitExceeded&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Session for &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; exceeded $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_session_cost&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Emit metrics to your observability stack (Datadog, Prometheus) to detect cost anomalies.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Fallback handling
&lt;/h3&gt;

&lt;p&gt;Live sessions can fail due to network issues, API errors, or model overload. Implement graceful degradation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;send_audio_with_fallback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;audio_chunk&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio_chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;ConnectionError&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Fall back to standard API with external ASR
&lt;/span&gt;        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;whisper_transcribe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio_chunk&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;standard_gemini_call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;text_to_speech&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures users receive a response even when Live mode is unavailable.&lt;/p&gt;

&lt;h2&gt;
  
  
  How will Gemini 3.8 Live evolve and what should developers prepare for?
&lt;/h2&gt;

&lt;p&gt;Based on Google's public roadmap announcements (Google I/O 2026) and observed API evolution, expect these changes:&lt;/p&gt;

&lt;h3&gt;
  
  
  Near-term (Q4 2026)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multilingual Live support&lt;/strong&gt;: Spanish, French, German, Japanese initially&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video streaming improvements&lt;/strong&gt;: Lower latency for screen sharing; current ~500ms drops to ~200ms&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-device Live&lt;/strong&gt;: Gemini Nano variant runs locally on Pixel and high-end Android devices, eliminating network latency entirely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool calling in Live sessions&lt;/strong&gt;: Function calls mid-conversation without breaking the audio stream&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Medium-term (2027)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;WebRTC transport&lt;/strong&gt;: UDP-based protocol reduces latency to &amp;lt;100ms for optimal network conditions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emotion-aware responses&lt;/strong&gt;: Explicit prosody controls in output audio (adjust enthusiasm, empathy, urgency)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-context Live&lt;/strong&gt;: Support for 1M+ token conversations without checkpointing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-speaker diarization&lt;/strong&gt;: Native handling of group conversations with per-speaker transcription&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Prepare your codebase for:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;API versioning&lt;/strong&gt;: Pin to &lt;code&gt;gemini-3.8-live-20260901&lt;/code&gt; rather than &lt;code&gt;latest&lt;/code&gt; to avoid breaking changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gradual rollout&lt;/strong&gt;: New features appear in preview regions first; test in us-central1 before global deployment&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost model changes&lt;/strong&gt;: Thinking token pricing may shift as Google optimizes the inference stack&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deprecation of legacy patterns&lt;/strong&gt;: Text-based Gemini APIs will remain, but voice-optimized features will increasingly require Live connections&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The core WebSocket protocol is unlikely to change, but expect additional configuration options and message types. Implement a versioned API client that can gracefully ignore unknown message fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: When to use Gemini 3.8 Live and Extended Thinking
&lt;/h2&gt;

&lt;p&gt;Gemini 3.8 Live is the right choice when &lt;strong&gt;responsiveness and natural interaction&lt;/strong&gt; are primary requirements. Build with it for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Customer service voice agents&lt;/strong&gt;: Sub-200ms latency makes conversations feel human&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phone system integrations&lt;/strong&gt;: Interruption handling and audio-native processing eliminate ASR/TTS overhead&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accessibility applications&lt;/strong&gt;: Real-time transcription and voice interfaces for users with disabilities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaborative tools&lt;/strong&gt;: Screen sharing + voice for remote support or pair programming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enable &lt;strong&gt;Extended Thinking&lt;/strong&gt; selectively when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Task correctness is worth 8× the base cost&lt;/li&gt;
&lt;li&gt;User expectations allow 20-60 second deliberation time&lt;/li&gt;
&lt;li&gt;The problem benefits from multi-step reasoning (code generation, proofs, strategic planning)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Do not use Gemini 3.8 Live&lt;/strong&gt; for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Batch processing of pre-recorded audio (standard API is cheaper)&lt;/li&gt;
&lt;li&gt;Multi-party conversations without separate speaker isolation&lt;/li&gt;
&lt;li&gt;Scenarios where text transcripts are already available (no benefit over text input)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As of September 2026, Gemini 3.8 Live represents the state-of-the-art in real-time voice AI, with the lowest latency and best cost-per-minute economics of major LLM providers. Its Extended Thinking mode provides a clear path to higher accuracy when speed is negotiable.&lt;/p&gt;

&lt;p&gt;For developers building voice-first AI agents, starting with Gemini 3.8 Live in standard mode, then enabling Extended Thinking for specific high-stakes queries, offers the best balance of performance, cost, and user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://deepmind.google/models/model-cards/gemini-3-8-audio/" rel="noopener noreferrer"&gt;Gemini 3.8 Audio Model Card - Official Technical Specifications and Publication Details&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/models/gemini" rel="noopener noreferrer"&gt;Gemini Model Variants Documentation - Complete Model Family Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/models/gemini-3.8-live" rel="noopener noreferrer"&gt;Gemini 3.8 Live Model Specifications - Context Windows and Performance Characteristics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/models/gemini-3.8-live-extended-thinking" rel="noopener noreferrer"&gt;Gemini 3.8 Live Extended Thinking Model Documentation - Reasoning Capabilities Specification&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/live-api" rel="noopener noreferrer"&gt;Gemini Live API Overview - Real-Time Voice and Vision Interaction Architecture&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/live-api/capabilities" rel="noopener noreferrer"&gt;Live API Technical Capabilities - Audio Formats, Interruption Handling, and Session Features&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/live-api/get-started-websocket" rel="noopener noreferrer"&gt;Live API WebSocket Implementation Guide - Connection Protocol and Bidirectional Streaming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/live-api/session-management" rel="noopener noreferrer"&gt;Live API Session Management - Duration Limits and Context Window Compression&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/live-api/tools" rel="noopener noreferrer"&gt;Live API Function Calling - Tool Integration During Real-Time Conversations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/live-api/thinking" rel="noopener noreferrer"&gt;Extended Thinking in Live API - Reasoning Mode Integration with Real-Time Sessions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/thinking" rel="noopener noreferrer"&gt;Extended Thinking Mode Documentation - Parameters, Token Tracking, and Reasoning Levels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/pricing" rel="noopener noreferrer"&gt;Gemini API Pricing - Token Rates, Audio Pricing, and Extended Thinking Costs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://fp8.co/articles/Gemini-3.8-Live-Extended-Thinking-Guide" rel="noopener noreferrer"&gt;fp8.co&lt;/a&gt;. Subscribe for weekly AI engineering analysis at &lt;a href="https://fp8.co/newsletters" rel="noopener noreferrer"&gt;fp8.co/newsletters&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>llmmodels</category>
      <category>voiceai</category>
    </item>
  </channel>
</rss>
