Skip to main content
The Agent SDK is available for both Python and TypeScript with identical capabilities.

Python

Requirements

  • Python 3.11 or higher
  • An Opper API key

Install from PyPI

pip install opper-agents
Or with a package manager:
# Using uv (recommended)
uv add opper-agents

# Using poetry
poetry add opper-agents

Verify Installation

import opper_agents
print(opper_agents.__version__)

TypeScript

Requirements

  • Node.js 20 or higher
  • An Opper API key

Install from npm

npm install @opperai/agents zod
Or with other package managers:
# Using pnpm (recommended)
pnpm add @opperai/agents zod

# Using yarn
yarn add @opperai/agents zod
Zod is a peer dependency used for schema validation. You need to install it separately.

Verify Installation

import { Agent } from "@opperai/agents";
console.log("Agent SDK loaded successfully");

Configuration

API Key

Set your Opper API key as an environment variable:
export OPPER_API_KEY="your-api-key"
Or pass it directly when creating an agent:
agent = Agent(
    name="MyAgent",
    opper_api_key="your-api-key"
)

TypeScript Configuration

For TypeScript projects, ensure your tsconfig.json includes:
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "strict": true,
    "esModuleInterop": true
  }
}
The decorator flags are required for the @tool decorator syntax.

Development Setup

Running Examples

Both SDKs include example files to help you learn:
# Clone the repo
git clone https://github.com/opper-ai/opper-agents
cd opper-agents

# Install dependencies
pip install -e ".[dev]"

# Run an example
python examples/01_getting_started/01_first_agent.py

Next Steps