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

   - Add CrewAIHook(BaseHook) that bridges Airflow connections to CrewAI's LLM 
constructor, reusing the existing pydanticai connection type — users configure 
one connection for PydanticAI, LlamaIndex, LangChain, and CrewAI
     - Hook provides _resolve_connection_kwargs() (password → api_key, host → 
base_url) and get_llm() returning a crewai.LLM instance with credentials 
injected via constructor (no env var mutation)
     - Register CrewAI integration and hook in provider.yaml, add 
crewai>=1.14.0 optional dependency, add docs with usage example
   
     New files
   
     - hooks/crewai.py — CrewAIHook implementation (~80 lines)
     - tests/unit/common/ai/hooks/test_crewai.py — 8 unit tests covering init, 
connection extraction, and get_llm()
     - docs/hooks/crewai.rst — Hook docs with Agent/Crew/Task usage example, 
connection config, parameter table
   
     Design notes
   
     Follows the exact pattern established by the LangChain hook. Simpler 
surface area — no embed_conn_id or get_embedding_model() since CrewAI
     doesn't need separate embedding models (LiteLLM handles model routing 
internally).
   
    <!-- SPDX-License-Identifier: Apache-2.0
         https://www.apache.org/licenses/LICENSE-2.0 -->
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   - [ x] Yes (please specify the tool below)
   
   Generated-by: [Claude] 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]

Reply via email to