Server Adapters
Deploy AI agents as HTTP servers using popular Node.js frameworks.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 - Configure for your frontend domains
- Add authentication - Protect your endpoints
- Rate limit - Prevent abuse
- Use streaming - Better UX for long responses
- Log requests - Track usage and errors

