Skip to content

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.

fix(element): stop an agent-3d boot failure painting into a detached host

nirholas7c44a9e332c7
diff --git a/src/element.js b/src/element.js
index dbd57aefc..cf3e4eaf4 100644
--- a/src/element.js
+++ b/src/element.js
@@ -2631,6 +2631,11 @@ class Agent3DElement extends HTMLElement {
}
_showError(err) {
+ // A boot that rejects after the host left the document (an SPA unmounting
+ // mid-load) has nothing to paint into, and the attempt throws from inside
+ // _boot's catch, turning a handled boot failure into an unhandled rejection.
+ // The agent:error event still fires either way.
+ if (!this.isConnected) return;
// Bare/decoration avatars degrade to the supplied poster (or stay
// transparent) rather than a chat-style error card — clean decoration,
// never a broken canvas. Chat agents get the card.