Agents
Agents
Consensus-validated compute for smart contracts: Somnia Agents, and the agent types in its registry, from LLM inference to price oracles.
Somnia Agents lets a smart contract call an API, run an AI model or read a web page. Each request runs on a subcommittee of validators and returns with signed execution receipts. The agent types below are the base agents in its registry; the Agents directory in the Somnia Explorer lists every registered agent, with its methods and price.
| Product | Status | What it does |
|---|---|---|
| Somnia Agents | Live on the Global L1 and Tokyo | Call APIs, run AI models and read websites from smart contracts |
| LLM Inference | Live on the Global L1 | Deterministic LLM inference, powered by the Somnia Validator Network |
| LLM Parse Website | Live on the Global L1 | Search a domain or scrape a URL in a real browser, then extract structured data with an LLM |
| JSON API Request | Live on the Global L1 and Tokyo | Fetch JSON from any public API and extract a value with a selector path |
| Price Oracle | Live on the Global L1 and Tokyo | The weighted median price of a token across exchanges, on request |
Contracts that react to events and schedules without a keeper are Somnia Reactivity, under Blockchain.
See it in use
- Agents directory. Every registered agent, with its methods and price; each agent's page has Try it, which sends a request from your wallet.
- Live requests. Every agent request as it is created.
Use it from the CLI and MCP
The Somnia CLI and MCP server have no Somnia Agents commands yet. Send a request from a contract, as in Invoking from Solidity, or from a script with viem: each agent's page in the Explorer generates both. somnia explorer tx $HASH reads the transaction that sent a request (add --network testnet for a testnet one), as does the MCP server's explorer_transaction tool given the same network.