Skip to main content

Agentic HIL

PyPI version CI License

Connect your AI to reality.

Let your agent develop, test, and improve firmware autonomously. In the real world. Agentic HIL makes this possible as a hard gate: it enforces strict safety boundaries and verifies the results on real hardware.

https://github.com/user-attachments/assets/8d39ba93-beeb-484e-b9e9-d9ce79538523

Watch the agent set up a fresh firmware project, write the firmware, and make the board say Hello World after installation and one restart. The recording shows real hardware feedback through the gate. The agent saves a test plan and runs it with both a correct and a deliberately wrong expectation. You get the plan, a report, and evidence that the test can pass and fail. The run ends with the lease released, the safe state confirmed, and nothing quarantined.

Get started

Install Agentic HIL for your user with one command. No admin rights required.

Linux / macOS (any shell):

curl -LsSf https://agentic-hil.github.io/install.sh | sh

Windows, in PowerShell:

irm https://agentic-hil.github.io/install.ps1 | iex

The installer registers the skill and MCP server for every supported agent CLI it finds on your PATH. It keeps the installation outside your repositories. Restart your agent once, then ask your first hardware question. Your agent sets up the project's bench through MCP.

If no claude, codex, or opencode CLI is found, the installer prints the next step. Install your agent CLI, then run agentic-hil agent-install --agent <claude-code|codex|opencode> to register it.

The installer asks the package manager where its user bin directory is and adds that directory to your shell startup files or Windows user Path when needed. Open a new shell to use the command. Pass --no-path (-NoPath in PowerShell) to manage that change yourself; the installer prints the line to add.

A fresh installation gets agentic-hil[can] from PyPI. Use --version <x.y.z> to pin a release. Rerunning the installer repairs an existing installation: editable checkouts reporting a .devN version are kept, and uv tools installed from a path, URL, or git reference are refreshed from that recorded source. To inspect and verify the installer before running it, follow the checksummed route in installation: download the script and its checksum from the same release, check the file, then run that file.

For a guided first run, try the STM32 starter. It has the firmware, test plans, and a planted defect ready for a three-step walkthrough on a Nucleo-F446RE.

Claude Code can also install the skill from the plugin marketplace: /plugin marketplace add agentic-hil/agentic-hil, then /plugin install agentic-hil@agentic-hil. The install command above still provides and registers the MCP server, with a verified absolute executable path outside your repository.

See installation for cmd.exe, registering one agent, using your own package manager, setting up an attached bench, optional components, and upgrades. The same installer command can repair an installation when agentic-hil upgrade fails. Troubleshooting covers startup problems.

In a clone of this repository, try a first check without a board:

agentic-hil check-plan examples/nucleo-f446re_demo/testconfig.yaml

It answers All 1 test plan(s) load through the reactor's loader. and exits 0, without loading a bench configuration or touching hardware.

Let your agent close the loop

You set the goal. Your agent writes and builds the firmware. Agentic HIL puts it on the board, exercises the device, and checks its responses against the test criteria. When a test fails, the agent gets concrete results it can use to diagnose the problem, change the code, and try again.

Agentic HIL supplies the hardware execution and feedback that make this development loop possible. Much of the flashing, testing, and checking you would do at the bench becomes part of the agent's workflow. You review the code alongside a record of what ran, what passed, and what failed, and focus your attention on requirements, design decisions, and test coverage.

Your agent builds firmware. Agentic HIL flashes it, exercises the board, and checks its responses within configured safety boundaries. The agent uses the results to diagnose, fix, and rebuild. You review the code and the hardware test results.

Agentic Hardware-in-the-Loop (Agentic HIL) connects coding agents to the bench through MCP tools and CI suites through a pytest plugin. Setup is available for Claude Code, Codex, and OpenCode.

Your coding agent sends hardware requests through MCP. Agentic HIL enforces the operator's configuration, drives debug probes, serial ports, and CAN buses, and returns structured results and reports. The configuration and audit record stay outside the agent's workspace.

Each hardware action returns a structured result with its outcome, diagnostics, and report and log paths. Your agent gets feedback it can act on, and you can trace the result back to the recorded run.

Bring your bench into the loop

Agentic HIL connects to your probe through its backend: ST-Link through OpenOCD or the STM32CubeProgrammer CLI, and CMSIS-DAP probes through pyOCD. It also flashes and resets ESP32 targets through esptool and their USB-UART bridge, without opening a debug session. Hardware support follows the probe and backend.

Send commands and read responses over serial ports and CAN buses using PCAN, SocketCAN, or a custom bridge. Several runs can share a CAN bus through the broker.

Agentic HIL runs on Linux, macOS, and Windows with Python 3.10 or newer, with CI coverage across all three platforms. The Nucleo-F446RE example takes you through a complete run on the board used to demonstrate the loop. See installation for backend and platform details.

Put the firmware to the test

Write down what the device should do in a reviewable YAML test plan. The test reactor validates the plan before touching hardware, then flashes, resets, and exercises the device in the order you specify. Checks compare actual responses with exact values, patterns, or numeric ranges. A check passes when the device meets that expectation.

Plans name logical devices, and the bench configuration connects them to real hardware. Use the same plan at your desk and in CI. A failed step stops the run; sessions are cleaned up, and configured recovery actions and their outcomes are recorded with the test results. Write your first hardware test.

Set boundaries that hold

You decide which devices and actions your agent may use. Agentic HIL rejects undeclared devices before opening a driver. It enforces permissions, validates requests, applies timeouts, and records what happened. The CLI, MCP tools, pytest plugin, and test reactor all pass through the same gate.

The authoritative configuration lives outside the workspace, beyond the agent's own file tools. Review the permissions it grants. Use agentic-hil revoke <key> or agentic-hil grant <key> from your own shell to change individual grants. Over MCP, an agent can only narrow its authority. Flashing is refused while either allow_raw_debugger_commands or allow_mass_erase is enabled.

Device leases protect runs from interference across the machine, and a SHA-256 audit chain makes the hardware record tamper-evident. A failed run keeps its failed verdict while configured recovery works to restore the bench and records the outcome. A broken audit trail holds the bench until operator recovery, because another hardware test cannot rebuild missing evidence.

Read the safety model for the overview and the security design for the full reasoning.

Try it on a real board

Start with the Nucleo-F446RE demo. Connect the board, build the firmware, and set up Agentic HIL from the example's directory:

cd examples/nucleo-f446re_demo
cmake --preset Debug && cmake --build --preset Debug   # → build/Debug/nucleo-f446re_demo.elf
agentic-hil setup --agent claude-code                  # or: codex / opencode
agentic-hil doctor

doctor checks the configuration against the attached bench and reports missing tools or hardware before you flash. If you connected the board after setup, agentic-hil adopt-hardware fills in the probe identity, backend executable, and COM device left unset. Use --dry-run to see the proposed changes first. On a host with OpenOCD and no STM32CubeProgrammer, the host's USB inventory can identify an attached ST-Link. Use --probe-id <serial> to select one when several probes are attached.

Run the example's hardware test plan:

agentic-hil test-reactor --test-config testconfig.yaml

The plan flashes the firmware, opens the serial port, resets the board, and checks the boot output for Hello World. A missing or wrong boot banner fails the test and returns the device output for diagnosis. The run closes the sessions it opened, including when a step fails.

Your agent can drive the same steps through MCP tools. Run pytest tests/ from the example directory to put the boot check in a regression suite. The example guide covers all three paths, and hardware testing shows how to write plans for your own device.

Go deeper

Your next step Read
Install, upgrade, or add CAN, pyOCD, or esptool support docs/installation.md
Define the bench and its permissions docs/configuration.md
Drive hardware through MCP docs/mcp-tools.md
Connect a specific MCP host docs/mcp-hosts.md
Write hardware tests with YAML or pytest docs/testing.md
Understand how safety boundaries and recovery work docs/safety-model.md and docs/security-design.md
Find platform and response-time commitments docs/support.md
Diagnose a failed run TROUBLESHOOTING.md
Set up your agent for this project AI_AGENT_QUICKSTART.md and AGENTS.md

Use agentic-hil for the package installation, CLI command, repository URL, and MCP server name. Python imports, pytest plugin names, fixtures, and Python examples use agentic_hil.

Development

To work on Agentic HIL itself:

python -m pip install -e '.[dev]'
ruff check src tests evals tools
pytest
python -m build
twine check dist/*

Releases publish to PyPI through GitHub trusted publishing in .github/workflows/workflow.yml. See CONTRIBUTING.md to contribute.

Security

Policy bypasses are treated as vulnerabilities; see SECURITY.md.

Support

Linux, macOS, and Windows have equal support. Hardware support follows the probe and backend: ST-Link through OpenOCD or STM32CubeProgrammer, CMSIS-DAP through pyOCD, and ESP32 USB-UART bridges through esptool.

Issues receive a response within 24 hours on workdays, and security reports within seven days. See the support policy for the full scope and commitments.

Ask questions in Discussions Q&A, share a run in Show and tell, or submit your first run report, whether it passed or failed.

License

Apache-2.0. See LICENSE.

Metadata

Release files for agentic-hil 0.26.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentic-hil 0.26.0
File Size Uploaded Provenance Actions
agentic_hil-0.26.0.tar.gz 3.6 MB With provenance Details for agentic_hil-0.26.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentic-hil 0.26.0
File Interpreter ABI Platform Actions
agentic_hil-0.26.0-py3-none-any.whl Python 3 none any Details for agentic_hil-0.26.0-py3-none-any.whl

Total release size: 4.8 MB

Release files / agentic_hil-0.26.0.tar.gz

Download URL agentic_hil-0.26.0.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
ab333a0bf6413cbe081281a491b76cca195d65e2b9a1afe53457cc144d8a9ee4
BLAKE2b-256 checksum
How to use checksums
bf49fb0cba3500f43026f879e6b92fa82c0f2a3565e3e58ed0a282bbd31c6cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / agentic_hil-0.26.0-py3-none-any.whl

Download URL agentic_hil-0.26.0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
07198072096d25d175cdc95c17200bb4277c70005f033386d941dfc720d5bad6
BLAKE2b-256 checksum
How to use checksums
86fc491f1babab95edba76dc2d792150c952749bc5af18c50be50613438790c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for agentic-hil 0.26.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentic_hil-0.26.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.26.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page