Skip to main content

Overview

The file system agent demonstrates ICRL’s training and inference flows using a simulated filesystem environment. The agent learns to navigate directories, read files, and perform operations like ls, cd, cat, find, mkdir, and cp. Successful trajectories are stored and retrieved for similar future tasks.

Source Files

Run With Mock LLM (No API Keys)

This demonstrates:
  • Training phase with trajectory accumulation
  • Database persistence across sessions
  • Trajectory retrieval for in-context examples
  • Evaluation on held-out tasks

Run With Real Model

Or with Anthropic:
Optional model override:
The demo runs in two phases:
  1. Training — The agent completes several tasks. Successful runs are stored.
  2. Evaluation — Held-out tasks are run with retrieval enabled. The agent uses stored trajectories as examples.

Environment Behavior

FileSystemEnvironment accepts command-like actions: Each task has a verify function that determines success based on the final FileSystemState.