Integration

CrewAI logo

CrewAI

CrewAI multi-agent crew framework integrated with ZenML

On this page

CrewAI lets you define multi-agent “crews” with roles, goals, and tasks that collaborate to complete work; integrating CrewAI with ZenML wraps those crews in reproducible pipelines with artifact tracking, orchestration, and an easy path from local experiments to production.

Features with ZenML

  • Pipeline orchestration. Run CrewAI crews as ZenML steps inside reproducible pipelines.
  • ‍Artifact management. Capture inputs and outputs for lineage, versioning, and auditability.
  • ‍Built-in evaluation hooks. Add post-run checks or eval steps to monitor quality over time.Infrastructure agnostic. Scale from local runs to Kubernetes, Airflow, and other ZenML stacks.
  • ‍Composable workflows. Combine crews with retrieval, evals, and deployment steps in one DAG.

Main Features

  • Multi-agent crews. Define collaborators with roles, goals, and tools.
  • ‍Task delegation. Break work into tasks and route them to the right agent.
  • ‍Collaborative execution. Agents coordinate to research, draft, and refine outputs.
  • ‍Pluggable patterns. Start from examples like research and writing crews and customize.

How to use ZenML with CrewAI

text
from zenml import ExternalArtifact, pipeline, step
from crewai_agent import crew

@step
def run_crewai(query: str) -> str:
    result = crew.kickoff(inputs={"city": query})
    return str(result)

@pipeline
def crewai_travel_pipeline() -> str:
    q = ExternalArtifact(value="Berlin")
    return run_crewai(q.value)

if __name__ == "__main__":
    print(crewai_travel_pipeline())

Additional Resources

Connect Your AI Workflows
to a World of Tools

Expand your AI workflows with 66 ZenML integrations