@bixai/create-agent-sdk-starter
v1.2.6
Published
BixAI CLI to scaffold a Next.js + OpenAI Agents SDK starter app
Maintainers
Readme
@bixai/Agent SDK Statter Kit
CLI to scaffold a production-ready Next.js + OpenAI Agents SDK starter app in seconds.
If this helps you ship agent apps faster, consider giving it a ⭐ star on GitHub!
What you get
- Next.js 16 App Router — baseline project, no cruft
- OpenAI Agents SDK — integrated and configured out of the box
- Tool-first architecture — typed tool boundaries with Zod validation
- Dual transport — standard JSON responses and SSE streaming on the same route
- Runtime isolation — agent execution layer is separate from route handlers
- Production guide — auth, rate limiting, persistent sessions, and monitoring patterns included
Requirements
- Node.js
20.9+— required by Next.js 16.x - Any of:
npm,pnpm,yarn, orbun
Quick start
npx @bixai/create-agent-sdk-starter
# Prompts for:
# - project name (e.g. my-agent-app)
# - package manager (npm / pnpm / yarn / bun)
# - install dependencies now (Y/n)
cd my-agent-app
cp .env.local.example .env.local # add your OPENAI_API_KEY
npm run devCreate a new app
# npm
npx @bixai/create-agent-sdk-starter
# pnpm
pnpm dlx @bixai/create-agent-sdk-starter
# yarn
yarn dlx @bixai/create-agent-sdk-starter
# bun
bunx @bixai/create-agent-sdk-starterSkip the prompt by passing the project name directly:
npx @bixai/create-agent-sdk-starter my-appInstall globally and reuse:
npm install -g @bixai/create-agent-sdk-starter
create-agent-sdk-starterCLI reference
create-agent-sdk-starter [project-name]| Option | Description |
|---|---|
| project-name | Target directory name. Prompts interactively if omitted. |
- Fails early if the target directory already exists
- Interactive mode selects package manager and optionally installs dependencies
- Automatically renames
gitignore→.gitignorepost-copy
Generated structure
my-agent-app/
app/
api/agent/route.ts
_components/
agents/main.agent.ts
runtime/agentRunner.ts
tools/
PRODUCTION_GUIDE.md
package.jsonConfigure
Copy .env.local.example to .env.local and add your key:
OPENAI_API_KEY=sk-...
# Optional overrides
# OPENAI_MODEL=gpt-4o-mini
# AGENTS_TRACING_DISABLED=true
# AGENTS_TRACE_INCLUDE_SENSITIVE_DATA=false
# AGENT_LOCAL_SESSION_TTL_MS=1800000
# AGENT_MAX_LOCAL_SESSIONS=200Then start the dev server:
npm run dev # npm
pnpm dev # pnpm
yarn dev # yarn
bun run dev # bunTest the API
Standard (JSON) request:
curl -X POST http://localhost:3000/api/agent \
-H "content-type: application/json" \
-d '{"message":"What is 42 multiplied by 13?"}'Streaming (SSE) request:
curl -N -X POST "http://localhost:3000/api/agent?stream=true" \
-H "content-type: application/json" \
-d '{"message":"Explain binary search in 5 lines"}'See PRODUCTION_GUIDE.md in the generated project for auth, rate limiting, persistent sessions, and monitoring.
Troubleshooting
npx fails on older Node — Upgrade to Node.js 20.9+ and retry.
npm README is stale — npm renders the README bundled at publish time. Updates require a new package version.
macOS EPERM under ~/.npm — Fix permissions:
sudo chown -R "$(id -u)":"$(id -g)" ~/.npm