Skip to content

docs: mark Agent.instructions as optional#3384

Merged
seratch merged 1 commit into
openai:mainfrom
ioleksiuk:docs/mark-agent-instructions-optional
May 13, 2026
Merged

docs: mark Agent.instructions as optional#3384
seratch merged 1 commit into
openai:mainfrom
ioleksiuk:docs/mark-agent-instructions-optional

Conversation

@ioleksiuk
Copy link
Copy Markdown
Contributor

Summary

The Agent properties table in `docs/agents.md` currently marks `instructions` as required (`yes`), but:

  • `Agent.instructions` has `= None` as its default in `src/agents/agent.py:283-290`.
  • The class docstring on `Agent` itself says "We strongly recommend passing `instructions`" — wording that signals optional-but-recommended.
  • `Agent(name="x")` succeeds at runtime without an `instructions` argument; many tests rely on this.

Update the table row to mark `instructions` as not required, while keeping a "Strongly recommended" hint to preserve the existing guidance.

Test plan

Docs-only change. Manually verified:

```
$ uv run python -c "from agents import Agent; a = Agent(name='x'); print(a.instructions)"
None
```

Issue number

N/A — found during a docstring/docs accuracy audit.

Checks

  • I've added new tests (if relevant) — docs only
  • I've added/updated the relevant documentation
  • I've run `make lint` and `make format` — no code touched
  • I've made sure tests pass — no code touched

`Agent.instructions` has a default value of `None` (see
`src/agents/agent.py:283-290`) and the class docstring itself notes
"We strongly recommend passing `instructions`" — implying it is
recommended, not required. `Agent(name="x")` succeeds at runtime
without `instructions`. Update the property table in `docs/agents.md`
to mark it as not-required with a note recommending it.
@seratch seratch added the documentation Improvements or additions to documentation label May 13, 2026
@seratch
Copy link
Copy Markdown
Member

seratch commented May 13, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seratch seratch modified the milestone: 0.17.x May 13, 2026
@seratch seratch merged commit f9eb3a4 into openai:main May 13, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants