SDK Reference
Go SDK
Go client.
Overview
Official Go client for the Zof REST API.
Package: github.com/zof-ai/zof-go. 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
- Go 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
go get github.com/zof-ai/zof-go
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?