An agent built on the OpenAI Agents SDK reads nothing from disk. Every part of it is declared in code and handed to a runner, so the same program behaves the same on any machine.
Agent(...)Declared once, in code. There is no project to inherit.RunConfig(...)Overrides for a single run, without touching the agent.THE AGENT LOOP
- call the model
- final output → done
- handoff → switch agent
- tool calls → run, loop
The loop is the product. Everything in the tree is an argument to it.
WHEN BOTH SET THE SAME THING
- RunConfig
- Agent
Two places, not five. Nothing on disk and nothing from your organisation can change what this agent does.
your_agent.pyThe agent object
01 / 11- An agent is a model, a set of instructions, and the tools it may call — constructed in code, not loaded from a folder.
- instructions can be a string or a function of the run context, so the system prompt can be built per request.
- clone() copies an agent and overrides what you name, which is how you make a variant without repeating the definition.
Easy to get wrongclone() is a shallow copy. Lists you do not override, such as tools, stay shared with the original, so changing one changes both.
Next to ClaudeClaude Code reads the same intent from CLAUDE.md on disk. Here there is no file: if you want one, you read it yourself and pass the text in.