pip install openai-agents, run the hello-world Agent + Runner, then add one function tool—after-work Python agent loop.
The OpenAI Agents SDK is a lightweight Python toolkit for agentic apps: Agents (LLM + instructions + tools), handoffs, guardrails, and a built-in run loop—with tracing. Docs: openai.github.io/openai-agents-python. Install: pip install openai-agents.
It is the production-minded successor vibe to earlier Swarm experiments: few primitives, Python-first. Perfect for after-work “hello agent” nights.
People who want an official OpenAI-shaped agent loop in plain Python. You should already be comfortable with pip, venvs, and reading function signatures.
Overview: Top 10 AI agent tools for after-work Python.
python -m venv .venv && source .venv/bin/activate
pip install openai-agents
export OPENAI_API_KEY=sk-...
from agents import Agent, Runner
agent = Agent(name="Assistant", instructions="You are a helpful assistant")
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)
Confirm output prints. That proves the run loop works.
Skim the docs sections on Agents, Running agents, and Results. Note: the SDK owns turns/tool dispatch unless you drop to the Responses API yourself.
Turn a tiny Python function (e.g. word_count(text: str) -> int) into a tool per the Tools guide. Ask the agent to count words in a short sentence. Print tool-related items from the result if the docs show how for your version.
In your words: when to use the SDK vs calling the Responses API directly (short one-shot vs managed multi-step). The docs table is worth one careful read.
Add instructions: “Always reply with the word count on its own first line.” Re-run. If the model skips the tool, improve the docstring and instructions—do not jump to multi-agent handoffs yet.
Few abstractions mean you can finish a working loop before bedtime. Tracing (when you enable it later) helps debug without guesswork.
Sharpen Python so tool signatures stay clean—Intro to Python Programming.