Skip to content

fix(examples): fix crewai examples#179

Merged
namrataghadi-galileo merged 1 commit intomainfrom
feature/fix-crewai-examples
Apr 20, 2026
Merged

fix(examples): fix crewai examples#179
namrataghadi-galileo merged 1 commit intomainfrom
feature/fix-crewai-examples

Conversation

@namrataghadi-galileo
Copy link
Copy Markdown
Contributor

Summary

Fixed all CrewAI example setup_controls.py scripts to use the correct control definition schema (selector/evaluator nested under condition), which was causing 422 errors against the updated server API. Updated all example pyproject.toml files and READMEs to handle the pydantic version conflict between agent-control-sdk and crewai.

Scope

User-facing/API changes:

  • Updated install instructions in all four CrewAI example READMEs to use a two-step install workaround for the pydantic conflict (crewai caps at <2.12, agent-control-evaluators requires >=2.12.4)
  • Removed agent-control-sdk from all four example pyproject.toml dependency lists so uv pip install -e . resolves cleanly

Internal changes:

  • Fixed selector/evaluator schema in all four setup_controls.py scripts — wrapped in condition key to match server API (content_publishing_flow, evaluator_showcase, secure_research_crew, steering_financial_agent)
  • Fixed data["evaluator"] reference in evaluator_showcase/setup_controls.py to data["condition"]["evaluator"] after the schema fix
  • Added response body logging to create_control_safe error handler in content_publishing_flow/setup_controls.py for easier debugging

Out of scope:

  • No changes to SDK or server source code
  • Root cause of pydantic conflict (agent-control-evaluators as a hard dependency in the SDK) is not fixed here — tracked as a follow-up

Risk and Rollout

Risk level: low — changes are confined to example scripts and READMEs, no production code touched.

Rollback plan: Revert example files. No server or SDK changes to roll back.

Testing

  • Added or updated automated tests
  • Ran make check (not applicable — example scripts only)
  • Manually verified behavior — setup_controls.py progressed past 422 after schema fix; install steps validated against content_publishing_flow

Checklist

  • Linked issue/spec (if applicable)
  • Updated docs/examples for user-facing changes
  • Included any required follow-up tasks — make agent-control-evaluators an optional dependency in the SDK to permanently resolve the pydantic conflict

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yashsheth46 yashsheth46 requested a review from joaomdmoura April 20, 2026 19:01
@namrataghadi-galileo namrataghadi-galileo merged commit 9004ea3 into main Apr 20, 2026
6 checks passed
@namrataghadi-galileo namrataghadi-galileo deleted the feature/fix-crewai-examples branch April 20, 2026 19:11
galileo-automation pushed a commit that referenced this pull request Apr 22, 2026
## [2.4.0](ts-sdk-v2.3.0...ts-sdk-v2.4.0) (2026-04-22)

### Features

* **evaluators:** add built-in budget evaluator for per-agent cost tracking ([#144](#144)) ([d4ce113](d4ce113)), closes [#130](#130)
* **sdk:** add external sink ([#175](#175)) ([45f3645](45f3645))
* **server:** Align condition and template depth limits ([#166](#166)) ([03f402e](03f402e))
* **server:** Phase 0: add control version history and soft-delete unusable legacy controls ([#172](#172)) ([e5b2b33](e5b2b33))

### Bug Fixes

* **examples:** fix crewai examples ([#179](#179)) ([9004ea3](9004ea3))
@galileo-automation
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants