Connecting Your Data
Learn how to connect your data to CopilotKit.
Specify "use client"
(Next.js App Router)
This is only necessary if you are using Next.js with the App Router.
Like other React hooks such as useState
and useEffect
, this is a client-side hook.
If you're using Next.js with the App Router, you'll need to add the "use client"
directive at the top of any file using this hook.
The useCopilotReadable
Hook
For your copilot to best answer your users' needs, you will want to provide it with context-specific, user-specific, and oftentimes realtime data. CopilotKit makes it easy to do so.
Test it out!
The data your provided is now available to the Copilot. Test it out by passing some data in the hook and asking the copilot questions about it.
Advanced
For more advanced use-cases, see useCopilotReadable
reference.
Cloud & Backend State
Backend Readable State
You can provide backend state via Copilot backend actions.
Knowledge Bases (Enterprise)
Additional plug-and-play integrations with knowledge bases are available via our enterprise plan. Please reach out to enable it.