DS2Agent: Holistic Device Agents for Accelerated Embedded Board-Level Design

Hongbin Yang, Chi Zhang, Yinhao Xiao, Runyu Pan, Yanni Yang, Xiuzhen ChengarXiv 2026 · arXiv

TL;DR

DS2Agent is an open-source framework that transforms static device datasheets into interactive, hardware-grounded agents for embedded systems design. By constructing a "triple-model" representation (knowledge, behavior, and driver) and allowing optional calibration against real hardware, it slashes the time and token costs of board-level development while virtually eliminating the hallucinations that plague standard LLMs.

What Problem Does This Paper Address?

Embedded board-level design is a notoriously manual and "tedious and laborious" process (as shown in Figure 1a). Engineers must navigate hundreds of pages of datasheets—filled with complex prose, register maps, and timing diagrams—to select components, write drivers, and integrate them into a working system.

While Large Language Models (LLMs) show promise in automating these tasks, they face two major hurdles:

  1. Static Interpretation: Most agents treat datasheets as simple text for Retrieval-Augmented Generation (RAG), missing the deep functional logic required for system integration.
  2. Hallucinations: Without a connection to physical reality, LLMs often "invent" register values or timing constraints, leading to broken firmware and wasted engineering hours.
Conventional vs. DS2Agent-assisted workflows

Methods

The authors introduce DS2Agent, which moves beyond simple text retrieval by building a structured, executable representation of a device. Each agent consists of three linked models:

  • Knowledge Model: Supports RAG-based question answering and fact retrieval.
  • Behavioral Model (Digital Twin): Captures the physical functionality, register semantics, and transfer functions (e.g., how a raw 16-bit value converts to Celsius).
  • Interface Model: Manages digital-interface operations and generates portable C driver code.

A key innovation is the Hardware-in-the-Loop (HITL) calibration. If a physical device is available, the agent can run tests to compare real-world measurements against its modeled predictions. This allows the agent to "calibrate" its internal knowledge, ensuring that the generated drivers actually work on the target hardware.

The construction process is handled by a multi-agent pipeline (Scanner, Builder, and Verifier) that extracts data from PDFs and verifies it against reference evidence before exposing the agent's capabilities via the Model Context Protocol (MCP).

The DS2Agent architecture featuring three linked models

Datasets

The framework was evaluated on ten diverse devices spanning seven functional categories, including sensors (SHT31, ADXL345), data converters (HX711, MCP4725), and real-time clocks (DS3231).

The evaluation used three main benchmarks:

  1. Question Answering: A set of 100 expert-curated questions covering communication, power, and timing.
  2. Driver Generation: Implementing specific functionality on a NUCLEO-F103RB target board.
  3. System Integration: Three real-world FreeRTOS applications: Temperature Control (TC), Automatic Leveling (AL), and Current Monitoring (CM).

Key Insights and Ideas

  • Shared Intermediate Representation: By linking knowledge, behavior, and drivers, the agent creates a "single source of truth." Once a register is defined for a QA task, that same definition is reused for code generation, ensuring consistency across the entire design lifecycle.
  • Hardware as the Ultimate Verifier: The authors treat hardware observations as "instance evidence." This grounding prevents the agent from getting stuck in a loop of hallucinated logic; if the physical chip says "0xEF" for its ID, the agent accepts that over a potentially misread datasheet.
  • Efficiency through Structure: Because the agent queries structured models rather than raw PDF text, it requires significantly fewer tokens to reach a correct answer, making it both faster and cheaper to run.

Key Results

The DS2Agent-augmented agent outperformed a baseline LLM agent across every metric:

  • Accuracy: Improved the QA score from 87 to 97 out of 100.
  • Token Efficiency: Reduced token usage by 44.8% for QA and a staggering 72.9% for driver generation.
  • Speed: Downstream task completion time for driver generation dropped from an average of 737 seconds to just 25 seconds—a 96.6% reduction.
  • Integration: In complex FreeRTOS tasks, it reduced total completion time by 44.1% (see Figure 4).
Performance comparison in FreeRTOS tasks

Limitations and Future Work

While highly effective for digital-interface devices, the paper notes some areas for growth:

  • Analog Complexity: The current behavioral models focus on digital registers and simple transfer functions. Modeling complex analog behaviors or high-speed RF characteristics remains a challenge.
  • Extraction Robustness: The "Scanner" phase still relies on LLMs to parse tables and diagrams, which can be a bottleneck if the source PDF is poorly formatted.
  • Broader Integration: Future work could involve integrating these agents directly into PCB EDA tools (like KiCad) to automate the entire board design from component selection to final routing.

Summary updated

Abstract

Embedded board-level development demands extensive expertise, from component selection and device characteristics to interface configuration, driver writing, and system composition. Recently, LLM-based agents have shown strong capabilities, raising the prospect of automating board-level design tasks. However, existing agents either target chip-level design or treat datasheets as static text, offering little guidance on whether a specific component should---or even could---be used for a given board-level design. Moreover, without touching real hardware, they hallucinate incorrect details. To fill this gap, we present {\setlength{\fboxsep}{1pt}\href{https://anonymous.4open.science/r/DS2Agent-9FE8/}{\fcolorbox{blue}{white}{DS2Agent}}}, an open-source framework that constructs interactive agents from device datasheets. Each agent comprises three models: a knowledge model supporting retrieval and question answering; a digital-twin model capturing the physical functionality of the device; and an interface model supporting driver development and system integration. To suppress hallucinations, we also allow optional connections to real devices, so that the agent can calibrate its internalized knowledge against the device. We evaluate DS2Agent on ten devices spanning seven functional categories. Compared with the baseline, the DS2Agent-augmented agent improves the question-answering score from 87 to 97 out of 100 while using 44.8\% fewer tokens. For driver generation, it reduces average token usage per device by 72.9\%. For system integration, it reduces total token usage across three FreeRTOS applications by 29.7\%.
BibTeX
@misc{yang2026ds,
  author = {Hongbin Yang and Chi Zhang and Yinhao Xiao and Runyu Pan and Yanni Yang and Xiuzhen Cheng},
  title = {{DS2Agent: Holistic Device Agents for Accelerated Embedded Board-Level Design}},
  year = {2026},
  eprint = {2611.25774},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25774},
}
Figure