feat(examples): expand CrewAI examples with multi-agent crew and Flow integration#94
feat(examples): expand CrewAI examples with multi-agent crew and Flow integration#94joaomdmoura wants to merge 5 commits intoagentcontrol:mainfrom
Conversation
… integration Add 4 new CrewAI example directories demonstrating the full range of Agent Control capabilities: - steering_financial_agent: All 3 action types (deny/steer/warn) in a wire-transfer scenario with 5 tested scenarios - evaluator_showcase: All 4 built-in evaluators (SQL, LIST, REGEX, JSON) in a data-analyst scenario with 12 tested scenarios - secure_research_crew: 3-agent sequential crew (Researcher, Analyst, Writer) with per-role policies and 5 tested scenarios - content_publishing_flow: Full CrewAI Flow with @start/@listen/@router, conditional routing (low_risk/high_risk/escalation), embedded crews, client-side steering, and human-in-the-loop with 6 tested scenarios Update the top-level CrewAI README with comprehensive feature coverage matrix, architecture diagrams, and scenario tables for all 5 examples. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…xamples Add ?limit=100 to all verify_setup API calls to handle pagination when many controls exist. Defer LLM creation in evaluator_showcase behind OPENAI_API_KEY check so examples work without an API key. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eate layout Refactor all 4 CrewAI examples (steering_financial_agent, evaluator_showcase, secure_research_crew, content_publishing_flow) from single-file monoliths to the standard `crewai create crew/flow` project structure: - src/<package>/main.py — entry point, scenarios, verify_setup - src/<package>/crew.py — @crewbase class with YAML config (crew examples) - src/<package>/config/agents.yaml + tasks.yaml — agent/task definitions - src/<package>/tools/*.py — tool implementations with @control() wrappers - pyproject.toml — [tool.crewai] type, [project.scripts] entry points All examples tested and passing with identical behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ools dep Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| ] | ||
|
|
||
| [project.scripts] | ||
| content_publishing_flow = "content_publishing_flow.main:main" |
There was a problem hiding this comment.
content_publishing_flow = "content_publishing_flow.main:run"
| 5. Banned topic -> LIST evaluator blocks at draft | ||
| 6. PII in draft -> REGEX evaluator blocks at draft | ||
| """) | ||
|
|
There was a problem hiding this comment.
def run():
"""Entry point for [project.scripts]."""
try:
main()
finally:
agent_control.shutdown()
|
|
||
| def kickoff(): | ||
| """Standard CrewAI flow entry point.""" | ||
| main() |
There was a problem hiding this comment.
try:
main()
finally:
agent_control.shutdown()
| flow.plot() | ||
|
|
||
|
|
||
| if __name__ == "__main__": |
There was a problem hiding this comment.
try:
main()
finally:
agent_control.shutdown()
| ] | ||
|
|
||
| [project.scripts] | ||
| evaluator_showcase = "evaluator_showcase.main:main" |
There was a problem hiding this comment.
evaluator_showcase = "evaluator_showcase.main:run"
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
There was a problem hiding this comment.
try:
main()
finally:
agent_control.shutdown()
| ] | ||
|
|
||
| [project.scripts] | ||
| steering_financial_agent = "steering_financial_agent.main:main" |
There was a problem hiding this comment.
steering_financial_agent = "steering_financial_agent.main:run"
|
|
||
| [project.scripts] | ||
| steering_financial_agent = "steering_financial_agent.main:main" | ||
| run_crew = "steering_financial_agent.main:main" |
There was a problem hiding this comment.
run_crew = "steering_financial_agent.main:run"
|
|
||
| def run(): | ||
| """Entry point for [project.scripts].""" | ||
| main() |
There was a problem hiding this comment.
try:
main()
finally:
agent_control.shutdown()
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
There was a problem hiding this comment.
try:
main()
finally:
agent_control.shutdown()
|
@joaomdmoura This looks great. Just some minor improvements to handle graceful shutdown. And Tasks were missing |
Add 4 new CrewAI example directories demonstrating the full range of Agent Control capabilities:
Update the top-level CrewAI README with comprehensive feature coverage matrix, architecture diagrams, and scenario tables for all 5 examples.