Skip to main content

Witdem

Analytics for AI agents and multi-step AI applications.

Tracing tells you what executed. Witdem connects those executions to application outcomes: which paths ran, what they cost, where they failed, and whether they achieved the product goal you defined.

Get started · YAML contracts · Haystack · Frameworks · Providers · Troubleshooting

First run

Start the local receiver, ELT worker, and dashboard:

npx -y witdem@0.2.0 up

That pulls the version-matched container, starts all three services, waits for them to become healthy, and opens http://localhost:8501. Docker with Compose is the only prerequisite. Data persists across down and package upgrades.

npx -y witdem@0.2.0 status
npx -y witdem@0.2.0 logs
npx -y witdem@0.2.0 down

Add the SDK to an existing Haystack 3 project from the checkout:

python -m pip install -e "/path/to/Witdem-Analytics/witdem-sdk[haystack]"
export WITDEM_ENDPOINT=http://localhost:4318

Wrap the pipeline once. Its existing run, run_async, and run_async_generator calls stay unchanged:

from witdem_sdk.integrations.haystack import instrument

pipeline = instrument(build_pipeline())
result = pipeline.run(data)

Add .witdem/witdem.yaml to describe what a useful result means:

version: 1
service:
  name: support-agent
  runtime: haystack
telemetry:
  capture_content: false
contracts:
  - name: answer
    mode: expression
    artifact:
      name: Support answer
      valid:
        non_empty: $.answer
    decision:
      name: Result validity
      expected: true
      observed: $.witdem.artifact_valid
    product_goal:
      name: Useful answer returned
      achieved: $.witdem.artifact_valid

Run the application normally. The execution and its business result appear at http://localhost:8501.

witdem-sdk 0.2.0 is not yet published to the package index. The source-checkout command above is the verified installation path for this release. Publishing the package is the remaining installation launch blocker.

What you get

  • Actual execution paths, branches, loops, retries, tools, model calls, and failures
  • Per-run latency, token usage, and cost when provider/model/usage evidence is sufficient
  • Application outcomes and product-goal success defined by your application
  • Provider and model comparisons using attributable time, usage, cost, and quality
  • Workflow/path analytics and run-linked issue investigation
  • Local DuckDB storage and a self-hosted dashboard; prompt and response capture is off by default

Witdem does not infer business success from a completed LLM call. Framework instrumentation records what happened technically; .witdem/witdem.yaml explains what the final result means.

Integration status

Statuses reflect current implementation and test evidence, not roadmap intent.

Integration Status Verified surface
Haystack 3 Stable Pipelines, agents, components, provider calls, loops, parallel branches, run, run_async, async generators
LangGraph Beta Compiled graphs, nodes, tools, models, errors, sync/async invocation and streaming
LangChain Beta Runnables, chains, chat/LLM calls, tools, retrievers, sync/async invocation and streaming
Native Python Supported Execution, operation, model, tool, decision, evaluation, outcome, and metric primitives
OpenAI Agents Beta Native trace processor, agents, generations, tools, handoffs, sync/async workloads
Anthropic Messages and Claude Agent SDK Beta Messages calls, usage, tool-use IDs, multi-turn workloads, Claude Agent message streams
Hugging Face smolagents Beta Official OpenInference agent, step, model, and tool spans; sync and streaming execution
LiteLLM Beta SDK callback and proxy OTLP paths, provider/model usage, reported cost, failures, routing metadata
OpenRouter Beta OpenAI-compatible sync/async and streaming calls, selected provider, route attempts, authoritative cost
Generic provider calls Experimental Sync/async callable wrapper with explicit provider/model and observed result metadata
Standard OTLP/HTTP Supported Generic OpenTelemetry, OTel GenAI, and OpenInference evidence

See compatibility.json for machine-readable version constraints and Providers for the difference between native, framework-observed, and generic support.

Providers

Witdem currently has verified paths for:

OpenAI and Anthropic have dedicated SDK integrations. Haystack observes the generator actually used at each model boundary. The remaining provider examples use standard GenAI OpenTelemetry attributes or witdem_sdk.integrations.generic; this is explicit in every provider guide.

Cost is not assumed from a provider name. Witdem uses provider-reported money when present, or the versioned server catalog when provider, model, and token usage match a catalog entry. Unknown prices remain Not measured with a diagnostic reason.

Parallel and asynchronous execution

When sibling spans overlap, Witdem preserves the observed fan-out and fan-in rather than flattening them into a false sequence:

             ┌─ semantic retriever ─┐
execution ───┤                      ├─ answer
             └─ keyword retriever ──┘

The runnable Haystack parallel pipeline demonstrates this with two concurrent retrievers and an OpenAI answer component.

Self-hosting

The npm launcher is the recommended local backend path. It is deliberately a small, dependency-free Docker launcher rather than a second implementation of Witdem. It never runs an npm postinstall script.

Service Address Purpose
Dashboard http://localhost:8501 Overview, runs, compare, workflows, and issues
Receiver http://localhost:4318 OTLP/HTTP and SDK record ingestion
ELT worker internal Duckle transformation into dashboard-ready DuckDB tables
npx -y witdem@0.2.0 status
curl http://localhost:4318/readiness
curl http://localhost:8501/health

For source development, clone the repository and run docker compose up -d. See Running Witdem with npx for ports, lifecycle, image pinning, and troubleshooting.

The Python-only development path is also available:

uv sync
uv run witdem dev --open

Documentation

Built with

DuckDB
Local analytics storage
Duckle
Raw-to-serving transformation
TanStack
Dashboard routing, queries, and tables

Witdem is independent of these projects. Their names and unmodified marks identify the technologies used and do not imply endorsement.

Metadata

Release files for witdem-analytics 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for witdem-analytics 0.2.0
File Size Uploaded
witdem_analytics-0.2.0.tar.gz 2.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for witdem-analytics 0.2.0
File Interpreter ABI Platform
witdem_analytics-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.4 MB

Release files / witdem_analytics-0.2.0.tar.gz

Download URL witdem_analytics-0.2.0.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6564d4cd8701014d5f0989ecd07addb3e974198921162fa35dd12d3f440dedc2
BLAKE2b-256 checksum
How to use checksums
30128109496d1cca3b1f4b578887953d38315816a6431110942a07ad36645fdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / witdem_analytics-0.2.0-py3-none-any.whl

Download URL witdem_analytics-0.2.0-py3-none-any.whl
Size 636.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b96f68da2d7f40a4353b2fd1d1b362581cefb4b9453c9f9fa8026e458d47fa1
BLAKE2b-256 checksum
How to use checksums
cb07f68194ea17a64cb3f32c0263fd8799ddcd0c9c768773bb14851828119fe9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page