Meet the Somnia Agents #1: LLM Parse Website.
LLM Parse Website is one of the three base Somnia Agents. It allows smart contracts to fetch information from live websites and convert it into structured onchain data through validator consensus.
This makes it possible to build applications that react to information on the web without relying on centralized backends or traditional oracle infrastructure.
Let’s explore how it works and when to use it.
handleResponse gets Response[] responses with each validator's .result, .validator, .executionCost.
Iterate and apply any rule: median, weighted, quorum, custom.
For voting research use ConsensusType.Threshold + a source-varying agent (JSON Fetch / Parse Website) so responses can legitimately diverge.
1. Dynamic: default subcommittee is 3, use createAdvancedRequest to scale up to the operator cap ( like 10 today).
2. Yes, pass ConsensusType.Threshold instead of Majority. Each validator returns independently and your callback gets the full responses[] array to aggregate.
Caveat: LLM agents are deterministic by design (temp=0 + fixed seed), so same prompt → same output even under Threshold. For different answers, vary prompts across requests, or use Threshold on JSON / Parse Website agents where source-level variance is real.