Lens Task Agent
The Lens Task Agent is an AI-powered vision and document analysis agent. It is designed to extract technical evidence, text, tables, and timing diagrams from images and documents.
It can be used directly via the CLI to analyze files on the fly, or it can be invoked by manager agents (such as the ASIC or Design agents) when they need to "see" a screenshot, datasheet figure, or schematic.
Key Features
- Multi-Format Vision: Processes standard images (
.png,.jpg,.jpeg,.gif,.webp,.bmp) and automatically renders.pdffiles into analyze-able images. - Technical Extraction: Specifically tuned to interpret datasheets, schematic diagrams, timing diagrams, and tables, returning structured summaries, key elements, and deep technical details.
- Targeted Analysis: Supports optional prompting to focus the analysis on specific signals, tables, or sections of a document.
- Structured Output: Can emit JSON for seamless integration into verification or specification-generation pipelines.
Command Options
The Lens task agent supports the following command-line options:
| Option | Description |
|---|---|
--input-image |
Required. Path to the image or PDF file to be analyzed. |
--image-prompt |
Optional context or question to guide the analysis (e.g., "Extract the SPI timing parameters"). |
--json-output |
Emits structured JSON output containing the description, key elements, and technical details. |
Usage
Use the Lens task agent through the NEX CLI by specifying --agent=lens.
Basic Command
Analyze a screenshot of a timing diagram:
Guided Analysis
Focus the extraction on a specific detail within a datasheet PDF:
nex --agent=lens --input-image=datasheets/sensor_spec.pdf --image-prompt="Extract the register map table from this document"
JSON Output (For Tooling)
If you are using Lens in a script to populate a specification: