Hi, I just played with some language models in python. Language models are able to do stuff for you. Like looking for a website, searching for stuff. You create agents that run in python and they can do stuff for you.
Now I got an idea. If an agent could own a lightning wallet in python, then it could spend sats on behalf of its owner.
The use case would be like this:
  1. Every afternoon the agent would wake up at 14:00 and go to a website and order some ingredients
  2. The agent would pay for the ingredients with a lightning wallet and would also give the address where the ingredients need to be dropped.
  3. You could ask the agent what you want to eat every day like "scrambled eggs". And the agent would hold an inventory of your ingredients in your refrigirator.
  4. If the agent picks scrambled eggs as what you would eat tomorrow, and there are no eggs or no ham, the agent would order these ingredients online.
The wallet I need to have the wallet in python. Is there an open source library where you can own a wallet in python and spend sats from within the code?
Can that maybe be a part of Nostr? In Nostr we have a wallet right, so is it possible to access that wallet from within Python?
How this use case can help others.
Imagine elderly people that needs to eat. They now can just talk to a gpt (a language model) and they get their food ordered. They would definitely use a wallet. The children can fund that wallet for them. And they get their food.
Other people like blind people or people not mobile. Who cannot leave home. Now they can chat with a language model and their stuff gets brought to them.
This is a use case that can help many people become more independent.
Nothing about your example use case requires an LLM. It could easily be just, "if this, then that".
reply
The llm part is: what are the ingredients of a pasta for tomorrow.
And the llm can also go to a website and buy the ingredients.
And the llm can also help you with: I want a lost of breakfasts for this month that include eggs, coleslaw and fruit. Please give me the list.
And then give me the ingredients.
reply
Most Agents are using AutoGPT to string together multiple GPT "thoughts" into intents and actions. AutoGPT has various plugins which allow it to "interact" with APIs, or automate web browsers, etc.
reply
It’s sounds like you are asking if there are lightning wallets out their that already have a well supported python library to interface with their wallet. What you’d probably end up wanting to do is separate your AI application from the wallet. I just recently set up Damus + Zapplepay + mutiny wallet to allow me to zap posts (since apple forced the removal of the native zaps). This architect would be something you could study to figure out the best way to mover forward with your project.
Another project to look at is Zeus LN. https://github.com/ZeusLN I mention that project because you can see how their app interacts with a lighting node. You connect a node via LND Rest or LND Connect or c-lightning Rest. Anyways, long story short your application could interact with a lightning node via rest. Making http requests from python land is well supported to say the least.
reply
Thanks. Will look into this. This is what I’m asking. Is there a well supported python library to interface their wallet. Because python is a language many people program in.
reply
reply
Seems like this is a great resource! I have been using Langchain to experiment with llms in python. And this seems like they have an integration with lightning nodes!! This is great!!!
reply
talk to a gpt....
I prefer to die but not talking with a gpt. FUCK AI
reply
I basically think this would require you to run Bitcoin core + LND or CLN or Eclair (one of the LN implementations) + make calls to (an LN implementation) via its API
reply
reply
Could also use LNbits API to create and program your LNBits wallets with python.
I don't like the idea of giving an LLM access to an actual node without some serious hardening first. Better to interact with someone else's node :)
reply