coding-agent-server
v0.4.0
Published
Coding Agent Server - Claude Agent SDK wrapper with JWT auth and HTTP callback
Maintainers
Readme
coding-agent-server
Claude Agent SDK wrapper for Vercel Sandbox with JWT authentication and Redis integration.
Features
- JWT Authentication: Verify user identity using JWKS public key
- Redis Integration: Credits check and message sync via Redis Pub/Sub
- SSE Streaming: Real-time streaming responses
- Session Management: Multi-turn conversation support
Environment Variables
# Required
ANTHROPIC_AUTH_TOKEN=xxx # Claude API token
AGENT_PORT=2329 # Server port
PROJECT_ID=xxx # Project ID for Redis sync
# Optional
AGENT_MODEL=claude-sonnet-4-20250514 # Claude model
ANTHROPIC_BASE_URL=xxx # Custom API base URL
# Authentication (optional, enables JWT verification)
JWT_SECRET=xxx # Same as AUTH_SECRET in ShipAgent
# Redis (optional, enables credits and sync)
REDIS_URL=redis://localhost:6379API
POST /chat
Send a message and receive streaming response (SSE).
Headers:
Authorization: Bearer <jwt_token>(required if JWT_SECRET is set)
Body:
{
"prompt": "Hello",
"sessionId": "optional-session-id" // 有则恢复会话,无则新建
}Response: SSE stream with Claude Agent SDK events
Publishing
cd packages/coding-agent-server
npm publish