Claude-driven warehouse-inspection agent for the
DIMENSIONAL (DimOS) Robot Hackathon.
A Unitree Go2 walks a multi-zone floor, perceives what's actually there,
compares it against a manifest, and reports missing/extra items — all via a
natural-language operator console. The agent loop drives
perceive → move/turn/say/report_discrepancy → done against either
the local simulator or (swap one file) the real DimOS SDK.
- Operator opens the console; three zones (A, B, C) and a seeded manifest are already loaded.
- Operator says (voice) "walk the patrol route and report any manifest discrepancies."
- Agent recalls last-seen positions from memory, picks an efficient route, walks zone A → B → C, perceiving each waypoint.
- Agent finds
chair_3is missing from zone A androgue_boxis present in zone B but not on the manifest — callsreport_discrepancyfor each. - Robot speaks the audit summary aloud (Web Speech TTS) before calling
done. - Operator drags
chair_3onto the floor and re-runs — manifest passes.
dimos_proto/go2_sim.py— mock Go2 SDK: pose, posture, battery, 90° / 5m FOV perception, action log.dimos_proto/tools.py— Anthropic tool schemas + dispatcher (move,turn,set_posture,perceive,say,done).dimos_proto/agent.py— Claude tool-use loop with a cached safety-rule system prompt, 20-step cap.dimos_proto/server.py— FastAPI + SSE localhost demo with a 2D canvas of the robot and world.dimos_proto/main.py— CLI entry.
The agent never sees the simulator directly — it only sees the tool schema.
The same loop runs against real hardware once Go2Sim is replaced with the DimOS SDK shim.
pip install -r requirements.txt
export ANTHROPIC_API_KEY=sk-ant-...
# CLI
python -m dimos_proto.main "find alice and say hello"
# Web demo
python -m dimos_proto.server # then open http://127.0.0.1:8000In the web demo: paste your API key, type a goal, watch the dog walk on the canvas while tool calls stream in. Try:
find alice and say hellolook around and report what you seewalk to the red ballsit down then stand back up
- Walls + collision — the simulator has axis-aligned wall segments;
moveraycasts the path and stops short on contact, returning ablocked by wallsignal the agent must reason about. - Emergency stop — operator button +
/estopendpoint. Sets a flag the simulator honors (refuses motion, collapses tosit) and cancels any in-flight mission mid-step. - Cancellable missions —
/canceland an in-loopthreading.Eventmake the agent abort at the next step boundary. - Sensor noise —
perceiveadds gaussian noise (~4 cm / 1.5°) to ranges and bearings, and occludes anything behind a wall. - Battery enforcement — actions cost battery; below 5% the robot refuses
to move. There is a charging dock in the world and a
recharge_at_docktool. - Token + cost telemetry — every mission yields a
USAGE:line with input/output tokens and an estimated USD cost (Sonnet 4.6 pricing). - Persistent log — every event (move, blocked, refused, perceive, say,
estop, etc.) is appended to
missions.jsonlwith a session id and timestamp. - Operator UX — drag any world object on the canvas to reposition it;
click
EMERGENCY STOPfor an instant halt; toggle TTS to hear the robot actually speak itssay()calls via Web Speech.
- Always
perceivebefore acting if info is stale. - Move in small steps (≤ 1.0 m) and re-perceive frequently.
- On
blocked by wall, turn and try a new heading — never repeat the same move. - Never move while posture is not
standor whileemergency_stopis true. - Below 15% battery, route to the dock and
recharge_at_dock. - Call
donewith a one-sentence summary when the goal is satisfied (or cannot be).
pip install pytest
pytest -q tests/10 unit tests cover collision, occlusion, e-stop, battery floor, posture lock, dock-proximity recharge, and memory round-tripping.
docker build -t dimos-agent .
docker run --rm -p 8000:8000 -e ANTHROPIC_API_KEY=sk-ant-... dimos-agentMIT