---
# System prepended metadata

title: Autonomous Generative LLC

---

# Autonomous Generative LLC

Here is a repo: https://github.com/mitmedialab/Generative-Autonomous-Legal-Entities


# Notes from 2024-05-03

* Shared slides we can use to help organize our respective speaking slots to Wyoming legis in a couple of weeks: https://docs.google.com/presentation/d/1ic3d1neIqU0s-uvMg7sPqzj0e2XfYkYzjmYFoADVfnM/edit#slide=id.p 

  
* Jesse's notes on usage example
Plan for what the autonomous agent will do.

The basic user interaction should be:
 - Some person external to the LLC should send an inquiry e-mail to `inquiries@llm.llc`.
 - This e-mail should be immediatedly forwarded to some internal system.
   - Proposed implementation/use-case:
     - `inquiries@llm.llc` receives a notification about a required change in the annual filing
     - this should bring a human into the loop, and provide an executive summary of the e-mail along with the intended action item / make an actionable suggestion, pull up what the annual filing was going to be and to provide a diff on the document (Damien - a few pages)
     - Idea: implement through a Discord bot
     - Discord bot receives incoming e-mails through a webhook, and:
       - decides if it's spam
       - if not spam, creates a new thread in a dedicated Discord channel
       - have an executive summary of the e-mail
       - have a list of actionable suggestions of how to handle the e-mail
       - listens to commands for how to respond to the e-mail thread



* Check out this prior project: Here are use cases: https://github.com/mitmedialab/AutomatedLegalEntityChallenge/wiki/2019-June-24-and-July-15-Notes-of-Rapid-Hack-Scenario-Sessions#scenario-1 


Here is a correponsing "Challenge" we made: https://github.com/dazzaji/AutomatedLegalEntityChallenge Would this be good to revive, update, and use as a way to garner a broader community proposing various (open source) implementations for Wyoming LLM LLC?  and Here's the final project page w/Google for for the MIT automated legal entity challenge: https://law.mit.edu/pub/automatedlegalentitychallenge/


* Example annual report for Wyoming LLC: https://wyobiz.wyo.gov/Business/FilingDetails.aspx?eFNum=111137069192183095103060147029096187051123199089 

* Good artile on autonomous legal entities: https://law.mit.edu/pub/mappingthefutureoflegalpersonality 

# Notes from 2023-04-26

* Some notes on relevant duties: https://github.com/mitmedialab/Generative-Autonomous-Legal-Entities/blob/main/Wyoming_Law-Excerpts.md 


Concept for Demo
* Show difference between between human in the loop LLC and totally autonomous LLC.
* Signature: Can we programmatically access Docusign?  Ask Mike.
* Autonomous LLC = Esign compliant? Require human intent?  Use bar code.
* Check to see if John Nay's multi-LLM fiduciary duty experience and if so, at least include paper in packet for legis and hopefully show it.
* Maybe show a negotiation with the LLM based on it's priorities and parameters. 
* For task - maybe create articles of incorp or a legal questions.  


Outline
* Goal to create something (app? product?) OR it could be a simple purchase and sale transaction of some kind. Or start with a sale of sometning, then zoom out to hire a person, then zoom out to make a new company.
* Job descripting posting
* Select candidate and negotiate
* consider a 5x5 view to see a) what contractor sees, b) what the LLM sees and what it's thinking/doing eg chain of thought reasoning, adhereing to guidelines, etc and triggering signature processes, etc.
* Could be pre-recorded video or real-time interaction
* Circulates docusign contract and "makes its mark" eg QR bar code.


**Consider** a version with human input and without human input** and show need for humans in the loop.





# Notes from Meeting with Wyoming Legislators and Post Meeting

Jesse tooling: https://docs.blazon.ai/docs/structured


* Need the procedure to form an LLC and maintain it via annual filings, etc.
* Need an old fashioned process map.


What if the articles for forming the LLC based on prompts.  

# Approach to Select Cmt 

## Maybe something with/for the LSO for teach-in

* Summarization for LSO FAQ bot
* Show drafting in Wyoming style
* Answer questions re Wyoming law

Show an example of what to do when data is "too long" via a vector db for example.

We assume one human at the center who states the goals (like a business owners dream) and they can "tell" the agent what they need 

