From aa706b3ef3a10d6f6dea72f1b25fd9f02ed6fc65 Mon Sep 17 00:00:00 2001 From: kjankov Date: Thu, 18 Jun 2026 17:46:00 -0400 Subject: [PATCH] examples: add quickstart.py example for basic OzAPI usage Adds a minimal runnable example showing how to instantiate the OzAPI client and dispatch a simple agent task. This lives in the examples/ directory (manually maintained, never overwritten by the generator). Co-Authored-By: Oz --- examples/quickstart.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 examples/quickstart.py diff --git a/examples/quickstart.py b/examples/quickstart.py new file mode 100755 index 0000000..4b46887 --- /dev/null +++ b/examples/quickstart.py @@ -0,0 +1,25 @@ +#!/usr/bin/env -S uv run python +""" +Quickstart example for the Oz Agent SDK. + +Demonstrates the minimal setup needed to run an agent task and poll +for results using the OzAPI client. + +Usage: + WARP_API_KEY=your_key ./examples/quickstart.py +""" + +import os + +from oz_agent_sdk import OzAPI + +client = OzAPI( + api_key=os.environ.get("WARP_API_KEY"), # defaults to WARP_API_KEY env var +) + +# Run an agent with a simple prompt +response = client.agent.run( + prompt="List the files in the current directory.", +) + +print(f"Agent run started — run_id: {response.run_id}")