DLStreamer coding agent (draft implementation for validation purposes).#741
DLStreamer coding agent (draft implementation for validation purposes).#741
Conversation
… not intended for EXTERNAL use yet.
|
I’m thrilled about the new development direction for DLStreamer: creating skills for AI agents to invoke. |
There was a problem hiding this comment.
Pull request overview
Adds a draft “DLStreamer coding agent” skill package intended to guide AI coding agents in generating new DLStreamer Python sample apps from natural-language pipeline descriptions.
Changes:
- Introduces the
dlstreamer-coding-agentskill definition (SKILL.md) with usage guidance, reference samples, and a generation procedure. - Adds reference documentation for pipeline construction, model preparation, design patterns, and coding conventions.
- Adds reusable assets/templates for generated sample app READMEs and Python/model-export scripts.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
.github/skills/dlstreamer-coding-agent/SKILL.md |
Defines when/how to use the skill and a recommended sample-app layout/procedure. |
.github/skills/dlstreamer-coding-agent/references/pipeline-construction.md |
Reference for elements, patterns, and rules for building pipelines/apps. |
.github/skills/dlstreamer-coding-agent/references/model-preparation.md |
Guidance for downloading/exporting models from common ecosystems to OV IR. |
.github/skills/dlstreamer-coding-agent/references/design-patterns.md |
Catalog of reusable implementation patterns mapped to existing samples. |
.github/skills/dlstreamer-coding-agent/references/coding-conventions.md |
Conventions for headers/imports/plugins/errors/metadata access. |
.github/skills/dlstreamer-coding-agent/assets/README-template.md |
README scaffold for generated samples. |
.github/skills/dlstreamer-coding-agent/assets/python-app-template.py |
Starter Python app template (pipeline + IO + event loop). |
.github/skills/dlstreamer-coding-agent/assets/export-models-template.py |
Starter model download/export script template. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/skills/dlstreamer-coding-agent/references/pipeline-construction.md
Outdated
Show resolved
Hide resolved
.github/skills/dlstreamer-coding-agent/references/pipeline-construction.md
Outdated
Show resolved
Hide resolved
.github/skills/dlstreamer-coding-agent/assets/python-app-template.py
Outdated
Show resolved
Hide resolved
.github/skills/dlstreamer-coding-agent/assets/export-models-template.py
Outdated
Show resolved
Hide resolved
.github/skills/dlstreamer-coding-agent/assets/README-template.md
Outdated
Show resolved
Hide resolved
Feel free to contribute and improve! |
…e-platform/dlstreamer into dlstreamer_coding_agent
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
qianlongding
left a comment
There was a problem hiding this comment.
AI Harness Documentation: To make this user-friendly, should we provide a brief README or guide on how to integrate these skills with popular AI harnesses (e.g., Claude Code, OpenCode, or Open Codex)? This would help users understand exactly how to 'plug' our skills into their existing AI agent workflows
Yes, this is by no means 'complete' - it is still an early version; the goal is to have it hardened and released to external custoemers as part of OEP 2026.1. |
|
|
||
| ## Procedure | ||
|
|
||
| ### Quick Recipes |
There was a problem hiding this comment.
the pattern ids in the table below , like 1 + 4 + 11 require the reader to cross-reference design-patterns.md to understand what they mean.
so i suggest inlining the names to make the table self-contained, e.g.:
1 (pipeline core) + 4 (ai inference) + 11 (file output)
this also reduces the risk of the agent misreading the recipe if pattern numbering ever shifts.
|
|
||
| Map the user's description to one or more of these patterns: | ||
|
|
||
| | Pattern | When to Apply | |
There was a problem hiding this comment.
this table lists patterns by name only, while the quick recipes above reference them by number only. an agent reasoning top-to-bottom through this file sees numbers first, then names, with no explicit link between them. adding the pattern numbers as a column here (or as a prefix in the pattern name column) would close that gap.
| --device /dev/dri \ | ||
| --group-add $(stat -c "%g" /dev/dri/render*) \ | ||
| --device /dev/accel \ | ||
| --group-add $(stat -c "%g" /dev/accel/accel*) \ |
There was a problem hiding this comment.
stat -c "%g" /dev/accel/accel* will fail on systems without an npu because the glob expands to nothing. please maybe wrap the --device /dev/accel and --group-add lines in a conditional, or at minimum add a note that these lines should only be included when npu devices are present on the host.
|
|
||
| # GPU fallback | ||
| device = args.device | ||
| if device == "GPU" and not os.path.exists("/dev/dri/renderD128"): |
There was a problem hiding this comment.
the gpu detection relies on /dev/dri/renderD128 which is the first intel igpu render node on linux. this could manifest as a silent callback to cpu on systems where the render node is renderD129 or higher (like, discrete gpu), and it won't work at all on windows. a more portable approach would be to query openvino directly, like "GPU" in Core().available_devices
as i was typing this, i remembered @pbartosik found a way to do this in an even better way in Optimizer.
|
|
||
| ```python | ||
| det_dev = args.device | ||
| if det_dev == "GPU" and not os.path.exists("/dev/dri/renderD128"): |
There was a problem hiding this comment.
same issue as in the python-app-template
same issue as in the app template: the recommended gpu check is hardcoded to /dev/dri/renderD128. since this is the canonical convention document that all generated apps will follow, fixing it here would propagate the improvement automatically
|
|
||
| {{APP_DESCRIPTION}} | ||
|
|
||
|  |
There was a problem hiding this comment.
 is a required-looking line with no guidance on what to do when no screenshot exists yet. a newly generated app won't have one. i suggest adding a comment like <!-- remove this line if no screenshot is available --> to prevent the agent from leaving a broken image reference in the final readme
|
|
||
| **When to use:** User asks for OCR (PaddleOCR), or any PaddlePaddle model from HuggingFace. | ||
|
|
||
| **CRITICAL:** PaddlePaddle v3+ models use PIR format (`.json` + `.pdiparams`), **not** the |
There was a problem hiding this comment.
the note that paddleocr v3+ uses pir format (.json + .pdiparams) instead of .pdmodel is in the export template. could cause failures during model prep.
please move it to it to the surface explicitly in the paddleocr section of model-preparation.md so the agent encounters it during step 2 research, not only when copying the template.
oonyshch
left a comment
There was a problem hiding this comment.
added comments for potential improvement
Description
Instructions for AI Coding Agents on how to generate new Python sample apps.
Work in progress - PR submitted for validation purposes on 'clean machines'.
Fixes # (issue)
Any Newly Introduced Dependencies
No new dependencies.
How Has This Been Tested?
Experimental feature, work in progress.
Checklist: