<?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: Tony Spiro</title>
    <description>The latest articles on DEV Community by Tony Spiro (@tonyspiro).</description>
    <link>https://dev.to/tonyspiro</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F36636%2F37a4c910-90d9-40b1-9a8b-69e1ad31b4f6.jpeg</url>
      <title>DEV Community: Tony Spiro</title>
      <link>https://dev.to/tonyspiro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tonyspiro"/>
    <language>en</language>
    <item>
      <title>What the Salesforce Acquisition Means for Contentful Customers (2026)</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Mon, 01 Jun 2026 15:46:11 +0000</pubDate>
      <link>https://dev.to/tonyspiro/what-the-salesforce-acquisition-means-for-contentful-customers-2026-4a95</link>
      <guid>https://dev.to/tonyspiro/what-the-salesforce-acquisition-means-for-contentful-customers-2026-4a95</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://www.cosmicjs.com/blog/contentful-salesforce-acquisition-2026" rel="noopener noreferrer"&gt;Cosmic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On June 1, 2026, Salesforce announced it has entered a definitive agreement to acquire Contentful. It is a significant milestone for the headless CMS space, and it will understandably raise real questions for Contentful's customers: What happens to my contract? Will pricing change? Is the product roadmap still the same? Do I now need a Salesforce relationship to use my CMS?&lt;/p&gt;

&lt;p&gt;This post is not a victory lap. Contentful built something meaningful, and this kind of exit is a testament to the value of the market they helped create. But if you are a Contentful customer evaluating your options right now, you deserve a clear-eyed read of what usually happens when enterprise software companies are absorbed into large CRM platforms, and what alternatives genuinely exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Typically Happens After an Acquisition Like This
&lt;/h2&gt;

&lt;p&gt;Every acquisition is different. But when a focused developer tool is acquired by a large enterprise platform, certain patterns tend to emerge over the following 12 to 24 months:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing pressure tends to go up, not down.&lt;/strong&gt; Enterprise acquirers optimize for average contract value. Expect more emphasis on enterprise tiers, bundling with the parent platform's suite, and less flexibility on seat-level or usage-level pricing for smaller teams.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Roadmap priorities shift toward the acquirer's ecosystem.&lt;/strong&gt; That is not necessarily bad, but it does mean that features most relevant to independent developers or smaller dev teams may not be the top priority anymore. Integration depth with Salesforce products, CRM tie-ins, and Salesforce-adjacent enterprise features are likely to move up the list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The migration window opens.&lt;/strong&gt; Many teams use acquisition announcements as a forcing function to evaluate their CMS choice. If you have been meaning to reassess your infrastructure, this is a natural moment to do it with clear eyes rather than urgency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Support and account structures often change.&lt;/strong&gt; Sales and support teams get reorganized. The contacts you know may move. Response times and support models often shift during integration periods.&lt;/p&gt;

&lt;p&gt;None of this is a guarantee, and Salesforce may prove to be a great steward of Contentful. But these are the questions worth asking your account team directly, in writing, before your next renewal.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Questions to Ask Your Contentful Rep Right Now
&lt;/h2&gt;

&lt;p&gt;If you are a current Contentful customer, here is what we would recommend getting clarity on in the next 30 days:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Is my current contract price locked, and for how long?&lt;/strong&gt; Get this confirmed in writing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Will I be required to move to a Salesforce billing relationship?&lt;/strong&gt; Some acquirers fold products into their main contract structures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is the product roadmap for the next 12 months, specifically?&lt;/strong&gt; Ask for written commitments, not verbal assurances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Are there any changes to data residency or compliance certifications?&lt;/strong&gt; This matters for teams in regulated industries or specific geographies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What is the migration path if I decide to leave?&lt;/strong&gt; Good vendors make this easy to understand up front.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should not have to speculate on any of these. Ask directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an Independent CMS Looks Like in 2026
&lt;/h2&gt;

&lt;p&gt;Cosmic has been independent since 2015. We are backed by Y Combinator (W19) and have grown on our own terms, without being folded into a larger enterprise platform. We have no plans to change that. Here is what we offer today:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI-native by design.&lt;/strong&gt; Cosmic is built for the AI era, not retrofitted for it. Our AI Agents include Team Agents (for Slack, WhatsApp, and Telegram), Content Agents (for autonomous content creation and management), Code Agents (connected to GitHub for building and shipping features), and Computer Use Agents (for browser automation). These are not add-ons. They are part of the platform.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An MCP Server.&lt;/strong&gt; The Cosmic MCP Server lets AI tools like Claude, Cursor, and other MCP-compatible clients interact directly with your content through a standardized protocol. Your CMS becomes a first-class AI context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A fast, clean REST API with the TypeScript SDK.&lt;/strong&gt; The Cosmic REST API delivers sub-100ms response times globally. The TypeScript SDK provides a clean, typed developer experience. There is no vendor lock-in through proprietary query languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A CLI for developers who prefer the terminal.&lt;/strong&gt; The Cosmic CLI lets you manage content, schemas, and deployments without leaving your workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transparent, usage-based pricing.&lt;/strong&gt; Our free plan is genuinely free, forever, with no credit card required. Paid plans start at $49/month for the Builder tier. Additional users are $29/user/month. There are no surprise enterprise negotiations required to get a fair price.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Real Teams Say
&lt;/h2&gt;

&lt;p&gt;FINN, the Munich-based car subscription platform, runs on Cosmic. Here is how their Co-Founder describes it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Cosmic is: us never having to ask a developer to change anything on the backend of our website."&lt;br&gt;
Maximilian Wuhr, Co-Founder at FINN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That independence, the ability for content teams to move without engineering bottlenecks, is exactly what is at risk when a CMS gets absorbed into a larger, more complex enterprise platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thinking About Migration? Here Is What to Expect
&lt;/h2&gt;

&lt;p&gt;Migrating a CMS is never trivial, but it is also not the multi-year project it used to be. With Cosmic's REST API, structured content models map cleanly from most headless CMS platforms.&lt;/p&gt;

&lt;p&gt;A few practical steps if you are early in the evaluation process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit your current content model.&lt;/strong&gt; Document your object types, field structures, and any custom API integrations before you start.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run a parallel pilot.&lt;/strong&gt; Stand up a Cosmic bucket alongside your current CMS. You can be on the free plan for this. Test your most critical content types first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluate your frontend dependencies.&lt;/strong&gt; If your frontend fetches content via a generic REST API (which most headless setups do), the transition is mostly a matter of updating endpoint calls and authentication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Talk to us.&lt;/strong&gt; We are not a faceless enterprise vendor. Our team is reachable, and if your situation is complex, we will tell you honestly whether Cosmic is the right fit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Salesforce acquiring Contentful is good news for Contentful's investors and team. Whether it is good news for Contentful's customers depends entirely on how the integration unfolds, and that is genuinely uncertain right now.&lt;/p&gt;

&lt;p&gt;What is certain: you have options, the market for independent headless CMS platforms is healthy, and there has never been a better time to evaluate what your content infrastructure should look like for the next three to five years.&lt;/p&gt;

&lt;p&gt;If you want to explore Cosmic, you can &lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;start on the free plan today&lt;/a&gt;, no credit card required. If you want to talk through your specific situation, &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;book a 30-minute intro call&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cosmic is a YC W19 company. We build the AI-native headless CMS for teams who want to move fast without depending on a platform that moves slow.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cms</category>
      <category>webdev</category>
      <category>news</category>
      <category>business</category>
    </item>
    <item>
      <title>Astro 6.4 + Cosmic: The Fastest Content Stack in 2026</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Sat, 30 May 2026 20:42:49 +0000</pubDate>
      <link>https://dev.to/tonyspiro/astro-64-cosmic-the-fastest-content-stack-in-2026-bn7</link>
      <guid>https://dev.to/tonyspiro/astro-64-cosmic-the-fastest-content-stack-in-2026-bn7</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://www.cosmicjs.com/blog/astro-6-4-cosmic-fastest-content-stack" rel="noopener noreferrer"&gt;Cosmic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Astro 6.4 landed recently, and the headline feature is hard to ignore: a brand-new Rust-based Markdown processor called Sätteri that shaved over a minute off build times for both the Astro and Cloudflare docs sites. Combine that with Cosmic's sub-100ms REST API responses and you have a content pipeline that nothing else on the market can touch right now.&lt;/p&gt;

&lt;p&gt;Here is everything that shipped in Astro 6.4, why it matters for content-heavy projects, and how to wire it up with Cosmic today.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's New in Astro 6.4
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Sätteri: Rust-Speed Markdown Processing
&lt;/h3&gt;

&lt;p&gt;The most significant addition in this release is Sätteri, a Markdown and MDX pipeline written in Rust, exposed through Astro's new pluggable API. In Astro's own testing, switching the Astro and Cloudflare docs sites to Sätteri shaved over a minute off their respective build times.&lt;/p&gt;

&lt;p&gt;For large content sites, that is not a marginal improvement. It changes the feedback loop entirely.&lt;/p&gt;

&lt;p&gt;One important note: Sätteri does not run remark or rehype plugins. If your project depends on plugins from the unified ecosystem, you will either need to stay on the default processor for now or port them to Sätteri's MDAST or HAST plugin system. The Astro team has signaled that Sätteri is the intended default processor in a future major release.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Pluggable Markdown Processor API
&lt;/h3&gt;

&lt;p&gt;Sätteri is possible because Astro 6.4 also introduces a configuration option that lets you swap out the entire Markdown pipeline. The default remains the unified-based processor, so existing projects keep working without any changes. The legacy top-level markdown options still work but are now deprecated and will be removed in Astro 8.0.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloudflare Routing Helpers
&lt;/h3&gt;

&lt;p&gt;For teams deploying on Cloudflare Workers, the adapter now ships a helper that wires up all the Cloudflare-specific plumbing: SESSION KV binding injection, static asset serving via the ASSETS binding, client address resolution, and prerendered error pages. It works with both custom fetch handlers and Hono middleware.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Performance Stack: Cosmic + Astro + Sätteri
&lt;/h2&gt;

&lt;p&gt;Here is what the full performance story looks like when you combine Cosmic with Astro 6.4:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content delivery:&lt;/strong&gt; Cosmic's REST API returns content in under 100ms, globally, with built-in CDN caching. Your editors update content in Cosmic's dashboard; your Astro site pulls it at build time or on-demand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Markdown processing:&lt;/strong&gt; Sätteri processes your Markdown and MDX at Rust speed, cutting a minute or more off large-site builds compared to the unified pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt; Astro ships zero JavaScript by default. Every page is static HTML unless you explicitly opt into interactivity with islands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No other content stack pairs these three things: a sub-100ms headless API, Rust-speed Markdown processing, and a zero-JS-by-default output format.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fetching Cosmic Content in an Astro Component
&lt;/h2&gt;

&lt;p&gt;First, install the SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @cosmicjs/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then fetch and render your content in an Astro component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
import { createBucketClient } from '@cosmicjs/sdk'

const cosmic = createBucketClient({
  bucketSlug: import.meta.env.COSMIC_BUCKET_SLUG,
  readKey: import.meta.env.COSMIC_READ_KEY,
})

const { objects: posts } = await cosmic.objects
  .find({ type: 'posts' })
  .props(['title', 'slug', 'metadata'])
  .depth(1)
---

&amp;lt;ul&amp;gt;
  {posts.map((post) =&amp;gt; (
    &amp;lt;li&amp;gt;&amp;lt;a href={`/blog/${post.slug}`}&amp;gt;{post.title}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
  ))}
&amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is all it takes. The Cosmic SDK handles authentication, caching headers, and type inference. Pair this fetch pattern with Sätteri for any local Markdown content, and you have a fully optimized content pipeline.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Related: &lt;a href="https://www.cosmicjs.com/blog/bun-and-cosmic-fastest-javascript-stack-2026" rel="noopener noreferrer"&gt;Bun + Cosmic: The Fastest JavaScript Stack in 2026&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why This Matters for Production Sites
&lt;/h2&gt;

&lt;p&gt;Build performance compounds. On a site with hundreds or thousands of Markdown files, a one-minute reduction per build translates directly into faster CI pipelines, cheaper build minutes, and shorter time-to-publish for your content team. At scale, the choice of Markdown processor is not a footnote. It is a budget line item.&lt;/p&gt;

&lt;p&gt;For teams running Cosmic + Astro in production, upgrading to Sätteri is a straightforward win if you are not relying on unified plugins. And for teams evaluating headless CMS platforms, the Cosmic + Astro combination now has an even stronger performance argument than it did last week.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Ready to build the fastest content stack available? Here is what you need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a free Cosmic account at &lt;a href="https://www.cosmicjs.com" rel="noopener noreferrer"&gt;cosmicjs.com&lt;/a&gt; (no credit card required).&lt;/li&gt;
&lt;li&gt;Spin up a new Astro project.&lt;/li&gt;
&lt;li&gt;Install the Cosmic SDK: &lt;code&gt;npm install @cosmicjs/sdk&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Optionally install Sätteri and configure it as your Markdown processor.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The free plan includes everything you need to get started: one bucket, up to 1,000 objects, and the full REST API. Start building for free, no credit card required.&lt;/p&gt;

&lt;p&gt;Want a guided walkthrough? &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;Book a demo&lt;/a&gt; and we will show you how teams are running Cosmic and Astro in production today.&lt;/p&gt;

</description>
      <category>astro</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>cms</category>
    </item>
    <item>
      <title>Why Digital Agencies Are Moving Client Sites to Headless CMS in 2026</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Sat, 30 May 2026 04:53:45 +0000</pubDate>
      <link>https://dev.to/tonyspiro/why-digital-agencies-are-moving-client-sites-to-headless-cms-in-2026-16f6</link>
      <guid>https://dev.to/tonyspiro/why-digital-agencies-are-moving-client-sites-to-headless-cms-in-2026-16f6</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://www.cosmicjs.com/blog/digital-agencies-moving-clients-headless-cms-2026" rel="noopener noreferrer"&gt;Cosmic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you run a digital agency, you have probably lived this scenario: a client calls because they need to update a hero image on their homepage. The request goes to your dev team, sits in a queue, gets deployed two days later. The client is frustrated. Your developers are annoyed at the interruption. And you just spent real engineering time on a task that should have taken a content editor 90 seconds.&lt;/p&gt;

&lt;p&gt;Headless CMS changes this dynamic entirely. And in 2026, the agencies that have made the switch are winning more clients, delivering better retainers, and spending developer hours on work that actually moves the needle.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Core Problem Headless CMS Solves for Agencies
&lt;/h2&gt;

&lt;p&gt;Traditional CMS platforms (WordPress, Drupal, even some "managed" solutions) bundle the content editing experience with the frontend presentation layer. This creates two problems for agencies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Client dependency on your developers for routine content updates.&lt;/strong&gt; Every hero swap, blog post, team page update, or event announcement requires a developer to touch the code or template.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fragile, monolithic deployments.&lt;/strong&gt; Updating the CMS often means risking the frontend. Plugin conflicts, theme changes, and version upgrades become project risks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Headless CMS separates content management from content delivery. Clients edit in a clean, purpose-built interface. The frontend is a completely separate application that pulls content via API. Developers never need to touch the CMS for routine editorial work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why 2026 Is the Inflection Point
&lt;/h2&gt;

&lt;p&gt;Three forces have converged to make headless CMS the default choice for forward-thinking agencies:&lt;/p&gt;

&lt;h3&gt;
  
  
  AI-Native Workflows
&lt;/h3&gt;

&lt;p&gt;Modern headless CMS platforms now include built-in AI agents. Your team can automate content drafting, SEO optimization, and even social media cross-posting directly from the CMS. That is hours of billable production work that becomes nearly instant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Framework Maturity
&lt;/h3&gt;

&lt;p&gt;Next.js, Nuxt, Astro, and Svelte have all reached production maturity. Every major frontend framework now has first-class support for API-driven content. The developer ecosystem has standardized around headless architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Client Sophistication
&lt;/h3&gt;

&lt;p&gt;Clients in 2026 expect content autonomy. They do not want to call your agency every time they need to publish a blog post. Headless CMS with an intuitive interface gives them that independence while keeping your team in control of the architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Cosmic Offers Agencies Specifically
&lt;/h2&gt;

&lt;p&gt;Cosmic is built from the ground up as a headless CMS. It is not a traditional CMS that added an API layer. Here is what that means for your agency workflow:&lt;/p&gt;

&lt;h3&gt;
  
  
  Client Content Autonomy Without Code Changes
&lt;/h3&gt;

&lt;p&gt;Content editors at your client's organization can create, edit, and publish content without ever touching your frontend codebase. Object types and metafields can be configured visually. When a client needs a new content type, your team can add it in minutes, without a deployment.&lt;/p&gt;

&lt;p&gt;This is exactly what FINN, the car subscription company, found when they moved to Cosmic:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Cosmic is: us never having to ask a developer to change anything on the backend of our website."&lt;br&gt;
— Maximilian Wuhr, Co-Founder at FINN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That quote could come from any of your clients, after you implement Cosmic for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Clean, Scalable Data Model
&lt;/h3&gt;

&lt;p&gt;Cosmic uses an object-based model. Every piece of content is an object with a type, metadata, and relationships. It maps cleanly to any frontend framework. Your developers will spend less time fighting the CMS data structure and more time building great user experiences.&lt;/p&gt;

&lt;h3&gt;
  
  
  REST API and TypeScript SDK
&lt;/h3&gt;

&lt;p&gt;All content is delivered via Cosmic's REST API and official TypeScript/JavaScript SDK. Integration with any frontend framework is straightforward:&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;createBucketClient&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;@cosmicjs/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;cosmic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createBucketClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;bucketSlug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-client-bucket&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;readKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-read-key&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;objects&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;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&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="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;blog-posts&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="nf"&gt;props&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;slug&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;metadata&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="nf"&gt;limit&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No proprietary query language. No complex configuration. Clean TypeScript types out of the box.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-Bucket Architecture for Multiple Clients
&lt;/h3&gt;

&lt;p&gt;Cosmic's project structure lets you manage multiple client buckets from a single workspace. Each client gets their own isolated content environment. You stay organized. Clients stay in their lane.&lt;/p&gt;

&lt;p&gt;Pricing scales cleanly with your agency's portfolio:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Builder plan&lt;/strong&gt; ($49/month): 2 buckets, 3 team members, perfect for small agencies or pilot projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team plan&lt;/strong&gt; ($299/month): 3 buckets, 5 team members, for growing agency teams&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business plan&lt;/strong&gt; ($499/month): 5 buckets, 10 team members, for larger agencies managing multiple client sites&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Additional buckets&lt;/strong&gt;: $29/bucket/month, so you can add clients without jumping to a new plan&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Built-In AI Agents
&lt;/h3&gt;

&lt;p&gt;Cosmic includes AI team agents that can run on a schedule or on-demand. For agencies, this opens up new service offerings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated content drafting and SEO optimization for clients&lt;/li&gt;
&lt;li&gt;Scheduled social media post generation from CMS content&lt;/li&gt;
&lt;li&gt;Competitor monitoring and content gap analysis&lt;/li&gt;
&lt;li&gt;Automated weekly content performance reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are billable deliverables that used to require hours of manual work.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Agency Pitch: Why Clients Choose Headless
&lt;/h2&gt;

&lt;p&gt;When you are selling headless CMS architecture to a client, the pitch is straightforward:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"You will own your content. Your team can publish anytime without calling us. And your site will be faster, more secure, and easier to scale than what you have today."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For clients who have ever been burned by a WordPress plugin update taking down their site, or who have waited three days for a simple content change, this is a compelling offer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started with Cosmic for Your Agency
&lt;/h2&gt;

&lt;p&gt;Cosmic offers a free plan with no credit card required, so you can build out a proof-of-concept for a client before committing to a paid tier.&lt;/p&gt;

&lt;p&gt;For agencies evaluating the platform at scale, book a 30-minute call with Tony Spiro, Cosmic's CEO, to discuss agency pricing and partnership options: &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;https://calendly.com/tonyspiro/cosmic-intro&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or start building immediately: &lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;https://app.cosmicjs.com/signup&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Cosmic pricing as of May 2026: Builder at $49/month, Team at $299/month, Business at $499/month. Additional buckets at $29/bucket/month. Additional users at $29/user/month.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cms</category>
      <category>agency</category>
      <category>business</category>
    </item>
    <item>
      <title>Building with Bun and Cosmic: The Fastest JavaScript Stack in 2026</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Sat, 30 May 2026 04:49:16 +0000</pubDate>
      <link>https://dev.to/tonyspiro/building-with-bun-and-cosmic-the-fastest-javascript-stack-in-2026-3ci2</link>
      <guid>https://dev.to/tonyspiro/building-with-bun-and-cosmic-the-fastest-javascript-stack-in-2026-3ci2</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on the &lt;a href="https://www.cosmicjs.com/blog/bun-and-cosmic-fastest-javascript-stack-2026" rel="noopener noreferrer"&gt;Cosmic blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Bun v1.3 is the fastest JavaScript runtime you can use right now. Cosmic's REST API returns content in under 100ms. Put them together and you get a full-stack setup that's faster at every layer: cold starts, package installation, HTTP requests, and content delivery.&lt;/p&gt;

&lt;p&gt;This is a practical tutorial. You'll set up a Bun project, pull content from Cosmic using the JavaScript SDK, and see why this combination is the right default for JavaScript developers building content-heavy apps in 2026.&lt;/p&gt;

&lt;p&gt;Bun is also actively rewriting core internals in Rust, doubling down on raw performance and memory safety. This isn't just an optimization story: it signals a long-term commitment to speed as a first-class priority.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Bun in 2026
&lt;/h2&gt;

&lt;p&gt;Bun started as a fast alternative to Node.js, but in December 2025 it was acquired by Anthropic, which is now betting on it as the runtime infrastructure powering Claude Code and the Claude Agent SDK. That acquisition signals something: the fastest JavaScript runtime is also where serious AI tooling is heading.&lt;/p&gt;

&lt;p&gt;Bun is built on JavaScriptCore (the engine that powers Safari) and written in Zig. It ships as a single binary that includes a runtime, package manager, bundler, and test runner. In practice this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Install speed:&lt;/strong&gt; Bun installs packages up to 25x faster than npm. With v1.3.14's global store, warm reinstalls are 7x faster again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Startup time:&lt;/strong&gt; Cold start times are significantly lower than Node.js, particularly for TypeScript projects where Bun transpiles natively without a separate build step.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Async/await performance:&lt;/strong&gt; Bun v1.3.7 shipped 35% faster async/await. v1.3.6 brought 15% faster async/await on top of that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in tooling:&lt;/strong&gt; No tsconfig.json gymnastics, no separate transpiler, no test framework to install.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bun v1.3 (released October 2025) added zero-config frontend development, a unified SQL API, and a built-in Redis client. As of v1.3.14, it includes a built-in image processing API, HTTP/3 support, and 7x faster warm installs. It's not a prototype anymore: Vercel added native Bun runtime support in October 2025.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Cosmic as the Content Layer
&lt;/h2&gt;

&lt;p&gt;Cosmic is an API-first headless CMS. Your content lives in Cosmic's CDN-backed infrastructure and is available via a REST API and JavaScript SDK.&lt;/p&gt;

&lt;p&gt;Key performance characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cached API requests are served from a global CDN. Sub-100ms response times in most regions.&lt;/li&gt;
&lt;li&gt;The JavaScript SDK is typed and tree-shakeable.&lt;/li&gt;
&lt;li&gt;No CMS server to run, no database to provision. You write frontend code and fetch content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Bun specifically, this matters because Bun's fast startup time is only useful if your data layer doesn't become the bottleneck. Cosmic's cached REST API is fast enough that it doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up the Stack
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Bun installed&lt;/li&gt;
&lt;li&gt;A free Cosmic account at &lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;cosmicjs.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Create a Bun project
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bun creates &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;tsconfig.json&lt;/code&gt;, and an entry point. No additional configuration needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Install the Cosmic SDK
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun add @cosmicjs/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Installs in roughly 200ms on a warm cache.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Create your Cosmic client
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lib/cosmic.ts&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;createBucketClient&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;@cosmicjs/sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cosmic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createBucketClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;bucketSlug&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;COSMIC_BUCKET_SLUG&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;readKey&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;COSMIC_READ_KEY&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the entire setup. No ORM, no connection pool.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Fetch content
&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;cosmic&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;./lib/cosmic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;posts&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;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&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="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;posts&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="nf"&gt;props&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;slug&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;metadata&lt;/span&gt;&lt;span class="dl"&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;posts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun run index.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No compilation step. Bun runs TypeScript directly. On a warm cache the Cosmic API call returns in under 100ms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Bun HTTP Server with Cosmic
&lt;/h2&gt;

&lt;p&gt;Bun has a built-in HTTP server (&lt;code&gt;Bun.serve&lt;/code&gt;) that's significantly faster than Express on Node.js:&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;cosmic&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;./lib/cosmic&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="nx"&gt;Bun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;routes&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;/api/posts&lt;/span&gt;&lt;span class="dl"&gt;'&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="o"&gt;=&amp;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;objects&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;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&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="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;posts&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="nf"&gt;props&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;slug&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;metadata&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;Response&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="nx"&gt;objects&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;No framework, no middleware setup, no boilerplate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance Reality Check
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bun startup time:&lt;/strong&gt; ~5ms on modern hardware. Node.js + ts-node is typically 200-500ms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cosmic cached API response:&lt;/strong&gt; Under 100ms from most regions for cached content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bun package install:&lt;/strong&gt; First install of a medium-sized project takes 5-10 seconds with Bun vs 30-60 seconds with npm.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these numbers require you to do anything special. Install Bun, use &lt;code&gt;@cosmicjs/sdk&lt;/code&gt;, and you get them automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters in 2026
&lt;/h2&gt;

&lt;p&gt;A few things converged to make this stack compelling right now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bun joined Anthropic in December 2025. The runtime that powers Claude Code is the same one you can use for your projects.&lt;/li&gt;
&lt;li&gt;Bun 1.3 added zero-config frontend support.&lt;/li&gt;
&lt;li&gt;Vercel added native Bun runtime support in October 2025.&lt;/li&gt;
&lt;li&gt;The Cosmic REST API is genuinely fast: CDN-backed, sub-100ms cached responses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The practical result: a Bun + Cosmic stack is faster to set up, faster to install, faster to run, and delivers fast content. There's no trade-off to evaluate here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;Sign up for Cosmic free&lt;/a&gt; (no credit card required), create a bucket, add a content type, and follow the setup steps above. You'll have a working content API in under 10 minutes.&lt;/p&gt;

&lt;p&gt;Want to talk through your specific use case? &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;Book a 30-minute intro with Tony&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>bunjs</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>Claude Sonnet 4.5 vs 4.6: What Changed and Which Should You Use?</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Thu, 28 May 2026 19:11:18 +0000</pubDate>
      <link>https://dev.to/tonyspiro/claude-sonnet-45-vs-46-what-changed-and-which-should-you-use-51bp</link>
      <guid>https://dev.to/tonyspiro/claude-sonnet-45-vs-46-what-changed-and-which-should-you-use-51bp</guid>
      <description>&lt;p&gt;Anthropic shipped Claude Sonnet 4.6 in February 2026, roughly five months after Sonnet 4.5 launched in September 2025. Both carry the same API pricing ($3 input / $15 output per million tokens), but the gap in capability is meaningful. If you're picking a model to build on right now, the choice matters.&lt;/p&gt;

&lt;p&gt;This post breaks down exactly what changed, which use cases favor each model, and how to connect either one to a real content layer using the Cosmic JavaScript SDK.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Changed: Sonnet 4.5 to 4.6
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Coding
&lt;/h3&gt;

&lt;p&gt;Sonnet 4.5 was already a strong coding model when it launched. Anthropic called it "the best coding model in the world" at the time, and it led SWE-bench Verified at 77.2% (averaged across 10 trials). It introduced the Claude Agent SDK and showed it could maintain focus across 30+ hour autonomous coding sessions.&lt;/p&gt;

&lt;p&gt;Sonnet 4.6 improves on this across the board. In Claude Code, users preferred 4.6 over 4.5 roughly &lt;strong&gt;70% of the time&lt;/strong&gt;. Testers reported that 4.6 more effectively reads context before modifying code, consolidates shared logic instead of duplicating it, and follows instructions more consistently over long sessions. One customer reported going from a &lt;strong&gt;9% error rate on Sonnet 4 to 0% on an internal code editing benchmark&lt;/strong&gt; after switching to 4.6. Another saw planning performance increase by 18% and end-to-end eval scores improve by 12%.&lt;/p&gt;

&lt;p&gt;The headline SWE-bench number for 4.6 is &lt;strong&gt;80.2%&lt;/strong&gt; with a prompt modification, up from 77.2% on 4.5.&lt;/p&gt;

&lt;h3&gt;
  
  
  Computer Use
&lt;/h3&gt;

&lt;p&gt;This is where 4.6 makes the biggest leap. Sonnet 4.5 led the OSWorld benchmark at &lt;strong&gt;61.4%&lt;/strong&gt; when it launched. Sonnet 4.6 pushes further: early users are reporting human-level capability on tasks like navigating complex spreadsheets and completing multi-step web forms. Anthropic also specifically calls out that 4.6 is a major improvement over 4.5 on prompt injection resistance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Long-Context Reasoning and Agent Planning
&lt;/h3&gt;

&lt;p&gt;Sonnet 4.6 ships with a &lt;strong&gt;1M token context window&lt;/strong&gt; in beta. That's enough to hold an entire codebase, dozens of research documents, or long contracts in a single request. Sonnet 4.5 didn't offer this.&lt;/p&gt;

&lt;h3&gt;
  
  
  Knowledge Work and Document Understanding
&lt;/h3&gt;

&lt;p&gt;Claude Sonnet 4.6 matches Opus 4.6 performance on OfficeQA, which tests how well a model reads enterprise documents (charts, PDFs, tables) and reasons from them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design and Frontend Output
&lt;/h3&gt;

&lt;p&gt;Multiple customers who tested 4.6 independently described its visual outputs as "notably more polished" with better layouts, animations, and design sensibility.&lt;/p&gt;




&lt;h2&gt;
  
  
  Side-by-Side Summary
&lt;/h2&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;Sonnet 4.5&lt;/th&gt;
&lt;th&gt;Sonnet 4.6&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SWE-bench Verified&lt;/td&gt;
&lt;td&gt;77.2%&lt;/td&gt;
&lt;td&gt;80.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;200K&lt;/td&gt;
&lt;td&gt;1M (beta)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-horizon planning&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Significantly improved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Document comprehension&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Matches Opus 4.6 on OfficeQA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frontend/design output&lt;/td&gt;
&lt;td&gt;Good&lt;/td&gt;
&lt;td&gt;Noticeably more polished&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API pricing&lt;/td&gt;
&lt;td&gt;$3 / $15 per M tokens&lt;/td&gt;
&lt;td&gt;Same&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Which Model Should You Use?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Use Sonnet 4.6 if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You're building a production coding agent or agentic workflow&lt;/li&gt;
&lt;li&gt;You need to process or reason over large documents, codebases, or research corpora&lt;/li&gt;
&lt;li&gt;You're using computer use in any production context&lt;/li&gt;
&lt;li&gt;You're building frontend generation tools or design automation&lt;/li&gt;
&lt;li&gt;You want the best available Sonnet performance at the same price point&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sonnet 4.5 may still be fine if:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You've already built and tested against it and your production system is stable&lt;/li&gt;
&lt;li&gt;You're running a constrained context window by design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For new projects: start with 4.6. For existing projects: migrate. The pricing is identical, and the capability uplift is real.&lt;/p&gt;




&lt;h2&gt;
  
  
  Using Claude with the Cosmic SDK
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun add @cosmicjs/sdk @anthropic-ai/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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;createBucketClient&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;@cosmicjs/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;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;cosmic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createBucketClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;bucketSlug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-bucket-slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;readKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-read-key&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;writeKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-write-key&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;anthropic&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="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;generateAndStoreBlogPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;topic&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;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;anthropic&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;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="s2"&gt;`Write a developer-focused blog post about: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;. Include code examples where relevant. Format in markdown.`&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;content&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;content&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="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="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="mi"&gt;0&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="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="nx"&gt;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertOne&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;blog-posts&lt;/span&gt;&lt;span class="dl"&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="nx"&gt;topic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;draft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;markdown_content&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="na"&gt;published_date&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;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;T&lt;/span&gt;&lt;span class="dl"&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="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="s2"&gt;`Draft created: &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;slug&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;object&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;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Sonnet 4.5 was an excellent model. Sonnet 4.6 is better in almost every measurable way at the same price. For new projects, default to 4.6. For existing deployments, the migration is a single string change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;Start building free on Cosmic&lt;/a&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;book a 30-minute intro with Tony&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.cosmicjs.com/blog/claude-sonnet-4-5-vs-4-6" rel="noopener noreferrer"&gt;cosmicjs.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>typescript</category>
      <category>cms</category>
    </item>
    <item>
      <title>How to Add a Cosmic AI Agent to Your Codebase: Website Chat with Full Content Context</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Thu, 28 May 2026 19:11:17 +0000</pubDate>
      <link>https://dev.to/tonyspiro/how-to-add-a-cosmic-ai-agent-to-your-codebase-website-chat-with-full-content-context-1hf</link>
      <guid>https://dev.to/tonyspiro/how-to-add-a-cosmic-ai-agent-to-your-codebase-website-chat-with-full-content-context-1hf</guid>
      <description>&lt;p&gt;Most chat widgets on the web are disconnected from the product they sit on. They answer from a generic LLM with no knowledge of your actual content, pricing, or documentation. The result: hallucinated answers, frustrated users, and support tickets that never needed to exist.&lt;/p&gt;

&lt;p&gt;Cosmic AI agents solve this at the infrastructure level. Because your agent lives inside your Cosmic project, it has direct read access to every object in your bucket: blog posts, docs, FAQs, product pages, and any other content type you define. No external vector database. No separate embedding pipeline. No syncing.&lt;/p&gt;

&lt;p&gt;This tutorial walks through the anchor use case: building a website chat agent that answers visitor questions using your real CMS content, exposed via the Cosmic REST API and JavaScript/TypeScript SDK.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We're Building
&lt;/h2&gt;

&lt;p&gt;A Team Agent configured with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CMS Read access to your content bucket&lt;/li&gt;
&lt;li&gt;A REST API channel so your frontend can send messages and stream responses&lt;/li&gt;
&lt;li&gt;A persona prompt that keeps answers grounded in your actual content&lt;/li&gt;
&lt;li&gt;A streaming chat widget built in Next.js using the &lt;code&gt;@cosmicjs/sdk&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end, visitors on your site can ask "What is your refund policy?" or "How do I set up webhooks?" and get accurate, sourced answers pulled from your real CMS objects.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Create the Team Agent
&lt;/h2&gt;

&lt;p&gt;In your Cosmic project dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Team Agents&lt;/strong&gt; in the project sidebar&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Team Agent&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Give it a name (e.g. "Site Assistant")&lt;/li&gt;
&lt;li&gt;Set the persona prompt (see below)&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Channels&lt;/strong&gt;, enable &lt;strong&gt;REST API&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Capabilities&lt;/strong&gt;, enable &lt;strong&gt;CMS Read&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Save the agent&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Persona prompt example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a helpful assistant for [Your Company]. You answer questions using the content in our CMS bucket: documentation, blog posts, FAQs, and product pages.

Rules:
- Only answer based on content you can find in the CMS. If you cannot find a relevant answer, say so honestly and suggest the user contact support.
- Keep answers concise and accurate. Quote directly from CMS content when helpful.
- Never fabricate pricing, feature availability, or technical details.
- If asked about something outside your knowledge base, direct the user to the relevant docs page or contact form.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After saving, copy the &lt;strong&gt;Agent ID&lt;/strong&gt; from the agent detail page. You will need it for the API calls.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Get a Personal Access Token
&lt;/h2&gt;

&lt;p&gt;All REST API calls to your agent require a Personal Access Token.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Account Settings &amp;gt; API Tokens&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Token&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Give it a descriptive name (e.g. "Site Chat Widget")&lt;/li&gt;
&lt;li&gt;Copy the token. You will only see it once.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Store it as an environment variable in your project:&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="nv"&gt;COSMIC_AGENT_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;cos_your_token_here
&lt;span class="nv"&gt;COSMIC_AGENT_ID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your_agent_id_here
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 3: Create a Next.js API Route
&lt;/h2&gt;

&lt;p&gt;Never expose your Personal Access Token to the browser. Instead, create a server-side API route that proxies messages to the Cosmic agent.&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;// app/api/chat/route.ts&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;NextRequest&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;next/server&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;AGENT_ID&lt;/span&gt; &lt;span class="o"&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;COSMIC_AGENT_ID&lt;/span&gt;&lt;span class="o"&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;AGENT_TOKEN&lt;/span&gt; &lt;span class="o"&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;COSMIC_AGENT_TOKEN&lt;/span&gt;&lt;span class="o"&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;NextRequest&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;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;conversation_id&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;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;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;`https://dapi.cosmicjs.com/v3/ai/agents/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;AGENT_ID&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;headers&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;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Bearer &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;AGENT_TOKEN&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&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;Content-Type&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;application/json&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;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="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;conversation_id&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="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="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&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="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;headers&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;Content-Type&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;text/event-stream&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;Cache-Control&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;no-cache&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;Connection&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;keep-alive&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 4: Build the Chat Widget Component
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// components/ChatWidget.tsx&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;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&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;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;Message&lt;/span&gt; &lt;span class="o"&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="o"&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="nl"&gt;content&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ChatWidget&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;setMessages&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Message&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="kd"&gt;const&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;setInput&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&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;isLoading&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsLoading&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&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;conversationId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setConversationId&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&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;bottomRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;HTMLDivElement&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&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;bottomRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nf"&gt;scrollIntoView&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;behavior&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;smooth&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="nx"&gt;messages&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;sendMessage&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="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;isLoading&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;userMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;setInput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;setIsLoading&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="nf"&gt;setMessages&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prev&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;prev&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;userMessage&lt;/span&gt; &lt;span class="p"&gt;}]);&lt;/span&gt;
    &lt;span class="nf"&gt;setMessages&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prev&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;prev&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;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="dl"&gt;''&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&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;fetch&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="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;headers&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;Content-Type&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;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;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;conversation_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;conversationId&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;reader&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;res&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="nf"&gt;getReader&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;decoder&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;TextDecoder&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;fullText&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="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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&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;reader&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&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;done&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;chunk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;decoder&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;value&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;lines&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="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&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;line&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;lines&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="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;data: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;continue&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;data&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;line&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&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;data&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;info&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;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;conversation_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nf"&gt;setConversationId&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;conversation_id&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;data&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;fullText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fullText&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="nf"&gt;setMessages&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;prev&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="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;prev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&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="mi"&gt;1&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;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;fullText&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="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;err&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Chat error:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;setIsLoading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&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;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;chat-widget&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;messages&lt;/span&gt;&lt;span class="dl"&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;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`message &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;role&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&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;msg&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="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;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="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;bottomRef&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input-row&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;
          &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&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;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setInput&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
          &lt;span class="nx"&gt;onKeyDown&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;e&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;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Enter&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="nf"&gt;sendMessage&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;
          &lt;span class="nx"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Ask anything...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="nx"&gt;disabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;sendMessage&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;disabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;isLoading&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;isLoading&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...&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;Send&lt;/span&gt;&lt;span class="dl"&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="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;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;h2&gt;
  
  
  Step 5: Read Your CMS Content with the SDK
&lt;/h2&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;createBucketClient&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;@cosmicjs/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;cosmic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createBucketClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;bucketSlug&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;COSMIC_BUCKET_SLUG&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;readKey&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;COSMIC_READ_KEY&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;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;getFAQs&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;objects&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;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&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="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;faqs&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="nf"&gt;props&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;metadata.answer&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="nf"&gt;limit&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;objects&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;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;Start building free&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cosmicjs.com/docs/dashboard/ai/agents" rel="noopener noreferrer"&gt;Read the full agent docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;Talk to Tony about your use case&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.cosmicjs.com/blog/cosmic-ai-agent-website-chat-knowledge-base" rel="noopener noreferrer"&gt;cosmicjs.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cms</category>
      <category>ai</category>
      <category>nextjs</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Claude Opus 4.8 Is Out: What It Means for AI-Native Development Teams</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Thu, 28 May 2026 18:52:38 +0000</pubDate>
      <link>https://dev.to/tonyspiro/claude-opus-48-is-out-what-it-means-for-ai-native-development-teams-3j8h</link>
      <guid>https://dev.to/tonyspiro/claude-opus-48-is-out-what-it-means-for-ai-native-development-teams-3j8h</guid>
      <description>&lt;p&gt;Anthropic shipped Claude Opus 4.8 today, May 28, 2026. If you are building agentic systems, coding assistants, or any product that relies on an AI model to take sustained, multi-step actions in the real world, this release deserves your attention.&lt;/p&gt;

&lt;p&gt;Opus 4.8 is not a full generational leap. Anthropic frames it as "a modest but tangible improvement" on its predecessor. But in agentic contexts, where reliability compounds across dozens of sequential steps, even incremental gains in judgment, honesty, and tool-calling precision translate into meaningfully better products.&lt;/p&gt;

&lt;p&gt;Here is what shipped today and why it matters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Opus 4.8 Benchmark Breakdown
&lt;/h2&gt;

&lt;p&gt;Anthropic published benchmark results across five categories that matter most for professional and agentic workloads:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Benchmark&lt;/th&gt;
&lt;th&gt;Claude Opus 4.8&lt;/th&gt;
&lt;th&gt;Claude Opus 4.7&lt;/th&gt;
&lt;th&gt;GPT-5.5&lt;/th&gt;
&lt;th&gt;Gemini 3.1 Pro&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SWE-Bench Pro (agentic coding)&lt;/td&gt;
&lt;td&gt;69.2%&lt;/td&gt;
&lt;td&gt;64.3%&lt;/td&gt;
&lt;td&gt;58.6%&lt;/td&gt;
&lt;td&gt;54.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Terminal-Bench 2.1 (terminal coding)&lt;/td&gt;
&lt;td&gt;74.6%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;78.2%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Humanity's Last Exam (reasoning, with tools)&lt;/td&gt;
&lt;td&gt;57.9%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OSWorld-Verified (computer use)&lt;/td&gt;
&lt;td&gt;83.4%&lt;/td&gt;
&lt;td&gt;82.3%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GDPval-AA (knowledge work)&lt;/td&gt;
&lt;td&gt;1890&lt;/td&gt;
&lt;td&gt;1753&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Finance Agent v2&lt;/td&gt;
&lt;td&gt;53.9%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ilef4vnxdg8r9c9s876.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6ilef4vnxdg8r9c9s876.png" alt="Claude Opus 4.8 Benchmarks" width="799" height="428"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source: Anthropic, May 28, 2026&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A few important notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agentic coding (SWE-Bench Pro):&lt;/strong&gt; Opus 4.8 leads all tested models at 69.2%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal coding (Terminal-Bench 2.1):&lt;/strong&gt; GPT-5.5 leads here at 78.2%. Opus 4.8 scores 74.6%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computer use (OSWorld-Verified):&lt;/strong&gt; 83.4% puts Opus 4.8 at the top of this category.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning:&lt;/strong&gt; 57.9% with tools. Best across all four tested models.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What's New Beyond the Benchmarks
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Honesty as a Feature
&lt;/h3&gt;

&lt;p&gt;Opus 4.8 is approximately 4x less likely than Opus 4.7 to let flaws in its own code pass without flagging them. Early testers describe the model as more likely to push back when a plan is not sound, and more likely to ask clarifying questions before making irreversible changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Effort Control
&lt;/h3&gt;

&lt;p&gt;Opus 4.8 introduces effort levels: default (high), extra, and max. Higher effort means more thinking time and better results on difficult tasks. For long-running async workflows, Anthropic recommends the "extra" setting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fast Mode: 2.5x Speed, Now 3x Cheaper
&lt;/h3&gt;

&lt;p&gt;Fast mode for Opus 4.8 runs at 2.5x the speed of regular mode. Fast mode is now priced at $10 per million input tokens and $50 per million output tokens, which is 3x cheaper than fast mode was for prior Opus models.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dynamic Workflows in Claude Code
&lt;/h2&gt;

&lt;p&gt;Shipping alongside Opus 4.8 is Dynamic Workflows, available in research preview for Max, Team, and Enterprise plan users.&lt;/p&gt;

&lt;p&gt;Instead of a single agent working sequentially, Claude Code can now plan work upfront and spin up tens to hundreds of parallel subagents within a single session. Jarred Sumner, creator of Bun, used Dynamic Workflows to rewrite Bun from Zig to Rust: 750,000 lines of Rust, 99.8% of the test suite passing, shipped in 11 days.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Cosmic Uses Opus 4.8
&lt;/h2&gt;

&lt;p&gt;Cosmic now uses Claude Opus 4.8 as the recommended model for high-reasoning content and code operations. Cosmic's AI Agents across Content, Code, Computer Use, and Team types are all powered by Claude models.&lt;/p&gt;

&lt;p&gt;Cosmic also ships an MCP Server that connects directly to Claude Code and Cursor. Opus 4.8's improved tool-calling efficiency makes this integration noticeably more responsive in practice.&lt;/p&gt;

&lt;p&gt;If you are building on Claude Opus 4.8 and need a content layer that keeps up, &lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;start free on Cosmic&lt;/a&gt; or &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;book a quick intro&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sources: &lt;a href="https://www.anthropic.com/news/claude-opus-4-8" rel="noopener noreferrer"&gt;Introducing Claude Opus 4.8&lt;/a&gt;, &lt;a href="https://claude.com/blog/introducing-dynamic-workflows-in-claude-code" rel="noopener noreferrer"&gt;Dynamic Workflows in Claude Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claudecode</category>
      <category>cms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The CMS Stack YC Companies Use in 2026</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Thu, 28 May 2026 14:46:18 +0000</pubDate>
      <link>https://dev.to/tonyspiro/the-cms-stack-yc-companies-use-in-2026-2d3c</link>
      <guid>https://dev.to/tonyspiro/the-cms-stack-yc-companies-use-in-2026-2d3c</guid>
      <description>&lt;p&gt;If you're building a YC-backed product in 2026, your CMS choice matters more than it did three years ago. The tools that worked in 2021 weren't built for AI-native teams, agentic workflows, or the kind of autonomous content pipelines that fast-moving startups now depend on.&lt;/p&gt;

&lt;p&gt;This is the CMS stack a growing number of YC companies are running today, and why Cosmic has become the default choice for teams that want to move fast without building and maintaining their own content infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why the CMS Decision Matters More in 2026
&lt;/h2&gt;

&lt;p&gt;Most early-stage teams default to one of three options: build a bespoke CMS, use a legacy platform like WordPress, or reach for a headless CMS and wire it up manually.&lt;/p&gt;

&lt;p&gt;All three have the same failure mode: they become bottlenecks. Content teams file tickets. Engineers get pulled into backend changes. Product velocity slows.&lt;/p&gt;

&lt;p&gt;The shift in 2026 is that the best teams aren't just picking a CMS for content storage. They're picking a CMS that can act autonomously, integrate with their AI tooling, and grow with their stack.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Cosmic Is
&lt;/h2&gt;

&lt;p&gt;Cosmic is an AI-powered headless CMS. It ships content infrastructure (REST API, TypeScript SDK, CLI, MCP Server) alongside AI Agents that live in Slack, WhatsApp, and Telegram, writing content, building features, fixing bugs, and deploying full-stack apps autonomously.&lt;/p&gt;

&lt;p&gt;No other CMS can deploy full-stack applications.&lt;/p&gt;

&lt;p&gt;Cosmic is YC W19. The team has been building for this moment for years.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Core Stack
&lt;/h2&gt;

&lt;h3&gt;
  
  
  REST API with Sub-100ms Response Times
&lt;/h3&gt;

&lt;p&gt;Cosmic's REST API is fast by default. Sub-100ms response times mean your frontend never waits on content. Works with any framework: Next.js, React, Vue, Nuxt, Astro, Remix, Svelte, Gatsby.&lt;/p&gt;

&lt;h3&gt;
  
  
  TypeScript SDK
&lt;/h3&gt;

&lt;p&gt;Fully typed. Works in Node.js and the browser. The same SDK your AI agents use is the one your developers use.&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;createBucketClient&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;@cosmicjs/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;cosmic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createBucketClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;bucketSlug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-bucket-slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;readKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-read-key&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;objects&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;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&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="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;blog-posts&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="nf"&gt;props&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;id,title,slug,metadata&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="nf"&gt;limit&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MCP Server
&lt;/h3&gt;

&lt;p&gt;Cosmic ships a native MCP Server. Connect it to Cursor, Claude Code, or GitHub Copilot in under 5 minutes. Your AI coding agent can then read, create, and update content objects directly without leaving the IDE.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cosmic"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.cosmicjs.com/v1/buckets/your-bucket-slug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bearer your-read-key:your-write-key"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  CLI
&lt;/h3&gt;

&lt;p&gt;Scaffold projects, manage content models, and push changes from the terminal. Works great in CI/CD pipelines.&lt;/p&gt;




&lt;h2&gt;
  
  
  AI Agents: The 2026 Differentiator
&lt;/h2&gt;

&lt;p&gt;This is where Cosmic separates from every other headless CMS on the market.&lt;/p&gt;

&lt;p&gt;Cosmic's AI Agents are persistent, autonomous team members that live in your existing communication stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Slack&lt;/strong&gt; — trigger content updates, deployments, and bug fixes with a message&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WhatsApp&lt;/strong&gt; — mobile-first content workflows for distributed teams&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Telegram&lt;/strong&gt; — lightweight, fast, no friction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The agents aren't chatbots. They're autonomous operators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content Agents&lt;/strong&gt; write, edit, and publish blog posts, landing pages, and product copy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Agents&lt;/strong&gt; build features, fix bugs, and commit to GitHub&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computer Use Agents&lt;/strong&gt; navigate browsers, fill forms, and run visual QA&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team Agents&lt;/strong&gt; coordinate between agents and humans&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Agentic Workflows
&lt;/h3&gt;

&lt;p&gt;Agentic Workflows let you chain Content, Code, and Computer Use agents together on a schedule or via webhook. For a fast-moving YC company, that means entire content pipelines, feature builds, and deployment cycles running autonomously while your team focuses on what matters.&lt;/p&gt;

&lt;p&gt;Example: a webhook fires when a competitor changes pricing. A Content Agent drafts a response blog post. A Code Agent commits updated comparison page copy. A Computer Use Agent verifies the live page looks correct. All without a human in the loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Full-Stack App Deployment
&lt;/h3&gt;

&lt;p&gt;Cosmic is the only CMS that can deploy full-stack applications autonomously. AI agents don't just manage content, they can build features, fix bugs, and ship entire apps to production without a developer in the loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cosmic Insights
&lt;/h3&gt;

&lt;p&gt;Cosmic Insights is built-in cookieless analytics that connects pageviews, sessions, and revenue directly to the CMS objects that drove them. Instead of guessing what content is working, you get a data-driven feedback loop. Your AI agents can read live performance data and propose what to write, optimize, or retire next. A closed loop no other CMS offers.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Teams Say
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"Cosmic is: us never having to ask a developer to change anything on the backend of our website."&lt;/p&gt;

&lt;p&gt;Maximilian Wuhr, Co-Founder at FINN&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Infrastructure You Can Rely On
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;99.9% uptime SLA&lt;/li&gt;
&lt;li&gt;50M+ API requests per month&lt;/li&gt;
&lt;li&gt;150+ countries&lt;/li&gt;
&lt;li&gt;256-bit SSL&lt;/li&gt;
&lt;li&gt;imgix CDN for media&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Free&lt;/strong&gt;: forever free, no credit card required, 2 team members&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Builder&lt;/strong&gt;: $49/month, 3 team members&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team&lt;/strong&gt;: $299/month, 5 team members&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Business&lt;/strong&gt;: $499/month, 10 team members&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise&lt;/strong&gt;: custom&lt;/li&gt;
&lt;li&gt;Additional users: $29/user/month&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Feature add-ons: Webhooks, Localization, Revision History, Automatic Backups ($99/month each or $199/month bundle).&lt;/p&gt;




&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;Sign up free at &lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;cosmicjs.com&lt;/a&gt;. No credit card required. Full MCP access on the free plan.&lt;/p&gt;

&lt;p&gt;Want a walkthrough? &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;Book an intro with Tony&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Cosmic is a YC W19-backed AI-powered headless CMS. Used by teams in 150+ countries.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cms</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>What is an MCP Server? (And Why Developers Are Adopting It Fast)</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Thu, 28 May 2026 03:17:33 +0000</pubDate>
      <link>https://dev.to/tonyspiro/what-is-an-mcp-server-and-why-developers-are-adopting-it-fast-8dh</link>
      <guid>https://dev.to/tonyspiro/what-is-an-mcp-server-and-why-developers-are-adopting-it-fast-8dh</guid>
      <description>&lt;p&gt;If you've spent any time building with AI agents in the last six months, you've probably seen "MCP" come up in Discord threads, GitHub issues, and Cursor release notes. Search volume for "mcp server" has crossed 60,000 monthly queries and is still climbing. So what exactly is an MCP server, and why is it suddenly everywhere?&lt;/p&gt;

&lt;p&gt;This guide answers that question clearly and practically, including how Cosmic's native MCP Server fits into the picture for developers building AI-native applications.&lt;/p&gt;




&lt;h2&gt;
  
  
  What is an MCP Server?
&lt;/h2&gt;

&lt;p&gt;MCP stands for &lt;strong&gt;Model Context Protocol&lt;/strong&gt;. An MCP server is a lightweight service that exposes tools, resources, and prompts to AI agents in a standardized way.&lt;/p&gt;

&lt;p&gt;Think of it like this: your AI agent (Claude, Codex, a custom GPT, etc.) needs to interact with external systems, read files, call APIs, or query databases. Without a standard, every tool integration requires custom glue code. MCP solves that by defining a common interface that any AI client can speak.&lt;/p&gt;

&lt;p&gt;At its core, an MCP server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exposes tools&lt;/strong&gt; that an AI agent can call (e.g., "fetch this content object", "create a new page", "search posts by tag")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provides resources&lt;/strong&gt; that give the agent context (e.g., a knowledge base, a list of available content types)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accepts prompt templates&lt;/strong&gt; that shape how the agent reasons about the data it receives&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The protocol was introduced by Anthropic and has since been adopted broadly across the developer ecosystem. It operates over standard transports (HTTP/SSE or stdio), which means any language or framework can implement it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why MCP is Surging Right Now
&lt;/h2&gt;

&lt;p&gt;Three things converged in the last 12 months to push MCP from niche spec to mainstream standard.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Agentic IDEs need a universal tool layer
&lt;/h3&gt;

&lt;p&gt;Cursor, Claude Code, and Codex are no longer just autocomplete tools. They're full autonomous coding agents that run multi-step tasks: reading files, editing code, running tests, and committing changes. For these agents to act on &lt;em&gt;your&lt;/em&gt; data, they need a way to reach it. MCP servers provide exactly that hook.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Claude's native MCP support changed the calculus
&lt;/h3&gt;

&lt;p&gt;When Anthropic built MCP support directly into Claude Desktop and the Claude API, adoption exploded. Developers who had been wiring up custom tool definitions switched to MCP because it's portable: build the server once, connect any compatible client.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The "skills" model is winning
&lt;/h3&gt;

&lt;p&gt;Early agentic tooling asked developers to describe every tool in a flat JSON schema. MCP introduces the concept of &lt;strong&gt;skills&lt;/strong&gt;: discrete, composable units of capability that agents can discover and invoke dynamically. This is a much better mental model for building production-grade agentic workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Can You Actually Do With an MCP Server?
&lt;/h2&gt;

&lt;p&gt;MCP servers unlock a specific class of use cases that were previously annoying to build:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content management via AI agents&lt;/strong&gt;&lt;br&gt;
An agent can read, create, and update structured content without a human opening a CMS dashboard. Marketing teams can say "publish the Q3 campaign brief as a blog post" in Slack, and an AI agent handles the rest.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autonomous development workflows&lt;/strong&gt;&lt;br&gt;
Cursor or Claude Code can pull context from your content model, generate code that correctly maps to your data schema, and push changes, all without leaving the IDE.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-platform content syndication&lt;/strong&gt;&lt;br&gt;
An agent connected to an MCP server can read a content object from your CMS and push it to multiple distribution channels: Slack, WhatsApp, Telegram, a newsletter API, whatever you wire up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic Q&amp;amp;A and search&lt;/strong&gt;&lt;br&gt;
Give an AI assistant access to your knowledge base via MCP and it can answer questions grounded in real content, with citations, without hallucinating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated content pipelines&lt;/strong&gt;&lt;br&gt;
Scheduled agents can monitor content status, trigger workflows when objects move from draft to published, or auto-generate metadata like SEO descriptions and alt text.&lt;/p&gt;


&lt;h2&gt;
  
  
  How Cosmic's MCP Server Works
&lt;/h2&gt;

&lt;p&gt;Cosmic ships a &lt;strong&gt;native MCP Server&lt;/strong&gt; as a first-class feature. This isn't a third-party plugin or a community experiment; it's built and maintained by the Cosmic team.&lt;/p&gt;

&lt;p&gt;There are two ways to connect: a hosted endpoint (recommended) and a self-hosted stdio option.&lt;/p&gt;
&lt;h3&gt;
  
  
  Hosted MCP (Recommended)
&lt;/h3&gt;

&lt;p&gt;The hosted endpoint is the fastest way to connect Cosmic to any AI assistant. No install required:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;https://mcp.cosmicjs.com/v1/buckets/{your-bucket-slug}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Authentication uses your bucket keys in the &lt;code&gt;Authorization&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Desktop config:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cosmic"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.cosmicjs.com/v1/buckets/your-bucket-slug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bearer your-read-key:your-write-key"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Cursor config&lt;/strong&gt; (&lt;code&gt;.cursor/mcp.json&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cosmic"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://mcp.cosmicjs.com/v1/buckets/your-bucket-slug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Bearer your-read-key:your-write-key"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Self-Hosted (stdio)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @cosmicjs/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The 18 Tools Cosmic's MCP Server Exposes
&lt;/h2&gt;

&lt;p&gt;Once connected, your AI assistant has access to 18 tools across four categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Objects (5 tools):&lt;/strong&gt; list, get, create, update, delete content objects&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Media (4 tools):&lt;/strong&gt; list, get, upload, delete media files&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object Types (5 tools):&lt;/strong&gt; list, get, create, update, delete content models&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Generation (4 tools):&lt;/strong&gt; generate text, images, video, and audio&lt;/p&gt;




&lt;h2&gt;
  
  
  MCP Server vs. Agent Skills: What's the Difference?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP Server&lt;/strong&gt; — Direct content management. Use case: "List my blog posts." The AI calls tools to interact with your bucket.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Skills&lt;/strong&gt; — Code generation guidance. Use case: "Build a blog with Cosmic." The AI writes code using the SDK.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use both together for the best experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  TypeScript SDK
&lt;/h2&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;createBucketClient&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;@cosmicjs/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;cosmic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createBucketClient&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;bucketSlug&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-bucket-slug&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;readKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-read-key&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;writeKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;your-write-key&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;// Fetch content objects&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;objects&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;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&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="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;blog-posts&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="nf"&gt;props&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;id,title,slug,metadata&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="nf"&gt;limit&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;// Create a new draft&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="nx"&gt;cosmic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertOne&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;blog-posts&lt;/span&gt;&lt;span class="dl"&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="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My AI-generated post&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;draft&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="p"&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;Generated by an autonomous agent...&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why Cosmic for MCP-Powered Workflows?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hosted MCP endpoint: connect any client in under 5 minutes&lt;/li&gt;
&lt;li&gt;18 built-in tools across objects, media, schemas, and AI generation&lt;/li&gt;
&lt;li&gt;REST API with sub-100ms response times&lt;/li&gt;
&lt;li&gt;TypeScript SDK with full type safety&lt;/li&gt;
&lt;li&gt;Team agents that live in Slack, WhatsApp, and Telegram&lt;/li&gt;
&lt;li&gt;Free tier includes full MCP access, no credit card required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;Sign up free →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Want a walkthrough for your specific stack? &lt;strong&gt;&lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;Book a quick intro with Tony →&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://www.cosmicjs.com/blog/what-is-an-mcp-server" rel="noopener noreferrer"&gt;cosmicjs.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>javascript</category>
      <category>ai</category>
      <category>cms</category>
    </item>
    <item>
      <title>How to Make Your Product Agent-Callable: What We Learned Building Agent Signup</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Wed, 27 May 2026 18:53:09 +0000</pubDate>
      <link>https://dev.to/tonyspiro/how-to-make-your-product-agent-callable-what-we-learned-building-agent-signup-5ffh</link>
      <guid>https://dev.to/tonyspiro/how-to-make-your-product-agent-callable-what-we-learned-building-agent-signup-5ffh</guid>
      <description>&lt;p&gt;Nobody handed us a playbook for this. We built one by accident.&lt;/p&gt;

&lt;p&gt;When we started thinking about how AI assistants would interact with Cosmic, we weren't thinking about distribution. We were thinking about developer experience: how do you get a coding assistant up and running with a live CMS bucket without making the human stop everything and copy-paste keys from a dashboard?&lt;/p&gt;

&lt;p&gt;The answer we landed on turned out to be something bigger than a UX improvement. It's a new acquisition channel. And almost nobody is building for it yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shift: AI Assistants Are the New Discovery Layer
&lt;/h2&gt;

&lt;p&gt;For the past decade, distribution meant SEO, app stores, and word of mouth. A potential user would Google their problem, land on your site, read your docs, and decide whether to sign up. The human was always the one initiating.&lt;/p&gt;

&lt;p&gt;That model is breaking.&lt;/p&gt;

&lt;p&gt;When a developer opens Cursor or Claude Code and says "build me a blog with a headless CMS," the AI assistant makes recommendations. It picks tools. It writes the integration code. And then, increasingly, it tries to provision the infrastructure on the user's behalf.&lt;/p&gt;

&lt;p&gt;If your product isn't callable by an AI agent, you're not in that consideration set. It doesn't matter how good your SEO is. The agent never sees your pricing page.&lt;/p&gt;

&lt;p&gt;This is the shift: the discovery layer is moving from search engines to AI assistants, and the API surface your product exposes to those assistants is becoming a distribution asset.&lt;/p&gt;

&lt;h2&gt;
  
  
  What "Agent-Callable" Actually Means
&lt;/h2&gt;

&lt;p&gt;There's no single standard. But from what we've built and observed, an agent-callable product has four layers:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A clean REST API with a well-documented agent-specific endpoint
&lt;/h3&gt;

&lt;p&gt;AI coding assistants know how to call REST APIs. They will read your docs, find the right endpoint, and call it. If you don't have an obvious starting point for an agent to provision or interact with your product without human intervention, you have a gap.&lt;/p&gt;

&lt;p&gt;The key design question: what's the one call an agent needs to make to get started with your product on behalf of a user?&lt;/p&gt;

&lt;h3&gt;
  
  
  2. An MCP server
&lt;/h3&gt;

&lt;p&gt;The Model Context Protocol (MCP) is becoming the standard way for AI assistants like Claude to access external tools. An MCP server exposes your product's capabilities as callable tools inside the assistant's context window.&lt;/p&gt;

&lt;p&gt;If you have a meaningful API, you can wrap it in an MCP server. We ship ours at cosmicjs.com/docs/mcp-server and also offer a self-hosted version. Users can point any MCP-compatible assistant at it and get full access to content management tools without leaving the conversation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. llms.txt and llms-full.txt
&lt;/h3&gt;

&lt;p&gt;This is the low-effort, high-leverage move most teams haven't made yet. &lt;code&gt;llms.txt&lt;/code&gt; is a plain-text file that gives AI assistants a structured, markdown-friendly index of your documentation. When an LLM is trying to understand your product, it will fetch this file.&lt;/p&gt;

&lt;p&gt;We put ours at cosmicjs.com/docs/llms.txt. The first line of that file is a direct instruction to agents: start here, and here's the one-curl signup flow. That's intentional. You're writing documentation for a non-human reader, and you should treat it that way.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. robots.txt allowlist for AI crawlers
&lt;/h3&gt;

&lt;p&gt;If you're not explicitly allowing GPTBot, ClaudeBot, PerplexityBot, and similar crawlers in your &lt;code&gt;robots.txt&lt;/code&gt;, you may be blocking the tools that would otherwise recommend you. Check your config. Most teams have rules that are broader than they intended.&lt;/p&gt;

&lt;p&gt;None of these are exotic. They're all table stakes if you want to be part of the agentic web.&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Built: Agent Signup
&lt;/h2&gt;

&lt;p&gt;The concrete problem we were solving: a coding assistant trying to use Cosmic on a user's behalf had to stop the flow, tell the user to go create an account, copy three API keys out of the dashboard, and paste them back into the conversation. A lot of users never made it through that.&lt;/p&gt;

&lt;p&gt;So we built &lt;a href="https://cosmicjs.com/changelog/agent-signup-ai-agents-can-now-provision-cosmic-projects-for-anyone" rel="noopener noreferrer"&gt;Agent Signup&lt;/a&gt;: a single API endpoint that lets an AI agent provision a Cosmic project on behalf of any user, before that user even has an account.&lt;/p&gt;

&lt;p&gt;The flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The agent calls the endpoint with the user's email.&lt;/li&gt;
&lt;li&gt;Cosmic creates a project and bucket, returns API keys the agent can use immediately.&lt;/li&gt;
&lt;li&gt;The user gets an email with a 6-digit OTP.&lt;/li&gt;
&lt;li&gt;They paste it back to the agent (or click a claim link).&lt;/li&gt;
&lt;li&gt;The bucket graduates to full free-tier access.&lt;/li&gt;
&lt;li&gt;The agent keeps building. The human never leaves the conversation.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The project auto-deletes after 14 days if unclaimed, keeping the system clean.&lt;/p&gt;

&lt;p&gt;We also exposed the same flow as MCP tools on the hosted MCP server, so any MCP-compatible assistant can trigger it without any installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Consideration Set Problem
&lt;/h2&gt;

&lt;p&gt;Building the infrastructure is necessary but not sufficient. You also have to get into the consideration set.&lt;/p&gt;

&lt;p&gt;When a user tells an AI assistant "I need a headless CMS for my Next.js app," the assistant makes a recommendation based on what the model was trained on: docs, blog posts, GitHub repos, forum discussions, Stack Overflow answers. It's not real-time search. It's accumulated pattern matching.&lt;/p&gt;

&lt;p&gt;That means the content you've published over the last few years matters more than you think. Traditional content marketing is, accidentally, agent optimization.&lt;/p&gt;

&lt;p&gt;But there are things you can do specifically for the agentic context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write docs for agents, not just humans. Use &lt;code&gt;llms.txt&lt;/code&gt; to give agents a fast path to the right information.&lt;/li&gt;
&lt;li&gt;Make your first API call obvious. The simpler the "getting started" story, the more likely an agent is to successfully complete it.&lt;/li&gt;
&lt;li&gt;Get into the training data. Published tutorials, GitHub repos, real-world usage patterns.&lt;/li&gt;
&lt;li&gt;Ship an MCP server. MCP is still early, but adoption is accelerating.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What We Still Don't Know
&lt;/h2&gt;

&lt;p&gt;We don't know what percentage of our new signups are coming from agent-initiated flows versus traditional search. Our attribution model wasn't built for this.&lt;/p&gt;

&lt;p&gt;We don't know which AI assistants are most likely to recommend Cosmic, or how much the quality of our &lt;code&gt;llms.txt&lt;/code&gt; actually influences recommendations versus raw training data volume.&lt;/p&gt;

&lt;p&gt;We don't know how quickly MCP will become a universal standard versus one of several competing protocols.&lt;/p&gt;

&lt;p&gt;There's a real first-mover window right now for teams willing to invest in the infrastructure. If you're building something in this space, I'd genuinely like to compare notes.&lt;/p&gt;

&lt;p&gt;If you want to see what agent-callable infrastructure looks like in practice, the &lt;a href="https://www.cosmicjs.com/docs/agent-skills" rel="noopener noreferrer"&gt;Cosmic Agent Skills docs&lt;/a&gt; walk through the full signup flow. The &lt;a href="https://www.cosmicjs.com/docs/mcp-server" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; is live and usable today.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cms</category>
      <category>api</category>
      <category>agents</category>
    </item>
    <item>
      <title>AI Agent vs Chatbot: What's the Real Difference?</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Wed, 27 May 2026 15:26:49 +0000</pubDate>
      <link>https://dev.to/tonyspiro/ai-agent-vs-chatbot-whats-the-real-difference-5113</link>
      <guid>https://dev.to/tonyspiro/ai-agent-vs-chatbot-whats-the-real-difference-5113</guid>
      <description>&lt;p&gt;Most tools marketed as "AI agents" in 2026 are not actually agents. They are chatbots with a nicer interface. The distinction matters, because the two things do fundamentally different work — and if you are evaluating AI tools for your team or your product, confusing the two is an expensive mistake.&lt;/p&gt;

&lt;p&gt;This article breaks down the real difference, explains where the line is, and shows what a genuine AI agent looks like in practice using Cosmic as a concrete example.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Chatbot?
&lt;/h2&gt;

&lt;p&gt;A chatbot responds to input. You send a message, it sends one back. The loop ends there. Modern LLM-powered chatbots (ChatGPT, Claude.ai, Gemini) are far more capable than the rule-based bots of five years ago, but the fundamental shape is the same: you prompt, it responds, nothing changes in the world unless you manually act on the output.&lt;/p&gt;

