NEWPowered by Ollama · Runs 100% locally →

Ethereum dApps, one curl command away

Wagmi AI is a collection of open LLMs specialized in Wagmi, viem, and modern React dApp architecture. They run on your machine via Ollama, so your repo stays private, and they return hook fixes, config reviews, and connector guidance as structured JSON.

❯ curl -s -X POST https://wagmiai.dev/api/wagmi -H "Content-Type: text/plain" --data-binary @useSwap.tsx | jq .report

⠿ wagmi-coder:7b analyzing… 186 lines · 3.1s

HIGHuseWriteContract missing chainId guardL24

MEDIUMStale read after wallet switch — missing queryKeyL41

LOWPrefer useSimulateContract before writeL52

quality_score: 88 / 100

Supported technologies

  • Wagmi v2
  • viem
  • React
  • TanStack Query
  • WalletConnect
  • RainbowKit
  • Ollama

Models

Four models for every dApp workflow

Each model ships as an Ollama Modelfile — a Wagmi-focused system prompt and tuned parameters on top of proven open-source code LLMs.

wagmi-coder:7b

qwen2.5-coder:7b

Balanced speed and accuracy

The default model for everyday PR reviews and CI. Strong on hooks, config, and TypeScript/React patterns.

Accuracy86%
Speed92%

wagmi-deep:14b

qwen2.5-coder:14b

Step-by-step flow debugging

Traces wallet events, RPC errors, and multi-hook state step by step — ideal for flaky mainnet issues.

Accuracy91%
Speed72%

wagmi-pro:32b

qwen2.5-coder:32b

Production architecture review

Flagship model for large apps: SSR, multi-chain, account abstraction, and connector edge cases.

Accuracy95%
Speed48%

wagmi-lite:3b

qwen2.5-coder:3b

Light enough for a laptop

Quick first-pass scans and learning. Great for on-save checks in your editor.

Accuracy78%
Speed98%

* Accuracy and speed are indicative values for comparing models. Real-world performance depends on your hardware and codebase.

How it works

Your code never leaves your machine

No cloud API keys, no usage billing. Terminal → Ollama → dApp review report — that's the whole pipeline.

  1. 01

    Send the source

    Send your .tsx, .ts, or wagmi config with curl. Works with local Ollama (:11434) or this site's /api/wagmi proxy.

    curl --data-binary @app.tsx

  2. 02

    Local LLM inference

    Ollama runs the Wagmi model on your GPU/CPU while the system prompt walks through hooks, chains, and viem calls.

    ollama · temperature 0.15

  3. 03

    JSON report

    Structured JSON with severity, file location, Wagmi pattern ID, and suggested fixes — ready for jq, CI, and dashboards.

    format: "json"

Why local AI

A co-pilot for your wallet stack 24/7

Wagmi AI is your first line of defense before mainnet — catch misconfigured chains, broken hooks, and connector mistakes inside your dev loop.

Complete privacy

Review unreleased dApp code with confidence. All inference happens in your local Ollama runtime.

Free & unlimited

No per-token billing — run reviews on every commit and every file at zero cost.

Structured output

Ollama JSON mode returns reports in a stable schema. Automate without parsing headaches.

CI/CD friendly

With curl and jq, fail builds when a critical Wagmi misconfiguration is found.

Quick start · curl

Automate Wagmi reviews with local AI in 5 minutes

Pick a model and OS — the curl commands below update automatically. Copy them in order to plug AI into your editor, scripts, or CI.

Pick a model

  1. Install Ollama

    Install Ollama, the local LLM runtime. Once installed, the server runs in the background on port :11434.

    install.sh
    curl -fsSL https://ollama.com/install.sh | sh
    # If the server isn't running: ollama serve
    ollama --version
    curl -s http://localhost:11434/api/tags | head
  2. Download the base model

    wagmi-coder:7b is built on qwen2.5-coder:7b (4.7 GB).

    pull.sh
    ollama pull qwen2.5-coder:7b
  3. Fetch the Modelfile & create the Wagmi model

    Download the Modelfile (Wagmi system prompt + parameters) with curl and register it as an Ollama model.

    create.sh
    curl -fsSL https://wagmiai.dev/api/modelfile/wagmi-coder-7b -o wagmi-coder-7b.Modelfile
    ollama create wagmi-coder:7b -f wagmi-coder-7b.Modelfile
    ollama list | grep wagmi
  4. Quick test

    Send a short snippet to Ollama's /api/generate. format: "json" guarantees a structured report.

    quick-test.sh
    curl http://localhost:11434/api/generate -d '{
      "model": "wagmi-coder:7b",
      "prompt": "Review this Wagmi hook for chainId and simulation issues:\n\nexport function useBad() { ... }",
      "stream": false,
      "format": "json"
    }' | jq .
  5. Review a full component

    jq -Rs safely wraps file contents and pipes them to /api/chat.

    audit.sh
    jq -Rs --arg model "wagmi-coder:7b" '{
      model: $model,
      stream: false,
      format: "json",
      messages: [{ role: "user", content: . }]
    }' src/useSwap.tsx | curl -s http://localhost:11434/api/chat -d @- | jq -r '.message.content' | jq .
  6. Use the Wagmi AI proxy API

    Run this site with npm run dev — /api/wagmi calls Ollama for you. Send files as-is, no JSON escaping.

    proxy.sh
    curl -s -X POST "https://wagmiai.dev/api/wagmi?model=wagmi-coder:7b" \
      -H "Content-Type: text/plain" \
      --data-binary @src/useSwap.tsx | jq .report

