How is an AI agent different from a chatbot?

A chatbot mainly answers questions. An AI agent can take actions like sending emails, querying databases, or deploying code.
Real life: Chatbot = support rep. Agent = ops engineer.