dopus weekly downloads statistics
A lightweight AI agent for Next.js App Router: your existing server functions become its tools, run with the signed-in user's permissions. Built on the Vercel AI SDK.
dopus has 477 recorded weekly downloads on npm, a change of +42.0% over the past 7 days, ranking #2274 of 3,247 tracked listings.
About dopus
dopus

A lightweight AI agent for Next.js (App Router). Hand it the server functions your app already has, and it does the user's tasks with them, with the user's own permissions: an in-app assistant or copilot with tool calling, approval cards and a chat UI, built on the Vercel AI SDK.
pnpm add dopus
pnpm dopus init
- Reuse what you have. Register the server actions and functions your app already has. You don't write a second API for the agent.
- Permissions come for free. Tools run inside the agent's request, so
cookies()andheaders()in your server functions see the signed-in user. Your own auth and ownership checks keep working unchanged. - Writes wait for the user. Mark a tool
confirm: trueand the user approves each call in the chat. Approvals are signed so a client cannot forge one. - Long work stays outside. A tool can start a job in your queue or Lambda and return at once; when your app rings the chat's channel, the agent reads the result with another tool and carries on.
- You own the generated code.
initcopies the route, prompts and a thin chat wrapper (plus its CSS) into your project, shadcn-style. The runtime and the chat UI itself live in the package; see Chat UI.
Built on the Vercel AI SDK 7. Supports OpenAI, Anthropic and Google models.
What it is for. An assistant inside your app that answers questions about the user's data and makes small changes on request: "show my open orders", "move this task to done", "assign the deploy checklist to Carol". Each turn is a few quick server-function calls inside one request, usually a few seconds.
What it is not. dopus stays small on purpose. These are out of scope:
- Running long work itself. A tool should finish in seconds. Longer jobs run in your own queue, Lambda or worker; a tool starts them, and the agent picks up again when your app announces they finished (see Background jobs).
- Autonomous, scheduled or multi-agent workflows.
- Built-in memory, RAG or a vector store. If you need search over documents, expose it as a tool.
- Frameworks other than Next.js, and the Pages Router.
- Running the agent somewhere other than your Next.js app, or deploying it for you. Host the app as you already do (see Hosting).
Quick start
Requirements: Next.js App Router, TypeScript, Node.js 22+, zod 4.
pnpm add dopus # or npm / yarn / bun
pnpm dopus init
init asks for a provider, an API key and a prompt preset, then:
| Writes | What it is |
|---|---|
.env.local | Your API key and a generated DOPUS_APPROVAL_SECRET. Never .env. Mode 600. |
agent.config.ts | Model, tools and prompt layers. Edit this. |
agent/prompts/preset.ts, agent/prompts/app.ts | Your prompt layers. Yours to edit. |
app/api/agent/route.ts | POST /api/agent. It speaks the AI SDK useChat protocol. |
components/agent/agent-chat.tsx (+ .css) | Thin wrapper: chat panel and widget with plugins. CSS with dopus- classes. |
It also installs whatever is missing of ai, zod, @ai-sdk/react and the provider package. It checks that .env.local is git-ignored.
init is safe to run again. Existing files and env values are left alone unless you pass --force and confirm.
The generated files import each other through your tsconfig path alias when it points at the project root (or src/),
e.g. "@/*": ["./*"] gives import agent from '@/agent.config'; without one they use relative paths. Nothing is
added to your tsconfig.
Then add the widget to your root layout:
// app/layout.tsx
import { AgentWidget } from '../components/agent/agent-chat'
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<AgentWidget suggestions={['What are my open orders?']} />
</body>
</html>
)
}
CLI options
dopus init [--provider openai|anthropic|google] [--model <id>]
[--preset general|customer-support|internal-ops]
[--yes] [--no-install] [--force] [--cwd <dir>]
--yes runs without prompts. It needs --provider and skips the API key prompt, so add the key to .env.local yourself afterwards.
Updating
init copies files into your project, so a new dopus version does not change them by itself. After upgrading the
package, bring them up to date:
pnpm add dopus@latest
pnpm dopus update # --dry-run to only see what would change
update handles the files init copied: the chat UI (agent-chat.tsx, agent-chat.css), the route and the preset
prompt. It never touches agent.config.ts, agent/prompts/app.ts or .env.local.…
Description from the npm listing.
- nextjs
- next.js
- ai
- agent
- llm
- server-actions
- ai-sdk
- openai
- anthropic
- gemini
- chatbot
- lightweight
- app-router
- tools
- ai-agent
- vercel-ai-sdk
- react
- typescript
- tool-calling
- function-calling
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 (142)Similar npm AI SDKs plugins
All 20 dopus 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/dopus. First seen Nov 14, 2026; last successful collection Dec 6, 2026. See the methodology.