@agentscope-chat/iframe-sdk
v1.1.0
Published
iframe SDK for AI Assistant agent platform communication with host systems
Maintainers
Readme
@agentscope-chat/iframe-sdk
智能体 iframe 端与宿主业务系统的 postMessage 通信 SDK。
npm install @agentscope-chat/iframe-sdkimport { createAgentBridge } from '@agentscope-chat/iframe-sdk'
const bridge = createAgentBridge({
parentOrigin: new URLSearchParams(location.search).get('parentOrigin') || '',
onReady: ({ token, appId, capabilities }) => {
console.log('ready', { appId, capabilities })
},
onHandshakeFailed: (err) => {
console.error(err)
},
})