Skip to content

opper-ai/opper-sdks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opper SDKs

Official SDKs for the Opper API.

SDK Package Directory
Python opperai python/
TypeScript opperai typescript/

Quick Start

Python

pip install opperai
from opperai import Opper

opper = Opper()  # uses OPPER_API_KEY env var

result = opper.call("summarize", input="Long article...")
print(result.data)

TypeScript

npm install opperai
import { Opper } from "opperai";

const opper = new Opper(); // uses OPPER_API_KEY env var

const result = await opper.call("summarize", {
  input: "Long article...",
});
console.log(result.data);

Agent SDK

Build AI agents with tool use, streaming, multi-agent composition, and MCP integration.

Python

from opperai import Agent, tool

@tool
def get_weather(city: str) -> str:
    """Get the current weather for a city."""
    return f"Sunny, 22°C in {city}"

agent = Agent(
    name="weather-assistant",
    instructions="You are a helpful weather assistant.",
    tools=[get_weather],
)

result = await agent.run("What's the weather in Paris?")
print(result.output)

See the Python agent examples for streaming, hooks, MCP integration, and multi-agent patterns.

TypeScript

import { z } from "zod";
import { Agent, tool } from "opperai";

const getWeather = tool({
  name: "get_weather",
  description: "Get the current weather for a city",
  parameters: z.object({ city: z.string() }),
  execute: async ({ city }) => `Sunny, 22°C in ${city}`,
});

const agent = new Agent({
  name: "weather-assistant",
  instructions: "You are a helpful weather assistant.",
  tools: [getWeather],
});

const result = await agent.run("What's the weather in Paris?");
console.log(result.output);

See the TypeScript agent examples for streaming, hooks, MCP integration, and multi-agent patterns.


See the Python SDK and TypeScript SDK READMEs for full documentation.

About

SDKs for the Opper API

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors