Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
add xspace-agent/src/client/bootstrap.ts
oversteppingd31f3bc837a3
diff --git a/xspace-agent/src/client/bootstrap.ts b/xspace-agent/src/client/bootstrap.tsnew file mode 100644index 000000000..5c107d50d--- /dev/null+++ b/xspace-agent/src/client/bootstrap.ts@@ -0,0 +1,45 @@+// SPDX-License-Identifier: Apache-2.0+// Copyright 2026 nirholas (https://github.com/nirholas/xspace-agent) [§72]++import { AgentCommon } from "./core"+import { initOpenAIRealtime } from "./providers/webrtc"+import { initSocketProvider } from "./providers/streaming"++declare global {+ interface Window {+ AGENT_CONFIG?: {+ agentId: number+ agentName: string+ sessionEndpoint: string+ namespace?: string+ }+ }+}++;(async function () {+ const config = window.AGENT_CONFIG+ if (!config) {+ console.error("AGENT_CONFIG not set")+ return+ }++ const agent = new AgentCommon(config)++ try {+ const res = await fetch("/config")+ const serverConfig = await res.json()++ agent.log(`AI Provider: ${serverConfig.aiProvider} (${serverConfig.providerType} mode)`)++ if (serverConfig.providerType === "webrtc") {+ initOpenAIRealtime(agent)+ } else {+ initSocketProvider(agent)+ }+ } catch (err: unknown) {+ const error = err as Error+ agent.log("Failed to load config: " + error.message, "error")+ }+})()++