Skip to content

Conversation

@chris-freeman-glean
Copy link
Contributor

Summary

Addresses a common DX issue where developers attempt to pass file objects directly to agents.run().

Changes

  • Adds an AgentFileUploadErrorHook that intercepts 400 errors with "permission" issues in agent runs.
  • Returns a clear, actionable error message explaining the required two-step process (Upload -> Get ID -> Pass ID).
  • Adds a straightforward example file examples/agent_with_file_upload.py demonstrating the correct workflow.

Testing

  • Verified the hook registration logic.
  • Verified the example code pattern against the SDK types.

@chris-freeman-glean chris-freeman-glean requested a review from a team as a code owner November 21, 2025 19:55
@chris-freeman-glean chris-freeman-glean force-pushed the cfreeman/agent-file-upload-dx branch from 8408986 to cf2be42 Compare November 21, 2025 20:00
@chris-freeman-glean chris-freeman-glean merged commit 546d4ea into main Nov 21, 2025
3 checks passed
@chris-freeman-glean chris-freeman-glean deleted the cfreeman/agent-file-upload-dx branch November 21, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants