Install the SDK
The Zyonix SDK is a Python package, zyonix-sdk. You import it as zyonix. It records what your
application does with each document and sends it to Zyonix in the background.
Requirements
- Python 3.10 or newer (3.10 to 3.14 are supported).
- Outbound HTTPS from where your application runs to your Zyonix address, for example
https://zyonix.example.com. - An sdk API key, created by an administrator on the Zyonix website under Team → API keys. You need it to send documents, not to install the package or to try it locally.
The SDK depends on:
| Package | Version | Why |
|---|---|---|
pydantic | 2.7 or newer, below 3 | reads and validates zyonix.yaml |
httpx | 0.27 or newer, below 1 | sends data to Zyonix |
opentelemetry-api, opentelemetry-sdk, opentelemetry-proto, opentelemetry-exporter-otlp-proto-common | 1.45.2 or newer, below 2 | the trace format (internal; you never use it directly) |
pyyaml | 6 or newer | reads zyonix.yaml |
zyonix-model | the same version as zyonix-sdk | shared definitions and the redaction rules; installed automatically |
Install with pip
Install the SDK with the extra that matches the LLM library your application uses. The extra adds automatic recording of that library's calls (prompts, answers, model names, token counts):
pip install "zyonix-sdk[openai]"
The quotes stop your shell from reading the square brackets.
| Extra | For applications that use | Installs |
|---|---|---|
openai | the openai package (also OpenAI-compatible providers called through it, such as Azure OpenAI or OpenRouter) | openinference-instrumentation-openai |
anthropic | the anthropic package | openinference-instrumentation-anthropic |
langchain | LangChain (langchain-core) | openinference-instrumentation-langchain |
llama-index | LlamaIndex (llama-index-core) | openinference-instrumentation-llama-index |
litellm | LiteLLM | openinference-instrumentation-litellm |
bedrock | AWS Bedrock through boto3 / botocore | openinference-instrumentation-bedrock |
Several libraries? Combine extras: pip install "zyonix-sdk[openai,anthropic]".
Another library, or your own HTTP calls to a model? Install without an extra:
pip install zyonix-sdk
You still get every document, its steps, their inputs, outputs, errors and timing. Only the separate record of each model call (and its token counts) is missing. See LLM libraries.
Pin the version
Pin a range in your dependency file so an upgrade happens only when you choose it:
# requirements.txt
zyonix-sdk[openai]>=0.1.13,<0.2
The <0.2 bound keeps you on the 0.1 series. Read the release notes before you move to a newer
series.
Install with uv or Poetry
# uv (a project with pyproject.toml)
uv add "zyonix-sdk[openai]>=0.1.13,<0.2"
# Poetry
poetry add "zyonix-sdk[openai]>=0.1.13,<0.2"
# pipenv
pipenv install "zyonix-sdk[openai]>=0.1.13,<0.2"
Or write the dependency into pyproject.toml yourself:
[project]
dependencies = [
"zyonix-sdk[openai]>=0.1.13,<0.2",
]
# Poetry's own table
[tool.poetry.dependencies]
zyonix-sdk = { version = ">=0.1.13,<0.2", extras = ["openai"] }
In a Docker image, add the line to the requirements file your Dockerfile already installs, and
rebuild the image.
If your Zyonix contact gave you the packages as a bundle of files instead of an index, use the
install command that came with the bundle, and do not also install zyonix-sdk from another
index: pip must not mix the two sources.
The zyonix command
Installing the SDK also installs a zyonix command with two subcommands:
| Command | What it does |
|---|---|
zyonix doctor | Checks your configuration, the connection and the key, and sends one test document. See Testing locally. |
zyonix init | Writes a commented starter zyonix.yaml (see Configuration). |
That is all a running application needs.
The CLI for developers and CI
The terminal commands that read results (zyonix status, zyonix runs, zyonix issues,
zyonix test, zyonix replay and more) are a separate package, zyonix-cli. It adds them to the
same zyonix command. Install it on developer machines and in CI, not necessarily in your
production image:
pip install zyonix-cli
pip install "zyonix-cli[mcp]" # optional: `zyonix mcp`, for coding agents that speak MCP
zyonix-cli requires the same version of zyonix-sdk. The CLI signs in as a person
(zyonix login) or uses a cli key, never the application's sdk key.
Check the install
python -c "import zyonix; print(zyonix.__version__)"
pip check
zyonix doctor
- The first line prints the version, for example
0.1.13. pip checkmust sayNo broken requirements found.zyonix doctorchecks the setup. Without a key and without local mode, it stops attracing is off: that is expected before you have configured anything. With a key andZYONIX_ENDPOINTset it must end withall checks passed.
Dependency conflicts
The SDK needs pydantic 2.7+, httpx 0.27+ and OpenTelemetry 1.45.2+. If your environment has older versions, pip upgrades them without asking. Before you install into an existing environment, see what would change:
pip install --dry-run "zyonix-sdk[openai]"
Read the Would install line. Common cases:
| Your project has | What happens | What to do |
|---|---|---|
pydantic 1.x pinned | pip cannot install the SDK (or would upgrade pydantic to 2 and break your code) | Migrate the project to pydantic 2 first, or keep Zyonix out of this environment |
httpx below 0.27 pinned | install fails | Raise the pin to httpx>=0.27,<1 and run your tests |
| OpenTelemetry 1.x below 1.45.2 (for example from another tracing tool) | pip upgrades it | Usually safe within 1.x; run your tests, and check the other tool's supported range |
Another tracing tool that installs its own openinference-instrumentation-* | the instrumentations are shared | Fine. Zyonix keeps its own private tracer; see LLM libraries |
Another package named zyonix | import zyonix loads the wrong one | Use a separate virtual environment |
After installing, run your application's own tests. The SDK does nothing until zyonix.init() is
called with a key or a local mode, so the tests behave exactly as before.
Next
- Add it to your code: Integrate by hand, or let your coding agent do it: Connect with a coding agent.
- Set the address and key: Configuration.