Quick Start¶
Get up and running with PitLane-AI in minutes. This guide will walk you through your first F1 analysis using both the CLI and web interface.
Before You Begin¶
PitLane-AI uses Claude to power its analysis. You'll need an Anthropic API key:
- Get a key at console.anthropic.com
- Set it in your environment before running any commands:
CLI Quick Start¶
1. Install¶
2. Create a Workspace¶
Workspaces isolate your analysis sessions and store generated charts:
3. Fetch Driver Information¶
Get information about F1 drivers:
4. View Event Schedule¶
Check the race calendar:
5. Analyze Lap Times¶
Compare lap times between drivers at a specific race:
pitlane analyze lap-times \
--workspace-id monaco-analysis \
--year 2024 \
--gp Monaco \
--session Q \
--drivers VER \
--drivers HAM
This generates a lap time comparison chart saved in ~/.pitlane/workspaces/monaco-analysis/charts/.
6. Analyze Tyre Strategy¶
Visualize pit stop and tyre compound usage:
pitlane analyze tyre-strategy \
--workspace-id monaco-analysis \
--year 2024 \
--gp Monaco \
--session R
7. Check Temporal Context¶
See what the agent knows about the current F1 season:
Web Interface Quick Start¶
1. Install¶
2. Start the Server¶
Or with tracing enabled:
3. Open in Browser¶
Navigate to http://localhost:8000 in your web browser.
4. Create a Session¶
On the home page, create a new analysis session with a descriptive name.
5. Ask Questions¶
Try these example queries in the chat interface:
- "Show me lap time distributions for the Monaco 2024 qualifying session"
- "Compare Verstappen and Hamilton's tyre strategies at Monaco"
- "What are the upcoming races this season?"
- "Give me information about driver VER"
6. View Generated Charts¶
Charts are automatically displayed in the chat interface and saved to your workspace.
Python API Quick Start¶
For programmatic access:
import asyncio
from pitlane_agent import F1Agent
async def main():
# Create an agent
agent = F1Agent(session_id="my-analysis")
# Stream a response
async for chunk in agent.chat("Compare lap times for VER and HAM at Monaco 2024 qualifying"):
print(chunk, end="", flush=True)
print() # New line after response
# Run the async function
asyncio.run(main())
Workspace Management¶
List Workspaces¶
View Workspace Info¶
Clean Old Workspaces¶
Remove workspaces older than 7 days:
Remove a Specific Workspace¶
Common Session Types¶
When using the --session parameter, these are the valid session types:
FP1- Free Practice 1FP2- Free Practice 2FP3- Free Practice 3Q- QualifyingSQ- Sprint QualifyingS- Sprint RaceR- Race
Example Workflows¶
Analyzing a Complete Race Weekend¶
# Create workspace
pitlane workspace create --workspace-id silverstone-2024
# Analyze qualifying
pitlane analyze lap-times \
--workspace-id silverstone-2024 \
--year 2024 --gp "Great Britain" --session Q \
--drivers VER --drivers NOR
# Analyze race tyre strategy
pitlane analyze tyre-strategy \
--workspace-id silverstone-2024 \
--year 2024 --gp "Great Britain" --session R
# View all generated charts
ls -lh ~/.pitlane/workspaces/silverstone-2024/charts/
Comparing Multiple Drivers¶
pitlane analyze lap-times \
--workspace-id multi-driver \
--year 2024 --gp Monaco --session R \
--drivers VER \
--drivers HAM \
--drivers LEC \
--drivers NOR
Tips¶
Grand Prix Names
Use the official race names or country names for the --gp parameter. Examples:
Monaco,"Great Britain",Italy,Singapore- Multi-word names should be quoted:
"Saudi Arabia","United States"
Workspace IDs
Use descriptive workspace IDs that indicate the race or analysis type:
monaco-quali-analysisbahrain-2024-strategyverstappen-performance
View Charts
Charts are saved in ~/.pitlane/workspaces/<session-id>/charts/ with timestamps in the filenames for easy organization.
Next Steps¶
- Configuration - Configure environment variables and settings
- Web Interface - Learn more about the web interface
- Analysis Types - Detailed guide to analysis capabilities
- Agent CLI - CLI reference (for agents/developers)