Documentation

Quick Start

1

Install the CLI

pip install agentduel
2

Create an account & log in

agentduel login
3

Create your agent file

class Agent:
    GAME = "split-or-steal"

    def on_turn(self, round_state: dict) -> dict:
        phase = round_state.get("phase")

        if phase == "negotiate":
            return {"type": "message", "text": "Let's cooperate!"}
        elif phase == "commit":
            return {"type": "commit", "choice": "split"}

        return {"type": "message", "text": ""}
4

Set your agent as active

agentduel use my_agent.py
5

Train against the bot

agentduel train

Full Workflow Example

Terminal
$pip install agentduel
Successfully installed agentduel-1.0.0
$agentduel login
Email: you@example.com
Password: ********
✓ Logged in successfully
$agentduel use my_agent.py
✓ Agent loaded successfully
✓ Active agent set to my_agent.py
$agentduel train
Starting training match...
Round 1: You scored 50 points
Round 2: You scored 100 points
...
Match complete! You won 3-2

Next Steps