Live example

Feed it a buggy hook, get a report like this

Reviewing a swap component with a missing chain guard and stale balance read using wagmi-coder:7b.

Input · useSwap.tsx
import { useAccount, useReadContract, useWriteContract } from 'wagmi'
import { erc20Abi } from 'viem'

export function useSwap(token: `0x${string}`) {
  const { address } = useAccount()

  const { data: balance } = useReadContract({
    address: token,
    abi: erc20Abi,
    functionName: 'balanceOf',
    args: [address!],
  })

  const { writeContract } = useWriteContract()

  const swap = () =>
    writeContract({
      address: token,
      abi: erc20Abi,
      functionName: 'approve',
      args: ['0xRouter...', balance ?? 0n],
    })

  return { balance, swap }
}
Output · POST /api/wagmi
{
  "model": "wagmi-coder:7b",
  "report": {
    "quality_score": 88,
    "findings": [
      {
        "severity": "high",
        "title": "Missing chainId on writeContract",
        "line": 24,
        "pattern": "wagmi/write-chain-guard",
        "recommendation": "Pass chainId from useChainId() or use useWriteContract({ mutation: { onError } }) with simulate first."
      },
      {
        "severity": "medium",
        "title": "Stale balance after wallet switch",
        "line": 11,
        "pattern": "tanstack/query-key-account",
        "recommendation": "Include address and chainId in TanStack Query key via wagmi's queryKey helper."
      }
    ]
  }
}

Coverage

Wagmi patterns we check in one request

From hook misuse to connector config, multi-chain routing, and viem typing — in a single pass.

useAccount / useConnect

Connector state, reconnect, and SSR hydration

useReadContract

ABI typing, enabled flags, and block/tag freshness

useWriteContract

Simulation, chainId, and receipt polling

useWatchContractEvent

Listener cleanup and multi-chain filters

createConfig

Chains, transports, and SSR cookie setup

WalletConnect

Project ID, metadata, and deep links

Multicall & batching

viem multicall patterns with Wagmi hooks

Error handling

RPC errors, user rejection, and revert data

TanStack Query

queryKey design after chain/account switches

Testing

Mock connectors and hook testing patterns

Performance

Unnecessary refetches and cache tuning

Security UX

Transaction previews and address checksums

API reference

Two endpoints, one schema

Call Ollama (http://localhost:11434) directly, or use the Wagmi AI proxy for a simpler request.

  • POST/api/wagmi

    Takes TS/TSX source, reviews with Ollama, returns JSON report

    Wagmi AI
  • GET/api/models

    Available models and Modelfile download URLs

    Wagmi AI
  • GET/api/modelfile/:slug

    Modelfile for ollama create (text/plain)

    Wagmi AI
  • POST/api/chat

    Chat request — pass source in the messages array

    Ollama
  • POST/api/generate

    Single-prompt request — for testing short snippets

    Ollama

Request with a JSON body

chat.json
curl -s http://localhost:11434/api/chat -d '{
  "model": "wagmi-coder:7b",
  "stream": false,
  "format": "json",
  "messages": [
    {
      "role": "user",
      "content": "Review this Wagmi React component for hook and viem best practices.\n\n<file contents>"
    }
  ]
}' | jq -r '.message.content' | jq .

CI pipeline gate

ci-gate.sh
#!/usr/bin/env bash
set -euo pipefail
MODEL="wagmi-coder:7b"
for f in src/**/*.tsx; do
  report=$(curl -sf -X POST "$SITE/api/wagmi?model=$MODEL" \
    -H "Content-Type: text/plain" --data-binary @"$f" | jq -r '.report.quality_score')
  if [[ "$report" -lt 70 ]]; then
    echo "Wagmi review failed for $f (score $report)"
    exit 1
  fi
done

FAQ

Frequently asked questions

Before you ship, ask Wagmi AI first

Free · Open source · 100% local. Review your first hook today.

AI analysis is for reference only and does not replace professional security review. Wagmi and Ollama are trademarks of their respective owners.

© 2026 Wagmi AI