The code of Agentic Policies: A Tutorial, to run on your own machine: the agentic loop, the paper's Push-T example, and the site's showcase: the agentic policy on robots in MuJoCo, at a table (Panda, two Pipers, two YAMs, ALOHA, the G1 humanoid) and in a kitchen (TidyBot, G1).
pip install "agentic-policies[all] @ git+https://github.com/VT-Collab/agentic-tutorial#subdirectory=code"Extras: pusht (gym-pusht), arm (MuJoCo), local (torch, transformers for hf: models), all. Python 3.10+.
agentic-policies pusht --seed 0 --gif episode.gif # the paper's run: LittleLamb on this machine
agentic-policies pusht --variant stop --model ollama:qwen3:8b # base, structured, rotate-below, memory, keep-out, stop
agentic-policies arm "put the red cube on the green cube" --robot yam --viewer
agentic-policies arm "put the red cube on the green cube" "put the blue cube on the red cube" --skills \
--robot aloha --model openrouter:openai/gpt-oss-120b --interactive
agentic-policies arm "open the fridge" --scene kitchen --robot tidybot --viewerModels: mock, hf:<repo> (transformers), ollama:<name> (cloud models after ollama signin),
openrouter:<id> (OPENROUTER_API_KEY), openai:<model> (any compatible server: OPENAI_BASE_URL, OPENAI_API_KEY).
from agentic_policies import AgenticPolicy, make_model
def wave(times: int):
"""
Wave the robot's hand.
Args:
times: How many times to wave.
"""
return f"Waved {times} times."
def done():
"""Declare the task complete."""
return "Task complete."
policy = AgenticPolicy(make_model("ollama:qwen3:8b"), prompt="You control a robot. Call one tool per turn.",
tools=[wave, done], window="all")
policy.run("Wave twice, then finish.", first_observation="The robot is ready.")The docstring is what the model reads; the body is what runs. See agentic_policies/pusht.py for a full harness.
Tests: pip install -e "code[pusht,arm,test]" && pytest code/tests
