본문으로 건너뛰기
SDK Version: Next

DX-APP Agent-Driven Development Guide

Overview

DX-APP supports DEEPX agent-driven development (dx-agent-dev) for building standalone inference applications on DEEPX NPU accelerators. Instead of manually writing boilerplate, you describe what you want in natural language and a network of specialized agents generates production-ready inference code, validates it, and reports results.

This guide covers the agent architecture, available skills, the validation framework, and troubleshooting for dx_app standalone inference development.


Agent Architecture

Six agents collaborate to build, validate, and manage dx_app inference applications.

AgentDescriptionRoutes To
dx-app-builderMaster router — classifies request type
and dispatches to specialist agent
dx-python-builder
dx-cpp-builder
dx-benchmark-builder
dx-model-manager
dx-python-builderBuilds Python inference apps in 4 variants:
sync, async, sync_cpp_postprocess,
async_cpp_postprocess
(Sub-agent — invoked by dx-app-builder)
dx-cpp-builderBuilds C++ inference apps using the InferenceEngine API (Sub-agent — invoked by dx-app-builder)
dx-benchmark-builderBenchmarks and profiles inference performance on target hardware (Sub-agent — invoked by dx-app-builder)
dx-model-managerDownloads, registers, and manages .dxnn compiled models (Sub-agent — invoked by dx-app-builder)
dx-validatorValidates generated app code and .deepx/ framework integrity

Routing Flow

User Request


dx-app-builder (classifies intent)

├──► dx-python-builder (Python inference app)
├──► dx-cpp-builder (C++ inference app)
├──► dx-benchmark-builder (performance profiling)
└──► dx-model-manager (model operations)


dx-validator (called automatically after generation)

Skills

Skills encapsulate reusable workflows that agents invoke during code generation.

General SWE Process

SkillDescription
dx-swe-brainstormBrainstorm and plan before any code generation
dx-swe-tddTest-driven development — validate each file immediately after creation
dx-swe-verifyVerify before claiming completion — evidence before assertions
dx-swe-writing-plansWrite structured implementation plans before touching code
dx-swe-executing-plansExecute a written implementation plan with review checkpoints
dx-swe-debuggingSystematic debugging — diagnose before proposing fixes
dx-swe-parallel-agentsDispatch 2+ independent tasks to parallel agents
dx-swe-subagent-devExecute implementation plans with independent sub-agents
dx-swe-receiving-reviewReceive and process code review feedback with technical rigor
dx-swe-requesting-reviewRequest code review to verify work meets requirements
dx-skill-routerRoute tasks to the appropriate skill automatically

DEEPX Build

SkillDescription
dx-agent-app-build-pythonBuild a Python inference app in any of the 4 variants using the IFactory pattern
dx-agent-app-build-cppBuild a C++ inference app with the InferenceEngine runtime API
dx-agent-app-build-asyncBuild an async high-performance app with pipelined pre/infer/post stages
dx-agent-app-model-managementDownload .dxnn models from the registry and configure model paths
dx-agent-app-validateRun the 5-level validation pyramid against generated code

Supported AI Tools

dx_app agent-driven development works with four AI coding tools. Each auto-loads the knowledge base through its own configuration.

ToolConfig FilesAgents Available
Claude CodeCLAUDE.mdAll 6 agents via context routing
GitHub Copilot.github/copilot-instructions.md
6 agents in .github/agents/
17 skills in .github/skills/
4 instructions in .github/instructions/
@dx-app-builder, @dx-python-builder,
@dx-cpp-builder, @dx-benchmark-builder,
@dx-model-manager, @dx-validator
Cursor.cursor/rules/dx-app.mdc (always)
6 agent rules + 17 skill rules
python-example.mdc, cpp-example.mdc,
tests.mdc (27 total)
Free-form with
auto-applied rules
OpenCodeAGENTS.md, opencode.json
6 agents in .opencode/agents/
17 skills in .deepx/skills/
@dx-app-builder
or /dx-agent-app-build-python

Copilot File-Specific Instructions

When editing files matching these globs, Copilot automatically injects context-specific instructions:

