A REPL (read-eval-print loop) is an interactive programming environment that repeatedly reads the code a user enters, evaluates it, prints the result, and waits for the next input. The name originates from Lisp in the 1960s, and many programming languages, including Python, JavaScript (Node.js) and Ruby, ship with a REPL.
State such as variables and functions stays in memory for as long as the session runs, so code can be entered a little at a time and its result checked immediately. This distinguishes a REPL from writing a complete program and running it all at once.
In AI, a REPL is often given to an agent as the tool for running code the model writes. Variables created in one execution remain available in the next, which suits multi-step data processing.