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?
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.
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?
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.
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.
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?