Claude Agent SDK vs. Messages API for a Production AI Assistant?
2 points
2 hours ago
| 0 comments
| HN
We're building a chat assistant into our B2B developer tool. It needs to call domain-specific tools (MCP), stream responses (SSE), and persist conversation history.

The Claude Agent SDK looks like it would save us a lot of work — agent loop, compaction, hooks, session management all built in. But the more we look at it, the more the architecture feels oriented toward single-user CLI use. The subprocess spawn overhead (~12s per call), filesystem-based sessions, memory issues in long-running processes, and the Node.js subprocess dependency inside our Python backend all makes look like not fit.

The other path is building the agent loop ourselves on the Messages API. Cleaner fit for a web backend, but obviously more work upfront.

Has anyone here gone through this decision? Would especially love to hear from folks who tried the SDK in a multi-tenant setting and can share what worked and what didn't. Also curious about anyone who started with the SDK and migrated away, or vice versa.

No one has commented on this post.