Skip to content

feat: CrewAI framework adapter (shared ToolCapture) - #22

Merged
MarouaBoud merged 3 commits into
feat/langgraph-adapterfrom
feat/crewai-adapter
Sep 2, 2026
Merged

MarouaBoud merged 3 commits into
feat/langgraph-adapterfrom
feat/crewai-adapter

Conversation

@MarouaBoud

Copy link
Copy Markdown
Member

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).

Stacked on #21 (the LangGraph adapter, which introduced frameworks.py). Merge #21 first; this PR auto-retargets to main when it does.

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 ToolCapture helper:

  • ToolCapture builds 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_fn are now thin: each supplies only its one-line invocation (graph.ainvoke vs crew.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

  • 141 tests pass, incl. a ToolCapture unit test and a CrewAI adapter test (name + args captured through a fake crew). ruff + mypy clean.
  • examples/crewai_agent.py shows the crew_factory(tools, goal) a user writes.

@MarouaBoud
MarouaBoud merged commit c75c033 into feat/langgraph-adapter Sep 2, 2026
4 checks passed
MarouaBoud added a commit that referenced this pull request Sep 3, 2026
feat: CrewAI adapter + shared ToolCapture (re-land of #22 onto main)
@MarouaBoud
MarouaBoud deleted the feat/crewai-adapter branch September 3, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant