Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMar 31, 2026·1 min de lectura

OpenAI Swarm — Lightweight Multi-Agent Orchestration

Educational multi-agent framework by OpenAI. Ergonomic agent handoffs, tool calling, and context variables. Minimal abstraction over Chat Completions API. 21K+ stars.

Introducción

Swarm is an educational multi-agent orchestration framework by OpenAI. It explores lightweight, ergonomic patterns for agent handoffs, tool calling, and context variables — with minimal abstraction over the Chat Completions API. Designed to teach multi-agent patterns, not as a production framework. 21,000+ GitHub stars, MIT licensed.

Best for: Learning multi-agent patterns, prototyping agent handoff workflows, understanding OpenAI's agent design philosophy Works with: OpenAI API (GPT-4o, GPT-4, GPT-3.5)


Core Concepts

Agents

Agents are instructions + functions. Simple and composable:

agent = Agent(
    name="Support",
    instructions="You handle customer support.",
    functions=[lookup_order, check_status, escalate],
)

Handoffs

Agents transfer control by returning another agent:

def transfer_to_billing():
    return billing_agent  # Control passes to billing

Context Variables

Share state across agents without global variables:

response = client.run(agent=triage,
    messages=[...],
    context_variables={"user_id": "123", "plan": "premium"})

Routines

Multi-step procedures encoded as agent instructions — like a playbook for the agent to follow.


FAQ

Q: What is OpenAI Swarm? A: An educational framework by OpenAI exploring lightweight multi-agent orchestration with handoffs, tool calling, and context variables. 21K+ stars, MIT licensed.

Q: Should I use Swarm in production? A: OpenAI explicitly states Swarm is educational, not a production framework. For production, consider OpenAI Agents SDK, LangGraph, or CrewAI.


🙏

Fuente y agradecimientos

Created by OpenAI. Licensed under MIT. openai/swarm — 21,000+ GitHub stars

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados