# OpenAI Agents SDK — Multi-Agent Workflows in Python > Official OpenAI framework for building multi-agent workflows. Handoffs between agents, tool calling, guardrails, tracing, and streaming. Lightweight, Python-native. 20K+ stars. ## Install Copy the content below into your project: ## Quick Use ```bash pip install openai-agents ``` ```python from agents import Agent, Runner agent = Agent(name="Assistant", instructions="You are a helpful assistant.") result = Runner.run_sync(agent, "Write a haiku about coding.") print(result.final_output) ``` --- ## Intro OpenAI Agents SDK is the official lightweight Python framework for building multi-agent workflows. It provides primitives for agent handoffs, tool calling, input/output guardrails, tracing, and streaming — designed to be minimal yet production-ready. 20,000+ GitHub stars, maintained by OpenAI. **Best for**: Developers building multi-agent systems with OpenAI models **Works with**: OpenAI API, GPT-4o, o3, any OpenAI-compatible endpoint --- ## Core Concepts ### Agents Agents are LLMs configured with instructions and tools: ```python agent = Agent( name="Research Agent", instructions="You research topics thoroughly.", tools=[search_tool, wikipedia_tool], ) ``` ### Handoffs Agents can delegate to specialized agents: ```python triage = Agent( name="Triage", handoffs=[billing_agent, technical_agent, general_agent], ) ``` ### Guardrails Validate inputs/outputs before and after agent runs: ```python @input_guardrail async def check_topic(ctx, agent, input): # reject off-topic requests ... ``` ### Tracing Built-in tracing for debugging multi-agent flows — visualize handoff chains, tool calls, and token usage. --- ### FAQ **Q: What is OpenAI Agents SDK?** A: The official OpenAI Python framework for multi-agent workflows with handoffs, tool calling, guardrails, and tracing. 20K+ GitHub stars. **Q: How is it different from LangChain or CrewAI?** A: It's minimal by design — focused primitives (agents, handoffs, guardrails) without a large dependency tree. Built and maintained by OpenAI. --- ## Source & Thanks > Created by [OpenAI](https://github.com/openai). Licensed under MIT. > [openai/openai-agents-python](https://github.com/openai/openai-agents-python) — 20,000+ GitHub stars --- Source: https://tokrepo.com/en/workflows/e0a359b3-9fb4-42a0-9785-aadd90c6e23d Author: Script Depot