Skip to main content

Welcome to Foil

Foil is an observability platform purpose-built for AI applications. Get complete visibility into your LLM calls, agent workflows, and AI pipelines with distributed tracing, real-time alerting, and actionable analytics.

Why Foil?

Building AI applications is hard. Debugging them is harder. Foil gives you the tools to understand what your AI is doing, why it’s failing, and how to make it better.

Distributed Tracing

Track every LLM call, tool execution, and agent step with full context and parent-child relationships.

Real-time Alerting

Get notified instantly when your AI hallucinates, gets stuck, or produces low-quality outputs.

Cost Analytics

Monitor token usage, latency, and costs across all your models and agents.

Custom Signals

Track user feedback, quality scores, and custom metrics tied to your traces.

How It Works

Choose the integration method that works best for you:

Features

Traces & Spans

Every AI interaction is captured as a trace containing multiple spans. Spans represent individual operations like LLM calls, tool executions, or retrieval steps. Foil automatically tracks:
  • Input and output content
  • Token usage (prompt, completion, total)
  • Latency and time-to-first-token
  • Errors and status codes
  • Custom metadata

Intelligent Alerting

Foil uses LLM analysis to detect issues that traditional monitoring misses: Content Evaluations:
  • Hallucination Detection - Identifies fabricated facts, fake entities, made-up citations
  • Quality Analysis - Catches off-topic, unhelpful, or incoherent responses
  • Loop Detection - Alerts when agents get stuck repeating themselves
  • Satisfaction Analysis - Detects responses likely to leave users unsatisfied
  • Frustration Detection - Identifies user frustration signals in conversations
  • Content Safety - Flags inappropriate, explicit, or harmful content
Security Evaluations:
  • Prompt Injection - Detects attempts to override instructions or extract system prompts
  • PII Leakage - Identifies exposed personal data (SSN, credit cards, phone numbers)
  • Jailbreak Detection - Catches bypass attempts like DAN, roleplay exploits

Signals & Feedback

Capture user feedback and custom metrics directly tied to your traces:
  • Thumbs up/down ratings
  • Star ratings
  • Sentiment analysis
  • Goal completion tracking
  • Custom metrics