@@ -95,15 +95,39 @@ print(answer)
9595agent.dispose()
9696```
9797
98- ## Running the Example
98+ ## Running the Examples
9999
100100### Prerequisites
101101
1021021 . Python 3.8+ installed
103- 2 . MCP servers running (see examples/server3001 and examples/server3002)
104- 3 . ANTHROPIC_API_KEY environment variable set
103+ 2 . ANTHROPIC_API_KEY environment variable set
105104
106- ### Run with the provided script
105+ ### API Key Example (Recommended)
106+
107+ Use this approach when you have a Gopher API key. The server configuration is fetched automatically from the Gopher API.
108+
109+ ``` bash
110+ cd examples/pip
111+
112+ # Set your Gopher API key
113+ export GOPHER_API_KEY=your_api_key_here
114+
115+ # Use default (latest) SDK version from TestPyPI
116+ ./client_example_api_run.sh
117+
118+ # Or specify a specific version
119+ SDK_VERSION=0.1.0.dev20260208150923 ./client_example_api_run.sh
120+
121+ # Pass a custom question
122+ ./client_example_api_run.sh " What tools are available?"
123+ ```
124+
125+ ### Server Config Example
126+
127+ Use this approach when you want to specify MCP servers directly via JSON configuration.
128+
129+ ** Additional Prerequisites:**
130+ - MCP servers running (see examples/server3001 and examples/server3002)
107131
108132``` bash
109133cd examples/pip
@@ -112,7 +136,7 @@ cd examples/pip
112136./client_example_json_run.sh
113137
114138# Or specify a specific version
115- SDK_VERSION=0.1.0.dev20260131170458 ./client_example_json_run.sh
139+ SDK_VERSION=0.1.0.dev20260208150923 ./client_example_json_run.sh
116140```
117141
118142### Run manually
@@ -123,12 +147,16 @@ python3 -m venv venv
123147source venv/bin/activate
124148
125149# Install from TestPyPI (for testing)
126- pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ gopher-orch
150+ pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ gopher-orch gopher-orch-native-darwin-arm64
127151
128152# Or install from PyPI (when released)
129153# pip install gopher-orch
130154
131- # Run the example
155+ # Run the API key example
156+ export GOPHER_API_KEY=your_api_key_here
157+ python client_example_api.py
158+
159+ # Or run the server config example (requires local MCP servers)
132160python client_example_json.py
133161```
134162
@@ -167,5 +195,7 @@ xattr -d com.apple.quarantine $(python -c "import gopher_orch_native_darwin_arm6
167195## Environment Variables
168196
169197- ` ANTHROPIC_API_KEY ` - Required for using Anthropic models
198+ - ` GOPHER_API_KEY ` - Required for ` create_with_api_key() ` - get one from https://gopher.security
170199- ` DEBUG=1 ` - Enable debug logging for library loading
171200- ` GOPHER_ORCH_LIBRARY_PATH ` - Override the native library path
201+ - ` SDK_VERSION ` - Override the SDK version when running example scripts
0 commit comments