Should have a doc repo where things come in.
Should have outputs.
Should do a legal track (formation, annual filings, etc)
Should do a business track (does a transcation or two?)

Primary way to deal w/the entity should be via email.  Mike has a technical solution for this.  Could do a custom email on llm.llc domain.   Maybe part of the demo is agreeing to use email on the domain. 

Can check the filing status of the entity by checking the status to see it's in good standing.

Can do private law contract to license and get use for email.

Can review the contract to see if there are any unfair terms in there and use SALI to confirm the terms and maybe even negotiate terms.  

This is also a great way to show mechanism for human oversight so if the terms are weird it could flag it and ask for a call from the human member. 

Maybe hire a human to do something.  Task rabbit? Fiver? Maybe try to lease propoerty of one of the senators.  



## LLC Demo

* https://docs.blazon.ai/docs/structured 

* Jesse can build out some foundation tech to juggle data and such.  Can make an Agent ready to go.
* Use Mike's tools for stuff like email and other stuff to work with Google Workspace (OpenID Connect)
* Audit agent action using Mike's stuff.

# NOTES

Existing Relevant Law

https://wyoleg.gov/statutes/compress/title08.pdf 

(xviii) "Personal digital identity" means the intangible digital representation of, by and for a natural person over which he has principal authority and through which he intentionally communicates or acts;

(xix) "Organizational digital identity" means the intangible digital representation of, by and for a corporation, business trust, estate, trust, partnership, limited liability company, association, joint venture, governmental agency, public corporation or any other legal or commercial entity that is not a natural person, over which it has principal authority and through which it intentionally communicates or acts;

Attribution: https://casetext.com/statute/wyoming-statutes/title-40-trade-and-commerce/chapter-30-digital-identity-act/section-40-30-102-acts-through-digital-identity 

Impersonation: https://www.wyoleg.gov/2022/Introduced/HB0070.pdf 
* https://casetext.com/statute/wyoming-statutes/title-40-trade-and-commerce/chapter-30-digital-identity-act/section-40-30-103-impersonation-of-digital-identity-remedies 



Algorithmic Legal Entities 

* https://github.com/Torantulino/Auto-GPT 
* https://news.ycombinator.com/item?id=35413054 

Maybe identify bounded autonomous legal entities that must have accountable patent entities and license plates and clearly indicated entities or transactions that have an attributable natural person operating through a "personal digital identity" so people know what is what and who is who. 


Personal and Organizational Digital Identity 

Clearly, we have the principal as a human or legal entity and that has humans in the case of a Dynamic Autonomous Legal Entity so the same exact duties exist but they are applied to new facts and circumstances. 

Identity Theft-Oriented Examples

Example: Illinois Biometric Information Privacy Act
https://www.ilga.gov/legislation/ilcs/ilcs3.asp?ActID=3004&ChapterID=57 
* Replace biometric identifiers with AI deek fake of Personal Digital Identity
* Maintain concepts of revocable consent and for an employment agreement
* Add something to the effect of the same for Organizational Deep Fake (including for phishing) and maintain the concept of assent for revocable delegated authority

Require conspicuous assent to alert of use for "parody" or [other legit use?] 
Require continuously available link to 1) service provider, 2) accountable party


Algorithmically Managed LLC

* Require continuous Member(s) exercising control of principal authority and delegation to algorithmic management system over organizational digital identity.
* Require 1) alert to third parties of algorithmic manager and link to legal entity
* Empower registered agent to act as public point of contact for unidentified human's in control.


ALSO: Insured and Bonded, perhaps? (see model law provisions)































# 2023-04-28 Dazza and James Brainstorm

Goal: brainstorm inputs and outputs for a robot LLC roleplay

- What information can the LLM receive?
    - Read incoming messages from subcontractors
    - Look at task list
    - Read operating agreement for LLC
    - Read legislation inputs
    - Read arbitrary email
        - Spam, scams, phishing
    - Read the news
        - Looking for specific things, optionally
- What actions can it take?
    - "Internal" actions that don't affect the outside world
        - Record-keeping: keeping TODO lists or something
        - Verify key signatures with public keys
        - Query a document store
            - "Search for keywords 'authoritative rules' in document store"
            - Or semantic query
        - Scheduling
            - Wake me up in an hour
            - Wake me up when this changes
    - "External" actions that do
        - Hiring someone
        - Buying something
        - Submitting filings
        - Sign & publish stuff with a private key
        - Surf the web
        - Edit documents with someone (live, hackmd or google docs)

