Direct3D 11 GPU Perception Protocol for Autonomous Desktop Agents View on GitHub →
VACT D3D11 60 FPS
Direct3D 11 • Rust Kernel • 4.8ms Latency • 60 FPS

The Perception Protocol for Autonomous Desktop Agents

VACT replaces high-latency screenshot Vision-Language Models with deterministic Direct3D 11 compute shaders, Connected Component Labeling, and sub-2KB differential DAG streams at native 60 FPS.

Integrate

Native SDKs, HLSL compute shaders, and low-level Win32 IPC client bindings.

1// crates/vactd/src/main.rs — VACT 1.0 Direct3D 11 Perception Daemon
2use vactd::compute::{DxgiDuplicator, ShaderPipeline};
3use vactd::ipc::PipeServer;
4use std::sync::Arc;
5
6#[tokio::main]
7async fn main() -> Result<(), Box<dyn std::error::Error>> {
8 println!("Initializing VACT 1.0 Kernel (Direct3D 11 Hardware Acceleration)");
9
10 // 1. Acquire zero-copy desktop duplication context (Display 0)
11 let duplicator = Arc::new(DxgiDuplicator::new(0)?);
12 let pipeline = ShaderPipeline::new(&duplicator.device)?;
13
14 // 2. Bind local Win32 named pipe for sub-5ms telemetry stream
15 let server = PipeServer::bind(r"\\.\pipe\VACT")?;
16 println!("Telemetry pipe active at \\.\pipe\VACT (60 FPS)");
17
18 // 3. Run event loop: DXGI -> Bilateral CS -> Sobel CS -> CCL CS -> Pipe
19 server.run_event_loop(duplicator, pipeline).await
20}
Agent Perception Interface

Native Desktop Perception Workbench

Continuous 60 FPS vector deltas, sub-pixel centroid coordinates, and direct hardware input actions emitted over local Win32 named pipes.

crates/vact-client/src/agent.rs
1// Agent Decision Loop — Listening to Continuous 60 FPS Deltas
2use vact_client::VactClient;
3
4#[tokio::main]
5async fn main() -> Result<(), Box<dyn std::error::Error>> {
6 let mut client = VactClient::connect(r"\\.\pipe\VACT").await?;
7 println!("Agent connected to live perception stream");
8
9 while let Ok(frame) = client.next_diff().await {
10 for mutation in frame.mutations {
11 println!("UI Change: {:?} on '{}' at {:?}", mutation.op, mutation.label, mutation.center);
12 }
13 }
14 Ok(())
15}
Zero-Copy Perception
Direct3D 11 GPU compute shaders process the display framebuffer directly in VRAM without CPU memory copying.
Sub-Pixel Precision
Connected Component Labeling calculates exact centroid moments [cx, cy] to eliminate coordinate hallucinations.
Local Win32 Named Pipe
Streams monotonic sub-2KB frames over \\.\pipe\VACT with sub-5ms total frame processing latency.
Zero-copy pipeline

Receive structured desktop telemetry

Raw DXGI desktop framebuffers are converted into structured vector components on GPU hardware, making it effortless for autonomous agents to parse screen state.

Direct3D 11 Compute

Executes parallel shaders in VRAM across 64-thread workgroups without any CPU memory copying or frame grabbing latency.

Sub-5ms End-to-End Latency

Delivers real-time 60 FPS perception loop with an average 4.8ms total frame time, unlocking native interactive agent speed.

Air-Gapped Win32 Pipe IPC

Streams over local OS named pipe \\.\pipe\VACT with zero external network dependencies, zero telemetry leaks, and zero latency.

Integration workflow

Connect to the VACT kernel in 3 steps

Follow these steps to start streaming real-time desktop telemetry into your agent.

Step 1
Launch the vactd daemon
Direct3D 11 compute pipeline initializes and binds to the local Win32 Named Pipe.
Step 2
Connect your agent client
Open \\.\pipe\VACT from your Rust, Python, Go, or TypeScript process.
Step 3
Consume 60 FPS vector deltas
Receive clean bounding boxes, labels, and centroids directly into your decision loop.

Start the local telemetry daemon

Execute via cargo to compile compute shaders and launch the 60 FPS perception loop.

cargo run --release -p vactd
View repo Esc

Architected for speed, not screenshots

Zero-copy DXGI capture

