# Module: tf_agents.trajectories.time_step

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/trajectories/time_step.py) |

TimeStep representing a step in the environment.

## Classes

[`class StepType`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/StepType): Defines the status of a `TimeStep` within a sequence.

[`class TimeStep`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/TimeStep): Returned with every call to `step` and `reset` on an environment.

## Functions

[`restart(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/restart): Returns a `TimeStep` with `step_type` set equal to [`StepType.FIRST`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/StepType#FIRST).

[`termination(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/termination): Returns a `TimeStep` with `step_type` set to [`StepType.LAST`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/StepType#LAST).

[`time_step_spec(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/time_step_spec): Returns a `TimeStep` spec given the observation_spec.

[`transition(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/transition): Returns a `TimeStep` with `step_type` set equal to [`StepType.MID`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/StepType#MID).

[`truncation(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/truncation): Returns a `TimeStep` with `step_type` set to [`StepType.LAST`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/StepType#LAST).

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| absolute_import | Instance of `__future__._Feature` |
| division | Instance of `__future__._Feature` |
| print_function | Instance of `__future__._Feature` |

<br />