Show HN: Lookspan – local-first observability for AI agents (npx lookspan) Lookspan launched a local-first observability dashboard for AI agents that runs entirely on the user's machine with zero cloud dependency. The open-source tool ingests trace data via HTTP, MCP, OpenTelemetry, or SDK adapters for LangGraph, CrewAI, and other frameworks, storing everything in local SQLite. By eliminating accounts, API keys, and data shipping to external servers, Lookspan gives developers real-time visibility into agent failures, token usage, and costs while keeping all data private. Local-first observability dashboard for AI agents. MCP-native. See every span your agents emit. npx lookspan → http://127.0.0.1:3100 Agent MCP · LangGraph · CrewAI · OpenTelemetry · HTTP → POST /api/ingest → SQLite → real-time dashboard 🇪🇸 ¿Prefieres español? Lee el README en español . When an AI agent misbehaves — fails, stalls, or quietly burns more tokens than expected — there's no native way to see what happened step by step. Existing observability tools are cloud-first: they want accounts, API keys, and shipping your production data to someone else's servers. Lookspan takes the opposite approach: everything runs on your machine, data never leaves it, and infra cost is zero. Instrument your agent with an adapter or just POST JSON and open the dashboard in your browser. npx lookspan → http://127.0.0.1:3100, no install, no cloud Send your first span from any language: curl -X POST http://127.0.0.1:3100/api/ingest \ -H "Content-Type: application/json" \ -d '{"spans": {"traceId":"t1","spanId":"s1","parentSpanId":null,"type":"llm call","name":"agent.run","startedAt":"2026-06-02T10:00:00Z","endedAt":"2026-06-02T10:00:01Z","status":"ok","framework":"custom","model":"gpt-4o","provider":"openai","usage":{"inputTokens":1000,"outputTokens":500,"costUsd":0}} }' Open http://127.0.0.1:3100 and watch the trace appear — with its cost computed server-side. HTTP span ingest — POST /api/ingest accepts JSON batches of spans. Works with any agent that can make an HTTP request. MCP-native — the @lookspan/mcp TypeScript SDK wraps any McpClient and emits a span per MCP tool call, without changing your agent code. Python SDKs — lookspan generic client plus adapters for LangGraph/LangChain lookspan-langgraph and CrewAI lookspan-crewai . OpenTelemetry — an OTLP/HTTP receiver at POST /v1/traces ; point any OTel exporter at it with no Lookspan SDK. gen ai. attributes map to provider/model/tokens. Real-time streaming — SSE endpoint GET /api/stream pushes span.ingested , trace.updated and alert.triggered to the dashboard, no polling. React dashboard — recent traces with a health strip + per-row latency/cost mini-bars; trace detail with a timeline waterfall or tree view and a conversation transcript of the prompt/response; replay diffs and A/B run comparison; costs & overview error rate, latency p50/p95/p99, cost per day ; alerts history. Cost tracking — aggregates input/output/cached/reasoning tokens and computes cost usd per span and per trace from a model pricing table, overridable with --pricing . Alerts — get notified when a trace fails or exceeds a cost/token/duration threshold toast + desktop notification + CLI + persisted history . Evaluation scores — attach metrics to a trace POST /api/traces/:id/scores from an LLM judge, an assertion, or by hand. Replay & LLM-as-judge — re-run a trace's captured prompt against the same or a different model and diff cost/latency/output, or have a judge model score the response 0–1. Needs a provider key env, in-memory only . Datasets & experiments — collect prompts into a test set seed from a trace or add by hand , run the whole set against a model in batch and score each output with the judge — aggregate cost/latency/score per run. Local SQLite — versioned migrations. Database at ~/.lookspan/lookspan.db by default; configurable via flag or env var. Optional retention with --retention . Security — binds to 127.0.0.1 by default; optional --token auth; server-side redaction of credential-looking attributes before storage. One-line CLI — npx lookspan starts the server and the dashboard with no global install. Wrap your client in one line — every model call is traced no OTel, no proxy : npm install @lookspan/openai python import OpenAI from 'openai'; import { observeOpenAI } from '@lookspan/openai'; const openai = observeOpenAI new OpenAI ; await openai.chat.completions.create { model: 'gpt-4o', messages } ; npm install @lookspan/anthropic python import Anthropic from '@anthropic-ai/sdk'; import { observeAnthropic } from '@lookspan/anthropic'; const anthropic = observeAnthropic new Anthropic ; await anthropic.messages.create { model: 'claude-sonnet-4-6', max tokens: 1024, messages } ; npm install @lookspan/mcp js import { wrapMcpClient, HttpSpanExporter } from '@lookspan/mcp'; const exporter = new HttpSpanExporter { endpoint: 'http://127.0.0.1:3100/api/ingest' } ; const { client } = wrapMcpClient mcpClient, { exporter, agentId: 'my-agent' } ; // Use it exactly as before — every callTool emits a tool call span. await client.callTool { name: 'read file', arguments: { path: '/tmp/foo.txt' } } ; await exporter.flush ; pip install lookspan + lookspan-langgraph / lookspan-crewai python from lookspan import LookspanClient from lookspan langgraph import LookspanCallbackHandler client = LookspanClient endpoint="http://127.0.0.1:3100/api/ingest" handler = LookspanCallbackHandler client=client, agent id="my-agent" result = graph.invoke {"messages": }, config={"callbacks": handler } client.flush Point any OTel exporter at the standard OTLP endpoint: export OTEL EXPORTER OTLP TRACES ENDPOINT=http://127.0.0.1:3100/v1/traces protobuf the OTel default and JSON are both accepted More runnable examples in examples/ /JoniMartin27/lookspan/blob/main/examples . The drop-in SDKs capture each call's prompt and reply captureContent , on by default; secrets are scrubbed server-side . With that, Lookspan can close the loop from observe to improve — open a trace and use the Replay & judge panel, or call the API directly: Provider keys live in memory only — never written to the DB or logged. LOOKSPAN OPENAI API KEY=sk-... npx lookspan ...or LOOKSPAN ANTHROPIC API KEY / --openai-key / --anthropic-key Replay the captured prompt against another model and diff cost/latency/output curl -X POST localhost:3100/api/traces/