Free Tool

Free OpenAI Agents SDK Starter Generator

An OpenAI Agents SDK starter generator creates copy-ready Python boilerplate for an Agent, Runner, function tools, handoffs, install commands, and environment setup so you can start from a working local agent.

Configure the starter

Pattern
tool
Tool
search_docs
Runtime
uv

agent.py

import asyncio

from agents import Agent, Runner, function_tool


@function_tool
def search_docs(query: str) -> str:
    """Search internal documentation for a short answer."""
    return f"Search results for: {query}"


agent = Agent(
    name="Developer Onboarding Agent",
    model="gpt-5.1",
    instructions="You help developers set up a small agent workflow. Ask one clarifying question when the request is underspecified.",
    tools=[search_docs],
)


async def main() -> None:
    result = await Runner.run(agent, "Answer developer onboarding questions")
    print(result.final_output)


if __name__ == "__main__":
    asyncio.run(main())

Install commands

mkdir agents-starter
cd agents-starter
uv init --python 3.11
uv add openai-agents
export OPENAI_API_KEY="sk-..."
uv run python agent.py

.env starter

OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-5.1
# Traces are available in the OpenAI dashboard after each run.

How to generate an Agents SDK starter

  1. Describe the agent job. Enter the task the first agent should solve and tune the system instructions.
  2. Pick a workflow pattern. Choose a single agent, a function-tool example, handoffs, or an agent-as-tool manager pattern.
  3. Choose a tool stub. Select a sample function tool that matches the first integration you plan to replace.
  4. Copy the starter files. Copy agent.py, install commands, and .env notes into your Python project.
  5. Run and inspect traces. Run the starter locally and inspect the resulting trace before connecting real systems.

Current Python SDK shape

Start with the Python openai-agents package, define an Agent, and run it with Runner from an async main function.

Tool-ready examples

Generate a safe placeholder @function_tool stub first, then replace it with your real docs, ticketing, or scoring integration.

Multi-agent path

Use handoffs when a specialist should take over a turn, or use agents as tools when one manager agent should keep control.

OpenAI Agents SDK starter FAQ

What is an OpenAI Agents SDK starter generator?

An OpenAI Agents SDK starter generator creates copy-ready Python boilerplate for Agent, Runner, optional function tools, handoffs, install commands, and environment setup.

Which package installs the OpenAI Agents SDK for Python?

Install the Python SDK with the openai-agents package. You can use pip install openai-agents or uv add openai-agents in a Python 3.10 or newer project.

When should I use handoffs instead of one agent?

Use handoffs when a routing agent should delegate part of a request to a specialist agent. For one simple workflow, start with a single Agent and add tools first.

Does this generator call the OpenAI API?

No. The generator runs entirely in your browser and only produces starter code. The generated Python code calls the API after you add your own OPENAI_API_KEY.

Where can I inspect an Agents SDK run?

After you run an agent with a valid API key, review traces in the OpenAI dashboard Trace viewer to inspect turns, tools, handoffs, and final output.

Related Tornic tools