Skip to content

Repository files navigation

Torii for SUMO

Torii

Task-Oriented Road Infrastructure Intelligence for Eclipse SUMO

An agent plugin that turns natural-language SUMO tasks into bounded, evidence-bound workflows — building, auditing, and reviewing networks without silently certifying what it cannot prove.

Website · Installation · Documentation · Examples · License

English · 简体中文 · Deutsch

How Torii Works

flowchart TD
    A["Natural-language request"] --> B["Router: classify intent, choose workflow"]
    B --> C["Planner: select gates, reference policy, traffic layers"]
    C --> D["Executor: bounded stages, source-immutable candidates"]
    D --> E["Reviewer: hash-bound evidence, HTML cockpit, decision manifests"]
    E --> F{Decision}
    F -->|"gates pass"| G["Automatic-safe"]
    F -->|"review required"| H["Review-required"]
    F -->|"evidence missing"| I["Blocked"]
Loading
Layer Role
Expert skills Classify tasks, select checks, state claim boundaries
MCP tools (74 registered) Run SUMO, TraCI, NetEdit, OSM conversion, audits, and evidence export

Hamburg Corridor Digital Twin

Product target: Am Sandtorkai 2349 → 2394 → 2403 (Großer Grasbrook, Am Sandtorpark, Osakaallee).

Torii cleaned Hamburg corridor in SUMO

Stage Status
W0 Scope
W1 Topology
W2 Signals 🟡
W3a Counts
W3b Detectors 🟡
W4 Replay 🔴

detector-constrained-diagnostic-replay — blocked by 2403 signal publication gap. Evidence summary · Development log

Official Hamburg 2024 aerial   Torii Connection Mode
Left: Hamburg official aerial (2024). Right: Torii W1 cleaned corridor in SUMO Connection Mode.

Design

  Candidate
      │
      ▼
  ┌─────────────────────────┐
  │  Protected semantic /   │──Yes──▶  Manual review
  │  TLS delta?             │         (hash-bound decision)
  └─────────────────────────┘
      │ No
      ▼
  ┌─────────────────────────┐
  │  All runtime gates      │──No───▶  BLOCKED
  │  pass?                  │         (recorded in manifest)
  └─────────────────────────┘
      │ Yes
      ▼
  AUTOMATIC-SAFE

Source networks are never modified in place — every edit produces a separate candidate with rollback. All artifacts are SHA-256 bound. See ARCHITECTURE.md for the full design.

What You Can Do

You want to... Torii provides
Build and audit a SUMO network from OSM Full cleanup workflow with Connection Mode, TLS reality, routeability, and review HTML
Audit a signal-control experiment Controller identity, paired demand, teleport/collision check, 4-class claim label
Reconstruct a digital-twin corridor W0–W5 executable plan using official MAP, OCIT, counts, and detector data
Audit lane-level connections Code-native Connection Mode: fromLane→toLane→via, request/foes, lane order, TLS binding
Compare two network versions Exact semantic diff, Connection Mode regression, outside-scope preservation
Bind standard NEMA phases Four-way (1–8) and three-way candidates; never batch-promotes

All 74 MCP toolsExample workflows

Installation

codex plugin marketplace add Tarard/Torii-SUMO --ref main
codex plugin add torii-sumo@torii-sumo

Start a new Codex session. Requires Python 3.11+ and Eclipse SUMO (sumo, netconvert, netedit). See the installation guide.

Quick Start

Use Torii to build a passenger-road SUMO network from this OSM area.
Check connectivity, audit traffic signals, test routeability, and save a review package.

Or start with the router:

torii_auto_workflow

Repository Structure

plugins/torii-sumo/       Codex plugin and MCP server (74 tools)
  src/torii_sumo/
    core/                 Domain logic
    tools/                MCP adapters
    server.py             Tool registration
  skills/                 Expert reasoning and workflow guidance
  scripts/                Reproducible CLI entry points
docs/                     Guides, architecture, protocols, evidence snapshots
examples/                 Small reproducible workflows
benchmarks/               Frozen evaluation assets and adjudication protocols
tests/                    Unit, contract, integration, and regression tests

More

License

Source code: PolyForm Noncommercial 1.0.0. Skills, docs, and examples: CC BY-NC 4.0. Commercial use requires written permission. See LICENSE.

Eclipse SUMO is a trademark of the Eclipse Foundation. OSM data © OpenStreetMap contributors (ODbL). Earlier releases archived at Zenodo.

About

Torii: Agent plugin for SUMO with OSM-to-SUMO tools, TLS review, routeability probes, and evidence-aware feedback diagnosis.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages