On-chain contract safety for autonomous agents

Score the contract
before your agent signs.

VeriSom gives AI agents a transaction-time safety verdict before they approve, swap, transfer, or call a smart contract. It inspects verified source or bytecode, recent on-chain activity, RAG evidence, callable functions, and Somnia agent results, then returns a direct score with provenance.

One MCP tool. One contract score. Evidence included.

Agent-side result surface

Built for the moment before execution.

Agents do not need long reports. They need a clear decision before value moves. VeriSom returns the exact surface an agent needs: score, recommendation, findings, inspected functions, recent activity, and the evidence used to produce the verdict.

Somnia safety scoreAllow / Review / Avoid recommendationKey risk findingsRAG context usedContract functions analyzedRecent transactions sampledSubmitted context payloadOracle transaction reference
Example resultALLOW
85Somnia score

Verified source was available and included in the scoring context.

Recent on-chain activity was sampled before the verdict.

Callable function surface was extracted from ABI metadata or bytecode selectors.

WorkflowPre-transaction scoring

A control layer for agents that execute on-chain.

VeriSom acts as a control layer for agents that interact with smart contracts. The agent makes one MCP call. VeriSom builds the evidence, submits the context to Somnia, and returns a direct safety decision before execution.

01
Inspect the contract surfaceFetch verified source code when available. If source is unavailable, fall back to deployed bytecode, selectors, and observable contract signals.
02
Build the evidence bundleCombine source excerpts, ABI or selector functions, recent transactions, bytecode signals, and local RAG retrieval into a structured decision context.
03
Return the verdictSubmit the context to VeriSom on Somnia and return a contract score with an Allow, Review, or Avoid recommendation.
RAG Evidence

Every score comes with evidence

See the retrieved source excerpts, context chunks, and signals that shaped the recommendation.

Function Surface

Callable behavior stays visible

Understand which callable functions were inspected through ABI metadata or bytecode selectors.

On-chain Trail

The verdict stays anchored

Anchor the result to recent contract activity and the final VeriSom oracle transaction.

MCP surface

Minimal input. High-confidence output.

01

Single tool call

Agents call `score_contract_before_interaction` and receive the final score directly. No request-id handling. No extra choreography.

02

Connector-owned signing

In local stdio mode, the connector keeps `AGENT_PRIVATE_KEY` inside its own environment. The agent never sends private keys through prompts or tool arguments.

03

Structured provenance

Each response includes the RAG context, inspected functions, recent transactions, bytecode fallback signals, and the exact context submitted for scoring.

Agent setup

Local stdio connector setup.

VeriSom currently exposes a local stdio MCP server through `mcp-stdio.ts`. For Claude-style local connectors, launch the project through the local `tsx.cmd` binary and keep `AGENT_PRIVATE_KEY` in the connector environment.

01

Run this project locally and start the stdio server with `npm run mcp:stdio`.

02

Configure the connector to launch `mcp-stdio.ts` through the local `tsx.cmd` binary.

03

Set `AGENT_PRIVATE_KEY` once in the connector environment so tool calls stay clean.

claude_desktop_config.json
{
  "mcpServers": {
    "verisom": {
      "command": "C:\\path\\to\\verisom-final\\node_modules\\.bin\\tsx.cmd",
      "args": [
        "C:\\path\\to\\verisom-final\\mcp-stdio.ts"
      ],
      "env": {
        "AGENT_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY_HERE",
        "SOMNIA_RPC_URL": "https://api.infra.testnet.somnia.network",
        "SOMNIA_EXPLORER_BASE_URL": "https://shannon-explorer.somnia.network",
        "VERISOM_CONTRACT_ADDRESS": "0x45e89Bae0eD991b63F8988d13EcEC1Ae0eEdDA77",
        "CHAIN_NAME": "Somnia Testnet"
      }
    }
  }
}
tool usage
const result = await score_contract_before_interaction({
  targetAddress: "0x3203332165Fa483e317095DcBA7d56d2ED4E15bC",
  intendedInteraction: "swap 500 USDC for ETH",
  auditFocus: "reentrancy, access control, fund handling"
});

result.somniaScore;
result.scoreBand;
result.recommendation;
result.keyFindings;
result.ragContextUsed;
result.contractFunctionsUsed;

Make contract safety part of your agent runtime.

Give your agent one MCP tool to evaluate smart contracts before interaction. Keep signing inside the connector, return a clear score, and preserve the evidence behind every verdict.