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(agents): salvage leading UUID from paste-damaged profile links

nirholasbaadfa0f2b0d
diff --git a/data/changelog.json b/data/changelog.json
index e4a42b193..49b8da091 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -15963,6 +15963,15 @@
"fix",
"security"
]
+ },
+ {
+ "date": "2026-07-25",
+ "title": "Agent profile links survive copy-paste damage",
+ "summary": "Agent profile URLs shared on social media sometimes arrive with a stray word or bracket glued to the end of the id, which used to dead-end on an error page. The profile now recognizes the id inside a mangled link and loads the right agent.",
+ "tags": [
+ "fix"
+ ],
+ "link": "/agents"
}
]
-}
+}
\ No newline at end of file
diff --git a/src/agent-detail.js b/src/agent-detail.js
index c30001ac6..5e8c67175 100644
--- a/src/agent-detail.js
+++ b/src/agent-detail.js
@@ -3071,8 +3071,16 @@ async function resolveAsAvatar(id) {
async function loadAgent(id) {
if (!id) return { error: 'missing id', agent: null, notFound: true };
- if (!UUID_RE.test(id))
- return { error: 'invalid id (expected UUID)', agent: null, notFound: true };
+ if (!UUID_RE.test(id)) {
+ // Links shared through social posts arrive with trailing junk glued to
+ // the id (a word joined by a lost linebreak, a stray bracket from
+ // markdown). Salvage a leading UUID instead of dead-ending the visit.
+ const salvaged = id.match(
+ /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i,
+ )?.[0];
+ if (!salvaged) return { error: 'invalid id (expected UUID)', agent: null, notFound: true };
+ id = salvaged;
+ }
let rec;
try {