feat: CrewAI framework adapter (shared ToolCapture) - #22
Merged
Merged
Conversation
MarouaBoud
added a commit
that referenced
this pull request
Sep 3, 2026
feat: CrewAI adapter + shared ToolCapture (re-land of #22 onto main)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the CrewAI framework adapter, completing the "LangGraph / CrewAI adapters" delivery item (E19). Drive the swarm with your own CrewAI crew — stampede owns the population/target/chaos/report, your crew makes each tool decision (NG-3).
Design — a shared, tested capture
The key move: since CrewAI accepts LangChain tools (like LangGraph), both adapters share one capture path, refactored out of #21 into a
ToolCapturehelper:ToolCapturebuilds capture-stub tools (with arg schemas from the target spec), records calls, and yields the first as a decision — framework-agnostic and unit-tested.langgraph_agent_fn/crewai_agent_fnare now thin: each supplies only its one-line invocation (graph.ainvokevscrew.kickoff).So the CrewAI adapter's capture logic is verified, not write-blind — the same fake-driven test that covers LangGraph covers CrewAI (via langchain-core, no crewai install needed).
Config:
population.framework: crewai+framework_ref: "module:crew_factory". New[crewai]extra.Verified
ToolCaptureunit test and a CrewAI adapter test (name + args captured through a fake crew). ruff + mypy clean.examples/crewai_agent.pyshows thecrew_factory(tools, goal)a user writes.