kaxil opened a new pull request, #76340:
URL: https://github.com/apache/airflow/pull/76340

   The OpenAI Agents SDK guide in Common AI relied on the Strands guide: 
"`AirflowTools` takes the same arguments as the Strands plugin (see Strands 
Agents)", and the explanation of tool failures and masking lived only there. 
Installation came last, MCP got half a sentence, and data access, sessions, 
approvals and streaming were barely covered. This rewrites the page so an SDK 
user can follow it without reading another framework's guide, in roughly the 
order the SDK's other durable-execution integrations use: install, try it, run 
it in a task, then tools, MCP, tracing, durable retries and limits.
   
   What's new on the page:
   
   - **Try the tools from a script.** `AirflowTools` with a connection in an 
`AIRFLOW_CONN_*` variable, no Dag or metadata database, and what happens when 
the script can't see a connection.
   - **Give the agent access to your data.** A new example, 
`example_openai_agents_data_access`, limits an agent to two warehouse tables 
(`SQLToolset`) and one bucket prefix (`ObjectStorageToolset`). The section 
shows the exact refusals the model gets, and says which limits stop a call 
before it reaches the system and which only cut the result.
   - **Hooks.** What to check before exposing a hook method through 
`HookToolset`. `HttpHook.run` is the counter-example: pinning `endpoint` still 
leaves `extra_options`, which can set a proxy or turn off TLS verification, and 
the method returns a `requests.Response` the model sees as `<Response [200]>`.
   - **Tools table.** For each kind of tool (`AirflowTools`, your own 
`@function_tool`, `mcp_servers`, hosted tools): whether its result is masked, 
what the model sees on a failure, and whether a durable retry replays it.
   - **Limits stated plainly.** `needs_approval` isn't connected to Airflow and 
returns `final_output=None`. `.filtered()` and `.approval_required()` fail 
through `AirflowTools`. A failure after `run_durably_sync` returns reruns the 
agent, so write the answer in a downstream task.
   
   Every output and error block on the page was captured in breeze from a 
scripted model against a real `SQLToolset` (SQLite), `ObjectStorageToolset` and 
`HookToolset`, on `openai-agents` 0.20.0 (`openai` 2.54) and 0.24.0 (`openai` 
3.42). Both gave identical text. The `run_durably` tests pass on both versions. 
The new example passes mypy and the example Dag import tests.
   
   **Why document today's behaviour rather than fix it first.** Several limits 
above are gaps in the adapter rather than intended design, such as journal 
cleanup on run return and approval wrappers. The page describes what ships now, 
so the guide is accurate for the released provider. Each fix will update the 
matching paragraph.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to