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_hereThese quickstart scripts are currently Gemini-first. For Codex OAuth usage, run codex login and use the main SDK or oas --provider codex.
Test 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: These quickstart scripts currently use Gemini models by default.
-
Codex OAuth: For Codex-backed usage, run
codex loginand useprovider: 'codex'with a model such asgpt-5.4. -
Runtime: This example uses Bun to run TypeScript files directly.