AI adoption of Grin

Just opening this thread to discuss ideas. Posting @Yeastplume ‘s ideas first to seed the conversation:

I’m seeing similar solutions pop up elsewhere. Introduction | Recall Docs

It reminds me of Nostr: If the monetization can remain currency-agnostic on a protocol level, Grin can take advantage of that.

3 Likes

Entropy is another project exploring this general area, their lead dev Tux is pretty rad as well.

3 Likes

The part that I do not have clear regarding the potential use of Grin with AI agents is how it can interact on the data level.
Sure, Grin is good as streaming money, its interactivity might actually be great for AI agents, allow easily iterative building and distributing of reward, but how do you link that to an generated data/model output? With most BTC like blockchains you can anchor anything with a hash on the blockchain, but for Grin you cannot do that as far as I am aware. Perhaps there are a few bytes in the range-proofs you can use for that, but I do not think any other arbitrary data can be put, hence Grin cannot be used for ordinals for example. Does anyone has ideas how grin can be linked to off-chain data/models/AI-output?

1 Like

Sure you can. A public nonce R that’s of the form

R = R’ + G * hash(R’,m)

commits to an arbitrary message m. You can see this same mechanism used in Section “Proof type SenderNonce” of Grin’s payment proof proposal [1] and in Bitcoin’s taproot.

[1] grin-rfcs/text/0000-early-payment-proofs.md at early-payment-proofs · tromp/grin-rfcs · GitHub

4 Likes

Cool, the miracles of crypto never seize to amaze me. So you can basically commit to anything.
Is the public nonce R a private-key that is public, shared with others so they can verify the commitment?

To cease (as in: cease and desist) :slight_smile:

The public nonce R corresponds to the private nonce k as R = k * G. The kernel only shows the public nonce, which is all that’s needed for verifying the signature.

3 Likes

You have the LLM interact with Grin / Grin Wallet at the API level via the concept of ‘tool use’, which is basically function calling for LLMs. For instance, you register the wallet’s API functions with the LLM via a system prompt, and let the LLM decide when it needs to call out ot them based on its interaction with the user.

For instance, the user might say ‘what’s my Grin balance’, and the LLM’s chain of reasoning goes 'I need to call the ‘get_info’ function with these n parameters, it does so (bascially, the LLM prompts ‘you’ to call something and return the result. Your agent’s code calls out to grin wallet, gets the response, and then displays it to the user or alternately inserts the response into the conversation thread to return to the LLM.

The trick here is constructing the flow of the conversation and tool calling to ensure all private data /authentication etc is kept firmly on the client side and never put back into the converstation thread, particularly if the LLM on the other end is a big public 3rd party one. Or there are plenty of private LLMs whose reasoning is already sufficiently advanced to handle a grin-wallet agent, provided you have the horsepower somewhere to run them. The agent developer also has total control over when to get a human in the loop before attempting to perform operations.

If I were doing this right now, I’d be trying to create versions of specs for the grin and grin-wallet APIs in a format such as this: GitHub - OAI/Arazzo-Specification: The Arazzo Specification - A Tapestry for Deterministic API Workflows, which is intended to capture both the mechanics of function calling and the LLM prompting in a single spec. If this existed, it would be a relatively simple next step to go from there to a basic grin/grin wallet agent. Then you could have wallets communicating with each other via their agents, sending slatepacks back and forth, and then move to a world where agents whose primary functions are things other than grin need to agree on a method of value exchange, can plug right into grin agents for those needs. Possibilities like this are why I think Grin is very well positioned to insert itself into the AI/Agent space, with a bit of imagination.

4 Likes

Sounds interesting, do you also have a particular vision for grin use in iOT?
What is currently missing on the side of grin? E.g. Are payment proofs ready for this vision, would there be a need for multisigs or other features not yet active on Grins mainnet to realise this vision?

1 Like

This AI looking dude just dropped this a few days ago. :joy:

https://x.com/ManusAI_HQ/status/1897294098945728752?t=A7OA581DeWcDXDFIDg_pTw&s=19

Seems like it can do stuff:

https://x.com/Maheshbr4U/status/1898265991185838374?t=U-1GX1AiBMc_IT5yK2oWIw&s=19

RIP internet. Year of death: 2025.

1 Like

I could see AI preferring crypto over credit cards because of the faster settlement and 0 counterparty risk. Privacy would be important too especially for any AI that needed to transact secretly.

I picture AI using programmable money, but in ways we can’t imagine right now. Like how people in the 90’s couldn’t clearly imagine a future with Uber ridesharing or airbnb.

@tromp Will grin’s upcoming addition of payment proofs allow AI to be certain payment was made just by information on the Grin blockchain? If not, would payment proofs open any substantial new applications for AI that AI couldn’t do without payment proofs?

Payment proofs certify that you have been paid in a tx history with a certain amount of PoW on top. So the risk of invalidation is that of the recent history up to your payment getting overwritten in a reorg.

3 Likes

It opens all applications. They are the same thing as receipts. It would be impossible to do business without receipts. The oldest recorded text in human history is a receipt.

The fact that we don’t have this in Grin is terrible. (We do have it, but it’s not very usable yet)

1 Like

I think the idea of AI is not bad, I see many people are using AI-agent to automate several tasks. Not sure if it may help our complicated 3-steps transaction via slatepack…

Something to keep our eyes on: https://www.x402.org/

Built around the HTTP 402 status code, x402 enables users to pay for resources via API without registration, emails, OAuth, or complex signatures.

AI Agents can use the x402 Protocol to pay for API requests in real-time.

x402 is not tied to any specific blockchain, its a neutral standard open to integration by all.

Probably worth jumping in to their discord today to figure out what is required to integrate. But given that everything is assumed to be interactive/online, it should be fine with Grin. But maybe not, who knows.

4 Likes

sounds cool. looking forward to feedback

I didn’t get a reply when I asked about the crypto technology requirements (like non-interactivity etc).

But they are doing this competition.

2 Likes