You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CopilotKit has useCopilotReadable for passing application state to the copilot, but there's no built-in way to tell the copilot what the user is currently looking at in the UI. Developers must manually track and serialize this themselves.
This matters because the most natural copilot interactions are contextual — "explain this chart", "why is this metric down?", "what does this row mean?" — and the copilot needs to know which element the user is referring to.
Proposed pattern
A first-class way to declare which UI regions are "askable" and automatically feed the focused element's context into the copilot:
// 1. Annotate elements<divdata-askable='{ "widget": "revenue", "value": "$2.3M" }'><RevenueChart/></div>// 2. Context updates automatically on click/hover/focususeCopilotReadable({description: 'What the user is focused on',value: focusContext,// auto-maintained});
What this enables
"Explain this" — copilot knows which chart/card/row the user means
Multi-step reasoning — history of recent interactions gives the copilot browsing context
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
CopilotKit has
useCopilotReadablefor passing application state to the copilot, but there's no built-in way to tell the copilot what the user is currently looking at in the UI. Developers must manually track and serialize this themselves.This matters because the most natural copilot interactions are contextual — "explain this chart", "why is this metric down?", "what does this row mean?" — and the copilot needs to know which element the user is referring to.
Proposed pattern
A first-class way to declare which UI regions are "askable" and automatically feed the focused element's context into the copilot:
What this enables
Existing solution
askable-ui implements this pattern today as a standalone library (~1kb, zero deps). It works with CopilotKit via a 3-line
useCopilotReadablebridge:Would love to hear if this is something CopilotKit would consider supporting natively or recommending as a complementary library.
Beta Was this translation helpful? Give feedback.
All reactions