Installation

econagents requires Python >=3.10 and can be installed from pypi via:

python -m pip install econagents

To install directly from GitHub, you can run:

python -m pip install git+https://github.com/IBEX-TUDelft/econagents.git

For development, it's recommended to use uv:

git clone https://github.com/IBEX-TUDelft/econagents.git
cd econagents
uv sync --all-extras --all-groups

Note that uv is used to create and manage the virtual environment for the project development. If you are not planning to contribute to the project, you can install the dependencies using your preferred package manager.

Optional Dependencies

The base install ships with the OpenAI client, which is the default provider. Other providers and observability backends are available as extras so you can pick what you need.

LLM Providers

  • ollama: For using locally-hosted Ollama models

    pip install econagents[ollama]
    

Observability Providers

For tracing and monitoring your LLM calls:

  • langsmith: For using LangSmith to track and analyze LLM calls

    pip install econagents[langsmith]
    
  • langfuse: For using LangFuse for observability

    pip install econagents[langfuse]
    

Convenience Installations

You can combine multiple optional dependencies:

  • Standard installation (adds LangSmith on top of the default OpenAI client):

    pip install econagents[standard]
    
  • All optional dependencies:

    pip install econagents[all]
    
  • Custom combinations:

    pip install econagents[ollama,langfuse]
    

Core Dependencies

The core package depends on the following packages:

  • pydantic: For data validation and parsing

  • requests: For HTTP requests

  • websockets: For WebSocket connections

  • jinja2: For rendering prompt templates

  • pyyaml: For parsing experiment config files

  • openai: Default LLM provider client

Known Issues

  1. Organizational security policies may break the websocket connection. If you keep getting 1006, ConnectionClosed errors try to install the package in another device.

  2. Notebooks and asyncio may not play well together. When you cancel a game running in a notebook, the websocket connection may not be closed properly. Close the notebook kernel before running another game.