Rust Proof of Concept - Build Brief (Plasmate v0)

Goal

Build a minimal Rust proof of concept that proves the core thesis:

  1. SOM can represent real pages deterministically and with 10x to 30x fewer tokens than raw HTML or DOM dumps.
  2. AWP can provide a stable, agent-friendly interface to observe and act.

This PoC is not trying to be a full browser. It is trying to be a compelling benchmark and a believable foundation.

Scope (In)

A. Core Engine

B. Networking (basic)

C. HTML to SOM

D. AWP v0.1 subset

Implement:

For page.act, it is acceptable to simulate behavior by:

The PoC can still be compelling even if action execution is stubbed, as long as:

E. Token benchmark harness

Token estimation method:

Scope (Out)

Not included in the PoC:

Acceptance Criteria

The PoC is "done" when:

  1. For at least 30 of 50 target URLs, the engine produces a SOM snapshot successfully.
  2. SOM output includes at least 50% of interactive elements visible to a human (links, buttons, inputs).
  3. SOM output is at least 8x smaller than raw HTML by token count on average.
  4. The AWP server can handle:
    • 50 sequential sessions
    • 10 concurrent sessions without crashes.

Recommended Crates

Element ID Strategy (Deterministic)

Define element_id as a hash of:

Example:

element_id = sha256("origin|role|name|path") then base32 encode.

This yields stable IDs unless the page structure changes, which is acceptable for a PoC.

Test Targets (suggested)

Pick a stable set:

Avoid:

Deliverables

  1. plasmate Rust binary
  2. AWP WebSocket server
  3. Example Python client that connects and calls observe
  4. Benchmark report (markdown) with token comparisons
  5. Dockerfile

Next Step After PoC

Phase 1 Alpha: