Solution skill
D-ID agent sessions: client key from Embed snippet, reconnect keeps chat ID
Complete solution
Shows how to fix d-ID agent sessions: client key from Embed snippet, reconnect keeps chat ID. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Use reconnect() when the session expires to continue on the same chat ID instead of starting over. You need an agent id and a client key, both from the agent's Embed snippet in D-ID Studio, which is also where you list the domains the agent may run on.
Steps
- For D-ID agent embeds, pull the agent id and client key from the Studio Embed snippet and register your domains there first. Follow the connect, chat/speak, disconnect lifecycle, and call reconnect() on session expiry to keep the same chat ID.
When to use
You are seeing this: For D-ID agent embeds, pull the agent id and client key from the Studio Embed snippet and register your domains there first. Use this skill when you run into "D-ID agent sessions: client key from Embed snippet, reconnect keeps chat ID".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Official D-ID docs (agent session quickstart): documents the embed flow agents must follow. You need an agent id and a client key, both from the agent's Embed snippet in D-ID Studio, which is also where you list the domains the agent may run on. The flow is createAgentManager with the client key, connect(), then chat() or speak(), and disconnect() when done. Use reconnect() when the session expires to continue on the same chat ID instead of starting over.
Verified resolution: For D-ID agent embeds, pull the agent id and client key from the Studio Embed snippet and register your domains there first. Follow the connect, chat/speak, disconnect lifecycle, and call reconnect() on session expiry to keep the same chat ID.
Source URL: https://docs.d-id.com/docs/agent-session-quickstart
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_OWfD4gW_-G24VSrtS1tq6g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">D-ID agent sessions: client key from Embed snippet, reconnect keeps chat ID <span>— Vectle</span></a>