Skip to main content

econ-llm

A python package that uses LLM agents to automate experiments using the VEcon Lab Website.

Installation

To install the package, run the following command:

pip install econ-llm

Dependencies

Python Dependeny

sudo apt install python3
sudo apt install python3-pip
sudo apt install python3-venv

secrets.txt

OpenAI_API_KEY
GitHub_Username GitHub_Access_Token

secrets.txt should be in the same directory as execution.

Upload

Assumes git credentials are set

git config --global user.email "YOUR_EMAIL"
git config --global user.name "YOUR_NAME"
git config pull.rebase true

Commands

Run

To run an experiment (multi-round ultimatum game), use the following command:

econ-llm run [experiment_id] [user_id] [(optional) experiment_version]

The agent automatically detects if it is a proposer or responder. Versions supported:

  • "human_ai_classic": (default) matches instructions given to humans

Upload

Upload output to econ-llm-data using the following command:

econ-llm upload

Visualize

Visualize the output using the following command:

econ-llm visualize [filter one] [filter two] ...

Filters are used to select the data to visualize. For example, to select logs from a specific user on a specific day, use the following command:

econ-llm visualize [user_id] [yyyy-mm-dd]

parse can also be used in place of visualize. Both commands produce in the conversation in a readable format.

Upgrade

To update the package, use the following command:

econ-llm upgrade

Download

To get data from VeconLab, use the following command:

econ-llm download [session_id] [admin_password]

Suggested Process Flow

Add agents as needed:

econ-llm run [experiment_id] [user_id]

Visualize the data:

econ-llm visualize

Get the data from VeconLab:

econ-llm download [session_id] [admin_password]

Make sure data is uploaded:

econ-llm upload

Output

The output will be saved in the ~/econ-llm-data directory. File names contains experiment_id, user_id, and timestamp. Metadata includes the previous and the role of the agent.

Specification

The package is currently using gpt-4o-2024-08-06 as the model from OpenAI.

Change Log

Version 3.X.X - critical fix for the proposer history

NOTE: running proposer in version previous to this will not produce valid results.

  • 3.0.1
    • Update proposer history to correctly track value for you/other

Version 2.X.X - production release

Version 2.0.X

  • 2.0.7
    • Add delay for the responder on the final page
    • Update data pull from VeconLab
  • 2.0.6
    • Make sure it runs in visible mode
    • Add a delay for the proposer on the final page
  • 2.0.5
    • Stable version for experiments
  • 2.0.4
    • Add a 5-10 second random delay before sending a message
  • 2.0.3
    • Remove misleading version after upgrade
  • 2.0.2
    • Add version command to check the version of the package
    • Fix issues with git initialization
  • 2.0.1
    • Stable version used for AI-responder experiments

Version 1.X.X

Version 1.2.X - bug fix with proposer

  • 1.2.6
    • Update logs before running experiment
  • 1.2.5
    • Add download command to get data from VeconLab
  • 1.2.4
    • Fix typo with '%%'
  • 1.2.3
    • Add a parse command to make the conversations human readable
    • Use markdown for past results
  • 1.2.2
    • Update how context is built/stored
    • Critical fixes to the context for proposer/responder
  • 1.2.1
    • Fix bug with the proposer not getting all information
    • Add delays in interactions
    • Add spinner when proposer is waiting on a response

Version 1.1.X

  • 1.1.3:
    • Add visualizer command
  • 1.1.2:
    • Update logging structure
    • Add log parsing
    • Auality of life improvements
      • Use aboslute import paths
      • Better argument parsing
  • 1.1.1:
    • Initial prototype release

Metadata

Release files for econ-llm 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for econ-llm 3.0.1
File Size Uploaded Provenance Actions
econ_llm-3.0.1.tar.gz 52.0 kB Without provenance Details for econ_llm-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for econ-llm 3.0.1
File Interpreter ABI Platform Actions
econ_llm-3.0.1-py3-none-any.whl Python 3 none any Details for econ_llm-3.0.1-py3-none-any.whl

Total release size: 92.8 kB

Release files / econ_llm-3.0.1.tar.gz

Download URL econ_llm-3.0.1.tar.gz
Size 52.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6c17cf20761e9ea06abe28ff3376859e8a54dfc5657fed6fd8ad5af56f0a0741
BLAKE2b-256 checksum
How to use checksums
23aea779084e503c5dc164313c745f20c8cb9c5623cee4132faa9f2eb85dfc6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / econ_llm-3.0.1-py3-none-any.whl

Download URL econ_llm-3.0.1-py3-none-any.whl
Size 40.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
929d95e97a3bf00b97be9f01b90e7b650eb0aba76fe3213043d55973c8ef6ef7
BLAKE2b-256 checksum
How to use checksums
a3fed329a84f1b009360555e81d66d935b8b9bdeeeb134833e414d0ee88bbcb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for econ-llm 3.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page