Skip to content

feat(nosana): a second landlord — rent a GPU container on a decentralized market with the wallet this MCP already holds - #82

Open
Daisuke134 wants to merge 1 commit into
BlockRunAI:mainfrom
Daisuke134:feat/nosana-tool
Open

feat(nosana): a second landlord — rent a GPU container on a decentralized market with the wallet this MCP already holds#82
Daisuke134 wants to merge 1 commit into
BlockRunAI:mainfrom
Daisuke134:feat/nosana-tool

Conversation

@Daisuke134

Copy link
Copy Markdown

What

Adds blockrun_nosana: rent a GPU container on Nosana, a decentralized GPU market that settles on Solana, using the Solana wallet this MCP already manages.

action: "rent" | "status" | "extend".

Why this sits next to blockrun_modal rather than competing with it

blockrun_modal is the fast path and stays that way: one HTTP call, USDC on Base, nothing else to hold. This is the durable path. The Nosana market is an on-chain program, so no company can end a running lease, and a lease can be extended in place instead of the agent having to move house every time the clock runs out.

Price is the smaller half of the argument (the cheapest market measured $0.048/GPU-hr against $1.50/hr for a managed T4). The larger half is that an agent whose shelter comes from exactly one provider stops existing when that provider does — Conway Research shipped wallet-paid VMs for agents and is shutting that service down on 2026-10-01. Two rails behind one wallet is a different property from cheap.

What it refuses up front

Each of these is a failure I hit for real, so the tool answers before the caller pays for the lesson:

Refused Why it matters
duration outside 60..86400s the market will not take it
lease over max_spend_usd an agent looping on this should be stopped by arithmetic, not by its balance running out — and it is checked before any key is touched
an array cmd the SDK accepts it and the node then dies a few seconds in with no error message

The description also states the costs instead of leaving them to be discovered: you must hold NOS and a little SOL, and the job definition is pinned to public IPFS — so nothing secret can go in env.

Dependency weight

@nosana/sdk is an optional peer dependency, imported lazily inside the handler.

Deliberately not optionalDependencies — npm installs those by default, which would charge every user ~113 packages for a tool most will never call. package-lock.json is untouched by this PR.

Verification

  • npm test262 pass, 0 fail (8 new tests covering the pure planner and definition builder)
  • npm run typecheck, npm run build, node scripts/sync-brand-numbers.mjs --check — all clean
  • CONTRIBUTING's stdio smoke test lists 20 tools including blockrun_nosana
  • Exercised against the live mainnet market, not a mock: jobs.get on a running job returned state: RUNNING, timeout: 1200, and getExposeIdHash derived the same public URL the container is actually serving on

Checklist

  • npm run typecheck && npm run build && npm test
  • Tool description ≤30 lines
  • README ## Tools row added
  • Tool (not skill) — stateful, needs typed args, not a path-passthrough catalog
  • CHANGELOG entry + version bump (0.32.9 → 0.33.0)
  • One feature per PR
  • Rebased onto latest main (eb47378)

… wallet this MCP already holds

blockrun_modal stays the fast path — one HTTP call, USDC on Base, nothing extra
to hold. This adds the durable path: the Nosana market is an on-chain Solana
program, so no company can end a running lease, and the cheapest GPU market
measured $0.048/hr against $1.50/hr for a managed T4. The point is not price.
An agent that can only rent from one provider stops existing when that provider
does, and both verbs now work from the same wallet.

Three things the tool refuses up front rather than letting the caller discover
them the expensive way: an out-of-range lease, an over-budget lease, and an
array cmd (the SDK accepts it and the node then dies a few seconds in with no
error). The description states the costs — you must hold NOS and a little SOL,
and the job definition is pinned to PUBLIC IPFS, so nothing secret can go in env.

@nosana/sdk is an optional PEER dependency, imported lazily. Not
optionalDependencies: npm installs those by default.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant