Foglamp

Open-source o11y for AI SDK

Last verified:

Visit Foglamp

What is Foglamp?

Foglamp is the open-source observability layer for AI agents built specifically for the Vercel AI SDK. It instruments every generateText and streamText call in just two lines of code, providing deep visibility into cost, latency, token usage, distributed traces, evaluations, and alerts. The tool helps developers see the cost, latency, and quality of every LLM call and catch bad output before users notice issues.

Key features include Cost Intelligence (track spend per model, agent, or customer with exact pricing), Distributed Traces (waterfall view of every run with exact prompts and responses per span), Evals (score production traffic with code checks and LLM judges, not static test sets), Alerts (threshold rules on cost, latency, and error rate that evaluate every minute), and Per-Agent Monitoring (spans, latency, and spend for each agent with full call flow). It also provides per-agent rollups, nested traces with zero manual span wiring, and model fingerprinting to catch silent weight changes when providers swap underlying models.

Foglamp is for developers and teams shipping AI agents on the Vercel AI SDK who need production-grade visibility. It's ideal for teams building autonomous workflows in ops, sales, or support who need to trust what agents tried, where they failed, and what changed. The tool is Apache 2.0 licensed, self-hostable with docker compose up, and available on GitHub.

Foglamp pricing

Pricing model: Freemium

Free tier available - Start free option on website. Open-source under Apache 2.0 license, self-hostable with docker compose up. The website emphasizes 'Start free' with no paid plan pricing details explicitly shown. Being open-source, users can self-host without subscription costs.

Foglamp pros

  • Built specifically for Vercel AI SDK with zero manual span wiring
  • Two-line instrumentation: registerTelemetry(foglamp())
  • Full nested traces with per-agent rollups automatically
  • Cost computed per call, agent, and customer from live pricing
  • Evals run against real production traffic, not static test sets
  • Alerts evaluate every minute to catch regressions early
  • Open-source Apache 2.0 license
  • Self-hostable with docker compose up
  • Model fingerprinting catches silent weight changes from provider swaps
  • Per-agent spans showing latency and spend with full call flow
  • Waterfall distributed traces with exact prompt and response per span
  • Code checks and LLM judges for scoring production traffic
  • Threshold rules on cost, latency, and error rate
  • No PII in eval outputs with pass rate tracking
  • Catches cost regressions before customer complaints or Twitter threads

Foglamp cons

  • Narrow focus only on Vercel AI SDK, not general-purpose like Langfuse/Arize
  • Business-level trace layer for handoffs/approvals not yet dedicated view
  • New tool with only 75 followers on Product Hunt at launch
  • Requires Vercel AI SDK - not compatible with other agent frameworks
  • No dedicated view for explicit handoffs or approval gates yet
  • Must model business events as tool calls/workflow steps with metadata
  • Limited brand recognition compared to established observability platforms
  • Self-hosting requires Docker knowledge for deployment

Frequently asked questions about Foglamp

What is Foglamp and what does it do?

Foglamp is the open-source observability layer for AI agents built specifically for the Vercel AI SDK. It provides costs, latency, tokens, distributed traces, evals, and alerts for every generateText/streamText call in just two lines of code. You see the cost, latency, and quality of every LLM call and catch bad output before your users do.

How do I instrument Foglamp in my code?

Instrumentation is two lines: import { foglamp } from 'foglamp' const fog = foglamp() or use registerTelemetry(foglamp()). This instruments every generateText/streamText call with zero manual span wiring, giving you full nested traces, per-agent rollups, cost, and evals automatically.

How is Foglamp different from Langfuse or Arize?

The biggest difference is focus: Foglamp is built specifically for the Vercel AI SDK. You get full nested traces, per-agent rollups, cost, and evals with zero manual span wiring in two lines. Second, quality + cost live in one place - evals run against real production traffic not static test sets, and cost is computed per call/agent/customer from live pricing. Third, alerts evaluate every minute so you find regressions from a dashboard not a customer. It's also Apache 2.0 and self-hostable with docker compose up.

What features does Foglamp provide?

Key features include: Cost Intelligence (track spend by model, agent, customer), Distributed Traces (waterfall every run with exact prompt/response per span), Evals (score production traffic with code checks and LLM judges), Alerts (threshold rules on cost, latency, error rate evaluating every minute), Per-Agent Monitoring (spans, latency, spend per agent), and Cost Intelligence showing exact cost per call.

Is Foglamp open-source and can I self-host it?

Yes, Foglamp is open-source under Apache 2.0 license and is self-hostable with docker compose up. It's available on GitHub and launched with Open Source and GitHub tags on Product Hunt.

How does Foglamp handle cost tracking?

Foglamp provides Cost Intelligence that shows exactly what every call costs by model, agent, and customer. It computes cost per call from live pricing, showing breakdowns like Claude Opus $323.12, Gemini 3.5 Pro $43.06, GPT-5.5 mini $85.05, with total spend tracking.

What are evals in Foglamp and how do they work?

Evals score production traffic with code checks and LLM judges, not static test sets. They track metrics like No PII and pass rate (e.g., 94%). Evals run against real production traffic so you catch quality issues in actual usage rather than synthetic tests.

Can Foglamp catch when a provider swaps their underlying model?

Yes, Foglamp fingerprints the model on every call so you catch silent weight changes when a provider swaps something under you. This helps detect when providers change underlying models without explicit notification.

Does Foglamp support business-level traces like handoffs and approvals?

Today every run is a full span tree showing what the agent tried, tool calls made, and where it failed step-by-step down to the token. Multi-step pipelines group under workflows, conversation turns under sessions. Explicit handoffs, approval gates, and failed-outcome states as first-class business events aren't a dedicated view yet - you model these as tool calls/workflow steps with metadata. Turning them into proper business-level traces is on the roadmap.

What real-world problem does Foglamp solve?

Foglamp solves the horror story where Week 1 ships clean, Week 3 costs double and answers get worse, then Week 4 customers start complaining on Twitter. The team caught a 10x cost regression on their own stack 3 days after shipping. Foglamp catches regressions before the Twitter thread starts by evaluating alerts every minute from the dashboard rather than from customer complaints.

Categories

Use cases

Browse all AI tools on NeedAnAI