Skip to content

AI-powered tool that helps you debug, analyze, and understand your applications using Pydantic Logfire.

License

Notifications You must be signed in to change notification settings

vstorm-co/logfire-assistant

Repository files navigation

Logfire AI Assistant by Vstorm

AI-Powered Debugging and Analysis for Pydantic Logfire
Built by Vstorm β€” AI tooling for modern development teams

Quick Start β€’ Features β€’ Screenshots β€’ How It Works

Python 3.11+ PydanticAI Logfire FastAPI PostgreSQL Redis React TypeScript

πŸ” Natural Language Queries Β β€’Β  πŸ—ƒοΈ Auto SQL Generation Β β€’Β  πŸ“Š Smart Visualizations Β β€’Β  ⚑ Real-time Streaming


Logfire AI Assistant by Vstorm is an AI-powered tool that helps you debug, analyze, and understand your applications using Pydantic Logfire. Ask questions in plain English, get instant answers with SQL queries and visualizations. Developed by Vstorm as part of our open-source AI developer tools ecosystem.

Logfire AI Assistant Demo
Ask questions in natural language, get SQL queries and visualizations

Why Use It?

Debugging AI agents and complex applications is hard:

  • Long traces β€” Agents generate many spans across multiple tool calls and LLM requests
  • Complex prompts β€” System prompts can be lengthy, making it hard to spot issues
  • Multi-turn conversations β€” Understanding what happened requires looking across entire interaction histories

Vstorm's Logfire AI Assistant acts as your AI debugging partner β€” it understands agent architectures, recognizes failure patterns, and helps you ship better software faster.


πŸ“Έ Screenshots

Main Interface

Home Page
Chrome extension sidebar integrated with Logfire dashboard

Core Features

Query Results SQL Generation
Query Results SQL Query
AI responses with data tables View generated SQL queries
Chart Visualization Span Analysis
Chart Span Select
Auto-generated charts from query results Select spans directly in Logfire UI

Settings & Configuration

Multi-Project Support Custom Prompts
Projects Prompts
Switch between Logfire projects Create reusable prompt templates
LLM Model Selection Customization
LLM Providers Style
Choose from multiple AI models Customize appearance and behavior

Additional Features

Slash Commands Conversation History
Prompts View Conversations
Quick access to saved prompts Browse and continue past conversations
File Attachments
File Input
Attach files for context

✨ Features

Feature Description
πŸ” Natural Language Queries Ask about your app's behavior in plain English
πŸ—ƒοΈ SQL Query Generation AI translates questions into SQL against Logfire data
πŸ“Š Auto Visualizations Automatically generate charts from query results
🎯 Span Context Select spans in Logfire and ask "what happened here?"
πŸ“ Multi-Project Support Switch between different Logfire projects seamlessly
πŸ“ Custom Prompts Define reusable prompts for common analysis tasks
⚑ Real-time Streaming Responses stream via WebSocket as they're generated
πŸ” JWT Authentication Secure access with token-based auth

πŸš€ Quick Start

1. Backend

# Install & configure
make install
cp backend/.env.example backend/.env
# Edit backend/.env with your settings

# Start database & run migrations
make db-init && make db-upgrade

# Run server
make run dev

2. Browser Extension

cd browser-extension
bun install && bun run build

Then load in Chrome:

  1. Go to chrome://extensions/
  2. Enable Developer mode
  3. Click Load unpacked β†’ select browser-extension/dist

That's it! Open Logfire dashboard, click on any span, and start asking questions.


πŸ”„ How It Works

You: "Why did this request take so long?"
                    β”‚
                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Chrome Extension                                       β”‚
β”‚  β€’ Captures span context (trace_id, span_id)            β”‚
β”‚  β€’ Sends question via WebSocket                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  AI Agent (PydanticAI)                                  β”‚
β”‚  β€’ Analyzes question + context                          β”‚
β”‚  β€’ Generates SQL query                                  β”‚
β”‚  β€’ Executes against Logfire API                         β”‚
β”‚  β€’ Creates visualization if needed                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
Answer: "The database query on line 42 took 3.2s due to
        missing index on user_id column. Here's the
        breakdown chart..."

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Chrome Extension                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Content Script  β”‚  β”‚         Sidebar Panel            β”‚  β”‚
β”‚  β”‚ (Logfire page)  β”‚  β”‚  β€’ Chat interface                β”‚  β”‚
β”‚  β”‚ β€’ Span selector β”‚  β”‚  β€’ Project switcher              β”‚  β”‚
β”‚  β”‚ β€’ Context grab  β”‚  β”‚  β€’ Settings & prompts            β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚                          β”‚
            β”‚      WebSocket           β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Backend (FastAPI)                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   API Routes β”‚  β”‚   Services   β”‚  β”‚   AI Agent       β”‚   β”‚
β”‚  β”‚   /api/v1/*  │──│              │──│   (PydanticAI)   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                               β”‚             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  PostgreSQL    β”‚  β”‚    Redis     β”‚  β”‚  Logfire API     β”‚ β”‚
β”‚  β”‚  (users,       β”‚  β”‚  (cache,     β”‚  β”‚  (query data)    β”‚ β”‚
β”‚  β”‚  conversations)β”‚  β”‚  rate limit) β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Development

Backend Commands

make run dev           # Development server
make test              # Run tests
make test-cov          # Tests with coverage
make lint              # Check linting
make format            # Auto-fix formatting
make db-migrate        # Create new migration
make docker-up         # Start all services (Docker)

Extension Commands

cd browser-extension
bun run dev            # Watch mode
bun run build          # Production build
bun run check          # Lint + format (Biome)

πŸ“ Project Structure

β”œβ”€β”€ backend/
β”‚   └── app/
β”‚       β”œβ”€β”€ agents/           # AI agent (PydanticAI)
β”‚       β”œβ”€β”€ api/routes/v1/    # HTTP endpoints
β”‚       β”œβ”€β”€ services/         # Business logic
β”‚       β”œβ”€β”€ repositories/     # Data access
β”‚       β”œβ”€β”€ schemas/          # Pydantic models
β”‚       └── db/models/        # SQLAlchemy models
β”œβ”€β”€ browser-extension/
β”‚   └── src/
β”‚       β”œβ”€β”€ background/       # Service worker
β”‚       β”œβ”€β”€ content/          # Content script
β”‚       β”œβ”€β”€ sidebar/          # Side panel UI
β”‚       └── stores/           # Zustand stores
└── docker-compose.yml

βš™οΈ Environment Variables

Copy backend/.env.example to backend/.env:

ENVIRONMENT=local
SECRET_KEY=your-secret-key     # openssl rand -hex 32

POSTGRES_HOST=localhost
POSTGRES_PASSWORD=postgres

REDIS_HOST=localhost

LOGFIRE_TOKEN=your-token       # Optional, for backend observability

πŸ™ Built With


πŸ“„ License

See LICENSE for details.


Made with ❀️ by Vstorm