This is a quickstart example for open-agent-sdk using the workspace reference.
This example uses the workspace reference, so dependencies are automatically linked:
bun installCopy .env.example to .env and add your API Key:
cp .env.example .env
# Edit .env file and add your GEMINI_API_KEYOr set environment variables directly:
export GEMINI_API_KEY=your_gemini_api_key_hereTest basic prompt functionality, file operations, and code analysis:
bun test-basic.tsTest multi-turn conversations with context preservation:
bun test-session.tsTest built-in tools (Glob, Bash, WebSearch):
bun test-tools.tsbun run test| File | Description |
|---|---|
test-basic.ts |
Basic functionality: Q&A, file operations, code analysis |
test-session.ts |
Session-based multi-turn conversation test |
test-tools.ts |
Tool usage test: Glob, Bash, WebSearch |
-
Model: This example uses the
gpt-5.3-codexmodel. Make sure your API Key has access to this model. -
Alternative Models: If
gpt-5.3-codexis not available, try:claude-opus-4.6
-
Runtime: This example uses Bun to run TypeScript files directly.