Thanks for wanting to contribute! This project is the official Python SDK for the Execlave AI Governance Platform.
- By contributing, you agree your work will be released under the MIT licence (see
LICENSE). - Be kind. See CODE_OF_CONDUCT.md.
- Security issues go to
security@execlave.com, never to a public issue. See SECURITY.md.
# Fork, then clone
git clone https://github.com/<you>/execlave-python-sdk
cd execlave-python-sdk
# Editable install with dev + test extras
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e ".[test]"
# Run the full test suite
pytest
# Run a single file
pytest tests/test_client.py -vPython 3.11+ is required. The project uses flit for packaging and pytest for testing.
execlave/
├── client.py # Main Execlave client + enforce_policy
├── trace.py # Trace class (chainable API)
├── instrumentation/ # Span + event helpers (shared across integrations)
├── integrations/
│ ├── langchain.py # LangChain callback handler
│ ├── openai_agents.py # OpenAI Agents SDK tracing processor
│ └── crewai.py # CrewAI instrument_crew helper
├── otel.py # OpenTelemetry bridge
└── connectors.py # (Deprecated) run_langchain
tests/ # pytest suite
- Tests pass (
pytest) - Type hints added on any new public function signatures
- Docstrings added or updated
-
CHANGELOG.mdupdated under Unreleased if the change is user-visible - No unrelated reformatting (keep diffs small)
- For new integrations: pin the target framework's version range in
pyproject.tomloptional-deps
- Add a new module under
execlave/integrations/. - Import the framework at runtime only (inside
__init__or a helper). The top-levelexeclaveimport must never require the framework. - Use
execlave.instrumentationhelpers (record_llm_call,record_tool_call,record_agent_action) rather than drivingTracedirectly. This keeps span semantics consistent. - Call
Execlave.enforce_policy(...)on every external action (tool call, outbound HTTP, database write). - Add an optional-dependency group in
pyproject.tomlwith a pinned range. - Add unit tests that mock the framework — CI does not install the real framework.
- Add a docs page at
frontend/app/docs/integrations/<name>/page.tsxin the monorepo PR.
blackformatting,rufflinting (configured inpyproject.toml).- Prefer composition over inheritance.
- No
print()in library code; uselogging. - Never swallow exceptions without logging — fail-open is acceptable for telemetry paths only, and must be logged at
warning.
Releases are driven from the monorepo. Tag sdk-python/vX.Y.Z publishes to PyPI via the sdk-publish.yml workflow. Versioning follows SemVer.
Open a discussion at https://github.com/execlave-ai/execlave-python-sdk/discussions or email support@execlave.com.