Your AI agent develops firmware on its own: build, flash, stimulate real hardware, observe, fix - policy-gated MCP tools + pytest plugin.
git clone https://github.com/agentic-hil/agentic-hil && cp agentic-hil/*.md ~/.claude/agents/Subagents overview
# Agentic HIL
<!-- mcp-name: io.github.agentic-hil/agentic-hil -->
**Your AI agent can develop firmware on its own — because Agentic HIL closes the loop with real hardware.**
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/agentic-hil/agentic-hil/master/docs/diagrams/hero-loop-dark.svg">
<img alt="The Agentic HIL loop: build, flash, stimulate, observe, then diagnose and fix, closing back onto build. Flash and stimulate write to the real board on your bench; observe reads back from it. Your agent runs the loop unattended and you review the pull request." src="https://raw.githubusercontent.com/agentic-hil/agentic-hil/master/docs/diagrams/hero-loop.svg">
</picture>
Agentic Hardware-in-the-Loop (Agentic HIL) is a Python package that exposes bounded MCP tools for probing, flashing, resetting, artifact validation, serial and CAN stimulus/feedback, reports, and logs — without giving an agent arbitrary host or debugger access. Each project has exactly one authoritative configuration stored outside the repository. Agentic HIL discovers it from the project root, while `AGENTIC_HIL_CONFIG` can select an explicit absolute-path override. The file defines the workspace binding, devices, actions, paths, and limits.
Names: the Python distribution/install target, CLI command, repository URL, and MCP server name use `agentic-hil`. Python imports, pytest plugin names, fixtures, and Python examples use `agentic_hil`.
## Install
The easiest path: copy/paste this prompt to your AI agent:
```text
Read and follow the complete guide at https://github.com/agentic-hil/agentic-hil/blob/master/AI_AGENT_QUICKSTART.md to install Agentic HIL and set it up for this project.
```
Agents follow [AI_AGENT_QUICKSTART.md](AI_AGENT_QUICKSTART.md) — everything installs user-local, **no admin rights required, ever**. The same is true doing it by hand.
### Installing it yourself
Two commands: install the package user-locally, then set up the project from its
root.
```bash
pip install --user agentic-hil
agentic-hil setup # add --agent codex or --agent opencode for those
```
`setup` creates the deny-by-default policy outside the repository, installs the
agent skill, registers the MCP server with a verified absolute executable path,
and runs `doctor`. It prints where the policy file landed — review it before
enabling anything.
If `pip` is missing, Python is externally managed, or `agentic-hil` does not end
up on `PATH`, install it persistently with a tool installer instead and rerun
`setup`:
```bash
uv tool install agentic-hil # or: pipx install agentic-hil
```
Never use `pip install --break-system-packages`. Never persist a `uvx`
invocation, a workspace virtual environment, or a bare `PATH` name as the MCP
launcher: each resolves anew later, so the program behind the hardware gate
could change without anyone editing anything.
[AI_AGENT_QUICKSTART.md](AI_AGENT_QUICKSTART.md) has the complete fallback chain,
and [TROUBLESHOOTING.md](TROUBLESHOOTING.md) covers what to do when something
does not start.
For direct PEAK/SocketCAN adapters add the CAN extra — `uv tool install
'agentic-hil[can]'` — and for the pyOCD backend `agentic-hil[pyocd]`. Both are
optional because they carry platform-specific drivers that flashing and UART do
not need; without them those tools refuse with `can_backend_not_available`
rather than failing at import.
To check a version without installing anything, `uvx --from agentic-hil
agentic-hil --version` is a diagnostic only.
## Why
A green build is not enough in embedded development: firmware has to behave correctly on the real board. Classic tools automate single steps — flash here, read a log there — but the moment real hardware has to respond, a human is back in the loop. Handing an agent a raw debugger shell or direct serial access instead is neither safe nor reproducible. Agentic HIL closes the gap with a small, auditable gate:
```
AI agent / CI ──MCP (stdio)──▶ Agentic HIL ──authoritative config──▶ OpenOCD / pyOCD / STM32CubeProgrammer
│ serial ports (pyserial)
│ CAN (PEAK / SocketCAN / bridge)
▼
structured results, reports, logs
```
Every hardware action is validated against the selected authoritative configuration, executed with timeouts, logged to `.agentic-hil/logs/`, and answered with a structured JSON result (`ok`, `error_type`, `summary`, `likely_causes`, `report_path`, `log_path`) that an agent can act on.
## MCP Entry
Every MCP host starts the same local stdio server from the firmware project root, using the reviewed absolute path of its persistent installation:
```text
/absolute/path/to/persistent/agentic-hil mcp-stdio
```
Host configuration schemas are not portable: VS Code uses `servers`, Claude Code uses `mcpServers`, Codex uses TOML, and OpenCode uses a command array. `agentic-hil setup --agent <agent>` performs secure user-level registration for Claude Code, Codex, and OpenCode. See [MCP host configuration](docs/mcp-hosts.md) for the remaining hosts. `agentic-hil mcp-config --output .mcp.json` generates only a machine-local Claude-compatible form with an absolute executable path; keep it uncommitted.
`mcp-stdio` discovers the authoritative file from its project working directory: `%APPDATA%/agentic-hil/projects/<project-id>/config.yaml` on Windows or `${XDG_CONFIG_HOME:-~/.config}/agentic-hil/projects/<project-id>/config.yaml` on POSIX. Set `AGENTIC_HIL_CONFIG` only when an operator-controlled absolute-path override is needed; never commit a machine-specific override in repository-controlled MCP configuration.
## Configuration
`agentic-hil setup` already created this file; `agentic-hil init` creates only it, without the skill and the MCP registration. Either way it lands outside the repository, deny-by-default, with `workspace_root` bound to the current absolute project path. It defines the target, artifact roots, and the project's named devices — debug probes, serial ports, and CAN buses — each with its own deny-by-default permissions:
```yaml
workspace_root: "/absolute/path/to/firmware-project"
state_root: "/absolute/operator-controlled/user-state/agentic-hil"
target:
name: "sensor-board"
controller: "stm32f4"
# Every device is named, and every device carries its own permissions. Test
# plan steps address a device by that name. The MCP tool surface drives the
# single configured probe, so a project with several probes runs multi-board
# work through `agentic-hil test-reactor`.
debuggers:
dut:
type: "openocd" # or "pyocd" (most Cortex-M targets), or "stlink" (STM32CubeProgrammer CLI)
probe_id: "0668FF383036" # required once several probes are configured: it is
# the only field that selects a physical probe
interface_cfg: "/absolute/path/to/openocd/scripts/interface/stlink.cfg"
target_cfg: "/absolute/path/to/openocd/scripts/target/stm32f4x.cfg"
timeout_s: 60
permissions:
allow_probe: true
allow_flash: true
allow_reset: true
allow_raw_debugger_commands: false
allow_mass_erase: false
probe_b: # a second, independently controlled board
type: "openocd"
probe_id: "0669FF505153" # pin the physical probe so boards cannot swap silently
interface_cfg: "/absolute/path/to/openocd/scripts/interface/stlink.cfg"
target_cfg: "/absolute/path/to/openocd/scripts/target/stm32f4x.cfg"
target: # optional per-probe override of the project target
name: "sensor-node"
permissions:
allow_probe: true
allow_flash: false # this board is read-only for now
debug:
allowed_symbols: ["main", "sensor_state", "capture_done", "capture_buffer"]
allow_all_symbols: false
artifacts:
allowed_roots: ["build"] # firmware may only be flashed from here
allowed_extensions: [".elf", ".hex", ".bin"]
com_ports:
dut_uart:
device: "/dev/ttyACM0" # Windows example: "COM5"
baudrate: 115200
permissions:
allow_read: true
allow_write: true
can_buses:
dut_can:
adapter: "socketcan" # or "peak", or "process" for a custom bridge
channel: "can0"
bitrate: 500000
permissions:
allow_read: true
allow_write: false
```
The operator reviews this file and explicitly enables only the required resources and permissions. `workspace_root` is mandatory and must exactly match the project root used to launch Agentic HIL. `state_root` is also mandatory: it must be an absolute, operator-controlled directory outside and non-overlapping with the workspace. Every trusted launcher for the same host resources must use this pinned root; changing `LOCALAPPDATA` or `XDG_STATE_HOME` after initialization does not change a running service's coordination namespace. Configured debugger/GDB/process-bridge executables and OpenOCD scripts must resolve to existing host-owned files outside the workspace. Empty symbol allowlists deny all symbols; unrestricted symbol access requires `allow_all_symbols: true`. Set optional `resource_id` on a debugger, COM, or CAN entry when different host paths/wrappers address the same physical resource; matching IDs share one cross-process lease. Two `debuggers` entries that resolve to the same physical probe are rejected outright, so a plan naming one board can never drive another.
All hardware entry points use this same file: `doctor`, `mcp-stdio`, `com-stdio`, the pytest plugin, and `test-reactor`. Deprecated configuration-path options remain parseable for patch-release compatibility but cannot redirect authority away from the discovered external file.
Export the full JSON schema with `agentic-hil schema --output agentic-hil-config.schema.json`.
## MCP Tools
| Group | Tools | Notes |
|-------|-------|-------|
| Debugger | `debugger_infWhat people ask about agentic-hil
What is agentic-hil/agentic-hil?
+
agentic-hil/agentic-hil is subagents for the Claude AI ecosystem. Your AI agent develops firmware on its own: build, flash, stimulate real hardware, observe, fix - policy-gated MCP tools + pytest plugin. It has 7 GitHub stars and was last updated today.
How do I install agentic-hil?
+
You can install agentic-hil by cloning the repository (https://github.com/agentic-hil/agentic-hil) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is agentic-hil/agentic-hil safe to use?
+
agentic-hil/agentic-hil has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.
Who maintains agentic-hil/agentic-hil?
+
agentic-hil/agentic-hil is maintained by agentic-hil. The last recorded GitHub activity is from today, with 1 open issues.
Are there alternatives to agentic-hil?
+
Yes. On ClaudeWave you can browse similar subagents at /categories/agents, sorted by popularity or recent activity.
Deploy agentic-hil to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/agentic-hil-agentic-hil)<a href="https://claudewave.com/repo/agentic-hil-agentic-hil"><img src="https://claudewave.com/api/badge/agentic-hil-agentic-hil" alt="Featured on ClaudeWave: agentic-hil/agentic-hil" width="320" height="64" /></a>More Subagents
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
The agent that grows with you
Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
The agent engineering platform.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.