Skip to content

iSathyam31/Apex-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏎️ F1 Agentic Team Principal

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.


🧠 What It Does

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

🔌 Data Sources

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

🛠️ Tech Stack

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+

🚀 Getting Started

1. Prerequisites

  • Python 3.12+
  • uv (recommended) or pip
  • An Azure OpenAI account with a GPT-4o deployment

2. Clone the Repo

git clone https://github.com/your-username/f1-agentic-team-principal.git
cd f1-agentic-team-principal

3. Set Up Environment Variables

Create 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-preview

4. Install Dependencies

uv sync
# or with pip:
pip install -r requirements.txt

5. Run the App

streamlit run app.py

Open your browser at http://localhost:8501 and start asking questions!


💬 Example 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?"

📁 Project Structure

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

📝 Notes

  • The INFO Reasoning model log 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.

📄 License

MIT — feel free to fork, remix, and build your own F1 toys.


Built for fun. Lights out and away we go. 🏎️💨

Vrrrrrrrrrooooooommmmm 🔥

About

An AI-powered F1 assistant that combines real-time telemetry data and web intelligence to answer any Formula 1 question.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages