openai-agents-sdk

$npx mdskill add mkurman/zorai/openai-agents-sdk

Orchestrate multi-agent workflows with handoffs and guardrails.

  • Enables complex task routing between specialized AI agents.
  • Depends on OpenAI API primitives for core agent functionality.
  • Decides actions through structured instructions and tool definitions.
  • Delivers results via Python objects with final output tracking.

SKILL.md

.github/skills/openai-agents-sdkView on GitHub ↗
---
name: openai-agents-sdk
description: "OpenAI Agents SDK — build agentic workflows with handoffs, guardrails, and tool integration. Single-agent to multi-agent orchestration. Tracing and observability. Python-first SDK from OpenAI."
tags: [openai, agents-sdk, agent-framework, handoffs, guardrails, orchestration, zorai]
---
## Overview

OpenAI Agents SDK provides a lightweight framework for building agentic AI workflows. Supports tool use, handoffs (agent-to-agent routing), guardrails, and tracing — built on the OpenAI API's native agent primitives.

## Installation

```bash
uv pip install openai-agents
```

## Basic Agent

```python
from agents import Agent, Runner

agent = Agent(name="Helper", instructions="You are a helpful assistant.")
result = Runner.run_sync(agent, "What is the capital of France?")
print(result.final_output)
```

## Tool Use

```python
from agents import Agent, Runner, function_tool

@function_tool
def get_weather(city: str) -> str:
    return f"Weather in {city}: sunny, 22°C"

agent = Agent(name="WeatherBot", instructions="Use tools to answer weather queries.", tools=[get_weather])
result = Runner.run_sync(agent, "What's the weather in London?")
print(result.final_output)
```

## Handoffs

```python
from agents import Agent, Runner

triage = Agent(name="Triage", instructions="Route to the right specialist.")
billing = Agent(name="Billing", instructions="Handle billing questions.")
triage.handoffs = [billing]

result = Runner.run_sync(triage, "My invoice didn't arrive")
```

## References
- [OpenAI Agents SDK docs](https://openai.github.io/openai-agents-python/)
- [OpenAI Agents GitHub](https://github.com/openai/openai-agents-python)

More from mkurman/zorai

SkillDescription
account-management>
agile-scrum>
albumentationsFast image augmentation library (Albumentations). 70+ transforms for classification, segmentation, object detection, keypoints, and pose estimation. Optimized OpenCV-based pipeline with unified API across all CV tasks. Supports images, masks, bounding boxes, and keypoints simultaneously. Note: classic Albumentations (MIT) is no longer maintained; successor AlbumentationsX uses AGPL-3.0. For torchvision-native augmentations, use torchvision.transforms.v2.
aml-complianceAnti-Money Laundering (AML) and Know Your Customer (KYC) compliance workflow. Sanctions screening, PEP detection, transaction monitoring, suspicious activity reporting (SAR), and OFAC compliance.
anki-connectThis skill is for interacting with Anki through AnkiConnect, and should be used whenever a user asks to interact with Anki, including to read or modify decks, notes, cards, models, media, or sync operations.
approval-checkpoint-long-taskCanonical long-task pack for daemon-managed work with deliberate approval checkpoints, status summaries, rollback notes, and mobile-safe governance-aware updates.
auditing-goal-artifactsUse when reviewing recent zorai goal run outputs, closure markers, ledgers, or evidence bundles to judge whether completion is credible or to identify remaining uncertainty.
autogenAutoGen (Microsoft) — multi-agent conversation framework. Agent-to-agent chat, code generation & execution, tool use, group chat, and human-in-the-loop. Build collaborative AI systems with specialized agents.
backtraderPython backtesting framework for trading strategies. Data feeds, brokers, analyzers, and live trading support. Strategy development with commission models, slippage, and signal-based execution.
beautiful-mermaidRender Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.