# iot-agent/iot-skillsbench architecture

> Architecture diagram of the GitHub repository iot-agent/iot-skillsbench, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iot-agent/iot-skillsbench
- Repository: https://github.com/iot-agent/iot-skillsbench

## Overview

This repository provides an LLM agent that turns embedded/IoT requirements into framework-specific code and project artifacts, alongside a multi-board, multi-peripheral benchmark. The primary path is task submission, configuration, skill selection and optional Arduino pin mapping, code generation, artifact assembly, then disk persistence. Batch execution supports repeated benchmark runs; human-expert and LLM-generated skills provide distinct knowledge sets. The excerpts show the graph and key node behaviors, but not every implementation detail or the hardware-validation path, so unverified relationships are omitted.

Main entry points: [`src/graph.py`](https://github.com/iot-agent/iot-skillsbench/blob/main/src/graph.py) (Workflow Graph), [`src/nodes.py`](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py) (Code Generator), [`scripts/run_task_single.py`](https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/run_task_single.py) (Single Task Runner), [`scripts/batch_run.py`](https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/batch_run.py) (Batch Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Task Entry"]
  node_single_runner["Single Task Runner<br/>[run_task_single.py]"]
  node_batch_runner["Batch Runner<br/>[batch_run.py]"]
  node_runtime_config["Runtime Config<br/>[config.py]"]
end

subgraph group_workflow["Agent Workflow"]
  node_agent_graph["Workflow Graph<br/>[graph.py]"]
  node_shared_state["Agent State<br/>[state.py]"]
  node_manager["Planner and Selector<br/>[nodes.py]"]
  node_pin_mapper["Pin Mapper<br/>[nodes.py]"]
  node_workspace["Workspace Preparation<br/>[nodes.py]"]
  node_coder["Code Generator<br/>[nodes.py]"]
  node_diagram["Diagram Branch<br/>[nodes.py]"]
  node_assembler["Artifact Assembler<br/>[nodes.py]"]
end

subgraph group_knowledge["Skills Knowledge"]
  node_skill_registry["Skill Registry<br/>[loader.py]"]
  node_expert_skills["Expert Skills"]
  node_generated_skills["Generated Skills"]
end

subgraph group_evaluation["Benchmark Evaluation"]
  node_task_sets["Benchmark Tasks"]
  node_hil_eval["Arduino Compile Retry<br/>[auto_test.py]"]
end

subgraph group_results["Generated Results"]
  node_persist["Artifact Persistence<br/>[nodes.py]"]
  node_output["Generated Project"]
end

node_user(("Task Author"))
node_llm{{"LLM Provider"}}
node_hardware{{"Physical Hardware"}}

node_user -->|"submits task"| node_single_runner
node_task_sets -->|"supplies tasks"| node_batch_runner
node_single_runner -->|"loads settings"| node_runtime_config
node_batch_runner -->|"loads settings"| node_runtime_config
node_single_runner -->|"builds and runs"| node_agent_graph
node_batch_runner -->|"builds and runs"| node_agent_graph
node_agent_graph -->|"dispatches"| node_manager
node_agent_graph -->|"dispatches"| node_pin_mapper
node_agent_graph -->|"dispatches"| node_workspace
node_agent_graph -->|"dispatches"| node_coder
node_agent_graph -.->|"optionally dispatches"| node_diagram
node_agent_graph -->|"dispatches"| node_assembler
node_agent_graph -->|"dispatches"| node_persist
node_agent_graph -->|"uses schema"| node_shared_state
node_manager -->|"loads skills"| node_skill_registry
node_skill_registry -->|"scans configured set"| node_expert_skills
node_skill_registry -->|"scans configured set"| node_generated_skills
node_manager -.->|"plans task"| node_llm
node_pin_mapper -->|"provides pin notes"| node_coder
node_workspace -->|"prepares code path"| node_coder
node_coder -->|"generates code"| node_llm
node_diagram -->|"provides diagram"| node_assembler
node_coder -->|"provides code"| node_assembler
node_assembler -->|"provides artifacts"| node_persist
node_persist -->|"writes files"| node_output
node_hil_eval -.->|"validates on hardware"| node_hardware

click node_single_runner "https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/run_task_single.py"
click node_batch_runner "https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/batch_run.py"
click node_task_sets "https://github.com/iot-agent/iot-skillsbench/tree/main/tasks"
click node_runtime_config "https://github.com/iot-agent/iot-skillsbench/blob/main/src/config.py"
click node_agent_graph "https://github.com/iot-agent/iot-skillsbench/blob/main/src/graph.py"
click node_shared_state "https://github.com/iot-agent/iot-skillsbench/blob/main/src/state.py"
click node_manager "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_skill_registry "https://github.com/iot-agent/iot-skillsbench/blob/main/src/loader.py"
click node_expert_skills "https://github.com/iot-agent/iot-skillsbench/tree/main/skills-human-expert"
click node_generated_skills "https://github.com/iot-agent/iot-skillsbench/tree/main/skills-llm-generated"
click node_pin_mapper "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_workspace "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_coder "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_diagram "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_assembler "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_persist "https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py"
click node_hil_eval "https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/auto_test.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_single_runner,node_batch_runner,node_runtime_config toneBlue
class node_agent_graph,node_shared_state,node_manager,node_pin_mapper,node_workspace,node_coder,node_diagram,node_assembler toneAmber
class node_skill_registry,node_expert_skills,node_generated_skills toneMint
class node_task_sets,node_hil_eval,node_user toneRose
class node_persist,node_output,node_llm,node_hardware toneIndigo
```

## Components

### Task Entry

- [Single Task Runner](https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/run_task_single.py): `scripts/run_task_single.py`
- [Batch Runner](https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/batch_run.py): `scripts/batch_run.py`
- [Runtime Config](https://github.com/iot-agent/iot-skillsbench/blob/main/src/config.py): `src/config.py`

### Agent Workflow

- [Workflow Graph](https://github.com/iot-agent/iot-skillsbench/blob/main/src/graph.py): `src/graph.py`
- [Agent State](https://github.com/iot-agent/iot-skillsbench/blob/main/src/state.py): `src/state.py`
- [Planner and Selector](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`
- [Pin Mapper](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`
- [Workspace Preparation](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`
- [Code Generator](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`
- [Diagram Branch](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`
- [Artifact Assembler](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`

### Skills Knowledge

- [Skill Registry](https://github.com/iot-agent/iot-skillsbench/blob/main/src/loader.py): `src/loader.py`
- [Expert Skills](https://github.com/iot-agent/iot-skillsbench/tree/main/skills-human-expert): `skills-human-expert`
- [Generated Skills](https://github.com/iot-agent/iot-skillsbench/tree/main/skills-llm-generated): `skills-llm-generated`

### Benchmark Evaluation

- [Benchmark Tasks](https://github.com/iot-agent/iot-skillsbench/tree/main/tasks): `tasks`
- [Arduino Compile Retry](https://github.com/iot-agent/iot-skillsbench/blob/main/scripts/auto_test.py): `scripts/auto_test.py`

### Generated Results

- [Artifact Persistence](https://github.com/iot-agent/iot-skillsbench/blob/main/src/nodes.py): `src/nodes.py`
- **Generated Project**

### Other components

- **Task Author**
- **LLM Provider**
- **Physical Hardware**

## Connections

- Task Author → Single Task Runner: submits task (evidence: `README.md`)
- Benchmark Tasks → Batch Runner: supplies tasks (evidence: `README.md`)
- Single Task Runner → Runtime Config: loads settings (evidence: `scripts/run_task_single.py`)
- Batch Runner → Runtime Config: loads settings (evidence: `scripts/batch_run.py`)
- Single Task Runner → Workflow Graph: builds and runs (evidence: `scripts/run_task_single.py`)
- Batch Runner → Workflow Graph: builds and runs (evidence: `scripts/batch_run.py`)
- Workflow Graph → Planner and Selector: dispatches (evidence: `src/graph.py`)
- Workflow Graph → Pin Mapper: dispatches (evidence: `src/graph.py`)
- Workflow Graph → Workspace Preparation: dispatches (evidence: `src/graph.py`)
- Workflow Graph → Code Generator: dispatches (evidence: `src/graph.py`)
- Workflow Graph → Diagram Branch: optionally dispatches (evidence: `src/graph.py`)
- Workflow Graph → Artifact Assembler: dispatches (evidence: `src/graph.py`)
- Workflow Graph → Artifact Persistence: dispatches (evidence: `src/graph.py`)
- Workflow Graph → Agent State: uses schema (evidence: `src/graph.py`)
- Planner and Selector → Skill Registry: loads skills (evidence: `src/nodes.py`)
- Skill Registry → Expert Skills: scans configured set (evidence: `README.md`)
- Skill Registry → Generated Skills: scans configured set (evidence: `README.md`)
- Planner and Selector → LLM Provider: plans task
- Pin Mapper → Code Generator: provides pin notes (evidence: `src/graph.py`)
- Workspace Preparation → Code Generator: prepares code path (evidence: `src/graph.py`)
- Code Generator → LLM Provider: generates code (evidence: `src/nodes.py`)
- Diagram Branch → Artifact Assembler: provides diagram (evidence: `src/graph.py`)
- Code Generator → Artifact Assembler: provides code (evidence: `src/graph.py`)
- Artifact Assembler → Artifact Persistence: provides artifacts (evidence: `src/graph.py`)
- Artifact Persistence → Generated Project: writes files (evidence: `src/nodes.py`)
- Arduino Compile Retry → Physical Hardware: validates on hardware
