jason810496 opened a new pull request, #69636: URL: https://github.com/apache/airflow/pull/69636
## Why `system_prompt` on `AgentOperator`/`LLMOperator` (and `@task.agent`/`@task.llm`) is a templated field, but the provider docs only mention this in passing — there's no worked example showing it templated from an upstream task's XCom, a common pattern for tailoring an agent's instructions to an earlier classification. ## What - Add a "Dynamic System Prompt" section to `docs/operators/agent.rst`, backed by a new example DAG function (`example_agent_dynamic_system_prompt`) in `example_dags/example_agent.py` that Jinja-templates `system_prompt` from a `classify` task's XCom. - Add a one-line `seealso` cross-reference in `docs/operators/llm.rst`, since `@task.llm` templates `system_prompt` identically. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Sonnet 5 following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
