whitebox-xai-sdk 1.0.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.
Files changed (72) hide show
  1. whitebox_xai_sdk-1.0.0/.github/workflows/docs.yml +72 -0
  2. whitebox_xai_sdk-1.0.0/.github/workflows/publish.yml +47 -0
  3. whitebox_xai_sdk-1.0.0/.github/workflows/test.yml +143 -0
  4. whitebox_xai_sdk-1.0.0/.gitignore +210 -0
  5. whitebox_xai_sdk-1.0.0/CHANGELOG.md +158 -0
  6. whitebox_xai_sdk-1.0.0/LICENSE +21 -0
  7. whitebox_xai_sdk-1.0.0/MANIFEST.in +31 -0
  8. whitebox_xai_sdk-1.0.0/PKG-INFO +627 -0
  9. whitebox_xai_sdk-1.0.0/README.md +568 -0
  10. whitebox_xai_sdk-1.0.0/docs/HUGGINGFACE_INTEGRATION.md +549 -0
  11. whitebox_xai_sdk-1.0.0/docs/LANGCHAIN_INTEGRATION.md +534 -0
  12. whitebox_xai_sdk-1.0.0/docs/PRODUCTION_DEPLOYMENT.md +736 -0
  13. whitebox_xai_sdk-1.0.0/docs/PYTORCH_INTEGRATION.md +1034 -0
  14. whitebox_xai_sdk-1.0.0/docs/SDK_MIGRATION_GUIDE.md +1214 -0
  15. whitebox_xai_sdk-1.0.0/docs/SKLEARN_INTEGRATION.md +574 -0
  16. whitebox_xai_sdk-1.0.0/docs/TENSORFLOW_INTEGRATION.md +932 -0
  17. whitebox_xai_sdk-1.0.0/docs/api-reference.md +305 -0
  18. whitebox_xai_sdk-1.0.0/docs/getting-started.md +99 -0
  19. whitebox_xai_sdk-1.0.0/docs/index.md +202 -0
  20. whitebox_xai_sdk-1.0.0/docs/integrations.md +170 -0
  21. whitebox_xai_sdk-1.0.0/docs/offline-mode.md +150 -0
  22. whitebox_xai_sdk-1.0.0/examples/async_monitoring.py +103 -0
  23. whitebox_xai_sdk-1.0.0/examples/basic_monitoring.py +75 -0
  24. whitebox_xai_sdk-1.0.0/examples/boosting_example.py +407 -0
  25. whitebox_xai_sdk-1.0.0/examples/decorator_monitoring.py +102 -0
  26. whitebox_xai_sdk-1.0.0/examples/langchain_example.py +390 -0
  27. whitebox_xai_sdk-1.0.0/examples/offline_mode_example.py +366 -0
  28. whitebox_xai_sdk-1.0.0/examples/pytorch_integration.py +122 -0
  29. whitebox_xai_sdk-1.0.0/examples/sklearn_integration.py +79 -0
  30. whitebox_xai_sdk-1.0.0/examples/tensorflow_example.py +180 -0
  31. whitebox_xai_sdk-1.0.0/examples/transformers_example.py +265 -0
  32. whitebox_xai_sdk-1.0.0/pyproject.toml +90 -0
  33. whitebox_xai_sdk-1.0.0/pytest.ini +37 -0
  34. whitebox_xai_sdk-1.0.0/setup.cfg +4 -0
  35. whitebox_xai_sdk-1.0.0/tests/conftest.py +26 -0
  36. whitebox_xai_sdk-1.0.0/tests/e2e/__init__.py +1 -0
  37. whitebox_xai_sdk-1.0.0/tests/integration/__init__.py +1 -0
  38. whitebox_xai_sdk-1.0.0/tests/integration/test_crewai_integration.py +431 -0
  39. whitebox_xai_sdk-1.0.0/tests/integration/test_langchain_integration.py +434 -0
  40. whitebox_xai_sdk-1.0.0/tests/integration/test_sklearn.py +45 -0
  41. whitebox_xai_sdk-1.0.0/tests/unit/__init__.py +1 -0
  42. whitebox_xai_sdk-1.0.0/tests/unit/test_client.py +224 -0
  43. whitebox_xai_sdk-1.0.0/tests/unit/test_config_exceptions.py +293 -0
  44. whitebox_xai_sdk-1.0.0/tests/unit/test_decorators.py +295 -0
  45. whitebox_xai_sdk-1.0.0/tests/unit/test_monitor.py +321 -0
  46. whitebox_xai_sdk-1.0.0/tests/unit/test_utils.py +277 -0
  47. whitebox_xai_sdk-1.0.0/whitebox_xai_sdk.egg-info/PKG-INFO +627 -0
  48. whitebox_xai_sdk-1.0.0/whitebox_xai_sdk.egg-info/SOURCES.txt +70 -0
  49. whitebox_xai_sdk-1.0.0/whitebox_xai_sdk.egg-info/dependency_links.txt +1 -0
  50. whitebox_xai_sdk-1.0.0/whitebox_xai_sdk.egg-info/requires.txt +44 -0
  51. whitebox_xai_sdk-1.0.0/whitebox_xai_sdk.egg-info/top_level.txt +1 -0
  52. whitebox_xai_sdk-1.0.0/whiteboxxai/__init__.py +31 -0
  53. whitebox_xai_sdk-1.0.0/whiteboxxai/cache.py +119 -0
  54. whitebox_xai_sdk-1.0.0/whiteboxxai/client.py +371 -0
  55. whitebox_xai_sdk-1.0.0/whiteboxxai/config.py +98 -0
  56. whitebox_xai_sdk-1.0.0/whiteboxxai/decorators.py +323 -0
  57. whitebox_xai_sdk-1.0.0/whiteboxxai/exceptions.py +109 -0
  58. whitebox_xai_sdk-1.0.0/whiteboxxai/git_utils.py +338 -0
  59. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/__init__.py +134 -0
  60. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/boosting.py +670 -0
  61. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/crewai_monitor.py +495 -0
  62. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/langchain.py +641 -0
  63. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/langchain_agents.py +537 -0
  64. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/pytorch.py +277 -0
  65. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/sklearn.py +219 -0
  66. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/tensorflow.py +489 -0
  67. whitebox_xai_sdk-1.0.0/whiteboxxai/integrations/transformers.py +531 -0
  68. whitebox_xai_sdk-1.0.0/whiteboxxai/monitor.py +413 -0
  69. whitebox_xai_sdk-1.0.0/whiteboxxai/offline.py +541 -0
  70. whitebox_xai_sdk-1.0.0/whiteboxxai/privacy.py +219 -0
  71. whitebox_xai_sdk-1.0.0/whiteboxxai/resources.py +840 -0
  72. whitebox_xai_sdk-1.0.0/whiteboxxai/utils.py +375 -0
