The F1 season is here — so why not build something fun with it?
I recently came across the OpenF1 API — an open-source, real-time Formula 1 data API — and wanted to take it for a spin. So I built this: an AI-powered F1 assistant that actually knows what it's talking about. Ask it about lap times, telemetry, standings, paddock rumors — it'll dig up the answer.
This project combines a multi-agent AI system (built with Agno) with the full OpenF1 API to answer any F1-related question — live data, historical stats, race strategy, and more.
The system runs two specialist agents coordinated by a "Team Principal":
| Agent | Role |
|---|---|
| 🏎️ F1 Strategist | Pulls live telemetry, lap times, pit data, standings from OpenF1 |
| 🗞️ F1 News Scout | Searches the web for latest paddock news, driver transfers & rumors |
| 🏁 Team Principal | Orchestrates both agents and synthesizes the final answer |
All live F1 data comes from OpenF1 — a free, open-source REST API providing real-time and historical F1 data:
- Sessions, meetings & race calendars
- Lap times & sector splits
- Car telemetry (speed, RPM, throttle, gear)
- Pit stops & tyre stints
- Race positions & intervals
- Driver and team standings
- Weather data
- Race control messages & flags
- Team radio references
| Layer | Technology |
|---|---|
| AI Framework | Agno (v2.5+) |
| LLM | Azure OpenAI (GPT-4o) |
| F1 Data | OpenF1 API |
| Web Search | DuckDuckGo (via ddgs) |
| Frontend | Streamlit |
| Language | Python 3.12+ |
- Python 3.12+
- uv (recommended) or pip
- An Azure OpenAI account with a GPT-4o deployment
git clone https://github.com/your-username/f1-agentic-team-principal.git
cd f1-agentic-team-principalCreate a .env file in the root directory:
AZURE_OPENAI_API_KEY=your_api_key_here
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_DEPLOYMENT=gpt-4o
AZURE_OPENAI_API_VERSION=2024-12-01-previewuv sync
# or with pip:
pip install -r requirements.txtstreamlit run app.pyOpen your browser at http://localhost:8501 and start asking questions!
- "Who is leading the Drivers' Championship after the last race?"
- "Show me Verstappen's lap times from the most recent session."
- "What are the latest rumors about the 2026 driver market?"
- "Compare the tyre strategies used in the last race."
- "What's the current Constructor standings?"
f1-agentic-team-principal/
├── app.py # Streamlit frontend
├── src/
│ ├── f1_agent.py # Multi-agent team definition
│ └── f1_client.py # OpenF1 API client
├── requirements.txt
├── .env # Your credentials (not committed)
└── README.md
- The
INFO Reasoning modellog you may see in the terminal is expected — Agno uses Chain-of-Thought reasoning when a native reasoning model isn't available. - OpenF1 is a community-maintained API — some endpoints (e.g., championship standings) are in beta.
MIT — feel free to fork, remix, and build your own F1 toys.
Built for fun. Lights out and away we go. 🏎️💨
Vrrrrrrrrrooooooommmmm 🔥