Somnia Agents / Invoking agents

Quickstart

How agent invocation works, which network to use, and where to explore agents.

This page covers how to invoke Somnia Agents: calling their methods and receiving results.

How agent invocation works

Agent invocations are asynchronous. When you invoke an agent:

  1. You invoke the agent through the platform contract and pay a fee.
  2. The platform contract distributes the request to validator nodes, which execute the agent independently.
  3. Validators reach consensus on the result.
  4. The platform returns the result, and optionally delivers it to a callback.

This decentralized execution makes results trustworthy and auditable.

Network and tokens

Somnia Agents are live on both Somnia Mainnet and Somnia Testnet. Pick the network that matches your deployment target:

Property Mainnet Testnet
Network name Somnia Mainnet Somnia Testnet
Chain ID 5031 50312
RPC URL https://api.infra.mainnet.somnia.network https://api.infra.testnet.somnia.network
Currency SOMI STT
SomniaAgents contract 0x5E5205CF39E766118C01636bED000A54D93163E6 0x037Bb9C718F3f7fe5eCBDB0b600D607b52706776

Get testnet STT from the Somnia Faucet. For mainnet, acquire SOMI through the usual channels.

Explore agents

The easiest way to get started is the Somnia Explorer: somnia-platform-explorer.vercel.app/agents. Use its chain selector to switch between Global (mainnet) and Global testnet.

In the Somnia Explorer you can:

  • Browse all available agents
  • View agent methods and their parameters
  • Copy a generated Solidity snippet for each method (payload encoding, deposit, createRequest and callback)
  • View requests and their execution receipts

See Using the explorer for a tour of each page.

To invoke agents directly from the browser, use the standalone Agent Explorer web app:

Network URL
Testnet https://agents.testnet.somnia.network
Mainnet https://agents.somnia.network

Invocation methods

There are two ways to invoke agents:

Method Use case Guide
Web app Exploration, testing, one-off calls This page
Solidity Smart contract integration, on-chain automation Invoking from Solidity

All agent invocations go through the Solidity platform contract, including calls made from the web app.

Next steps

Edit this page