{"slug": "show-hn-opensmith-trace-llm-pipelines-locally-with-trace-no-cloud", "title": "Show HN: OpenSmith – Trace LLM pipelines locally with trace, no cloud", "summary": "OpenSmith, an open-source, local-first alternative to LangSmith for tracing LLM pipelines, launched with 100% local data storage via SQLite and no cloud requirement. The tool, installable via pip, supports any Python LLM pipeline and offers a local dashboard at localhost:7823, with optional integrations for OpenTelemetry and Postgres.", "body_md": "The open-source, local-first alternative to LangSmith.\n\nopensmith is to LangSmith what Ollama is to OpenAI — the local-first, privacy-first alternative.\n\n| LangSmith | opensmith | |\n|---|---|---|\n| Setup | Cloud account required | pip install opensmith |\n| Data privacy | Sends traces to cloud | 100% local, SQLite only |\n| Framework | Best with LangChain | Works with any Python code |\n| Cost | Free tier then paid | Free forever, open source |\n| Offline | No | Yes |\n| Docker | No | No |\n| Dashboard | Hosted | localhost:7823 |\n\nLangSmith is powerful, but it is built around cloud-hosted tracing and is most natural inside the LangChain ecosystem. opensmith is a local-first alternative: install it with `pip`\n\n, use it with any Python LLM pipeline, and inspect traces on your machine without accounts, hosted services, Docker, or configuration. No trace data leaves your machine.\n\n```\npip install opensmith\n```\n\nOptional integrations:\n\n```\npip install \"opensmith[otel]\"\npip install \"opensmith[postgres]\"\npip install \"opensmith[all]\"\n```\n\nUse `opensmith[all]`\n\nto install both OpenTelemetry and Postgres support.\n\n``` python\nfrom opensmith import trace\n\n@trace\ndef call_llm(prompt: str):\n    return openai.chat.completions.create(\n        model=\"gpt-4o-mini\",\n        messages=[{\"role\": \"user\", \"content\": prompt}],\n    )\n\n@trace\ndef my_pipeline(question: str):\n    # search_docs is your own retrieval function\n    docs = search_docs(question)\n    return call_llm(docs + question)\n```\n\nAsync functions are supported:\n\n``` python\nfrom opensmith import trace\n\n@trace(tags=[\"production\", \"rag\"])\nasync def call_llm(prompt: str):\n    return await openai.chat.completions.create(\n        model=\"gpt-4o-mini\",\n        messages=[{\"role\": \"user\", \"content\": prompt}],\n    )\n```\n\nWarn when a trace exceeds a token budget:\n\n``` python\nfrom opensmith import trace\n\n@trace(token_budget=1000)\ndef my_pipeline():\n    return call_llm(\"summarize this document\")\npython\nfrom opensmith import trace\n\nwith trace(\"my_pipeline\", tags=[\"debug\"]) as t:\n    t.log(\"query\", query)\n    response = openai.chat.completions.create(\n        model=\"gpt-4o-mini\",\n        messages=[{\"role\": \"user\", \"content\": query}],\n    )\n    t.log(\"response\", response)\npython\nfrom opensmith import autopatch\n\nautopatch()\n```\n\nPatch only selected backends:\n\n``` python\nfrom opensmith import autopatch\n\nautopatch(only=[\"openai\"])\n```\n\nPatch everything except selected backends:\n\n``` python\nfrom opensmith import autopatch\n\nautopatch(exclude=[\"chromadb\"])\n```\n\nPrint trace results to the terminal as they complete:\n\n``` python\nfrom opensmith import set_console_mode, trace\n\nset_console_mode(True)\n\n@trace\ndef my_func():\n    return \"ok\"\n```\n\nopensmith reads `opensmith.json`\n\nfrom the current working directory on import:\n\nCreate a starter config:\n\n```\nopensmith init\n{\n  \"db_path\": \"./my_traces.db\",\n  \"console_mode\": false,\n  \"autopatch\": [\"openai\", \"qdrant\"]\n}\nopensmith ui\n```\n\nOpen `http://localhost:7823`\n\n. If the port is already in use, opensmith automatically tries the next available port. Use `--no-auto-port`\n\nto disable this behavior.\n\n| Command | Description |\n|---|---|\n`opensmith init` |\nCreate a starter `opensmith.json` config. |\n`opensmith ui` |\nStart the local dashboard with automatic port selection. |\n`opensmith traces --q rag --status err --tags production` |\nList and filter traces in the terminal. |\n`opensmith stats` |\nShow aggregate trace, step, token, and cost statistics. |\n`opensmith export` |\nExport traces to JSON or CSV. |\n`opensmith clear` |\nDelete all locally stored traces after confirmation. |\n\n| Backend | Package | Status |\n|---|---|---|\n| openai | openai | ✅ |\n| anthropic | anthropic | ✅ |\n| litellm | litellm | ✅ |\n| qdrant | qdrant-client | ✅ |\n| chromadb | chromadb | ✅ |\n| pinecone | pinecone-client | ✅ |\n\nTraces are stored locally at `~/.opensmith/traces.db`\n\nunless overridden with `opensmith.json`\n\nor `set_default_db_path()`\n\n.\n\nUse Postgres instead by installing `opensmith[postgres]`\n\nand setting `OPENSMITH_DB_URL`\n\n:\n\n```\nexport OPENSMITH_DB_URL=\"postgresql://user:pass@localhost:5432/opensmith\"\n```\n\nInstall both Postgres and OpenTelemetry support with `pip install \"opensmith[all]\"`\n\n.\n\nExport traces with nested steps as JSON:\n\n```\nopensmith export --format json --output traces.json\n```\n\nExport a flat trace list as CSV:\n\n```\nopensmith export --format csv --output traces.csv\n```\n\nOpenTelemetry export is disabled by default. Install the optional dependencies and set `OPENSMITH_OTEL_ENDPOINT`\n\nto enable OTLP HTTP export:\n\n```\npip install \"opensmith[otel]\"\nexport OPENSMITH_OTEL_ENDPOINT=\"http://localhost:4318\"\n```\n\nopensmith sends traces to `/v1/traces`\n\nand metrics to `/v1/metrics`\n\nunder that endpoint.\n\nMIT", "url": "https://wpnews.pro/news/show-hn-opensmith-trace-llm-pipelines-locally-with-trace-no-cloud", "canonical_source": "https://github.com/shivnathtathe/opensmith", "published_at": "2026-07-26 14:36:47+00:00", "updated_at": "2026-07-26 14:52:41.262740+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-tools"], "entities": ["OpenSmith", "LangSmith", "Ollama", "OpenAI", "LangChain", "SQLite", "Postgres", "OpenTelemetry"], "alternates": {"html": "https://wpnews.pro/news/show-hn-opensmith-trace-llm-pipelines-locally-with-trace-no-cloud", "markdown": "https://wpnews.pro/news/show-hn-opensmith-trace-llm-pipelines-locally-with-trace-no-cloud.md", "text": "https://wpnews.pro/news/show-hn-opensmith-trace-llm-pipelines-locally-with-trace-no-cloud.txt", "jsonld": "https://wpnews.pro/news/show-hn-opensmith-trace-llm-pipelines-locally-with-trace-no-cloud.jsonld"}}