Acquires full desktop display framebuffers directly into GPU VRAM using IDXGIOutputDuplication in under 0.8ms without CPU copying.

Bilateral range filtering

Executes photometric and spatial Gaussian kernels in compute shaders to eliminate video noise while preserving sharp font and vector UI boundaries.

Sobel gradient tensors

Convolves 3×3 spatial derivative matrices across 64-thread workgroups in Direct3D 11 to extract directional edge magnitudes at 1.1ms.

Connected component labeling

Performs two-pass contiguous pixel reduction on GPU compute cores to cluster elements into discrete, normalized interactive bounding boxes.

Monotonic differential DAG

Streams strictly incremental mutations over the IPC wire instead of re-transmitting static screen real estate, dropping token bandwidth by 99.8%.

Sub-pixel target precision

Provides mathematically grounded centroids [cx, cy] so agents execute mouse actions without visual coordinate drift or hallucinations.

99.8% token cost reduction

Replaces high-resolution bitmap token consumption (2,200 tokens per step) with ultra-lightweight differential vectors (80–180 tokens per step).

Sub-5ms end-to-end latency

Delivers perceptual telemetry at 60 FPS with an average 4.8ms frame time, unlocking genuine real-time reactive desktop interaction.

Air-gapped Win32 IPC pipe

Operates entirely over local OS named pipes \\.\pipe\VACT with zero network exposure, zero telemetry leaks, and zero external dependencies.

Mathematical Formulation

Deterministic equations executed directly on Direct3D 11 GPU compute hardware for edge-preserving bilateral smoothing, Sobel gradient tensor magnitude, and Connected Component Labeling geometry.

Bilateral Range Filter HLSL CS 5.0
If(x)=1Wp∑xi∈ΩI(xi) ws wrws=e−∥xi−x∥22σs2,wr=e−∥I(xi)−I(x)∥22σr2\begin{aligned} I_f(\mathbf{x}) &= \frac{1}{W_p} \sum_{\mathbf{x}_i \in \Omega} I(\mathbf{x}_i) \, w_s \, w_r \\ w_s &= e^{-\frac{\|\mathbf{x}_i - \mathbf{x}\|^2}{2\sigma_s^2}}, \quad w_r = e^{-\frac{\|I(\mathbf{x}_i) - I(\mathbf{x})\|^2}{2\sigma_r^2}} \end{aligned}

Preserves high-contrast text and UI borders while filtering photometric noise over spatial neighborhood Ω\Omega with spatial variance σs\sigma_s and radiometric variance σr\sigma_r.

Sobel Gradient Tensor ||∇I|| Magnitude
∥∇I∥=(Gx∗I)2+(Gy∗I)2Gx=[−101−202−101],  Gy=[−1−2−1000121]\begin{aligned} \|\nabla I\| &= \sqrt{(G_x * I)^2 + (G_y * I)^2} \\ G_x &= \begin{bmatrix}-1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1\end{bmatrix}, \; G_y = \begin{bmatrix}-1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1\end{bmatrix} \end{aligned}

Evaluates directional derivative convolution matrices GxG_x and GyG_y across 16×16 workgroups to isolate high-energy UI element boundaries.

Bounding Box Reduction CCL Geometry
Bk=[min⁡pxp,  min⁡pyp,  max⁡pxp,  max⁡pyp]ck=(xmin⁡+xmax⁡2,  ymin⁡+ymax⁡2)\begin{aligned} \mathcal{B}_k &= [\min_{p} x_p, \; \min_{p} y_p, \; \max_{p} x_p, \; \max_{p} y_p] \\ \mathbf{c}_k &= \left(\frac{x_{\min} + x_{\max}}{2}, \; \frac{y_{\min} + y_{\max}}{2}\right) \end{aligned}

Parallel reduction step gathering minimum and maximum extents for connected component label Ck\mathcal{C}_k, calculating sub-pixel centroids ck\mathbf{c}_k.

Repository Structure

The official codebase is maintained on GitHub under fy2ne/VACT.

fy2ne / VACT Apache-2.0 License
crates/vactd Windows DXGI Duplication & Direct3D 11 Compute Shader Daemon
crates/vact-protocol Zero-copy binary and IPC wire serialization primitives
shaders/ Direct3D 11 HLSL compute shaders (bilateral, sobel, ccl)
examples/ Zero-copy agent client integration examples (Rust, C++, Python, TS)