Skip to content
PluginStats

@coder/ai-sdk-agent weekly downloads statistics

By coder (5 listings) · npm · AI SDKs

A Vercel AI SDK-compliant agent backed by Coder Agents, Coder's server-side agent runtime. `new CoderAgent()` returns a real AI SDK Agent (generate/stream).

View on npm Fresh · Oct 17, 2026

@coder/ai-sdk-agent has 540 recorded weekly downloads on npm, a decrease of 76.5% over the past 30 days.

It ranks #1494 of 2,256 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -49.7%.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
540
Official API · Oct 17, 2026
7-day growth
-57.4%
-728 weekly downloads
30-day growth
-76.5%
-1.8K weekly downloads
90-day growth
-49.7%
-533 weekly downloads
Rank
#1494
Among tracked npm listings

About @coder/ai-sdk-agent

@coder/ai-sdk-agent

A Vercel AI SDK agent backed by Coder Agents, Coder's server‑side agent runtime. new CoderAgent(...) implements the AI SDK's Agent interface (generate() / stream()): script it, stream from it, and attach your own tools exactly like the SDK's own ToolLoopAgent.

Coder Agents runs the complete agent loop server‑side: the multi‑step tool loop, built‑in tools, MCP, sub‑agents, multi‑provider model routing, and automatic context compaction. This package bridges it to the AI SDK's client‑side loop without re‑implementing the loop.

Status: targets Coder's stable chat API (/api/v2/chats), available since Coder 2.37.0 (September 1, 2026). This package remains pre‑1.0. See API compatibility for older deployments.

Contents

| Get started | Build | Reference | Run in production |

| Install | Custom tools | Auth | Timeouts & cancellation | | Quick start | Files | Configuration | Handling errors | | Examples | Structured output | API compatibility | Cleanup | | Agent vs. provider | Sessions | How it works | Usage & cost | | | Rehydrating chat history | Testing | Observability | | | Watching chats | Limitations | Workspaces & quota | | | Workspace previews | | Durable workflows | | | Sources | | |

Agent vs. provider — which package?

| | @coder/ai-sdk-agent (this package) | @coder/ai-sdk-provider |

| What runs | Coder's server‑side agent: tool loop, built‑in tools, MCP servers, workspace‑scoped file/shell tools, sub‑agents, and compaction, on the deployment | Plain model calls through Coder's AI Gateway. A normal AI SDK provider: generateText, streamText, generateObject | | Server state | Each CoderAgent is one server chat ("session"), bound to at most one workspace | No chat, no workspace; natively cancelable | | Structured output | Through a tool call (Structured output) | generateObject, schema‑constrained | | Reach for it when | You need server‑side tools, MCP, or a workspace | You just need a model (plan / extract / summarize / classify) |

They compose: a multi‑step pipeline often uses the provider for its pure text/JSON steps and the Agent only for the steps that touch tools.

Install

Requires Node ≥ 22 and ai v7. The constructors throw an actionable error when another ai major is detected, instead of failing cryptically mid‑generation. The guard fails open when the installed version can't be resolved.

Quick start

generate() returns a real AI SDK GenerateTextResult; stream() returns a real StreamTextResult (.textStream, .fullStream, .toUIMessageStream(), .steps, .usage, …). Because CoderAgent _is_ an Agent, it composes with the rest of the AI SDK.

Examples

Runnable scripts in examples/ run against a real deployment via tsx:

Each example creates a new chat and archives it when done; none touches workspaces. Details: examples/README.md.

Custom tools

Tools you pass are registered with Coder Agents as client‑executed ("dynamic") tools; your execute runs in your process. This is the standard AI SDK tool loop:

1. The model calls your tool, and the run pauses on the server. 2. The AI SDK runs your tool's execute. 3. This package submits the result back, and the run resumes.

• Give tools an execute for scripting use; the loop runs to completion automatically. • Coder's own server‑side tools (file editing, shell, MCP, …) still run on the server. They appear in the transcript as providerExecuted tool calls/results: you observe them, you don't execute them.

Since v0.2.1: server tools stream as dynamic-tool parts

Server‑executed tools stream with dynamic: true: they aren't in your ToolSet, and the AI SDK only accepts unknown tool names on dynamic calls. In UI message streams they therefore surface as dynamic-tool parts rather than tool-{name} parts. Key off toolName, not part.type, when rendering them.

Files

Pick by whether the model should read the file or operate on it.

Chat attachments carry content for the model to read (a PDF, image, CSV…). Drop a native AI SDK file part into a message and it's uploaded transparently:

To upload once and reuse across turns, use attach(). It also accepts a Blob/File or stream; fs.openAsBlob avoids reading the whole file into memory:

Attachments are capped at 10 MiB and restricted to this media‑type allowlist: application/pdf, application/json, text/{plain,markdown,csv}, image/{png,jpeg,gif,webp}. Oversized or unsupported files throw a clear error up front.

Workspace files are material for the agent to operate on: a zip of assets, a dataset, a binary — anything outside the allowlist or over the cap. Write it onto the workspace filesystem and let the agent's tools take over.

This needs a workspaceFiles adapter. The agent core stays dependency‑free, so whoever holds a workspace connection supplies a few‑line adapter:

Structured output

Coder Agents has no server‑side response_format, so CoderAgent cannot constrain what the model says to a JSON schema. A responseFormat / experimental_output request emits a warning and is best‑effort at most.

• Pure text‑in / JSON‑out, no server‑side tools → use @coder/ai-sdk-provider with generateObject / Output.object (schema‑constrained; requires AI Gateway on the deployment). • The answer must come out of an agent run (server‑side tools, MCP, a workspace) → have the model submit its answer by _calling a tool_ whose inputSchema is your Zod schema. The answer arrives as the tool call's typed input.

The tool pattern needs four rules to stay robust (validate client‑side, never stop on the call, and more). Guide: docs/structured-output.md. Copyable helper: examples/06-structured-output.ts.

Sessions

One CoderAgent instance maps to one chat ("session") on the Coder server. The chat is created on the first turn and reused by later generate()/stream() calls, with history kept server‑side. agent.chatId is the current chat id.

| Call | What it does |…

Description from the npm listing.

  • agent
  • ai
  • ai-sdk
  • coder
  • llm
  • streaming
  • tools
  • vercel-ai-sdk

Where @coder/ai-sdk-agent sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,256 listings · 113 pages · page 75, #15 (overall #1495)
All npm: every listing in weekly downloads order
PNG SVG
AI SDKs250 listings · 13 pages · page 9, #6 (overall #166)
AI SDKs: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@coder/ai-sdk-agent weekly downloads on npm, last 90 days: 540 weekly downloads as of Oct 17, 2026, -49.7% over 90 days.@coder/ai-sdk-agentWeekly downloads on npm · Last 90 days540downloads / week-49.7% over 90 days02K4K6K8K10KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
@coder/ai-sdk-agent weekly downloads on npm, last 90 days: 540 weekly downloads as of Oct 17, 2026, -49.7% over 90 days.
PNG SVG

7/30/90-day growth

@coder/ai-sdk-agent weekly downloads growth on npm: -57.4% over 7 days, -76.5% over 30 days, -49.7% over 90 days.@coder/ai-sdk-agentWeekly downloads growth on npm540downloads / week now7-day growth-728 weekly downloads-57.4%30-day growth-1,757 weekly downloads-76.5%90-day growth-533 weekly downloads-49.7%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@coder/ai-sdk-agent weekly downloads growth on npm: -57.4% over 7 days, -76.5% over 30 days, -49.7% over 90 days.
PNG SVG

Ranking history

@coder/ai-sdk-agent npm ranking history: currently #1494 (by weekly downloads).@coder/ai-sdk-agentnpm ranking · by weekly downloads · Last 90 days#1494current rank#1488#1490#1492#1494#1496Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@coder/ai-sdk-agent npm ranking history: currently #1494 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (121)
Recent weekly downloads observations for @coder/ai-sdk-agent
Date (UTC)Weekly downloadsChange vs. previous
540-392
932+145
787-223
1,010-247
1,2570
1,257+37
1,220-48
1,268+309
959-10
969-154
1,123-24
1,147-75
1,222-262
1,484—

Similar npm AI SDKs plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@coder/ai-sdk-agent. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.