showcase/shell-docs/src/content/docs/integrations/crewai-flows/shared-state/index.mdx
CoAgents maintain a shared state that seamlessly connects your UI with the agent's execution. This shared state system allows you to:
The foundation of this system is built on CrewAI's stateful architecture.
<Callout type="info" title="Conversational Flow state"> If you promoted the Flow to conversational mode, inherit custom Pydantic state from `ag_ui_crewai.CopilotKitState`. It includes the conversation fields CrewAI needs in addition to CopilotKit messages, actions, and shared state. </Callout>State streaming is perfect when you want to facilitate collaboration between your agent and the user. Any state that your CrewAI Flow persists will be automatically shared by the UI. Similarly, any state that the user updates in the UI will be automatically reflected
This allows for a consistent experience where both the agent and the user are on the same page.