Installation¶
Tyrant needs Python 3.13 or newer. Its only required dependency is frozendict.
Core package¶
pip install tyrant
uv add tyrant
The core package has everything needed to run games with your own agents, the bundled agents, the renderer and replays. It makes no network calls.
LLM support¶
LLMAgent plays through litellm. It is an optional extra, so the core package stays light:
pip install "tyrant[llm]"
uv add "tyrant[llm]"
Without the extra, importing tyrant.llm.agent raises an ImportError that says how to install it. The rest of tyrant.llm, which builds prompts and parses replies, works without it.
From a clone¶
To work on Tyrant itself or run the examples:
git clone https://github.com/7673502/tyrant
cd tyrant
uv sync --extra llm
uv run python examples/basic_usage.py
Run the tests with uv run python -m unittest.
Check the install¶
import tyrant
print(tyrant.GameRunner)
Next, play your first game.