The RouteDetails object contains the details of the route; the route engine supplies it to the routing script in the same way it supplies EventDetails to the routing script.
The RouteDetails object is a top-level object that script writers must use to obtain objects on the next level. Specifically, it provides the process instance (ProcInstance object) and can also be used to create WorkItems.