{"_id":"@agent-protocol/ai","_rev":"2-d7546d3eb8c46b67e08657b13712f4b2","name":"@agent-protocol/ai","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@agent-protocol/ai","version":"0.1.0","_id":"@agent-protocol/ai@0.1.0","maintainers":[{"name":"omswami","email":"reach.oms2004@gmail.com"}],"dist":{"shasum":"de04136f4cd4a7a304062c26d76cc806d67678b6","tarball":"https://registry.npmjs.org/@agent-protocol/ai/-/ai-0.1.0.tgz","fileCount":17,"integrity":"sha512-vDz+tkOcymbG2Kbi4WdKNrurUD3xsga3dlHTQ9LfSXRQsiN0rH1OHW1rEsULA5w3o+qmke3C5+P5T3mI9kaAwQ==","signatures":[{"sig":"MEYCIQCWO5NWUsywdzsOcs7zOX5yIy0lAxCvT/bka7vLjhCtXQIhANaRJzQBtkxWvICHqVVITxxH6dg2uqDaNtG6bcMLEwgn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27889},"main":"dist/index.js","_from":"file:agent-protocol-ai-0.1.0.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc -w","build":"tsc"},"_npmUser":{"name":"omswami","email":"reach.oms2004@gmail.com"},"_resolved":"/private/var/folders/21/cvgcsn117nx2b1r3fl_y12yc0000gn/T/248a5b5887cf13b0db13091479dceab0/agent-protocol-ai-0.1.0.tgz","_integrity":"sha512-vDz+tkOcymbG2Kbi4WdKNrurUD3xsga3dlHTQ9LfSXRQsiN0rH1OHW1rEsULA5w3o+qmke3C5+P5T3mI9kaAwQ==","_npmVersion":"10.9.3","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@agent-protocol/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5","@types/react":"^18"},"peerDependencies":{"react":">=18","@agent-protocol/core":"0.1.0"},"_npmOperationalInternal":{"tmp":"tmp/ai_0.1.0_1767713003668_0.3203509742815367","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agent-protocol/ai","version":"0.1.1","main":"dist/index.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"peerDependencies":{"react":">=18","@agent-protocol/core":"0.1.1"},"dependencies":{"@solana/web3.js":"^1.98.4","@types/node":"^20.19.27","@agent-protocol/core":"0.1.1"},"devDependencies":{"@types/react":"^18","typescript":"^5"},"scripts":{"build":"tsc","dev":"tsc -w"},"_id":"@agent-protocol/ai@0.1.1","description":"**React SDK for the Agent Protocol.**","_integrity":"sha512-h5FTq4Cohsl97p4W9o9j7iegRHfQzea31Xa/V/kv5kdOk+6E0Nsc1g2Np/6KFfxIqf4WN6hcfy8ArN4+8C5OIw==","_resolved":"/private/var/folders/21/cvgcsn117nx2b1r3fl_y12yc0000gn/T/520dbee8c9e977717ee89304264d4635/agent-protocol-ai-0.1.1.tgz","_from":"file:agent-protocol-ai-0.1.1.tgz","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-h5FTq4Cohsl97p4W9o9j7iegRHfQzea31Xa/V/kv5kdOk+6E0Nsc1g2Np/6KFfxIqf4WN6hcfy8ArN4+8C5OIw==","shasum":"569e8b2d1e10ca2e246cc55c6d4fc06157a8879f","tarball":"https://registry.npmjs.org/@agent-protocol/ai/-/ai-0.1.1.tgz","fileCount":21,"unpackedSize":43331,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDVal4VEExQGEyQtsyB6idEWSWAdJF9MNiLXTWZSu5JzwIgTrDe15dsfVStIItjMNFQ8pi+IlxXRY6P2aOcmNIenhE="}]},"_npmUser":{"name":"omswami","email":"reach.oms2004@gmail.com"},"directories":{},"maintainers":[{"name":"omswami","email":"reach.oms2004@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai_0.1.1_1767720445949_0.6604856536833188"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-06T15:23:23.561Z","modified":"2026-01-06T17:27:26.331Z","0.1.0":"2026-01-06T15:23:23.831Z","0.1.1":"2026-01-06T17:27:26.111Z"},"maintainers":[{"name":"omswami","email":"reach.oms2004@gmail.com"}],"readme":"# @agent-protocol/ai\n\n**React SDK for the Agent Protocol.**\n\nBuild AI-powered blockchain applications with ease. This package provides React components and hooks to integrate Agent Protocol chat capabilities into your dApp.\n\n## Installation\n\n```bash\npnpm add @agent-protocol/ai @agent-protocol/core\n# or\nnpm install @agent-protocol/ai @agent-protocol/core\n```\n\n## Usage\n\n### 1. Wrap your app with `AgentProvider`\n\n```tsx\nimport { AgentProvider } from \"@agent-protocol/ai\";\n\nfunction App({ children }) {\n    return (\n        <AgentProvider apiKey=\"your_api_key\">\n            {children}\n        </AgentProvider>\n    );\n}\n```\n\n### 2. use `ChatWidget`\n\nThe `ChatWidget` handles the UI and standard interactions. You just need to provide the **handlers** (actual implementations) for the tools.\n\n```tsx\nimport { ChatWidget } from \"@agent-protocol/ai\";\nimport { ALL_TOOLS } from \"@agent-protocol/core\";\n\nfunction MyPage(props) {\n    // Define how to execute the tools (e.g., using Solana Wallet Adapter)\n    const handlers = {\n        transferSOL: async (args) => {\n            console.log(\"Transferring\", args.amount, \"to\", args.toAddress);\n            // ... your wallet logic\n            return \"signature_abc123\";\n        }\n    };\n\n    return (\n        <ChatWidget \n            title=\"My AI Agent\"\n            handlers={handlers} // Connects the AI intent to your code\n        />\n    );\n}\n```\n\n### 3. Custom UI with `useAgent`\n\nIf you want to build your own UI instead of using the widget:\n\n```tsx\nimport { useAgent } from \"@agent-protocol/ai\";\n\nconst { messages, sendMessage, isLoading } = useAgent({\n    handlers: myHandlers\n});\n```\n","readmeFilename":"README.md","description":"**React SDK for the Agent Protocol.**"}