Skip to main content
Witdem AI — Understand how your AI system actually behaves

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.

Tests SDK on PyPI Analytics on PyPI npm Python License

Get started · YAML contracts · Frameworks · Providers · Contributing · Security

See Witdem in action

From one-line setup and two-line instrumentation to a measured run, its execution graph, business outcome, cost, and contract evidence.

Watch the Witdem installation and analysis walkthrough
▶ Watch the 1:48 installation-to-analysis walkthrough

First run

Choose one backend launcher. Applications use witdem-sdk with either path.

Docker-managed (requires Docker Compose):

npx -y witdem@stable-0-1 up

Native Python (requires Python and pipx):

pipx install witdem-analytics
witdem up

Both start the receiver, ELT worker, and dashboard, wait for health, open http://localhost:8501, and preserve data across down and upgrades. Their lifecycle vocabulary is the same:

npx -y witdem@stable-0-1 status   # Docker path
witdem status                     # pipx path
npx -y witdem@stable-0-1 logs receiver
witdem down

Check releases and compatibility without changing packages or data:

npx -y witdem@stable-0-1 update --check
witdem update --check

See the upgrade guide for exact NPX, pipx, and SDK commands.

Add the SDK to an existing Haystack 3 project:

python -m pip install "witdem-sdk[haystack]"
export WITDEM_ENDPOINT=http://localhost:4318

From the application project, create the YAML contract and then edit it to describe that application's result:

witdem-sdk init --runtime haystack

This creates .witdem/witdem.yaml. It does not inspect or rewrite application code, and it will not replace an existing contract unless --force is used.

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.

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

Witdem also normalizes retrieval, reranking, search, embeddings, OCR, tools, evaluations, image, audio, video, and extension operations without inferring vendors. See AI operations and evaluations.

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

NPX is the Docker-managed path; pipx is a genuinely native, Node-free and Docker-free path. The npm package never runs a 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@stable-0-1 status
curl http://localhost:4318/readiness
curl http://localhost:8501/health

See Operations for lifecycle, ports, logs, data, backup/recovery, and Development only when contributing to Witdem itself.

Documentation

Community

Witdem is built in the open. Bug reports, integration examples, documentation improvements, and focused code contributions are welcome.

License

Witdem is licensed under the Apache License 2.0.

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.1.2

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.1.2
File Size Uploaded
witdem_analytics-0.1.2.tar.gz 706.5 kB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / witdem_analytics-0.1.2.tar.gz

Download URL witdem_analytics-0.1.2.tar.gz
Size 706.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d789fef4ce6c9d387cad714074f0f7c950345372074435cd3a4b6a7281008f9
BLAKE2b-256 checksum
How to use checksums
e37447f8582e93cfd710dc9d9d705a0ffec742aa2b17b651b453c9f2a4121803
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 31, 2026.

Transparency log

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

Download URL witdem_analytics-0.1.2-py3-none-any.whl
Size 750.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a291fe172e4670ba89fd7ac268e579d307ed9ddd6557d23336fc4220b3abc98
BLAKE2b-256 checksum
How to use checksums
2b125623ddf80fc7a0f1abf4848f03b0b77dbc3e8c8c227a9f463e7f7632c841
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 31, 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

0.2.0

2 release files

0.1.4

2 release files

This release

0.1.2 This release

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