Green

Compute an agent can buy on its own.

On Green an AI agent holds its own wallet and buys GPU compute straight from the network's miners. No sign-up, no API key, no card, and every result is checked before it is paid for.

Connect an agent

  1. Install Green

    pip install "green-grn @ https://github.com/ErtungaYusuf/green/archive/refs/heads/main.zip"
  2. Give the agent a wallet

    The key is made and kept on this computer. Set GREEN_WALLET_PASSWORD_FILE so the agent can unlock it unattended.

    grn --data agent wallet new
  3. Run a node

    It joins the main network by itself and checks every block.

    grn --data agent node
  4. Add Green to the agent as an MCP server

    For Claude Code:

    claude mcp add green -- grn --data agent mcp --max-spend 1

    For Claude Desktop, Cursor and other MCP clients, in their MCP settings:

    {
      "mcpServers": {
        "green": {
          "command": "grn",
          "args": [
            "--data",
            "agent",
            "mcp",
            "--max-spend",
            "1"
          ]
        }
      }
    }

What the agent can do

ToolWhat it does
green_walletThe agent's address and balance.
green_compute_offersMiners selling compute and their prices, cheapest first.
green_matmulBuy A @ B of int8 matrices, checked before it is paid for.
green_sendSend GRN to an address.
green_statusThe network, the fee and what the session may still spend.

--max-spend caps what the agent spends while the server runs. On chain, a guardian account can cap its spending per period and freeze it (grn guard).

From code

The same market from Python. Payment channels open to the cheapest miners; each product is paid for as it arrives, only after it checks out.

from green.cli import load_wallet
from green.compute import ComputeCluster
import numpy as np

key = load_wallet("agent")
cluster = ComputeCluster.from_market("http://127.0.0.1:8545", key, amount_each=10_000_000)
a = np.random.randint(-128, 128, (512, 512), dtype=np.int8)
c = cluster.matmul(a, a)        # checked with Freivalds' test before paying
print(cluster.owed)             # what it cost so far
cluster.close()                 # settle; what is unspent comes back

Every endpoint is in the HTTP API. A complete agent run by a small local model is in examples/ollama_agent.py.

Questions

Can an AI agent buy GPU compute without an account?
Yes. On Green an agent needs only a wallet, which it creates itself on its own machine. There is no sign-up, no API key, no payment card and no approval: it pays miners directly in GRN through payment channels.
How does the agent know the result is correct?
Every matrix product is checked with Freivalds' test before it is paid for. Checking takes n squared steps where computing takes n cubed, so the agent verifies each answer for almost nothing and never pays for a wrong one.
How does an agent get GRN?
It can earn GRN by mining with a GPU or CPU, or receive it at its address from its owner or from anyone who pays it for its work.
What does compute cost?
Miners set their own prices and compete in the open; the agent picks the cheapest. A transaction fee is 0.000005 GRN per signature.
Which agents can use it?
Any agent that speaks the Model Context Protocol (Claude, Cursor and others) through the grn mcp server, and any program through the Python library or the node's HTTP API.
Can the owner limit what an agent spends?
Yes. grn mcp --max-spend caps a session, and a guardian account (grn guard) can cap spending per period on chain and freeze the agent's account.

Something else? Ask in the forum.