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@latest 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@latest status   # Docker path
witdem status                     # pipx path
npx -y witdem@latest logs receiver
witdem down

Check releases and compatibility without changing packages or data:

npx -y witdem@latest 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

This creates a small .witdem/witdem.yaml index, a separate contract file, and a basic coding-agent skill at .witdem/skills/witdem/SKILL.md. It does not inspect or rewrite application code, and it will not replace an existing project unless --force is used.

To make the canonical skill discoverable through the common project skill location, initialize with witdem-sdk init --expose-agent-skill. This creates .agents/skills/witdem as a link; the skill remains owned by .witdem.

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)

The project file only identifies the service and references definitions:

version: 2
service:
  name: support-agent
telemetry:
  capture_content: false
contracts: [contracts/answer.yml]

The contract names the result and independently reportable goal requirements. Application code reports their values with Witdem.report(...); Witdem never extracts business meaning from a framework-specific return object.

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
Direct OpenAI SDK Beta Responses, Chat Completions, embeddings, sync/async and streaming calls, usage, tool-call IDs
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@latest 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.2.5

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.5
File Size Uploaded
witdem_analytics-0.2.5.tar.gz 725.6 kB Details

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / witdem_analytics-0.2.5.tar.gz

Download URL witdem_analytics-0.2.5.tar.gz
Size 725.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c8fb1eba1f62e08d1d4d1b0ac7f18917e32acbcd4a9703ea7fcdcd937d09fcb7
BLAKE2b-256 checksum
How to use checksums
8c52aa5ce7ac859aede36ba76c3935894eea50111c1f390a03c1f1b23a5265cf
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 Sep 3, 2026.

Transparency log

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

Download URL witdem_analytics-0.2.5-py3-none-any.whl
Size 773.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e51ffd071141c3a70602a22ad14d4f04e967bb51ced03a1187d49c3f91546d0
BLAKE2b-256 checksum
How to use checksums
cdc24305f5803d034b5c62caa32e58023db2fa2c279a16789526660929729f3b
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 Sep 3, 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

This release

0.2.5 This release

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

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