A city backend must call Claude Messages reliably from production services. Which technical approach fits?
Select an answer to reveal the explanation.
Short Explanation
You should use the official Claude SDK, not a community browser automation script that drives the Claude chat website—browser automation breaks when the site changes and isn't built for backend reliability. The Claude Code CLI and prompt evaluation test harness are dev tools too, not production clients for live resident traffic.
Full Explanation
Production city backends calling Claude should use an official SDK that wraps the REST Messages API rather than only hand-rolled HTTP. SDKs encapsulate auth headers, request serialization, streaming, retries, timeouts, and versioned endpoint details so municipal microservices share a maintained client path instead of relying on a community browser automation script that drives the Claude chat website, which is brittle for backend traffic, breaks when the site changes, and offers no stable API contract.
Using a community browser automation script that drives the Claude chat website for backend requests fails because browser automation is fragile, ties production traffic to website UI changes, lacks typed errors and connection pooling, and cannot provide a consistent retry policy across services that share an org quota. Using the interactive Claude Code CLI as an in-process library inside production request handlers fails conceptually—the CLI is an interactive developer tool, not a production client, and embedding it in request handlers introduces blocking behavior, concurrency issues, and security defects that slow incident response. Integrating direct calls to the Anthropic prompt evaluation test harness for live user traffic fails because the test harness is meant for evaluation, not production serving, and unsupported surfaces can change without notice and break civic SLAs for permitting, 311, or finance bots.
Exam caveat: even with an SDK, pin versions and review changelogs before upgrading in production paths that residents depend on. Operational check: standardize on the official SDK in the shared platform library, ban browser automation, CLI-as-library usage, and test-harness traffic in CI, and verify Messages create calls succeed with org credentials fetched from the municipal secret store.