SDK Reference

Python SDK

Python client.

Overview

Official Python client for the Zof REST API.

Package: zof-ai. Supports projects, runs, agents, webhooks, pagination helpers, automatic retries, and typed error handling.

Who should read this

  • QA engineers, SREs, platform teams, and developers operating Zof Console and APIs.

Prerequisites

  • Python development environment (see language runtime requirements)
  • Organization API key stored in environment or secret manager

When to use this workflow

  • Onboarding new team members to Zof terminology and workflows
  • Authoring internal runbooks aligned with Console labels
  • Designing CI/CD or webhook integrations against documented behavior

Step-by-step procedure

Install package

pip install zof-ai

Initialize client

Pass apiKey from ZOF_API_KEY environment variable.

Use separate client instances per environment (staging vs production keys).

First API call

List projects or create a staging run to verify connectivity.

Handle ZofApiError for validation and rate limit responses.

Key concepts

Organization scope
All Zof Console and API operations are isolated to your authenticated tenant.
Governed execution
Agent output and remediation follow policy packs with human approval when configured.

Best practices

  • Never embed API keys in source; use environment variables or vault injection
  • Prefer waitUntilComplete helpers over tight polling loops
  • Pin SDK version in production services and review changelog before upgrades

Was this page helpful?

Python SDK | Zof AI Documentation