Coding Agent Server - Claude Agent SDK wrapper with JWT auth and HTTP callback
npm install coding-agent-serverClaude Agent SDK wrapper for Vercel Sandbox with JWT authentication and Redis integration.
- 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
``bashRequired
ANTHROPIC_AUTH_TOKEN=xxx # Claude API token
AGENT_PORT=2329 # Server port
PROJECT_ID=xxx # Project ID for Redis sync
API
$3
Send a message and receive streaming response (SSE).
Headers:
-
Authorization: Bearer (required if JWT_SECRET is set)Body:
`json
{
"prompt": "Hello",
"sessionId": "optional-session-id" // 有则恢复会话,无则新建
}
`Response: SSE stream with Claude Agent SDK events
Publishing
`bash
cd packages/coding-agent-server
npm publish
``