Skip to content

fix: pass initial state via kickoff(inputs=) for CrewAI 1.10.1 compatibility#80

Open
iabshailley wants to merge 1 commit intomainfrom
fix/crewai-flow-state-setter
Open

fix: pass initial state via kickoff(inputs=) for CrewAI 1.10.1 compatibility#80
iabshailley wants to merge 1 commit intomainfrom
fix/crewai-flow-state-setter

Conversation

@iabshailley
Copy link
Copy Markdown

Summary

  • CrewAI 1.10.1 removed the setter on Flow.state, making direct assignment (flow.state = BookingState(...)) raise TypeError: property 'state' of 'DealBookingFlow' object has no setter at runtime
  • Remove the broken flow.state = ... assignment
  • Pass the campaign brief via flow.kickoff(inputs={"campaign_brief": ...}) instead — the correct API for initialising flow state in CrewAI 1.10.1

Root cause

The pinned version (crewai==1.10.1, added in b80cc5d) changed Flow.state from a settable attribute to a read-only property backed by the pydantic model. Any code that assigned to it after construction broke silently at import time and raised at the first booking attempt.

Test plan

  • Start buyer agent and POST to /bookings with a valid CampaignBrief
  • Confirm job reaches awaiting_approval status (previously crashed immediately with TypeError)
  • Confirm GET /bookings/{job_id} returns budget_allocations and recommendations
  • POST /bookings/{job_id}/approve-all and confirm job reaches completed

🤖 Generated with Claude Code

…ibility

CrewAI 1.10.1 removed the setter on Flow.state, making direct assignment
(`flow.state = BookingState(...)`) raise a TypeError at runtime. Pass the
campaign brief through kickoff(inputs=...) instead, which is the correct
API for initialising flow state in this version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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