Fuel-safe road-trip intelligence for OpenClaw agents.
An OpenClaw-compatible Agent Skill for deterministic, stateful, and auditable US road-trip planning.
SafeRoutes is an OpenClaw-compatible Agent Skill that turns natural-language trip requests into fuel-range-safe driving plans. It plans and re-plans US road trips from manual addresses, verifies real gas, lodging, and repair stops, persists every change in a reversible trip tree, and hands the selected route off to Google Maps.
The repository ships a framework-neutral skill package in skill/
and a machine-readable CLI that emits one structured JSON object per action.
OpenClaw can load the package as a standard skill; a thin native-tool adapter
can promote that same CLI to a first-class saferoutes function tool. The
adapter improves discovery and invocation—the safety and routing logic remain
inside SafeRoutes.
| Agent-native | Fuel-safe | Stateful | Auditable |
|---|---|---|---|
SKILL.md contract and JSON CLI |
Vehicle range is a hard planning constraint | plan, update, undo, and status share a reversible trip tree |
Every run persists plans, maps, tool traces, and logs |
SafeRoutes is intentionally not turn-by-turn GPS navigation. It is a static-first planning and re-planning layer that produces evidence-backed route artifacts an agent can explain, inspect, and hand off to a navigation app.
Iron law: the agent only produces judgements about the world (open / closed / road description) — it never edits the route. Every route decision converges in the
Orchestrator(a pure function). The agent is a sensor/verifier; the function is the decider.
Design is the single source of truth—see docs/:
01_SYSTEM_DESIGN.md— V3 architecture (components, data model, interfaces, algorithms, errors, config).02_MVP_SPEC.md— MVP scope, acceptance criteria, test layers, DoD.03_ROADMAP.md— MVP → V1 → V2 → V3 evolution.
SafeRoutes has been exercised through a live OpenClaw gateway with real model turns, tool calls, routing providers, persisted plans, and session transcripts—not just mocked model responses. The evaluations show that lower-cost, general-purpose agents can execute the workflow correctly once the tool is easy to discover; the largest gain came from making SafeRoutes a native function tool instead of asking the model to discover a prompt-level skill.
Before the redesign, an agent had to notice injected skill text, read its
instructions, and construct a shell command. web_search was a much shorter
path, and all three agents missed SafeRoutes on autonomous requests. After the
redesign, saferoutes appears directly in OpenClaw's function-tool list and can
produce the complete bundle in one structured call.
The numbers below deliberately separate the historical three-model live baseline from the post-redesign MiniMax-M3 rerun. We have not claimed that all three models achieved M3's post-redesign score.
The 2026-06-17 baseline ran 41 cases × 3 models = 123 real OpenClaw runs. Although autonomous discovery was still broken, agents that actually invoked SafeRoutes were usually able to extract parameters and continue route trees correctly.
| Agent | Correct after invocation | Named-request trigger rate | Mean wall time (A/B/C/E) |
|---|---|---|---|
| GLM-5.2 | 91% | 55% | 121s |
| MiniMax-M3 | 100% | 25% | 75s |
| MiMo-2.5-Pro | 75% | 40% | 257s |
This baseline established the engineering diagnosis: using the route tool correctly was not the main bottleneck; deciding to invoke it was. See the full report and 123 raw result rows. The timing column covers the 35 non-gap A/B/C/E cases per model; the six D-class ingestion/gap cases are preserved in the raw results but excluded from that latency comparison.
The first-class-tool redesign was then tested in 10 additional live M3 cases:
six requests did not name SafeRoutes, and four explicitly supplied a waypoint.
Full means that the agent invoked SafeRoutes and returned the route, fuel,
lodging/repair, and Google Maps bundle; named cases also had to persist the
requested waypoint.
| Post-redesign outcome | Result |
|---|---|
| Full single-turn outcomes | 9/10 (90%) |
| Autonomous triggers | 5/6 (~83%), up from 0/12 |
| Named waypoint cases | 4/4 Full |
| Native SafeRoutes calls | 9/10 |
web_search escapes |
0/10 |
| Mean wall time across the 10 turns | 101.8s |
The one counted failure asked for the vehicle's safe range before planning; it
did not fabricate a route or fall back to web search. This was a 10-case,
single-repetition (K=1) M3 validation, not a three-model post-redesign
benchmark. See the redesign report and
raw rerun results.
Case A-L1-01 was an ordinary Chinese request—“plan my drive from Pittsburgh
to West Lafayette”—that did not name SafeRoutes. MiniMax-M3 made one native
saferoutes call, made zero web_search calls, persisted trip
8241dc0ec036, and returned a 425-mile route with two fuel stops, lodging,
repair coverage, warnings, and a Google Maps deep link. The complete agent turn
took 119.8 seconds.
Representative lines from the retained live run.log:
stage:geocode done in 250.5ms
google routes: 3 candidate(s) returned, 3 kept
stage:route done in 414.3ms
stage:plan+score done in 1558.5ms
stage:render done in 119.9ms
The full trace keeps provider failures and fallback behavior instead of hiding them. Inspect the tool trace, tool timing summary, persisted plan, itinerary, redacted OpenClaw transcript, or the evidence provenance note.
These are separate Full-verdict round-two examples for the models whose roadbook snapshots were retained (GLM, M3, and Qwen). They demonstrate the actual rendered output and are not used as the post-redesign comparison above.
| GLM-5.2 · waypoint route | MiniMax-M3 · gap recovery | Qwen3.7-max · route plan |
|---|---|---|
![]() |
![]() |
![]() |
| run.log · tools.jsonl | run.log · tools.jsonl | run.log · tools.jsonl |
Every score can be followed back through the evaluation evidence index,
redacted transcript manifest, tool
trace, persisted plan, and rendered map. Editable diagrams.net sources for all
five figures are in docs/assets/readme/openclaw-eval/.
Limits: no post-redesign three-model rerun has been performed; the live tests validate software/tool behavior, not a person physically driving the route. Historical logs also do not contain comparable dollar-cost accounting, so efficiency claims here use elapsed time, tool-call count, and output completeness—not invented cost savings.
uv sync --extra dev # install deps + dev tooling
uv run saferoutes \
--from "5522 Baum Blvd, Pittsburgh PA" \
--to "1717 University Ave, Berkeley CA" \
--depart 2026-06-02T07:00 [--avoid-highway]Output lands in ./out/<timestamp>/: map.html + plan.json + run.log.
uv run ruff check . && uv run mypy . # lint + type-check
uv run pytest -m unit # pure functions, no network
uv run pytest -m integration # mocked externals, no network
uv run pytest -m agent # cassette replay, no network
uv run pytest -m arch # import / architecture guard
make smoke # E2E against real APIs (manual / nightly)- Secrets live in
.env(never committed, never logged):OPENROUTER_API_KEY,TAVILY_API_KEY,FIRECRAWL_API_KEY,GOOGLE_ROUTES_API_KEY. - Tunables (weights / vehicle / model) live in
saferoutes/config.py. - See
.env.examplefor the expected variable names.



