Skip to content

Temporal Agents

Temporal Agents: We gave agents the ability to rewind time.

Core trick

A branch(instruction, ago) primitive rewinds the agent's own trajectory to an earlier step and replaces the later timeline with a new strategy.

Tags

Description

Temporal Agents: We gave agents the ability to rewind time. One primitive, branch(instruction, ago), lets an agent roll back to any earlier point in its own trajectory, swap in a new strategy, and keep going from there. The old timeline dies, the new one takes over, hard cut. Most agents burn their entire compute budget moving in a straight line, committing to decisions, accumulating errors, unable to course-correct without starting over. We broke that constraint. But rewinding isn't free (every branch costs steps, and the budget is fixed) so the real question is whether an agent can learn when to use it: a meta-policy that decides, in the moment, whether to keep pushing forward or burn steps rolling back to fix a mistake made six moves ago. Temporal control as learned compute allocation, not brute-force search.
ShubhamPatilsd/timetravel_openenv★ 10 forksPythonCreated Mar 8, 2026 · last push Mar 8, 2026

README excerpt

---
title: timetravel
emoji: ⏳
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
---

# timetravel — OpenEnv Time Travel Rewind Environment

A temporal-control RL environment where an agent must navigate a path, discover a passcode at the end, and use time-travel (branch) to rewind and open a locked door efficiently.

## Game

```
start -> door -> path-1 -> path-2 -> sign
```

- The door at position `door` is locked and requires a passcode.
- The passcode is only revealed at `sign`.
- Budget is intentionally tight: walking all the way and back is expensive.
- The optimal strategy: reach `sign`, read passcode, `branch` back near `door`, unlock.

## JSON Action Protocol

Each model turn must output exactly one JSON object:

```json
{"thinking": "...", "action": "...", "args": {...}}
```

| Action | Args | Description |
|--------|------|-------------|
| `move_forward` | `{}` | Move one step toward `sign` |
| `move_back` | `{}` | Move one step back toward `start` |
| `read_sign` | `{}` | Read the passcode (must be at `sign`) |
| `open_door` | `{"passcode": "..."}` | Unlock the door (must be at `door`) |
| `branch` | `{"ago": <int>, "instruction": "..."}` | Rewind `ago` steps, pass note to past self |
| `abandon` | `{}` | End episode immediately |

Invalid JSON or schema violations increment `protocol_violations` and return an error message.

## Temporal Mechanics

- `branch(ago, instruction)`: rewinds internal game state `ago` steps. `ago > 0` required.
- After branching,

Team