Glob PatternInjected InstructionContent
src/python_example/**python-example.instructions.mdIFactory pattern, SyncRunner/AsyncRunner usage, 4-variant naming
src/cpp_example/**cpp-example.instructions.mdC++14 standard, RAII patterns, InferenceEngine API
src/postprocess/**postprocess.instructions.mdPostprocessing conventions, pybind bindings
tests/**tests.instructions.mdpytest patterns, fixtures, NPU markers

OpenCode Skills (Slash Commands)

General SWE Process

Slash CommandDescription
/dx-swe-brainstormBrainstorm and plan before code generation
/dx-swe-tddTest-driven development with incremental validation
/dx-swe-verifyVerify completion with evidence before assertions
/dx-swe-writing-plansWrite structured implementation plans
/dx-swe-executing-plansExecute implementation plans with review checkpoints
/dx-swe-debuggingSystematic debugging — diagnose before fixing
/dx-swe-parallel-agentsDispatch independent tasks to parallel agents
/dx-swe-subagent-devExecute plans with independent sub-agents
/dx-swe-receiving-reviewReceive code review feedback with technical rigor
/dx-swe-requesting-reviewRequest code review to verify work
/dx-skill-routerRoute tasks to the appropriate skill

DEEPX Build

Slash CommandDescription
/dx-agent-app-build-pythonStep-by-step Python app generation with IFactory
/dx-agent-app-build-cppC++ app with InferenceEngine
/dx-agent-app-build-asyncAsync high-performance app
/dx-agent-app-model-managementModel download and registry
/dx-agent-app-validateRun the 5-level validation pyramid

Platform File Loading Reference

Each AI coding agent auto-loads different configuration files at the dx_app level.

Auto-Loaded Files

FileAuto-loaded byLoading
.github/copilot-instructions.mdCopilot Chat/CLIAuto
CLAUDE.mdClaude CodeAuto
AGENTS.md + opencode.jsonOpenCodeAuto
AGENTS.md + .codex/skills/dx-codex-identity/SKILL.mdCodex CLIAuto
.cursor/rules/dx-app.mdcCursorAuto
.cursor/rules/python-example.mdcCursorAuto (glob)
.cursor/rules/cpp-example.mdcCursorAuto (glob)
.cursor/rules/tests.mdcCursorAuto (glob)

Agent Files (Manual @mention)

AgentCopilot (@mention)OpenCode (@mention)Claude Code (.claude/agents/)
dx-app-builder.github/agents/
dx-app-builder.agent.md
.opencode/agents/
dx-app-builder.md
.claude/agents/
dx-app-builder.md
dx-python-builder.github/agents/
dx-python-builder.agent.md
.opencode/agents/
dx-python-builder.md
.claude/agents/
dx-python-builder.md
dx-cpp-builder.github/agents/
dx-cpp-builder.agent.md
.opencode/agents/
dx-cpp-builder.md
.claude/agents/
dx-cpp-builder.md
dx-benchmark-builder.github/agents/
dx-benchmark-builder.agent.md
.opencode/agents/
dx-benchmark-builder.md
.claude/agents/
dx-benchmark-builder.md
dx-model-manager.github/agents/
dx-model-manager.agent.md
.opencode/agents/
dx-model-manager.md
.claude/agents/
dx-model-manager.md
dx-validator.github/agents/
dx-validator.agent.md
.opencode/agents/
dx-validator.md
.claude/agents/
dx-validator.md

Copilot File-Specific Instructions

FileScope
.github/instructions/python-example.instructions.mdPython example files
.github/instructions/cpp-example.instructions.mdC++ example files
.github/instructions/postprocess.instructions.mdPostprocess files
.github/instructions/tests.instructions.mdTest files

Skill Files (All Platforms — /slash-command)

SkillFile
/dx-swe-brainstorm.deepx/skills/dx-swe-brainstorm/SKILL.md
/dx-agent-app-build-async.deepx/skills/dx-agent-app-build-async/SKILL.md
/dx-agent-app-build-cpp.deepx/skills/dx-agent-app-build-cpp/SKILL.md
/dx-agent-app-build-python.deepx/skills/dx-agent-app-build-python/SKILL.md
/dx-swe-parallel-agents.deepx/skills/dx-swe-parallel-agents/SKILL.md
/dx-swe-executing-plans.deepx/skills/dx-swe-executing-plans/SKILL.md
/dx-agent-app-model-management.deepx/skills/dx-agent-app-model-management/SKILL.md
/dx-swe-receiving-review.deepx/skills/dx-swe-receiving-review/SKILL.md
/dx-swe-requesting-review.deepx/skills/dx-swe-requesting-review/SKILL.md
/dx-skill-router.deepx/skills/dx-skill-router/SKILL.md
/dx-swe-subagent-dev.deepx/skills/dx-swe-subagent-dev/SKILL.md
/dx-swe-debugging.deepx/skills/dx-swe-debugging/SKILL.md
/dx-swe-tdd.deepx/skills/dx-swe-tdd/SKILL.md
/dx-agent-app-validate.deepx/skills/dx-validate/SKILL.md
/dx-swe-verify.deepx/skills/dx-swe-verify/SKILL.md
/dx-swe-writing-plans.deepx/skills/dx-swe-writing-plans/SKILL.md

Shared Knowledge Base (.deepx/)

The .deepx/ directory is the canonical source of truth for all agent knowledge. Platform-specific files (.github/, .cursor/, .opencode/) are generated from .deepx/ by dx-agent-gen generate --repo dx-runtime/dx_app. It is NOT auto-loaded — agents and skills reference specific files as needed during task execution.

DirectoryFilesDescription
.deepx/agents/6 files (dx-app-builder.md, dx-python-builder.md, dx-cpp-builder.md, dx-benchmark-builder.md, dx-model-manager.md, dx-validator.md)Authoritative agent definitions
.deepx/skills/17 directoriesDetailed skill workflows (one SKILL.md per directory)
.deepx/templates/Template filesCode generation templates
.deepx/knowledge/Knowledge filesDomain-specific reference material
.deepx/toolsets/5 filesAPI references and schema documentation
.deepx/instructions/6 filesCoding standards and workflow rules
.deepx/memory/5 filesPersistent knowledge — pitfalls and session memory
.deepx/contextual-rules/4 filesContext-dependent rules activated by task type

User Scenarios

Scenario 1: Build a Python Detection App

Prompt:

"Build a yolo26n person detection app using Python"
ToolHow to Use
Claude CodeType the prompt directly. CLAUDE.md routes to dx-agent-app-build-python skill. Asks 2-3 questions (variant, task type, model), generates files in dx-agent-dev/<session_id>/ (or src/... if explicitly requested), and validates.
GitHub Copilot@dx-app-builder followed by the prompt. Routes to dx-python-builder, generates all 4 variants, runs dx-validator.
CursorType the prompt directly. dx-app.mdc (always loaded) provides context. python-example.mdc activates for src/python_example/ files.
OpenCode@dx-app-builder followed by the prompt, or /dx-agent-app-build-python skill directly.

Scenario 2: Build a C++ App

Prompt:

"Build a C++ inference app for yolo26n using InferenceEngine"
ToolHow to Use
Claude CodeType the prompt directly. Routes to dx-agent-app-build-cpp skill.
GitHub Copilot@dx-cpp-builder followed by the prompt.
CursorType the prompt directly. cpp-example.mdc activates for src/cpp_example/ files, injecting C++14 and RAII conventions.
OpenCode@dx-app-builder followed by the prompt, or /dx-agent-app-build-cpp skill directly.

Scenario 3: Download and Register a Model

Prompt:

"Download yolo26n model for DX-M1"
ToolHow to Use
Claude Code@dx-model-manager followed by the prompt.
GitHub Copilot@dx-model-manager followed by the prompt.
CursorType the prompt directly.
OpenCode@dx-model-manager followed by the prompt, or /dx-agent-app-model-management skill.

Scenario 4: Validate Generated Code

Prompt:

"Validate the detection app I just created"
ToolHow to Use
Claude Code@dx-validator followed by the prompt.
GitHub Copilot@dx-validator followed by the prompt.
CursorType the prompt directly.
OpenCode@dx-validator followed by the prompt, or run manually: python .deepx/scripts/validate_app.py src/python_example/object_detection/yolo26n/

Scenario 5: Build a Pose Estimation App

Prompt:

"Build a pose estimation app with yolo26n-pose"
ToolHow to Use
Claude CodeType the prompt directly. Routes to dx-agent-app-build-python skill with pose_estimation task type. Generates keypoint visualization and skeleton drawing logic.
GitHub Copilot@dx-app-builder followed by the prompt. Routes to dx-python-builder with pose-specific postprocessing.
CursorType the prompt directly. python-example.mdc activates for generated files in src/python_example/pose_estimation/.
OpenCode@dx-app-builder followed by the prompt, or /dx-agent-app-build-python skill directly.

Scenario 6: Build an Instance Segmentation App

Prompt:

"Build an instance segmentation app with yolo26n-seg"
ToolHow to Use
Claude CodeType the prompt directly. Routes to dx-agent-app-build-python skill with instance_segmentation task type. Generates mask overlay visualization.
GitHub Copilot@dx-app-builder followed by the prompt. Routes to dx-python-builder with segmentation-specific postprocessing.
CursorType the prompt directly. python-example.mdc activates for generated files in src/python_example/instance_segmentation/.
OpenCode@dx-app-builder followed by the prompt, or /dx-agent-app-build-python skill directly.

Scenario 7: Build a Classification App

Prompt:

"Build an image classification app with EfficientNet-B0"
ToolHow to Use
Claude CodeType the prompt directly. Routes to dx-agent-app-build-python skill with classification task type. Generates top-K label prediction logic.
GitHub Copilot@dx-app-builder followed by the prompt. Routes to dx-python-builder with classification postprocessing (softmax + top-K).
CursorType the prompt directly. python-example.mdc activates for generated files in src/python_example/classification/.
OpenCode@dx-app-builder followed by the prompt, or /dx-agent-app-build-python skill directly.

Scenario 8: Build an Async High-Performance App

Prompt:

"Build an async high-performance detection app with yolo26n"
ToolHow to Use
Claude CodeType the prompt directly. Routes to dx-agent-app-build-async skill. Generates pipelined pre/infer/post stages with queue-based parallelism.
GitHub Copilot@dx-app-builder followed by the prompt. Routes to dx-python-builder with async variant focus.
CursorType the prompt directly. python-example.mdc activates for generated async files.
OpenCode@dx-app-builder followed by the prompt, or /dx-agent-app-build-async skill directly.

Quick Start

Request a person detection app in natural language:

@dx-app-builder "Build a Python person detection app using yolo26n"

The agent will:

  1. Ask clarifying questions — variant (sync / async), model precision, task type (detection, classification, segmentation, etc.)
  2. Present a build plan — list of files to generate, model to download, config to write
  3. Route to dx-python-builder — the specialist agent takes over
  4. Generate files in dx-agent-dev/<session_id>/ (or src/ if explicitly requested)
  5. Validate and reportdx-validator runs checks and prints a summary

Mandatory Questions (HARD-GATE)

When using @dx-app-builder, the agent enforces 3 mandatory questions before generating any code:

  1. Language/variant: Python (sync / async / cpp_postprocess / async_cpp_postprocess) or C++?
  2. AI task: detection, classification, segmentation, pose, etc.
  3. Model: Specific model name (e.g., yolo26n) or auto-recommend

These questions are non-skippable — even if your prompt provides enough context, the agent will confirm each decision explicitly before proceeding.


What Gets Created

By default, agent-generated code is placed in the dx-agent-dev/ isolation directory to prevent conflicts with existing source code.

Default Output (dx-agent-dev/)

dx-agent-dev/<session_id>/
├── README.md # Session metadata and run instructions
├── session.json # Machine-readable session config
├── setup.sh # Environment setup script (mandatory)
├── run.sh # App launch script (mandatory)
├── session.log # Agent session log (mandatory)
└── src/python_example/{task}/{model}/
├── __init__.py
├── config.json
├── {model}_factory.py
├── {model}_sync.py
├── {model}_async.py
├── {model}_sync_cpp_postprocess.py
└── {model}_async_cpp_postprocess.py

Session ID format: YYYYMMDD-HHMMSS_<agent>_<model>_<task> where <agent> is claude, copilot, cursor, or opencode (e.g., 20260403-143022_claude_yolo26n_detection).

Production Output (src/)

When you explicitly request production placement, files are written directly to src/python_example/{task}/{model}/ — the standard source tree.

File Descriptions

FilePurpose
config.jsonModel path, task type, input dimensions, label map
{model}_factory.pyImplements IFactory — the 5-method interface for pre/post processing
{model}_sync.pySynchronous single-threaded inference entry point
{model}_async.pyAsynchronous pipelined inference entry point
{model}_sync_cpp_postprocess.pySync inference with C++ post-processing via pybind
{model}_async_cpp_postprocess.pyAsync inference with C++ post-processing via pybind
NOTE

setup.sh, run.sh, and session.log are mandatory artifacts in every session output directory


5-Level Validation Pyramid

dx-validator applies checks in ascending order of cost. Each level gates the next.


/5\ Performance benchmarks (FPS targets)
/───\
/ 4 \ NPU integration tests (requires hardware)
/───────\
/ 3 \ Smoke tests (--help, module import)
/───────────\
/ 2 \ Config validation (model paths, task types)
/───────────────\
1 Static checks (imports, naming, structure)
LevelWhat It ChecksRequires Hardware
1 — StaticAbsolute imports, naming conventions, file structure, IFactory methodsNo
2 — Configconfig.json schema, .dxnn model path resolution, valid task typesNo
3 — Smoke--help flag runs without error, modules import cleanlyNo
4 — NPU IntegrationEnd-to-end inference on a sample image with NPU presentYes
5 — PerformanceFPS meets target thresholds for the model and acceleratorYes

Validation Commands

# Static checks (11 checks across Level 1 and Level 2)
python .deepx/scripts/validate_app.py src/python_example/{task}/{model}/

# Include smoke tests (Levels 1–3)
python .deepx/scripts/validate_app.py src/python_example/{task}/{model}/ --smoke-test

# Framework integrity — verify .deepx/ directory structure
python .deepx/scripts/validate_framework.py

Knowledge Base Structure

Agent knowledge lives in the .deepx/ directory at the dx_app project root.

DirectoryCountContents
agents/6Agent definitions and routing rules
skills/17Skill workflow directories (one SKILL.md each)
templates/Code generation templates
knowledge/Domain-specific reference material
toolsets/5API references (InferenceEngine, IFactory, dxrt-cli, model registry, pybind helpers)
memory/5Persistent knowledge (common pitfalls, platform API notes, optimization patterns, camera/display notes, model config cache)
contextual-rules/4Coding standards, import rules, naming conventions, directory layout rules
prompts/4System prompts for each specialist agent
scripts/2validate_app.py, validate_framework.py
NOTE

Platform files (.github/, .cursor/, .opencode/, CLAUDE.md, AGENTS.md) are generated by dx-agent-gen generate --repo dx-runtime/dx_app. Do not edit them directly. Edit .deepx/ source files and re-run the generator. A pre-commit hook runs dx-agent-gen automatically.

Agents read from these directories at task start. Memory files are updated when new patterns or fixes are discovered during development.


Session Sentinels

Agents output fixed markers at the start and end of each task for automated testing:

MarkerWhen
[DX-AGENT-DEV: START]First line of the agent's response
[DX-AGENT-DEV: DONE (output-dir: <relative_path>)]Last line after all work is complete. <relative_path> is the session output directory relative to the project root. If no files were generated, omit the (output-dir: ...) part.

Sub-agents invoked via handoff do not output sentinels — only the top-level agent does.

Rules:

  1. CRITICAL — Output [DX-AGENT-DEV: START] as the absolute first line of the first response, before any other text. This is non-negotiable even if the user says to proceed autonomously.
  2. Output [DX-AGENT-DEV: DONE (output-dir: <path>)] as the very last line after all work, validation, and file generation is complete.
  3. If you are a sub-agent invoked via handoff/routing, do NOT output sentinels — only the top-level agent outputs them.
  4. If the user sends multiple prompts in a session, output START/DONE for each prompt.
  5. The output-dir in DONE must be the relative path from the project root to the session output directory.
  6. Never output DONE after only producing planning artifacts (specs, plans, design documents). DONE means all deliverables are produced — implementation code, scripts, configs, and validation results.

Troubleshooting

  • Problem: Agent writes relative imports (from .factory import ...)
    Cause: Default LLM behavior
    Solution: Use absolute imports only.
    Example: from dx_app.python_example.detection.yolo26n.yolo26n_factory import ...

  • Problem: Factory class missing methods
    Cause: Incomplete IFactory implementation
    Solution: Implement all 5 required methods:
    create_preprocessor, create_postprocessor, create_label_map, create_input_config, create_visualizer

  • Problem: Model not found at runtime
    Cause: .dxnn file path not registered
    Solution: Query model_registry.json via dx-model-manager to download and register the model.

  • Problem: NPU not available / device error
    Cause: Accelerator not detected by driver
    Solution: Run dxrt-cli -s to check device status and verify the DEEPX kernel module is loaded.

  • Problem: validate_app.py fails immediately
    Cause: Python path or venv not configured
    Solution: Activate the dx_app virtual environment and ensure PYTHONPATH includes the project root.


Further Reading