&lt;p&gt;Chatbots are excellent for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Answering questions&lt;/li&gt;
&lt;li&gt;Drafting text you will review and send yourself&lt;/li&gt;
&lt;li&gt;Explaining concepts&lt;/li&gt;
&lt;li&gt;Summarizing documents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What they do not do: take action, persist state across sessions, call external systems, or complete multi-step tasks without you driving every step.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Copilot?
&lt;/h2&gt;

&lt;p&gt;Between a chatbot and a full agent sits the copilot. A copilot can take limited actions inside a defined surface — typically a single tool or application. GitHub Copilot writes code inside your editor. These are copilots: they accelerate a human doing a specific task inside one environment.&lt;/p&gt;

&lt;p&gt;Copilots are useful. They are not agents. They wait for you. They do not initiate, plan across tools, or execute multi-step workflows on their own.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is an AI Agent?
&lt;/h2&gt;

&lt;p&gt;An agent does work. Without you driving every step.&lt;/p&gt;

&lt;p&gt;The distinguishing characteristics of a real AI agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It takes action in external systems — not just generates text, but writes to a database, publishes a post, opens a browser, sends a message, calls an API&lt;/li&gt;
&lt;li&gt;It plans across multiple steps — given a goal, it breaks the work into steps and executes them in sequence&lt;/li&gt;
&lt;li&gt;It can run on a schedule or in response to events — not just when you prompt it&lt;/li&gt;
&lt;li&gt;It has memory and context — it knows what it did before and can build on prior work&lt;/li&gt;
&lt;li&gt;It can use tools — search, code execution, browser control, CMS read/write&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The simplest test: if it can only tell you something, it is a chatbot. If it can do something without you clicking the next button, it is an agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Same Scenario, Two Ways
&lt;/h2&gt;

&lt;p&gt;Suppose you want a weekly competitive analysis posted to your team's Slack channel every Monday.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With a chatbot:&lt;/strong&gt; You open the chat interface, paste in competitor URLs, ask for analysis, copy the output, format it, paste it into Slack yourself. Repeat every Monday.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With an agent:&lt;/strong&gt; You configure it once: "Every Monday at 8:30am, fetch these competitor blogs, identify new posts from the last 7 days, flag keyword opportunities, post a formatted summary to #content-team in Slack." It runs. Every Monday. Without you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Most "AI Agents" Are Still Chatbots
&lt;/h2&gt;

&lt;p&gt;A few architectural reasons why something labeled an agent may still behave like a chatbot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No persistent state: it forgets context between sessions&lt;/li&gt;
&lt;li&gt;No tool use: it generates text about what it would do, but cannot actually call external APIs&lt;/li&gt;
&lt;li&gt;No autonomous triggering: it only runs when you explicitly start a conversation&lt;/li&gt;
&lt;li&gt;Single-step execution: it answers your question rather than breaking a goal into sequential tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the AI requires you to copy its output and paste it somewhere else to make something happen, it is a chatbot.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Real Agents Look Like: Cosmic as an Example
&lt;/h2&gt;

&lt;p&gt;Cosmic ships three agent types, each with genuinely different capabilities:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Content Agents&lt;/strong&gt; — Scheduled or event-triggered. A content agent can fetch competitor blogs on a cron schedule, write a full SEO article, generate a featured image, save a draft to the CMS, and cross-post to Dev.to with canonical URL and UTM parameters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Team Agents&lt;/strong&gt; — Live in Slack, WhatsApp, or Telegram. Persistent memory across sessions. Can receive a message, fetch analytics data, write a report, reply in the channel, and delegate tasks to other agents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Computer Use Agents&lt;/strong&gt; — Control a real browser. Can log into third-party tools, run visual audits, fill out forms, click elements, and complete tasks that require navigating a real web interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  What This Means for Your Team
&lt;/h2&gt;

&lt;p&gt;If you are evaluating AI tools, the right questions are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can it run without me prompting it?&lt;/li&gt;
&lt;li&gt;Can it write to external systems, not just generate text?&lt;/li&gt;
&lt;li&gt;Does it remember prior context?&lt;/li&gt;
&lt;li&gt;Can it handle multi-step tasks, or just single-turn responses?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the answer to most of these is no, you have a chatbot with good marketing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Cosmic AI Agents
&lt;/h2&gt;

&lt;p&gt;Cosmic's agent layer is built directly into the CMS. Content agents, team agents, and computer use agents are available on paid plans. The free plan lets you explore the platform before committing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;Start for free&lt;/a&gt; — no credit card required&lt;/p&gt;

&lt;p&gt;&lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;Book a demo&lt;/a&gt; to see the agent layer in action&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.cosmicjs.com/docs" rel="noopener noreferrer"&gt;Read the docs&lt;/a&gt; for full agent configuration reference&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cms</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How Enterprise Teams Are Replacing Contentful with an AI-Native CMS in 2026</title>
      <dc:creator>Tony Spiro</dc:creator>
      <pubDate>Tue, 26 May 2026 17:09:42 +0000</pubDate>
      <link>https://dev.to/tonyspiro/how-enterprise-teams-are-replacing-contentful-with-an-ai-native-cms-in-2026-1npj</link>
      <guid>https://dev.to/tonyspiro/how-enterprise-teams-are-replacing-contentful-with-an-ai-native-cms-in-2026-1npj</guid>
      <description>&lt;p&gt;Large global enterprises are quietly migrating away from Contentful toward AI-native headless CMS platforms. Here is what is driving the shift and what content teams need to know.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Enterprise Teams Are Re-Evaluating Contentful
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Cost at Scale Becomes Unsustainable
&lt;/h3&gt;

&lt;p&gt;Contentful's pricing model was designed for a different era. As enterprise teams grow, the per-user and per-locale costs compound quickly. Teams that started with a few editors find themselves paying significantly more year over year without a corresponding increase in value.&lt;/p&gt;

&lt;p&gt;By contrast, Cosmic's Business plan starts at $499/month and includes 10 team members, 50,000 objects, and 150,000 non-cached API requests per month. Additional users are $29/user/month. For large content organizations managing multiple brands or regions, the economics are dramatically different.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Developer Dependency Creates Operational Bottlenecks
&lt;/h3&gt;

&lt;p&gt;The core frustration for enterprise content teams is not the CMS interface. It is the dependency on engineering for every schema change, every new field, every workflow adjustment. Content teams that should be moving at editorial speed are waiting in developer queues.&lt;/p&gt;

&lt;p&gt;Cosmic was built to remove this bottleneck. Object types, metafields, and AI-powered content workflows can be configured and updated without developer involvement. The result: content teams ship faster, and developers stay focused on product.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. AI Integration Is an Afterthought, Not a Foundation
&lt;/h3&gt;

&lt;p&gt;Most legacy headless CMS platforms added AI features as a bolt-on. The architecture was not designed for it. Cosmic is different: AI agents are native to the platform. Teams can run AI content agents on a schedule, automate content workflows across channels, and build multi-step automation pipelines directly inside the CMS, no third-party integrations required.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Enterprise Content Teams Actually Need in 2026
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;IT-Approved Infrastructure&lt;/strong&gt;&lt;br&gt;
Enterprise deployments require certifiable uptime, predictable infrastructure, and documented security practices. Cosmic delivers 99.9% uptime SLA on enterprise plans, 256-bit SSL encryption in transit and at rest, and optional single sign-on (SSO).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No Developer Dependency for Content Operations&lt;/strong&gt;&lt;br&gt;
The ability for content editors to create, update, and publish without filing a ticket is no longer a nice-to-have. It is a prerequisite. Cosmic's object-based model means content teams own their schemas and their workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;API-First Architecture That Works With Any Frontend&lt;/strong&gt;&lt;br&gt;
Enterprise tech stacks are rarely monolithic. Content needs to power websites, mobile apps, internal tools, and third-party integrations simultaneously. Cosmic's REST API and TypeScript/JavaScript SDK make it straightforward to pipe content to any consumer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scale Without Surprise Bills&lt;/strong&gt;&lt;br&gt;
At 50M+ API requests/month, cost predictability matters. Cosmic's enterprise plan offers custom usage limits, overage transparency, and dedicated support.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Migration Path Is Shorter Than You Think
&lt;/h2&gt;

&lt;p&gt;One common objection to moving off Contentful is migration complexity. Enterprise content teams often have years of content, custom schemas, and embedded editorial workflows.&lt;/p&gt;

&lt;p&gt;Cosmic offers white-glove migration assistance on enterprise plans. The process typically involves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Schema mapping:&lt;/strong&gt; Translating Contentful content types to Cosmic object types (usually a 1:1 process)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content export and import:&lt;/strong&gt; Using Contentful's export tools and Cosmic's REST API to move content objects in bulk&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API endpoint updates:&lt;/strong&gt; Updating frontend calls from Contentful's delivery API to Cosmic's REST API. The TypeScript SDK makes this straightforward.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Team training:&lt;/strong&gt; Content editors typically get up to speed within a day&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For teams running on Next.js, Nuxt, Astro, or any modern framework, the frontend changes are minimal.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Real-World Perspective
&lt;/h2&gt;

&lt;p&gt;FINN, the car subscription service, made the switch to Cosmic and the result was immediate: content teams stopped waiting on developers entirely.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Cosmic is: us never having to ask a developer to change anything on the backend of our website." — Maximilian Wuhr, Co-Founder at FINN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;If your organization is evaluating headless CMS options, or if you are already on Contentful and want to model out what a migration would look like, the best next step is a direct conversation.&lt;/p&gt;

&lt;p&gt;Book a 30-minute intro call: &lt;a href="https://calendly.com/tonyspiro/cosmic-intro" rel="noopener noreferrer"&gt;https://calendly.com/tonyspiro/cosmic-intro&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or start exploring on your own: &lt;a href="https://app.cosmicjs.com/signup" rel="noopener noreferrer"&gt;https://app.cosmicjs.com/signup&lt;/a&gt;. The Free plan includes a full working bucket with no credit card required.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Cosmic is a YC W19 company. Pricing as of May 2026: Business plan at $499/month. Enterprise plans available with custom pricing, SSO, 24/7 support, and SLA guarantees.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>cms</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
