Thank you for your interest in contributing to TensorZero!
TensorZero aims to power the next generation of AI applications. We'd love to collaborate with you to make this vision a reality.
Tip
In addition to community contributions, we're also hiring in NYC (in-person only). See our open roles.
TensorZero is licensed under the Apache 2.0 license. By contributing to this repository, you agree to license your contributions under the same license.
Join our community on Slack or Discord to chat with the team and other contributors.
We use GitHub Issues to track bugs and feature requests. For general questions, technical support, and conversations not directly related to code, please use GitHub Discussions.
Tip
See the good-first-issue
label for simpler issues that might be a good starting point for new contributors.
For small changes (i.e. a few lines of code), feel free to open a PR directly.
For larger changes, please communicate with us first to avoid duplicate work or wasted effort. You can start a discussion (GitHub, Slack, or Discord) or open an issue as a starting point. The team will be happy to provide feedback and guidance.
Tip
See the "Technical Guide" section below for more details on building and testing TensorZero.
We're planning to open-source our documentation pages soon. See issue #432 for more details.
In the meantime, please open an issue if you have suggestions or find any problems with the documentation.
We'd love to collaborate on examples, tutorials, and other content that showcases how to build AI applications with TensorZero.
For content contributed directly to our repository, please follow the same process as code contributions.
For external content (e.g. blog posts, videos, social media content), we're excited to support and amplify your work. Share your content in our community channels (Slack and Discord), tag us on social media, or reach out if you'd like technical review or feedback before publishing.
We're happy to provide guidance and support for both types of content to help you create high-quality resources for the TensorZero community.
We're open to exploring integrations with other projects and tools (both open-source and commercial). Reach out if you're interested in collaborating.
If you discover a security vulnerability, please email us at security@tensorzero.com.
Did you have something else in mind? Reach out on Slack or Discord and let us know.
- Install Rust (1.80+) →
- Install
cargo-deny
→ - Install
cargo-nextest
→ - Install
pre-commit
→ - Enable
pre-commit
in your repository:pre-commit install
- Install Docker →
- Install
uv
→ - Install Python (3.9+) (e.g.
uv python install 3.9
+ ) - Install Node.js (we use v22) and
npm
→ - Install pnpm
npm install -g pnpm
→
cargo test-unit
-
Launch the test ClickHouse database
docker compose -f tensorzero-internal/tests/e2e/docker-compose.yml up --wait
-
Set the relevant environment variables. See
examples/production-deployment/.env.example
for the full list. -
Launch the gateway in testing mode
cargo run-e2e
-
Run the E2E tests
cargo test-e2e
Tip
The E2E tests involve every supported model provider, so you need every possible credential to run the entire test suite.
If your changes don't affect every provider, you can run a subset of tests with cargo test-e2e xyz
, which will only run tests with xyz
in their name.
-
Launch ClickHouse and the gateway in E2E testing mode (see above).
-
Go to the relevant directory (e.g.
cd clients/python
) -
Create a virtual environment and install the dependencies
uv venv uv pip sync requirements.txt
-
Run the tests
uv run pytest
-
Run the type checker
uv pip install pyright uv run pyright
-
Run the formatter
uv pip install ruff uv run ruff format --check . uv run ruff check --output-format=github --extend-select I .
For development, the UI runs against hardcoded fixtures in ui/fixtures/
.
It depends on a running ClickHouse instance that has been initialized with the TensorZero data model.
We include some fixture data as well in order to exercise some functionality.
It also requires a one-time build of a WebAssembly module from Rust source code that is used to ensure consistent templating of messages across the gateway and UI.
The steps below assume you are in the ui/
directory.
Here are the steps in order to run or test the UI assuming you have the prerequisites installed and this repository checked out:
- Install dependencies:
pnpm install
- Build the WebAssembly module following instructions in
ui/app/utils/minijinja/README.md
. - Create a
.env
file and set the following environment variables for the server:
OPENAI_API_KEY=<your-key>
FIREWORKS_API_KEY=<your-key>
FIREWORKS_ACCOUNT_ID=<your-account-id>
TENSORZERO_CLICKHOUSE_URL=<your-clickhouse-url> # For testing, set to http://chuser:chpassword@localhost:8123/tensorzero
TENSORZERO_UI_CONFIG_PATH=<path-to-config-file> # For testing, set to ./fixtures/config/tensorzero.toml
- Run the dependencies:
docker compose -f fixtures/docker-compose.yml up
With the dependencies running, you can run the tests with pnpm run test
.
Similarly, you can start a development server with pnpm run dev
.
Thanks again for your interest in contributing to TensorZero! We're excited to see what you build.