@@ -0,0 +1,72 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ paths:
7
+ - 'docs/**'
8
+ - 'README.md'
9
+ pull_request:
10
+ branches: [ main ]
11
+ paths:
12
+ - 'docs/**'
13
+ - 'README.md'
14
+ workflow_dispatch:
15
+
16
+ jobs:
17
+ validate-docs:
18
+ name: Validate Documentation
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: '3.9'
29
+
30
+ - name: Install markdown linter
31
+ run: |
32
+ npm install -g markdownlint-cli
33
+
34
+ - name: Lint markdown files
35
+ run: |
36
+ markdownlint '**/*.md' --ignore node_modules --ignore .github || true
37
+
38
+ - name: Check for broken links
39
+ uses: gaurav-nelson/github-action-markdown-link-check@v1
40
+ with:
41
+ use-quiet-mode: 'yes'
42
+ config-file: '.github/markdown-link-check-config.json'
43
+ continue-on-error: true
44
+
45
+ build-docs:
46
+ name: Build Documentation
47
+ runs-on: ubuntu-latest
48
+
49
+ steps:
50
+ - name: Checkout code
51
+ uses: actions/checkout@v4
52
+
53
+ - name: Set up Python
54
+ uses: actions/setup-python@v5
55
+ with:
56
+ python-version: '3.9'
57
+
58
+ - name: Install dependencies
59
+ run: |
60
+ python -m pip install --upgrade pip
61
+ pip install -e ".[dev]"
62
+ pip install mkdocs mkdocs-material mkdocstrings[python]
63
+
64
+ - name: Build documentation
65
+ run: |
66
+ mkdocs build --strict
67
+
68
+ - name: Upload documentation
69
+ uses: actions/upload-artifact@v4
70
+ with:
71
+ name: documentation
72
+ path: site/
@@ -0,0 +1,47 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ build-and-publish:
10
+ name: Build and publish Python distribution
11
+ runs-on: ubuntu-latest
12
+ environment: pypi
13
+ permissions:
14
+ id-token: write # required for OIDC trusted publishing
15
+
16
+ steps:
17
+ - name: Checkout code
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: '3.9'
24
+
25
+ - name: Install build dependencies
26
+ run: |
27
+ python -m pip install --upgrade pip
28
+ pip install build
29
+
30
+ - name: Build distribution
31
+ run: |
32
+ python -m build
33
+
34
+ - name: Check distribution
35
+ run: |
36
+ pip install twine
37
+ twine check dist/*
38
+
39
+ - name: Publish to PyPI
40
+ if: github.event_name == 'release'
41
+ uses: pypa/gh-action-pypi-publish@release/v1
42
+
43
+ - name: Upload artifacts
44
+ uses: actions/upload-artifact@v4
45
+ with:
46
+ name: python-package-distributions
47
+ path: dist/
@@ -0,0 +1,143 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+ workflow_dispatch:
9
+
10
+ env:
11
+ PYTHON_VERSION: '3.9'
12
+
13
+ jobs:
14
+ code-quality:
15
+ name: Code Quality Checks
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: ${{ env.PYTHON_VERSION }}
26
+ cache: 'pip'
27
+
28
+ - name: Install code quality tools
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ pip install black==23.11.0 isort==5.12.0 flake8==6.1.0 pylint==3.0.3 mypy==1.7.1 bandit==1.7.5
32
+
33
+ - name: Run Black formatter check
34
+ run: |
35
+ black --check --diff .
36
+
37
+ - name: Run isort import check
38
+ run: |
39
+ isort --check-only --diff .
40
+
41
+ - name: Run flake8 linter
42
+ run: |
43
+ flake8 whiteboxxai/ tests/ examples/ --count --statistics --max-line-length=120
44
+
45
+ - name: Run pylint
46
+ run: |
47
+ pylint whiteboxxai/ --exit-zero --score=yes
48
+
49
+ - name: Run security check (Bandit)
50
+ run: |
51
+ bandit -r whiteboxxai/ -f json -o bandit-report.json || true
52
+
53
+ - name: Upload Bandit report
54
+ uses: actions/upload-artifact@v4
55
+ if: always()
56
+ with:
57
+ name: bandit-security-report
58
+ path: bandit-report.json
59
+
60
+ unit-tests:
61
+ name: Unit Tests
62
+ runs-on: ubuntu-latest
63
+ strategy:
64
+ matrix:
65
+ python-version: ['3.9', '3.10', '3.11', '3.12']
66
+
67
+ steps:
68
+ - name: Checkout code
69
+ uses: actions/checkout@v4
70
+
71
+ - name: Set up Python ${{ matrix.python-version }}
72
+ uses: actions/setup-python@v5
73
+ with:
74
+ python-version: ${{ matrix.python-version }}
75
+ cache: 'pip'
76
+
77
+ - name: Install dependencies
78
+ run: |
79
+ python -m pip install --upgrade pip
80
+ pip install -e ".[dev]"
81
+
82
+ - name: Run unit tests
83
+ run: |
84
+ pytest tests/unit -v --cov=whiteboxxai --cov-report=xml
85
+
86
+ - name: Upload coverage to Codecov
87
+ uses: codecov/codecov-action@v3
88
+ if: matrix.python-version == '3.9'
89
+ with:
90
+ file: ./coverage.xml
91
+ flags: unittests
92
+ name: codecov-umbrella
93
+
94
+ integration-tests:
95
+ name: Integration Tests
96
+ runs-on: ubuntu-latest
97
+
98
+ steps:
99
+ - name: Checkout code
100
+ uses: actions/checkout@v4
101
+
102
+ - name: Set up Python
103
+ uses: actions/setup-python@v5
104
+ with:
105
+ python-version: ${{ env.PYTHON_VERSION }}
106
+ cache: 'pip'
107
+
108
+ - name: Install dependencies
109
+ run: |
110
+ python -m pip install --upgrade pip
111
+ pip install -e ".[dev,all]"
112
+
113
+ - name: Run integration tests
114
+ run: |
115
+ pytest tests/integration -v
116
+
117
+ e2e-tests:
118
+ name: End-to-End Tests
119
+ runs-on: ubuntu-latest
120
+
121
+ steps:
122
+ - name: Checkout code
123
+ uses: actions/checkout@v4
124
+
125
+ - name: Set up Python
126
+ uses: actions/setup-python@v5
127
+ with:
128
+ python-version: ${{ env.PYTHON_VERSION }}
129
+ cache: 'pip'
130
+
131
+ - name: Install dependencies
132
+ run: |
133
+ python -m pip install --upgrade pip
134
+ pip install -e ".[dev,all]"
135
+
136
+ - name: Run e2e tests
137
+ run: |
138
+ pytest tests/e2e -v || EXIT=$?
139
+ if [ "${EXIT:-0}" -eq 5 ]; then
140
+ echo "No e2e tests collected - skipping"
141
+ exit 0
142
+ fi
143
+ exit "${EXIT:-0}"
@@ -0,0 +1,210 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
208
+
209
+ # Internal migration notes
210
+ MIGRATION_SUMMARY.md
@@ -0,0 +1,158 @@
1
+ # Changelog
2
+
3
+ All notable changes to the WhiteBoxXAI Python SDK will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] - 2026-07-14
11
+
12
+ First stable, production release. This release realigns the SDK with the
13
+ `whiteboxxai.com` product branding and folds in the fixes/features
14
+ developed in the `whitebox-xai-azure` monorepo's `sdk/` directory.
15
+
16
+ ### Changed
17
+ - **BREAKING**: Rebranded from `whiteboxai`/`whiteboxai-sdk` (single "x",
18
+ `whiteboxai.io`/`whitebox.agentaflow.com`) to `whiteboxxai`/`whitebox-xai-sdk`
19
+ (double "x", `whiteboxxai.com`). Update imports: `from whiteboxai import ...`
20
+ → `from whiteboxxai import ...`; update the install command to
21
+ `pip install whitebox-xai-sdk`; update the `EXPLAINAI_*` env vars to
22
+ `WHITEBOXXAI_*` (`WHITEBOXXAI_API_KEY`, `WHITEBOXXAI_BASE_URL`).
23
+ - **BREAKING**: Switched from a `src/whiteboxai/` layout to a flat
24
+ `whiteboxxai/` layout at the repository root, matching the canonical
25
+ source in `whitebox-xai-azure/sdk/`. Removed the legacy `setup.py`;
26
+ `pyproject.toml` is now the single build configuration.
27
+ - Version is now read from installed package metadata
28
+ (`importlib.metadata.version("whitebox-xai-sdk")`) instead of being
29
+ hardcoded in three separate places.
30
+ - `Development Status` classifier bumped from Beta to Production/Stable.
31
+ - `ModelMonitor.log_prediction()`/`alog_prediction()`/`log_batch()` now call
32
+ the predictions API with the correct `input_data`/`output_data` field
33
+ names (previously sent `inputs`/`outputs`, which the real API doesn't
34
+ accept).
35
+
36
+ ### Added
37
+ - `ModelMonitor` local buffering (`buffer_size=`) with `flush()`/`aflush()`
38
+ and context-manager support (`with ModelMonitor(...) as monitor:`
39
+ flushes on exit).
40
+ - `ModelMonitor.get_prediction_count()`, `get_drift_reports()`,
41
+ `create_alert_rule()`, and `get_active_alerts()` convenience methods.
42
+ - `log_prediction(explain=True)` now actually triggers explanation
43
+ generation via the explanations resource, instead of silently
44
+ accepting and dropping the flag.
45
+ - SDK exception classes (`APIError`, `AuthenticationError`, `RateLimitError`,
46
+ `ValidationError`, `NotFoundError`) now carry structured metadata
47
+ (`status_code`, `response`, `request_id`, `retry_after`, `fields`, etc.)
48
+ instead of being bare, attribute-less `Exception` subclasses.
49
+ - `Config` now validates `timeout`/`max_retries` are positive.
50
+ - MCP (Model Context Protocol) usage documented in `README.md` for
51
+ non-Python integrations, pointing at the companion `whiteboxxai-mcp`
52
+ package.
53
+ - `LICENSE` file (MIT), matching `pyproject.toml`'s declared license.
54
+
55
+ ### Fixed
56
+ - Fixed an import-time crash: `whiteboxxai.integrations` (and therefore the
57
+ whole SDK) failed to import for anyone without PyTorch or TensorFlow
58
+ installed, due to bad optional-dependency fallback stubs in
59
+ `integrations/pytorch.py` and `integrations/tensorflow.py`, and an
60
+ unguarded/unbound name in `integrations/langchain.py`.
61
+ - `README.md` code samples fixed throughout: wrong import path
62
+ (`whiteboxai` → `whiteboxxai`), wrong class name (`WhiteBoxAI` →
63
+ `WhiteBoxXAI`), and wrong install command.
64
+ - Corrected `WhiteBoxXAI_*`-cased env var references (wrong case, and in
65
+ one place the wrong variable name entirely) to the real
66
+ `WHITEBOXXAI_API_KEY`/`WHITEBOXXAI_BASE_URL` across guides and examples.
67
+ - `docs/` guides (`api-reference.md`, `getting-started.md`, `index.md`,
68
+ `integrations.md`, `offline-mode.md`) rebranded from the stale
69
+ `whiteboxai.io`/`agentaflow.com`/`EXPLAINAI_*` naming.
70
+
71
+ ## [0.2.1] - 2026-05-03
72
+
73
+ No changelog entry was recorded for this release at the time. Reconstructed
74
+ from the git history between the `0.2.0` and `0.2.1` tags:
75
+
76
+ ### Added
77
+ - `AgentWorkflows` resource and client binding for multi-agent workflow
78
+ tracking.
79
+
80
+ ### Fixed
81
+ - e2e pytest exit-code handling.
82
+ - Import normalization and formatting cleanup across integrations and
83
+ examples.
84
+
85
+ ## [0.2.0] - 2026-02-10
86
+
87
+ ### Added
88
+ - **Git Integration**: Automatic Git context detection for model versioning
89
+ - `GitContext` class for repository metadata
90
+ - `detect_git_context()` function for auto-detection
91
+ - `validate_git_context()` for validation
92
+ - Support for both GitPython and subprocess fallback
93
+ - **CrewAI Multi-Agent Monitoring**: Full support for CrewAI workflows
94
+ - `CrewAIMonitor` class for monitoring crews
95
+ - Automatic agent and task tracking
96
+ - Agent-to-agent interaction logging
97
+ - Token usage and cost tracking
98
+ - Workflow analytics
99
+ - **LangChain Multi-Agent Support**: Enhanced LangChain integration
100
+ - `MultiAgentCallbackHandler` for agent execution tracking
101
+ - `LangGraphMultiAgentMonitor` for LangGraph workflows
102
+ - Agent-to-agent handoff monitoring
103
+ - Tool call tracking
104
+ - `monitor_langchain_agent()` helper function
105
+ - **Documentation**: Complete MkDocs setup with Material theme
106
+ - Comprehensive navigation structure
107
+ - API reference integration
108
+ - Code highlighting and copy buttons
109
+ - Dark/light mode support
110
+
111
+ ### Changed
112
+ - **BREAKING**: Fixed import paths from `explainai.*` to `whiteboxai.*`
113
+ - Users must update imports: `from explainai.client` → `from whiteboxai.client`
114
+ - Updated dependencies:
115
+ - httpx: >=0.24.0 → >=0.25.0
116
+ - numpy: >=1.24.0 (aligned with latest stable)
117
+ - Added pandas>=1.3.0 (core dependency)
118
+ - Added tenacity>=8.0.0 (core dependency)
119
+ - Enhanced optional dependencies:
120
+ - Added git extra: `pip install whiteboxai-sdk[git]`
121
+ - Added crewai extra: `pip install whiteboxai-sdk[crewai]`
122
+ - Updated all extra: includes git, crewai, and all integrations
123
+
124
+ ### Fixed
125
+ - Import errors due to incorrect package naming (explainai vs whiteboxai)
126
+ - Missing MkDocs configuration causing documentation build failures
127
+ - Incomplete integration exports in `whiteboxai.integrations`
128
+
129
+ ### Documentation
130
+ - Created comprehensive MkDocs configuration
131
+ - Added index page with quick start examples
132
+ - Organized documentation with clear navigation
133
+ - Added examples for Git integration, CrewAI, and LangChain agents
134
+
135
+ ## [0.1.0] - 2026-01-05
136
+
137
+ ### Added
138
+ - Initial release of WhiteBoxAI Python SDK
139
+ - Basic monitoring functionality
140
+ - Scikit-learn integration
141
+ - PyTorch integration
142
+ - TensorFlow/Keras integration
143
+ - Hugging Face Transformers integration
144
+ - LangChain integration
145
+ - XGBoost/LightGBM integration
146
+ - Offline mode support
147
+ - Privacy filters
148
+ - Caching support
149
+ - Example code
150
+ - Documentation
151
+
152
+ ### Security
153
+ - PII detection and masking
154
+ - Secure API key handling
155
+
156
+ [Unreleased]: https://github.com/AgentaFlow/whitebox-python-sdk/compare/v0.2.0...HEAD
157
+ [0.2.0]: https://github.com/AgentaFlow/whitebox-python-sdk/compare/v0.1.0...v0.2.0
158
+ [0.1.0]: https://github.com/AgentaFlow/whitebox-python-sdk/releases/tag/v0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WhiteBoxXAI Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # Include requirements files in source distribution
2
+ include README.md
3
+ include LICENSE
4
+ include CHANGELOG.md
5
+
6
+ # Include configuration files
7
+ include pyproject.toml
8
+ include pytest.ini
9
+ include .gitignore
10
+
11
+ # Include GitHub workflows and documentation
12
+ recursive-include .github *.md *.yml *.yaml
13
+
14
+ # Include documentation
15
+ recursive-include docs *.md *.rst *.txt
16
+
17
+ # Include examples
18
+ recursive-include examples *.py
19
+
20
+ # Include tests
21
+ recursive-include tests *.py
22
+
23
+ # Include source package data
24
+ recursive-include whiteboxxai *.py
25
+
26
+ # Exclude compiled files
27
+ global-exclude *.py[cod]
28
+ global-exclude __pycache__
29
+ global-exclude *.so
30
+ global-exclude .DS_Store
31
+ global-exclude *.egg-info