You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vikramkoka (via GitHub)" <gi...@apache.org> on 2026/05/19 15:51:32 UTC
[PR] Add CrewAI framework hook to common.ai provider [airflow]
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CrewAI framework hook to common.ai provider [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #67194:
URL: https://github.com/apache/airflow/pull/67194#issuecomment-4501808304
<!-- uv-lock-rebase-notice -->
`uv.lock` on `main` just moved via [#67232](https://github.com/apache/airflow/pull/67232) ("[main] Upgrade important CI environment"), commit [`6b64a62`](https://github.com/apache/airflow/commit/6b64a621be4c376bf899294e144e7693ae68148d) and this PR currently conflicts.
Quickest fix:
```bash
git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-lease
```
_Automated nudge — ignore if you're not ready to rebase. This comment is updated in place on future `uv.lock` bumps._
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add CrewAI framework hook to common.ai provider [airflow]
Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil closed pull request #67194: Add CrewAI framework hook to common.ai provider
URL: https://github.com/apache/airflow/pull/67194
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org