Notes on getting https://github.com/yoheinakajima/babyagi set up:
- Install Github App
- Clone URL with github app
- Open in sublime text
- Command+shift+P -> Install control
- Command+shift+P -> Install terminus
- Right click the folder in sublime text -> open 
- `xcode-select --install`
- `pip3 install --user -r requirements.txt`
- `cp .env.example .env`
- edit .env variables:
    - OPENAI_API_KEY 
    - ...temperature...
    - ...model name...
    - ...objective...
    - ...initial task...
- save .env
- `python3 babyagi.py`


Colab version:



### What needs to be modified to make babyAGI ACTUALLY DO STUFF
https://github.com/yoheinakajima/babyagi/blob/main/babyagi.py#L460-L482
- This needs to be an interactive session with multiple backs-and-forth between chatgpt and the system tools
- You need to tell ChatGPT what it can do, parse its response to look for commands, and then execute those.

Example command:
```
Your goal is to find the acreage of the amazon rainforest.

You have available the following python commands:

def google_search(text: str) -> str:
    '''Return the HTML of the first page of search results.'''
    pass

def get_site(url: str) -> str:
    '''Return the HTML contents of the web page at the given URL.'''
    pass

def print(text: str):
    '''Output text to GPT'''
    
    
Write a python script using this API and we will execute it and give you back whatever the script outputs to help you complete the task.

```
Keep in mind that the results may do ARBITRARY THINGS TO YOUR COMPUTER and therefore should probably be... sandboxed somehow
Running in colab it's fine.

Just parse out a ```python ... ``` chunk in the output and then exec() it LOL. Collect whatever it tells itself... and send that in a new API call.


        
        

OUTPUT
```python
import re

def extract_acreage(html: str) -> str:
    acreage_pattern = r'(\d[\d,]*\.\d+|\d[\d,]*)\s+(million|billion)?\s?acres'
    match = re.search(acreage_pattern, html, re.IGNORECASE)
    if match:
        return match.group(0)
    return None

search_query = "acreage of the Amazon rainforest"
search_results = google_search(search_query)

url_pattern = r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
urls = re.findall(url_pattern, search_results)

for url in urls:
    site_html = get_site(url)
    acreage = extract_acreage(site_html)
    if acreage:
        print(f"The acreage of the Amazon rainforest is approximately: {acreage}")
        break
```






BARB OUTPUT

def main():
  # Google search for the acreage of the Amazon rainforest.
  search_results = google_search("acreage of amazon rainforest")

  # Find the first link in the search results that contains the acreage.
  link = search_results.find(".//a[contains(text(), 'acreage')]")

  # Get the HTML contents of the web page at the link.
  page_contents = get_site(link.get("href"))

  # Find the acreage in the HTML contents.
  acreage = page_contents.find(".//span[contains(text(), 'acreage')]").text

  # Print the acreage.
  print(acreage)

if __name__ == "__main__":
  main()
















## NOTES

**ERROR**
```
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysr
oot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Libr
ary/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/Ap
plications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/include/python3.9 -c /var/folder
isibility=hidden
  creating build
  creating build/temp.macosx-10.9-universal2-3.9
  creating build/temp.macosx-10.9-universal2-3.9/python_bindings
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysr
oot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Libr
ary/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration -I/pr
ivate/var/folders/80/c6mly7wd7476r_d0881xy7j40000gn/T/pip-build-env-9m1qrxr8/overlay/lib/python3.9/site-packages/pybind11/
include -I/private/var/folders/80/c6mly7wd7476r_d0881xy7j40000gn/T/pip-build-env-9m1qrxr8/overlay/lib/python3.9/site-packa
ges/numpy/core/include -I./hnswlib/ -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Vers
ions/3.9/include/python3.9 -c ./python_bindings/bindings.cpp -o build/temp.macosx-10.9-universal2-3.9/./python_bindings/bi
ndings.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO=\"0.7.0\" -std=c++14 -fvisibility=hidde
n
  clang: error: the clang compiler does not support '-march=native'
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for hnswlib
```

Fix: https://github.com/nmslib/hnswlib/pull/451
Magic command:

`pip3 install git+https://github.com/XiChenn/hnswlib@master`