feat: add Composio toolkit cache refresh button to admin dashboard
Description
Expose the existing Composio toolkit cache refresh API as a button/action in the admin dashboard, so admins can manually clear cached Composio toolkit responses whenever new toolkits are added or existing ones are updated — instead of waiting for the cache to expire.
Why
Composio responses are cached for 24 hours. When the Composio Toolkit site changes (e.g. a new toolkit is added or an existing one is updated), the UI does not immediately reflect those changes. Admins need a way to force-refresh the cache from the dashboard without waiting for the TTL to expire.
Implementation
- The cache refresh API already exists — this task is purely about surfacing it in the admin dashboard UI
- Add a "Refresh Composio Toolkits" button to the relevant section of the admin dashboard
- On click: call the existing cache refresh API, clear cached Composio toolkit metadata so subsequent requests return fresh data
- Show a loading state while the refresh is in progress
- On success: show a toast/confirmation message confirming the cache was cleared
- On error: surface the error clearly (toast/snackbar) with enough detail for the admin to understand what went wrong
- Log the action server-side: timestamp + admin user who triggered the refresh
Acceptance Criteria
- [ ] "Refresh Composio Toolkits" button is visible and accessible in the admin dashboard
- [ ] Clicking the button calls the existing cache refresh API successfully
- [ ] Cached Composio toolkit metadata is cleared — subsequent requests return fresh data from Composio
- [ ] Success state is surfaced in the UI (toast / confirmation message)
- [ ] Errors are surfaced clearly in the UI (toast / snackbar / inline message)
- [ ] Action is logged server-side with timestamp and acting admin user
Related
- #3907 — Dynamic Composio integrations + backend-driven toolkit slugs
Implementation Plan
Triage Assessment
YellowSnnowmann's investigation (comment 2026-06-24) correctly identifies that the issue's premise is flawed: there is no server-side Composio toolkit cache to refresh. The 24h cache lives client-side in app/src/lib/composio/catalogCache.ts (localStorage). The "admin dashboard" is ambiguous between the separate dashboard repo and openhuman's ComposioPanel.tsx. Issue needs re-scoping per the two paths proposed in the investigation comment.
Proposed Scope
Two options. Recommend Option 1 (client-side, matches reality) for fast delivery. Option 2 (full server-side) if observability requirements justify the cost.
- Option 1 (recommended): Add refresh button to openhuman's
ComposioPanel.tsxthat callsinvalidateToolkitCatalogCache()+ refetches. Drops "server-side API" and "server-side logging" criteria. - Option 2: Build a backend Composio cache layer, refresh API, audit log, core RPC, and dashboard button. Net-new backend work.
Implementation Steps (Option 1)
- Open
app/src/components/settings/panels/ComposioPanel.tsx. Add a "Refresh Composio Toolkits" button in the relevant section. - On click: call
invalidateToolkitCatalogCache()fromapp/src/lib/composio/catalogCache.ts, then trigger a refetch of the toolkit catalog. - Show loading state (
isRefreshingstate in component) while refetch is in progress. - On success: show confirmation toast via the existing notification system.
- On error: surface error in toast with actionable detail.
- Update the issue title and body to reflect Option 1 scope, or re-open with the maintainer's decision on Option 1 vs 2.
Verification
- Unit:
app/src/lib/composio/catalogCache.test.ts-- confirm invalidation + refetch. - Manual: click button in ComposioPanel, confirm toolkit list is reloaded.
Risks and Open Questions
- Open: maintainer needs to confirm Option 1 vs Option 2.
- If Option 2 is chosen, scope expands to building server-side Composio caching in
backend-alphahuman/src/routes/agentIntegrations/composio.ts.
Acceptance Criteria
- [ ] "Refresh Composio Toolkits" button in ComposioPanel.
- [ ] Clicking calls
invalidateToolkitCatalogCache()+ refetches. - [ ] Success state shown (toast).
- [ ] Errors surfaced (toast).
Before picking this up I traced the "cache refresh API already exists" assumption through all three candidate surfaces, and it doesn't hold as written. Flagging the specifics so we can re-scope.
The 24h toolkit cache only exists client-side
The only real Composio toolkit cache + refresh primitive lives in the openhuman frontend:
app/src/lib/composio/catalogCache.ts—localStoragecache,TTL_MS = 24h, keycomposio:catalog:v1, withinvalidateToolkitCatalogCache()(the refresh primitive).- It's invalidated today via a
composio:config-changedCustomEvent(dispatched fromComposioPanel.tsx, consumed inlib/composio/hooks.ts), not an HTTP/RPC endpoint.
This cache is per-user, on each device's localStorage — there's nothing shared/server-side to refresh centrally.
The backend has no toolkit cache at all
In backend-alphahuman, the Composio routes (src/routes/agentIntegrations/composio.ts) have no refresh/invalidate endpoint, and there's no 24h cache to refresh:
composioListToolkitsControllerreturns a static env allowlist (getEnabledToolkits()) — no TTL, no cache.composioListToolsControllerhits the Composio SDK live on every request — no caching layer (no Redis/in-memory).
So the premise "the cache refresh API already exists — this task is purely about surfacing it" isn't accurate; there is no server-side refresh API and no server-side cache behind one.
"admin dashboard" is ambiguous, and conflicts with where the cache is
- The actual admin dashboard is the separate
dashboardrepo (Clerk +isAdmingated, Integrations page) — but it has zero Composio functionality and no access to openhuman's client-side cache. - The openhuman app has no admin dashboard; admin/dev actions live as Settings panels (e.g.
ComposioPanel.tsx).
So the button's natural home (admin dashboard) and the thing it would refresh (openhuman client cache) are in different apps.
Acceptance criteria that can't be met as written
- "Cached Composio toolkit metadata is cleared — subsequent requests return fresh data" — only achievable as a client-side
localStorageinvalidation in openhuman, not a shared server refresh. - "Action is logged server-side with timestamp and acting admin user" — requires a server endpoint that doesn't exist; there's no server-side action to log today.
Proposed paths
- Quick / client-side (matches reality): add the button to openhuman
ComposioPanel.tsx, callinginvalidateToolkitCatalogCache()+ refetch, with loading + toast. Drops the "server-side API" and "server-side logging" criteria (neither exists). Small, shippable. - Full server-side version (bigger than the ticket implies): build a real backend cache (so there's something to share/refresh), a refresh/invalidate route + audit logging in
backend-alphahuman, a core RPC in openhuman, and the dashboard button. This is net-new backend work, not "surfacing an existing API."
Could you confirm (a) which surface the button should live on (openhuman Settings vs the dashboard admin app) and (b) whether we want option 1 or option 2? Happy to take either — just want to align before building, since the issue assumes infra that isn't there.
cc related: #3907
Product triage note (2026-08-23)
Disposition: premise needs correction and priority should be reduced. Evidence/action: The toolkit catalog cache is client-side localStorage, not a server cache, and the current product has no matching admin dashboard. Re-scope this to a Settings refresh action, or close it as an invalid premise if an admin surface is not planned.
Triage: invalid — The proposed admin refresh API does not exist; the reported cache is client-side localStorage, so the issue premise is incorrect. Closing as not planned.