-
Notifications
You must be signed in to change notification settings - Fork 207
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
Description
The AgentInputItem
type is currently imported using regular import syntax in the documentation examples, but it should be imported using import type
syntax since it's a type-only export.
Current Behavior
The example code shows:
import {
Agent,
AgentInputItem, // ❌ This causes an error
run,
tool,
user,
withTrace,
} from '@openai/agents';
Error Message
SyntaxError: The requested module '@openai/agents' does not provide an export named 'AgentInputItem'
Expect Behavior
import {
Agent,
run,
tool,
user,
withTrace,
type AgentInputItem, // ✅ Correct way
} from '@openai/agents';
Affected Documentation
Running agents guide:chat-threads
Other example code that imports AgentInputItem
Environment
Package: @openai/agents [v0.0.14]
TypeScript version: [v5.8.3]
Node.js version: [v22.16.3]
Additional Context
This is important because new users following the documentation will encounter errors when trying to run the example code. The documentation should reflect the correct import syntax for type-only exports.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers