@qoder-ai/qoder-agent-sdk weekly downloads statistics
By qoder-ai · npm · MCP servers
TypeScript SDK for building Qoder-powered coding agents.
@qoder-ai/qoder-agent-sdk has 15,343 recorded weekly downloads on npm, an increase of 45.4% over the past 30 days, ranking #1130 of 3,247 tracked listings.
About @qoder-ai/qoder-agent-sdk
@qoder-ai/qoder-agent-sdk
TypeScript SDK for building applications on top of Qoder Agent.
The SDK starts qodercli for you, streams agent messages back to Node.js, and
lets your application configure tools, permissions, working directories, MCP
servers, hooks, and interactive sessions.
For compression billing messages, see 压缩费用消息接口.
Installation
npm install @qoder-ai/qoder-agent-sdk zod
Prerequisites:
- Node.js 18+
- A Qoder account or another authentication method supported by your host application
zod is a peer dependency used when you define MCP tool schemas. Keep it
installed if your application uses SDK tools or MCP integration.
Runtime Behavior
query() runs through a process-wide qodercli daemon. The default route uses
the daemon most recently started by startDaemon(); when none is running it
starts one. startDaemon() remains a stateless factory: every call starts a
new daemon, and the latest one becomes the default for later queries. Pass
options.daemon to bind a query to a specific instance. The daemon owns the
CLI process boundary, so the SDK does not spawn a separate CLI per query. Call
shutdownDaemon() before your host process exits to stop the default daemon.
During npm install, the postinstall script downloads the CLI binary selected
by the package's pinned CLI version into dist/_bundled; worker packages also
deliver the worker runtime into dist/_worker.
The daemon launches qodercli either as a native process carrier or as a Node
worker runtime. startDaemon({ launchMode: 'process' | 'worker' }) selects the
carrier explicitly; when a query has to start the default daemon itself, its
options.transport (ProcessTransport or WorkerTransport) selects the
carrier, otherwise the package's DEFAULT_RUNTIME_TRANSPORT applies. Worker
mode launches the bundled dist/_worker runtime, or the runtime passed through
pathToQoderWorkerRuntime; when no worker runtime is available the daemon
falls back to the process carrier. While a default daemon is ready it is
reused, so later queries' carrier and daemon-level options are ignored.
The process carrier uses pathToQoderCLIExecutable when provided, then
QODERCLI_PATH, then the bundled CLI, then a locally installed qodercli.
JavaScript CLI entries run through executable (or the SDK host's Node binary).
Options.transport, ProcessTransport, and WorkerTransport remain
available: selecting either transport no longer spawns a per-query process or
worker, it routes the query to the default daemon. A custom
QueryTransportProvider is the only transport that bypasses the daemon. Query
options that configure the CLI process, such as pathToQoderCLIExecutable,
executable, executableArgs, env, proxy, vpcEndpoint, and auth, only
apply when the default daemon has to be started; while one is ready they are
ignored.
options.extraHeaders accepts a Record<string, string> for the first Qoder
main-model request of the first queryable input and its network retries. Later
tool continuations, subagents, and queries do not inherit these headers. Existing
built-in headers take precedence. Use a paired CLI build with extra_headers
support. For example, after the host obtains the user's paid-usage confirmation:
query({
prompt,
options: {
...options,
extraHeaders: { "Cosy-Paid-Confirmed": "true" },
},
});
If your environment blocks install scripts or network downloads, skip postinstall runtime downloads:
QODER_SKIP_DOWNLOAD=1 npm install @qoder-ai/qoder-agent-sdk zod
QODER_SKIP_DOWNLOAD only affects install-time downloads. Point the daemon at
an existing qodercli with:
export QODERCLI_PATH=/absolute/path/to/qodercli
Authentication
Every SDK query needs an explicit authentication option.
| Authentication method | Identity | Use case |
|---|---|---|
| Personal Access Token (PAT) | A Qoder user | Automation that needs the user's permissions and data |
| Service Account | An organization workload | Services and jobs that should not depend on a personal account |
Local qodercli session | The signed-in user | Interactive development on a workstation |
For a PAT, generate a token at qoder.com/account/integrations, store it in a secret manager, and expose it through the default environment variable:
export QODER_PERSONAL_ACCESS_TOKEN=your-token
import { accessTokenFromEnv, query } from "@qoder-ai/qoder-agent-sdk";
const q = query({
prompt: "Summarize this repository.",
options: {
auth: accessTokenFromEnv(),
cwd: process.cwd(),
},
});
For a Service Account, read the key from your secret manager and pass it directly to the SDK:
import { query, serviceAccount } from "@qoder-ai/qoder-agent-sdk";
// Get the Service Account key from the host's secret manager adapter.
const serviceAccountKey = await readSecret("qoder-service-account-key");
const q = query({
prompt: "Summarize this repository.",
options: {
auth: serviceAccount({ serviceAccountKey }),
cwd: process.cwd(),
},
});
The SDK and CLI obtain and refresh short-lived Service Account tokens for this
authentication method. A host can retain the Service Account key and use
serviceAccount({ fetchServiceAccountToken }) to obtain and refresh
short-lived SATs for qodercli. See the
host callback example for a
complete Token exchange and query. To reuse a signed-in developer
workstation, use qodercliAuth(). See the
SDK authentication guide for
complete setup instructions and security guidance.
Quick Start
Create demo.mjs:
import { qodercliAuth, query } from "@qoder-ai/qoder-agent-sdk";…
Description from the npm listing.
- qoder
- agent
- sdk
- cli
- mcp
- ai
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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.
Each band is one page of 20. Weekly downloads on a linear 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.
Recent observations
Full history (135)Similar npm MCP servers plugins
All 20 @qoder-ai/qoder-agent-sdk alternativesData 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/@qoder-ai/qoder-agent-sdk. First seen Nov 20, 2026; last successful collection Dec 6, 2026. See the methodology.