Sahi is a web automation tool that uses JavaScript and proxy injection to simplify browser automation and testing. It provides normalized APIs to access elements on the page and simulate user events across different browsers. Sahi scripts are executed by injecting JavaScript code into the browser via a proxy. This allows Sahi to work across domains and handle issues like page refreshes. The APIs and architecture aim to make Sahi easy for testers to use while still being powerful enough for developers.