How to Build a Reliable AI Assistant with the Claude API