Getting episode information from the environment

Is there a way to access time step the agent is currently in during the run of an episode? Also, how can the agent access when an episode starts and stops?