From 8acc345c5799434681e5ce195188dadc3367cbc5 Mon Sep 17 00:00:00 2001 From: kjankov Date: Thu, 18 Jun 2026 17:31:02 -0400 Subject: [PATCH] examples: add basic_usage.py starter example Adds a minimal runnable example that shows how to create a client, start an agent run, and print the resulting run_id. The file lives in examples/ (manually-maintained, never overwritten by the generator). Co-Authored-By: Oz --- examples/basic_usage.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 examples/basic_usage.py diff --git a/examples/basic_usage.py b/examples/basic_usage.py new file mode 100755 index 0000000..4729641 --- /dev/null +++ b/examples/basic_usage.py @@ -0,0 +1,23 @@ +#!/usr/bin/env -S uv run python +"""Basic usage example for the Oz API Python SDK. + +Demonstrates how to: + - Create a client using the WARP_API_KEY environment variable + - Start an agent run with a simple prompt + - Print the resulting run_id +""" + +import os + +from oz_agent_sdk import OzAPI + +# The client automatically reads WARP_API_KEY from the environment. +client = OzAPI( + api_key=os.environ.get("WARP_API_KEY"), +) + +response = client.agent.run( + prompt="Say hello and report back.", +) + +print(f"Agent run started — run_id: {response.run_id}")