At its core, AutoGraph operates as a 'mini-compiler' or source code transformer, automatically rewriting Python control flow constructs like `if`, `for`, and `while` loops into their equivalent TensorFlow graph operations (e.g., `tf.cond`, `tf.while_loop`) during the tracing phase of a `@tf.function`.