showcase/shell-docs/src/content/docs/integrations/llamaindex/shared-state/index.mdx
<ImageZoom src="https://cdn.copilotkit.ai/docs/copilotkit/images/coagents/SharedStateCoAgents.gif" alt="Shared State Demo" width={1000} height={1000} className="rounded-lg shadow-lg border mt-0" />
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 LlamaIndex's AG-UI protocol integration, which provides initial_state support in the workflow router.
State streaming is perfect when you want to facilitate collaboration between your agent and the user. Any state that your LlamaIndex Agent 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.