Quick Start
Express
Hono
Fastify
Nest.js
Configuration Options
Request Format
Response Format
Non-Streaming
Streaming
Server-Sent Events (SSE) format:With Tools
Authentication Middleware
Environment Variables
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY | Yes | For the agent |
PORT | No | Server port (default: 3000) |
Best Practices
Enable CORS
Enable CORS
Configure for your frontend domains
Add authentication
Add authentication
Protect your endpoints
Rate limit
Rate limit
Prevent abuse
Use streaming
Use streaming
Better UX for long responses
Log requests
Log requests
Track usage and errors
Related
Next.js
Next.js integration
Agent
Agent configuration

