About Foglamp
Foglamp is an open-source observability layer for AI agents built on the Vercel AI SDK. It captures cost, latency, token usage, and distributed traces from every generateText and streamText call, with instrumentation that takes two lines of code. The project ships with a free hosted tier and can be self-hosted via Docker Compose.
Review
Observability for AI agents is becoming a standard requirement as teams move agents into production. Foglamp wraps model calls to log detailed telemetry data automatically, grouping traces by agent, workflow, and session. Its focus on the Vercel AI SDK simplifies setup but limits the scope to that ecosystem.
Key Features
- Instrumentation requires only two lines - registering telemetry on the AI SDK - to capture full nested traces, per-agent cost rollups, and latency breakdowns without manual span wiring.
- Every run logs cost, latency, tokens, reasoning tokens, and the full prompt/streamed response, all available in a replayable trace view that shows tool calls and step-by-step decisions.
- Automated evals run directly on production traffic using LLM-as-judge and code-based checks (such as "No PII"), alerting when pass rates decline or costs spike.
- Alerts evaluate every minute for spend anomalies or regressions, surfacing issues from a dashboard rather than after customer reports.
- The codebase is open-source under Apache 2.0, self-hostable with docker compose up, and available with a free hosted tier for quick starts.
Pricing and Value
A free hosted tier exists at launch, and the tool is fully open source, so self-hosting incurs only infrastructure costs. The pricing model beyond the free tier has not been detailed yet. Users planning larger-scale deployments will need to watch the project page for updates.
Pros
- Two-line setup delivers immediate cost, latency, and token data with full trace trees - no manual span creation needed.
- Traces are replayable and fingerprinted per model call, making it possible to catch silent provider-side model changes.
- Evals run against real production traffic, not a static test set, flagging regressions from a dashboard instead of waiting for user complaints.
- Open-source licensing and a simple Docker Compose deployment give teams full control over data and infrastructure.
Cons
- The tool is built specifically for the Vercel AI SDK, so teams using other agent frameworks (e.g., LangChain, CrewAI, direct API calls) won't get the same native instrumentation.
- Business-level events - explicit handoffs, approvals, failed-outcome states - are not yet first-class trace entities; they can be modeled as workflow steps, but a dedicated view is on the roadmap only.
- Pricing for the hosted service beyond the free tier is undefined at launch, which may complicate cost forecasting for production use.
Foglamp fits teams already shipping AI agents on the Vercel AI SDK who need visibility into costs and behavior without a complex observability setup. It is less suited for environments that require broad framework support or first-class business process tracing today. Developers comfortable with self-hosting and permissive open-source tools will likely find the free tier a practical entry point.
Open 'Foglamp' Website
Your membership also unlocks:








