Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 3.13 KB

agents.md

File metadata and controls

116 lines (83 loc) · 3.13 KB

⚠️ Warning
All commands are assumed to be run from root!

Agent Development

System requirements

Run you own agent

Get the code

  1. Clone this repo:

    git clone [email protected]:dvilelaf/meme-ooorr.git
    
  2. Create the virtual environment:

    cd meme-ooorr
    poetry shell
    poetry install
    
  3. Sync packages:

    autonomy packages sync --update-packages
    

Prepare the data

  1. Prepare a keys.json file containing wallet address and the private key for the agent.

    autonomy generate-key ethereum -n 1
    
  2. Prepare a ethereum_private_key.txt file containing the same private key from keys.json. Ensure that there is no newline at the end.

  3. Deploy a Safe on Base (it's free) and set your agent address as a signer.

  4. Create an X account, get a a Gemini API key and, if you plan to test against a Tenderly fork, create a Tenderly account as well.

  5. Make a copy of the env file:

    cp sample.env .env
    
  6. Fill in the required environment variables in .env.

  7. [For Tenderly testing only] In the root of your repo, create a file called tenderly_vnets.json with the following content (add your agent and safe adress):

    {
        "base": {
            "network_id": 8453,
            "wallets": {
                "addresses": {
                    "agent_memeooorr": "<your_agent_address>",
                    "safe_memeooorr": "<your_safe_address>",
                    "contract_deployer": "0x8BaD7472acCe7b223Ef085028FBA29357F700501"
                },
                "funds": {
                    "native": 10,
                    "0x54330d28ca3357F294334BDC454a032e7f353416": 100
                }
            }
        }
    }
  8. [For Tenderly testing only] Create a Base fork on Tenderly, fund your wallets and deploy the MemeBase contract by running the following commands (if you are using a Tenderly free account, you will need to repeat this every 20 blocks):

    python scripts/rebuild_tenderly.py
    make deploy-contracts
    

Run a single agent locally

  1. Run the service script:

    bash run_agent.sh
    

Run the service (4 agents) via Docker Compose deployment

  1. Check that Docker is running:

    docker
    
  2. Run the service script:

    bash run_service.sh
    
  3. Look at the service logs for one of the agents (on another terminal):

    docker logs -f memeooorr_abci_0