This directory contains example scripts and demonstrations of the Open Agent SDK features.
See quickstart/ for a comprehensive introduction to the SDK.
# Set your API key
export OPENAI_API_KEY="your-api-key"
# or
export GEMINI_API_KEY="your-api-key"
# Run quickstart suite
cd examples/quickstart
bun install
bun testThe skills-demo.ts example demonstrates the skill system:
- Skills are automatically loaded from
~/.claude/skills/and./.claude/skills/ - Use
/skill-nameto activate a skill - The skill content is injected into the system prompt
- The LLM follows the skill instructions
See the skills/ directory for example skill files:
code-reviewer- Thorough code review specialistrefactor- Code refactoring expert
To use these example skills, copy them to your skills directory:
# Create personal skills directory
mkdir -p ~/.claude/skills
# Copy example skills
cp examples/skills/*.md ~/.claude/skills/
# Or copy to your project
mkdir -p .claude/skills
cp examples/skills/*.md .claude/skills/Then run the demo:
bun run examples/skills-demo.tsSkills are Markdown files with YAML frontmatter:
---
name: my-skill
description: What this skill does
tools: ['Read', 'Write', 'Edit']
---
# Skill Instructions
Your detailed instructions here. You can use:
- Markdown formatting
- Code blocks
- Lists
- etc.
## Parameter Substitution
Use $ARGUMENTS to reference what the user typed after /skill-name.| Example | Description |
|---|---|
quickstart/ |
Comprehensive SDK quickstart package |
skills-demo.ts |
Skill system demonstration |
skills/ |
Example skill files |
All examples require an API key. Set one of these environment variables:
OPENAI_API_KEY- For OpenAI providerGEMINI_API_KEY- For Google Gemini provider
Then run with:
bun run examples/<example-name>.ts