Loading...
Loading...
Set up AgentPulse in a React or Electron project. Use when the user wants to add AgentPulse, make their app MCP-controllable, or integrate with Claude Code/Claude Desktop. This is a ONE-TIME setup skill. For help writing useExpose hooks, use the "agentpulse" skill instead.
npx skill4agent add dang-hai/agentpulse agentpulse-setupnpm install agentpulseAgentPulseProviderApp.tsxmain.tsximport { AgentPulseProvider } from 'agentpulse';
function App() {
return (
<AgentPulseProvider endpoint="ws://localhost:3100/ws">
<YourApp />
</AgentPulseProvider>
);
}app/layout.tsx'use client';
import { AgentPulseProvider } from 'agentpulse';
export default function RootLayout({ children }) {
return (
<html><body>
<AgentPulseProvider endpoint="ws://localhost:3100/ws">
{children}
</AgentPulseProvider>
</body></html>
);
}pages/_app.tsximport { AgentPulseProvider } from 'agentpulse';
export default function App({ Component, pageProps }) {
return (
<AgentPulseProvider endpoint="ws://localhost:3100/ws">
<Component {...pageProps} />
</AgentPulseProvider>
);
}references/ELECTRON_SETUP.mduseExposeimport { useExpose } from 'agentpulse';
function SomeInput() {
const [value, setValue] = useState('');
useExpose('test-input', { value, setValue }, {
description: 'Test input for verifying AgentPulse setup.',
});
return <input value={value} onChange={e => setValue(e.target.value)} />;
}package.json{
"scripts": {
"agentpulse": "agentpulse"
}
}concurrently{
"scripts": {
"dev:agent": "concurrently \"npm run dev\" \"npm run agentpulse\""
}
}~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"agentpulse": {
"url": "http://localhost:3100/mcp"
}
}
}npm run devnpx agentpulsediscover()test-input| Issue | Solution |
|---|---|
| "WebSocket connection failed" | Is |
Components not in | Is |
| MCP tools not available | Check config file path, restart MCP client |
references/TROUBLESHOOTING.md"Help me expose my login form to AgentPulse"