integrate-fusion-agent
Integrates a Flows/Dune app with the Fusion built-in PAIA agent panel using @cognite/app-sdk. Use this skill whenever a developer wants to: open the agent panel from their app, send the agent a contextual message, let the agent read app state (resources), or let the agent call actions in the app. Triggers: "fusion agent", "PAIA", "agent panel", "sendAgentMessage", "sendAgentLayoutMode", "agent server", "registerAgentServer", "connectToHostApp", "agent integration", "agent sidebar", "app-sdk agen
Security Assessment
About integrate-fusion-agent
This skill guides developers through wiring a Cognite Flows/Dune application into the Fusion built-in PAIA agent panel using the `@cognite/app-sdk` package. It solves the boilerplate-and-lifecycle problem of connecting a custom app to a host agent: obtaining a HostAppAPI handle, handling the case where the app runs outside Fusion, and exposing app state and actions to the agent in a consistent, testable way. It explicitly steers developers to use the skill's patterns instead of hand-writing integration code that can mishandle the connection lifecycle.
It covers three independent capabilities that can be adopted individually: opening the agent panel (sidebar, fullscreen, or closed) via `sendAgentLayoutMode`; injecting contextual messages into the agent chat via `sendAgentMessage` with optional new-session behavior; and registering an agent server that publishes read-only resources (app state the agent can read) and actions (tools the agent can invoke, defined with snake_case names and Zod schemas). The documentation includes a React hook pattern for `connectToHostApp`, a recommended file structure separating actions, resources, and the lifecycle hook, and important correctness notes such as using the updater form of setState to avoid React invoking a Comlink proxy as a state updater.
The target audience is frontend developers building Fusion apps who want their app to cooperate with the platform's assistant. Typical use cases include adding an assistant button, letting the agent analyze a selected item, or granting the agent structured read access and callable operations. It requires `@cognite/app-sdk` version 0.3.1 or later and a React/TypeScript codebase.
FAQ
What does this skill integrate with?
The Fusion built-in PAIA agent panel, via the @cognite/app-sdk package, for Flows/Dune apps.
What are the prerequisites?
A React/TypeScript app and @cognite/app-sdk version 0.3.1 or later, installed with your package manager (pnpm, npm, or yarn).
What happens when the app runs outside Fusion?
connectToHostApp rejects, so the pattern catches the rejection and returns null. Agent UI triggers should be hidden or disabled rather than shown as broken.
What can an agent server expose?
Read-only resources (structured JSON or text describing app state) and actions (tools the agent can invoke, named in snake_case with Zod parameter schemas).
When should I use newSession: true when sending a message?
When the user starts a new task from a specific item; omit it to continue an existing conversation.
Install integrate-fusion-agent
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
cognitedata/builder-skills