wizardflow 0.8.0__tar.gz → 0.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wizardflow-0.10.0/CONTRIBUTING.md +115 -0
- wizardflow-0.10.0/LICENSE +202 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/PKG-INFO +79 -47
- {wizardflow-0.8.0 → wizardflow-0.10.0}/README.md +74 -23
- {wizardflow-0.8.0 → wizardflow-0.10.0}/docs/cli.md +49 -17
- {wizardflow-0.8.0 → wizardflow-0.10.0}/docs/opentelemetry.md +134 -20
- wizardflow-0.10.0/docs/otel-dashboard.md +290 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/docs/recording.md +54 -14
- {wizardflow-0.8.0 → wizardflow-0.10.0}/pyproject.toml +10 -5
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/__init__.py +37 -5
- wizardflow-0.10.0/src/wizardflow/_ui/404.html +29 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/__next.__PAGE__.txt +2 -2
- wizardflow-0.10.0/src/wizardflow/_ui/__next._full.txt +25 -0
- wizardflow-0.10.0/src/wizardflow/_ui/__next._head.txt +6 -0
- wizardflow-0.10.0/src/wizardflow/_ui/__next._index.txt +9 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/__next._tree.txt +2 -2
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/01brywq_z5ove.js +1 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/0iwzswstrbtmn.js +1 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/1-qe8j935n74p.js +7 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/1ht5kh0l88e_p.js +2 -0
- wizardflow-0.8.0/src/wizardflow/_ui/_next/static/chunks/301ajw92ycgkd.css → wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/1lhv2sxpxb696.css +1 -1
- wizardflow-0.8.0/src/wizardflow/_ui/_next/static/chunks/09s72r58ijxwx.js → wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/24fllkoepd75z.js +1 -1
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/2ghl-f22fcyuj.js +1 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/2uxls48-761wf.js +23 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/2wbjayl1zz1m7.js +1 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/36e7ug9m0b333.js +136 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/3xavzj2yyi39z.js +28 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/449hx-1yg7218.js +2 -0
- wizardflow-0.8.0/src/wizardflow/_ui/_next/static/chunks/turbopack-2fblmukzx7kws.js → wizardflow-0.10.0/src/wizardflow/_ui/_next/static/chunks/turbopack-3bqwujl4u_ndp.js +1 -1
- wizardflow-0.10.0/src/wizardflow/_ui/_not-found/__next._full.txt +20 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_not-found/__next._head.txt +6 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_not-found/__next._index.txt +9 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_not-found/__next._not-found/__PAGE__.txt +1 -1
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_not-found/__next._not-found.txt +1 -1
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_not-found/__next._tree.txt +2 -2
- wizardflow-0.10.0/src/wizardflow/_ui/_not-found.html +29 -0
- wizardflow-0.10.0/src/wizardflow/_ui/_not-found.txt +20 -0
- wizardflow-0.10.0/src/wizardflow/_ui/index.html +29 -0
- wizardflow-0.10.0/src/wizardflow/_ui/index.txt +25 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/opengraph-image +0 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel/__next._full.txt +24 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel/__next._head.txt +6 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel/__next._index.txt +9 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel/__next._tree.txt +4 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel/__next.otel/__PAGE__.txt +7 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel/__next.otel.txt +5 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel.html +29 -0
- wizardflow-0.10.0/src/wizardflow/_ui/otel.txt +24 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/sitemap.xml +1 -1
- wizardflow-0.10.0/src/wizardflow/_ui/why-wizardflow/__next._full.txt +43 -0
- wizardflow-0.10.0/src/wizardflow/_ui/why-wizardflow/__next._head.txt +6 -0
- wizardflow-0.10.0/src/wizardflow/_ui/why-wizardflow/__next._index.txt +9 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/why-wizardflow/__next._tree.txt +2 -2
- wizardflow-0.10.0/src/wizardflow/_ui/why-wizardflow/__next.why-wizardflow/__PAGE__.txt +20 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/why-wizardflow/__next.why-wizardflow.txt +1 -1
- wizardflow-0.10.0/src/wizardflow/_ui/why-wizardflow.html +29 -0
- wizardflow-0.10.0/src/wizardflow/_ui/why-wizardflow.txt +43 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/cli.py +426 -25
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/client.py +331 -122
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/constants.py +21 -0
- wizardflow-0.10.0/src/wizardflow/file_import.py +111 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/otel.py +130 -22
- wizardflow-0.10.0/src/wizardflow/otel_file_exporter.py +296 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/otel_mapping.py +164 -10
- wizardflow-0.10.0/src/wizardflow/otlp_http.py +167 -0
- wizardflow-0.10.0/src/wizardflow/otlp_live.py +236 -0
- wizardflow-0.10.0/src/wizardflow/otlp_proto.py +385 -0
- wizardflow-0.10.0/src/wizardflow/otlp_writer.py +311 -0
- wizardflow-0.10.0/src/wizardflow/receiver.py +277 -0
- wizardflow-0.10.0/src/wizardflow/serve.py +467 -0
- wizardflow-0.10.0/src/wizardflow/store/__init__.py +26 -0
- wizardflow-0.10.0/src/wizardflow/store/db.py +123 -0
- wizardflow-0.10.0/src/wizardflow/store/importer.py +500 -0
- wizardflow-0.10.0/src/wizardflow/store/mapping.py +78 -0
- wizardflow-0.10.0/src/wizardflow/store/otlp.py +331 -0
- wizardflow-0.10.0/src/wizardflow/store/projection.py +418 -0
- wizardflow-0.10.0/src/wizardflow/store/queries.py +598 -0
- wizardflow-0.10.0/src/wizardflow/store/schema.py +215 -0
- wizardflow-0.10.0/src/wizardflow/store/settings.py +261 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/helpers.py +5 -2
- wizardflow-0.10.0/tests/otlp_builders.py +81 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_cli.py +7 -5
- wizardflow-0.10.0/tests/test_enabled_on_error.py +175 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_langgraph.py +2 -1
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_otel.py +175 -4
- wizardflow-0.10.0/tests/test_otel_error_handling.py +221 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_otel_file_exporter.py +4 -2
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_otel_integration.py +3 -3
- wizardflow-0.10.0/tests/test_otel_out.py +177 -0
- wizardflow-0.10.0/tests/test_otlp_live.py +300 -0
- wizardflow-0.10.0/tests/test_otlp_proto.py +140 -0
- wizardflow-0.10.0/tests/test_projection.py +357 -0
- wizardflow-0.10.0/tests/test_receiver.py +340 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_recording.py +12 -12
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_reinit.py +11 -0
- wizardflow-0.10.0/tests/test_serve.py +724 -0
- wizardflow-0.10.0/tests/test_settings.py +144 -0
- wizardflow-0.10.0/tests/test_store.py +336 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_workflow.py +6 -5
- wizardflow-0.8.0/CONTRIBUTING.md +0 -71
- wizardflow-0.8.0/LICENSE +0 -21
- wizardflow-0.8.0/assets/demo.gif +0 -0
- wizardflow-0.8.0/scripts/build_ui.py +0 -75
- wizardflow-0.8.0/scripts/live_trace_demo.py +0 -211
- wizardflow-0.8.0/src/wizardflow/_ui/404.html +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/__next._full.txt +0 -23
- wizardflow-0.8.0/src/wizardflow/_ui/__next._head.txt +0 -6
- wizardflow-0.8.0/src/wizardflow/_ui/__next._index.txt +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/_next/static/chunks/2_iu57vjc6ikq.js +0 -131
- wizardflow-0.8.0/src/wizardflow/_ui/_next/static/chunks/414c1-tn-1aef.js +0 -36
- wizardflow-0.8.0/src/wizardflow/_ui/_next/static/chunks/43x_68q2b6gcs.js +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/_not-found/__next._full.txt +0 -18
- wizardflow-0.8.0/src/wizardflow/_ui/_not-found/__next._head.txt +0 -6
- wizardflow-0.8.0/src/wizardflow/_ui/_not-found/__next._index.txt +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/_not-found.html +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/_not-found.txt +0 -18
- wizardflow-0.8.0/src/wizardflow/_ui/index.html +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/index.txt +0 -23
- wizardflow-0.8.0/src/wizardflow/_ui/why-wizardflow/__next._full.txt +0 -37
- wizardflow-0.8.0/src/wizardflow/_ui/why-wizardflow/__next._head.txt +0 -6
- wizardflow-0.8.0/src/wizardflow/_ui/why-wizardflow/__next._index.txt +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/why-wizardflow/__next.why-wizardflow/__PAGE__.txt +0 -20
- wizardflow-0.8.0/src/wizardflow/_ui/why-wizardflow.html +0 -7
- wizardflow-0.8.0/src/wizardflow/_ui/why-wizardflow.txt +0 -37
- wizardflow-0.8.0/src/wizardflow/otel_file_exporter.py +0 -145
- {wizardflow-0.8.0 → wizardflow-0.10.0}/.gitignore +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/docs/jsonl-file-format.md +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/data_types.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/multibranch.html +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/multibranch.md +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/multibranch.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/quickstart.html +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/quickstart.md +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/examples/quickstart.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_render.py +0 -0
- {wizardflow-0.8.0/src/wizardflow/_ui/_next/static/1QfoA382k0nvObP14Huhr → wizardflow-0.10.0/src/wizardflow/_ui/_next/static/EfARZaft_lO_nmV8NVTed}/_buildManifest.js +0 -0
- {wizardflow-0.8.0/src/wizardflow/_ui/_next/static/1QfoA382k0nvObP14Huhr → wizardflow-0.10.0/src/wizardflow/_ui/_next/static/EfARZaft_lO_nmV8NVTed}/_clientMiddlewareManifest.js +0 -0
- {wizardflow-0.8.0/src/wizardflow/_ui/_next/static/1QfoA382k0nvObP14Huhr → wizardflow-0.10.0/src/wizardflow/_ui/_next/static/EfARZaft_lO_nmV8NVTed}/_ssgManifest.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/05-c3ty_6dwfk.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/0cz1d0mv5g_q7.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/0d1yav018wi6n.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/0fizjutis9uvx.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/14a18doinx71t.css +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/14mrh2-p_w84d.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/1_way7swvumpv.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/1diz-5jfxjm5x.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/1por0fhggxwcm.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/2-j1b74l3lxxu.css +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/24c18qa28ilul.css +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/27jktro2p5rq9.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/2dclsx_n3obic.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/2gj5bmeov-r8f.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/2l6srvxdnb-io.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/310vm2bl3xxpt.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/32c7h_m2amh5m.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/352yh6c3r6-0k.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/3n7dm2ojtyzwn.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/3q-c23s8gv3du.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/chunks/3rdqn8rx95pw7.js +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/4fa387ec64143e14-s.2tuy5pz7dlieh.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/53b9e256198e5412-s.390ncx5urfkfu.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/5ce348bf30bf5439-s.31988l_ccedte.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/6306c77e7c8268e4-s.2dbetqa9o8jxf.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/7178b3e590c64307-s.21jp631_3pja2.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/797e433ab948586e-s.p.0r6juujl39pe6.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/7d817b4c03b0c5f1-s.1uyisp29ctx0d.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/8a480f0b521d4e75-s.1qq4vpdcun5oj.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/bbc41e54d2fcbd21-s.1rgnod-3esatf.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/caa3a2e1cccd8315-s.p.0wgildi0cnwt9.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/fef07dbb0973bf53-s.3p2_lha1f2xer.woff2 +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/_next/static/media/icon.09qublg69ek7b.svg +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/icon.svg +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/_ui/robots.txt +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/html.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/markdown.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/py.typed +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/src/wizardflow/reader.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/conftest.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_html.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_markdown.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_node_lifecycle.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_persistence.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_reader.py +0 -0
- {wizardflow-0.8.0 → wizardflow-0.10.0}/tests/test_rotation.py +0 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Contributing to the WizardFlow Python SDK
|
|
2
|
+
|
|
3
|
+
This SDK lives in `sdk/python/` of the WizardFlow monorepo. It's pure Python with
|
|
4
|
+
no runtime dependencies; `pytest` is the only dev dependency.
|
|
5
|
+
|
|
6
|
+
## Built on the standard library
|
|
7
|
+
|
|
8
|
+
The package has no runtime dependencies, and new code must not add one. Where
|
|
9
|
+
another project would reach for a library, WizardFlow has its own small
|
|
10
|
+
implementation:
|
|
11
|
+
|
|
12
|
+
| Part | Built on | Instead of |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| OTLP protobuf encode and decode (`otlp_proto.py`) | hand-written field-number tables | `protobuf`, `opentelemetry-proto` |
|
|
15
|
+
| `otel export --endpoint` sender (`otlp_http.py`) | `urllib`, `gzip` | `opentelemetry-exporter-otlp` |
|
|
16
|
+
| Live export to an endpoint without the OTel SDK (`otlp_live.py`) | a background thread over `otlp_http.py` | the SDK's `BatchSpanProcessor` |
|
|
17
|
+
| OTLP receiver on port 4318 (`receiver.py`) | `http.server`, `zlib` | an OpenTelemetry Collector |
|
|
18
|
+
| Dashboard database (`store/`) | `sqlite3` | a database server |
|
|
19
|
+
| Dashboard and replay server (`serve.py`, `cli.py`) | `http.server` | a web framework |
|
|
20
|
+
| LangGraph graph extraction | duck typing on `app.get_graph()` | importing `langgraph` |
|
|
21
|
+
| Project download `.zip` (in `web/`, `utils/zip.ts`) | a small stored-ZIP writer | JSZip |
|
|
22
|
+
|
|
23
|
+
The one exception is live export that joins the app's own traces: it imports
|
|
24
|
+
the app's OpenTelemetry packages lazily (`otel.py`), because only the
|
|
25
|
+
OpenTelemetry API can join them. Live export to an endpoint falls back to the
|
|
26
|
+
built-in sender when the SDK isn't installed (`otel_exporter="auto"`); where
|
|
27
|
+
the packages are truly required, missing ones give a clear error with the
|
|
28
|
+
install command, never an import error at `import wizardflow`.
|
|
29
|
+
|
|
30
|
+
The hand-written parts are checked against the real libraries where they exist;
|
|
31
|
+
see [OTLP protobuf and the OTel packages](#otlp-protobuf-and-the-otel-packages).
|
|
32
|
+
|
|
33
|
+
## Local development
|
|
34
|
+
|
|
35
|
+
Work against a local checkout with an editable install:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
cd sdk/python
|
|
39
|
+
pip install -e ".[dev]"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`tests/conftest.py` puts `src/` on the path, so the suite also runs without any
|
|
43
|
+
install.
|
|
44
|
+
|
|
45
|
+
## Tests
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
cd sdk/python
|
|
49
|
+
pytest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The tests pin the emitted schema shape and the recording semantics (step
|
|
53
|
+
folding, completed-only persistence, append-only durability, `id=` targeting,
|
|
54
|
+
unknown-node fast-fail, …).
|
|
55
|
+
|
|
56
|
+
### OTLP protobuf and the OTel packages
|
|
57
|
+
|
|
58
|
+
WizardFlow encodes and decodes OTLP protobuf itself (`src/wizardflow/otlp_proto.py`),
|
|
59
|
+
so neither `protobuf` nor `opentelemetry-proto` is a dependency. The tests check
|
|
60
|
+
it against the official classes, and compare the built-in exporter with the
|
|
61
|
+
OTel SDK's. Those tests skip without the packages; install them to run
|
|
62
|
+
everything:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install opentelemetry-sdk opentelemetry-proto opentelemetry-exporter-otlp-proto-http
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
To compare the two exporters by hand, `wizardflow otel export` takes a hidden
|
|
69
|
+
`--exporter otel-sdk` flag that sends through the OTel SDK instead of the
|
|
70
|
+
built-in exporter (default `--exporter builtin`). Point both at
|
|
71
|
+
`wizardflow dashboard` and compare what arrives.
|
|
72
|
+
|
|
73
|
+
## Schema contract
|
|
74
|
+
|
|
75
|
+
The JSONL this SDK serializes to is defined by `src/types/agenttrace.ts` in the
|
|
76
|
+
monorepo frontend. That TypeScript type, including the `header` / `message` /
|
|
77
|
+
`seal` record types, is the schema of record. Change it and the serializer
|
|
78
|
+
(`src/wizardflow/client.py`) plus the reader (`src/wizardflow/reader.py`) and
|
|
79
|
+
their tests must change in lockstep; they must not drift.
|
|
80
|
+
|
|
81
|
+
## Refreshing the bundled UI
|
|
82
|
+
|
|
83
|
+
The bundled viewer lives in `src/wizardflow/_ui/` and is committed so a
|
|
84
|
+
standalone SDK checkout (and the published package) works without the website
|
|
85
|
+
source or a Node build step. Refresh it from the monorepo frontend after UI
|
|
86
|
+
changes:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
cd sdk/python
|
|
90
|
+
python scripts/build_ui.py
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
That script runs the shared Next frontend with
|
|
94
|
+
`NEXT_PUBLIC_WIZARDFLOW_TARGET=local`, copies the static export into
|
|
95
|
+
`src/wizardflow/_ui/`, and removes hosted-only legal route artifacts (`Impressum`
|
|
96
|
+
/ `Datenschutz`). The SDK UI keeps the GitHub project link.
|
|
97
|
+
|
|
98
|
+
## Checking live traces by hand
|
|
99
|
+
|
|
100
|
+
The viewer follows a trace file while it is still being written: it polls with
|
|
101
|
+
`If-None-Match`, extends the timeline without losing your place, and stops when
|
|
102
|
+
the part rotates away. None of that is covered by an automated test, so there is
|
|
103
|
+
a generator to watch it with:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
cd sdk/python
|
|
107
|
+
python scripts/live_trace_demo.py
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
It records a synthetic run with the ordinary SDK calls, writing into the
|
|
111
|
+
monorepo's `web/public/` (so the trace is same-origin for `npm run dev` in
|
|
112
|
+
`web/`) and printing the viewer URL. It rotates after 18 messages, so the sealed
|
|
113
|
+
part, the part navigation, and the live pulse dot can all be seen in a couple of
|
|
114
|
+
minutes. Like `build_ui.py`, it needs the full monorepo checkout and is never
|
|
115
|
+
packaged.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -1,36 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: wizardflow
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: Python SDK for recording agent flows into the WizardFlow / AgentTrace file format.
|
|
5
5
|
Project-URL: Homepage, https://getwizardflow.com
|
|
6
|
-
Project-URL: Documentation, https://
|
|
6
|
+
Project-URL: Documentation, https://github.com/lkleonk/wizardflow/tree/main/sdk/python/docs
|
|
7
|
+
Project-URL: Source, https://github.com/lkleonk/wizardflow
|
|
8
|
+
Project-URL: Issues, https://github.com/lkleonk/wizardflow/issues
|
|
7
9
|
Author: Leon Koch
|
|
8
|
-
License:
|
|
9
|
-
|
|
10
|
-
Copyright (c) 2026 Leon Koch
|
|
11
|
-
|
|
12
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
in the Software without restriction, including without limitation the rights
|
|
15
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
furnished to do so, subject to the following conditions:
|
|
18
|
-
|
|
19
|
-
The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
copies or substantial portions of the Software.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
SOFTWARE.
|
|
10
|
+
License-Expression: Apache-2.0
|
|
29
11
|
License-File: LICENSE
|
|
30
12
|
Keywords: agents,langgraph,llm,observability,tracing
|
|
31
13
|
Classifier: Development Status :: 3 - Alpha
|
|
32
14
|
Classifier: Intended Audience :: Developers
|
|
33
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
34
15
|
Classifier: Operating System :: OS Independent
|
|
35
16
|
Classifier: Programming Language :: Python :: 3
|
|
36
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -52,12 +33,13 @@ into a portable WizardFlow JSONL file that you can replay as an interactive
|
|
|
52
33
|
graph, inspect with ordinary tools, or attach to a bug report.
|
|
53
34
|
|
|
54
35
|
Drop the file into [getwizardflow.com](https://getwizardflow.com) and it is
|
|
55
|
-
processed entirely in the browser
|
|
56
|
-
locally with `wizardflow
|
|
36
|
+
processed entirely in the browser, so nothing is uploaded. You can also replay it
|
|
37
|
+
locally with `wizardflow replay`, or collect many runs, and the traces and logs
|
|
38
|
+
of any app with OpenTelemetry, in a local dashboard: `wizardflow dashboard`.
|
|
57
39
|
|
|
58
40
|

|
|
59
41
|
|
|
60
|
-
|
|
42
|
+
▶ **[Watch this run replay](https://getwizardflow.com/?example=doctor-consultation)**
|
|
61
43
|
|
|
62
44
|
## Why WizardFlow?
|
|
63
45
|
|
|
@@ -65,8 +47,10 @@ locally with `wizardflow ui`.
|
|
|
65
47
|
observability account.
|
|
66
48
|
- **Replay it anywhere.** Use the bundled local viewer or the fully client-side
|
|
67
49
|
hosted viewer.
|
|
68
|
-
- **Zero runtime dependencies.** The
|
|
69
|
-
daemon or framework.
|
|
50
|
+
- **Zero runtime dependencies.** The package is pure Python and requires no
|
|
51
|
+
daemon or framework. Recording, OTLP export of a finished run, and the local
|
|
52
|
+
dashboard with its OTLP receiver all use only the standard library (see
|
|
53
|
+
[Dependencies](#dependencies)).
|
|
70
54
|
- **Explicit by design.** Your code chooses which node executions and values
|
|
71
55
|
enter the trace.
|
|
72
56
|
- **OpenTelemetry is optional.** The same node executions can also be projected
|
|
@@ -78,6 +62,26 @@ locally with `wizardflow ui`.
|
|
|
78
62
|
pip install wizardflow
|
|
79
63
|
```
|
|
80
64
|
|
|
65
|
+
### Dependencies
|
|
66
|
+
|
|
67
|
+
None. Recording, replay, Markdown/HTML/JSON export, the local dashboard with
|
|
68
|
+
its database and OTLP receiver, and sending to an OTLP endpoint, live while
|
|
69
|
+
recording or a finished run later, all use only the Python standard library.
|
|
70
|
+
WizardFlow installs anywhere and never pins a version your app also uses.
|
|
71
|
+
|
|
72
|
+
The OpenTelemetry packages only come in when you want WizardFlow's spans inside
|
|
73
|
+
your app's own traces:
|
|
74
|
+
|
|
75
|
+
| Live export (`init(otel=True)`) | Needs |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| Straight to an endpoint (`otel_endpoint=...`), e.g. to watch runs arrive in `wizardflow dashboard` | Nothing extra |
|
|
78
|
+
| Same, joined to your app's own traces | `opentelemetry-sdk` and `opentelemetry-exporter-otlp-proto-http` |
|
|
79
|
+
| Into your app's own tracing (no `otel_endpoint`) | `opentelemetry-api`, which an app with OpenTelemetry already has |
|
|
80
|
+
|
|
81
|
+
With an endpoint, WizardFlow uses the OpenTelemetry SDK when it is installed and
|
|
82
|
+
its own sender otherwise; `otel_exporter` picks one explicitly. See the
|
|
83
|
+
[OpenTelemetry guide](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/opentelemetry.md#installation).
|
|
84
|
+
|
|
81
85
|
## Quickstart
|
|
82
86
|
|
|
83
87
|
```python
|
|
@@ -108,11 +112,17 @@ print(trace_path)
|
|
|
108
112
|
`end_message()` appends the completed message to JSONL. There is no separate
|
|
109
113
|
`save()` call.
|
|
110
114
|
|
|
115
|
+
Recording mistakes such as an unknown node id are logged as warnings rather
|
|
116
|
+
than raised into your app; pass `on_error="raise"` to make them raise (handy in
|
|
117
|
+
tests). Pass `enabled=False`, or set `WIZARDFLOW_ENABLED=false`, to turn tracing
|
|
118
|
+
off while keeping the same API. See
|
|
119
|
+
[docs/recording.md](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/recording.md#error-handling-on_error).
|
|
120
|
+
|
|
111
121
|
Drop `trace_path` into [getwizardflow.com](https://getwizardflow.com), or open
|
|
112
122
|
it locally:
|
|
113
123
|
|
|
114
124
|
```bash
|
|
115
|
-
wizardflow
|
|
125
|
+
wizardflow replay traces/run__<timestamp>.jsonl
|
|
116
126
|
```
|
|
117
127
|
|
|
118
128
|
The module-level style remains available for applications that use one default
|
|
@@ -128,16 +138,27 @@ with wizardflow.node("msg-1", "generator") as node:
|
|
|
128
138
|
wizardflow.end_message("msg-1")
|
|
129
139
|
```
|
|
130
140
|
|
|
131
|
-
##
|
|
141
|
+
## Local dashboard
|
|
132
142
|
|
|
133
|
-
|
|
143
|
+
For more than one run, `wizardflow dashboard` keeps your runs and any
|
|
144
|
+
OpenTelemetry traces in a local SQLite database: a span waterfall with the
|
|
145
|
+
graph beside it, GenAI messages and token counts, and a receiver on
|
|
146
|
+
`localhost:4318` that apps with OpenTelemetry can send to directly.
|
|
134
147
|
|
|
135
148
|
```bash
|
|
136
|
-
|
|
149
|
+
wizardflow dashboard run.jsonl # import a run, then open the dashboard
|
|
137
150
|
```
|
|
138
151
|
|
|
139
|
-
|
|
140
|
-
|
|
152
|
+

|
|
153
|
+
|
|
154
|
+
See the [dashboard guide](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/otel-dashboard.md).
|
|
155
|
+
|
|
156
|
+
## Optional OpenTelemetry export
|
|
157
|
+
|
|
158
|
+
Enable OTLP trace export while retaining JSONL as the portable source of
|
|
159
|
+
truth. Sending to an endpoint needs no extra packages; to have the spans join
|
|
160
|
+
your app's own OpenTelemetry traces, install the OTel SDK
|
|
161
|
+
(see [Dependencies](#dependencies)):
|
|
141
162
|
|
|
142
163
|
```python
|
|
143
164
|
trace = wizardflow.init(
|
|
@@ -157,9 +178,9 @@ with trace.workflow() as run: # one workflow = one OTel trace
|
|
|
157
178
|
trace.close_otel()
|
|
158
179
|
```
|
|
159
180
|
|
|
160
|
-
`otel_attributes` sets exact keys on the workflow's root span
|
|
161
|
-
`session.id` groups traces into Phoenix sessions, `langfuse.session.id`
|
|
162
|
-
Langfuse sessions.
|
|
181
|
+
`otel_attributes` sets exact keys on the workflow's root span. For example,
|
|
182
|
+
`session.id` groups traces into Phoenix sessions, and `langfuse.session.id`
|
|
183
|
+
into Langfuse sessions.
|
|
163
184
|
|
|
164
185
|
Generic logs can optionally choose an exact application-owned span attribute
|
|
165
186
|
without changing their JSONL/UI label:
|
|
@@ -173,7 +194,8 @@ Content export is enabled by default when OTel export is enabled, with
|
|
|
173
194
|
receiver should only get metadata. See the
|
|
174
195
|
[OpenTelemetry guide](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/opentelemetry.md)
|
|
175
196
|
for provider ownership, GenAI mappings, content controls, graph events, and
|
|
176
|
-
independent JSONL/OTel lifecycles. Existing artifacts can be exported later
|
|
197
|
+
independent JSONL/OTel lifecycles. Existing artifacts can be exported later,
|
|
198
|
+
without any OTel packages:
|
|
177
199
|
|
|
178
200
|
```bash
|
|
179
201
|
wizardflow otel export run.jsonl --endpoint http://localhost:4318/v1/traces
|
|
@@ -198,27 +220,37 @@ duck-typed through `app.get_graph()`.
|
|
|
198
220
|
## Documentation
|
|
199
221
|
|
|
200
222
|
- **[Recording agent runs](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/recording.md)**
|
|
201
|
-
|
|
223
|
+
— messages, node scopes, semantic records, generic logs, kinds, output
|
|
202
224
|
selection, multiple clients, and reinitialization.
|
|
203
225
|
- **[OpenTelemetry export](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/opentelemetry.md)**
|
|
204
|
-
|
|
226
|
+
— OTLP setup, provider ownership, GenAI mappings, privacy controls, graph
|
|
205
227
|
events, offline JSONL export, and cleanup.
|
|
206
228
|
- **[WizardFlow JSONL format](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/jsonl-file-format.md)**
|
|
207
|
-
|
|
229
|
+
— record shapes, semantic fields, compatibility, and rotation.
|
|
208
230
|
- **[CLI and local viewer](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/cli.md)**
|
|
209
|
-
|
|
231
|
+
— every command: live local replay, Markdown, HTML, and JSON export, the
|
|
232
|
+
dashboard, and database import.
|
|
233
|
+
- **[OTel dashboard](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/otel-dashboard.md)**
|
|
234
|
+
— import runs and OTLP JSON or receive OTLP live into a local database,
|
|
235
|
+
browse projects, traces, and logs, open graph replay, and map attributes.
|
|
210
236
|
|
|
211
237
|
## CLI at a glance
|
|
212
238
|
|
|
213
239
|
```bash
|
|
214
|
-
|
|
215
|
-
wizardflow
|
|
216
|
-
wizardflow
|
|
240
|
+
# Replay: one run file, nothing stored
|
|
241
|
+
wizardflow replay run.jsonl # interactive local replay
|
|
242
|
+
wizardflow replay --latest traces/ # newest run in a directory
|
|
243
|
+
wizardflow md run.jsonl -o run.md # Markdown export
|
|
217
244
|
wizardflow html run.jsonl -o run.html
|
|
218
245
|
wizardflow json run.jsonl -o run.json
|
|
246
|
+
|
|
247
|
+
# Dashboard: all your runs and OpenTelemetry data in a local database
|
|
248
|
+
wizardflow dashboard # open it, receiving OTLP on :4318
|
|
249
|
+
wizardflow dashboard run.jsonl # import a run (or OTLP JSON), then open it
|
|
250
|
+
wizardflow db import run.jsonl # import without opening
|
|
219
251
|
```
|
|
220
252
|
|
|
221
|
-
|
|
253
|
+
The replay commands read both WizardFlow JSONL and the single-document JSON form. See
|
|
222
254
|
the [CLI guide](https://github.com/lkleonk/wizardflow/blob/main/sdk/python/docs/cli.md)
|
|
223
255
|
for flags, live-trace behavior, and rotated-part navigation.
|
|
224
256
|
|