PitchPal is an interactive command-line AI assistant for football (soccer) data, powered by LLMs and LangGraph. It supports streaming responses, classification, and integrates with various football data tools.
- Interactive QA loop for football-related queries
- Streaming LLM responses
- Arize Phoenix tracing and logging support
- Modular tool integration for football statistics, fixtures, odds, and more
- Python 3.13+
- Phoenix (optional, for tracing)
Install dependencies with uv:
uv sync --frozenActivate the virtual environment:
source .venv/bin/activateMake sure to have the following environment variables set in your shell or in a .env file:
export FOOTBALL_API_KEY=your_football_api_key # required
export OPENAI_API_KEY=your_openai_api_key # OpenAI model
export GOOGLE_API_KEY=your_google_api_key #Google modelAlternative: build with docker:
docker build -t pitchpal .
docker run -it --rm -e FOOTBALL_API_KEY=your_football_api_key -e OPENAI_API_KEY=your_openai_api_key -e GOOGLE_API_KEY=your_google_api_key pitchpalYou can also set the environment variables in a .env file in the root directory and run docker with:
docker run -it --rm --env-file .env pitchpalRun the main script:
python main.py [--phoenix-endpoint URL] [--debug] [--log] [--model google|openai] [--show-classification]--phoenix-endpointPhoenix endpoint URL (optional)--debugEnable debug logging--logEnable logging (critical level if off, info/debug if on)--modelChoose the model to use (googleoropenai, default:openai)--show-classificationShow guardrailing node outputs in yellow
Type your football-related questions at the prompt. Type exit or quit to leave.
main.py– Main entry point and CLIagent/– Agent logic and configurationtools/– Football data toolsutils/– Utility functionstest/– Testscache/– Cached data
GPLv3