#Can you tell me about Context Aware Agent Transfer? I want that when i transfer agent, the conversa
1 messages · Page 1 of 1 (latest)
Short answer
- Yes—agent-to-agent transfer hands off the ongoing conversation to the target agent. You configure it with the transfer_to_agent system tool and rules (target agent, condition, optional delay/message, first‑message behavior). (elevenlabs.io)
- You don’t pass dynamic variables “in” the transfer. Dynamic variables are conversation‑scoped: set them at conversation start (or update them via tools) and they remain available after the transfer. The platform also exposes system__current_agent_id to reflect the active agent after a transfer. (elevenlabs.io)
How to make the transfer context‑aware
- Keep the state in dynamic variables: Define variables in prompts/tools ({{var_name}}) and provide them at conversation initiation (SDK/widget/public talk‑to URL). They’ll be accessible to the new agent because it’s the same ongoing conversation. (elevenlabs.io)
- If you need to set or modify variables right before switching, have the current agent call a server/client tool that returns JSON and assigns values to dynamic variables, then invoke transfer_to_agent. Note: system tools (including transfer_to_agent) cannot update dynamic variables. (elevenlabs.io)
- Passing at start:
- SDK: include dynamic_variables in ConversationInitiationData. (elevenlabs.io)
- Public talk‑to page: pass via URL (?vars=base64JSON or var_name=value). (elevenlabs.io)
- Web widget: set the dynamic-variables attribute. (elevenlabs.io)
References
- Agent-to-agent transfer overview and configuration. (elevenlabs.io)
- Dynamic variables (system__current_agent_id, system__conversation_id, passing methods). (elevenlabs.io)
- Changelog (agent transfer improvements; system__current_agent_id). (elevenlabs.io)
- Client tools (append tool results to conversation context; system tools can’t update dynamic variables). (elevenlabs.io)
If you share how you start sessions (SDK, widget, or telephony), I can point to the exact code path for setting/updating variables before transfer.
Do dynamic variables stay the same even after agent transfer? Are they available across agents?
Short answer
- System dynamic variables persist across an agent transfer. Use system__current_agent_id (changes after transfer) and system__agent_id (initiator) to track which agent is active within the same conversation (system__conversation_id). (elevenlabs.io)
- Custom dynamic variables are scoped to the conversation. They’re provided at conversation start (conversation_initiation_client_data.dynamic_variables), are fixed in system prompts unless you update them via tools, and remain available during the conversation—transfer included—provided the target agent actually references the same variable names. (elevenlabs.io)
- If the target agent requires a variable that isn’t present at transfer time, the call can fail with “Missing dynamic variable after agent transfer,” so ensure needed variables are set before or updated via a tool. (help.elevenlabs.io, elevenlabs.io)
What to do
- Define the same placeholders (for example, {{user_name}}) in all agents that should consume them, or update/add variables via a tool before/after transfer. (elevenlabs.io)
- Use system__current_agent_id to branch tool behavior based on which agent is currently active. (elevenlabs.io)
Related docs: agent-to-agent transfer setup. (elevenlabs.io)
Sources:
Dynamic variables | ElevenLabs Documentation
Personalization | ElevenLabs Documentation
Where can I locate the reason for my call failing? – ElevenLabs
Dynamic variables | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Dynamic variables | ElevenLabs Documentation
Agent transfer | ElevenLabs Documentation
When an agent transfer happens, does that transfer the entire conversation with the first agent to the second agent?
Yes. An agent-to-agent transfer hands off the ongoing conversation to the target agent. The conversation remains the same session (the conversation_id persists) and only the “current agent” switches, so the receiving agent continues with the existing context/history. (elevenlabs.io)
Are Agents private? How to make my created agents public so that i can use them with another API Key?
Short answer
- Agents are workspace resources. You control whether conversations with an agent require authentication (private) or can be opened publicly. Resource management (creating/updating agents, listing them, generating signed URLs) is always gated by workspace access and an API key with permissions. (elevenlabs.io)
How to make an agent public for conversations
- Disable auth on the agent. Set platform_settings.auth.enable_auth to false (and adjust/remove any allowlist) so clients can connect using only the agent_id. (elevenlabs.io)
- Once auth is disabled, you can start a conversation over WebSocket with wss://api.elevenlabs.io/v1/convai/conversation?agent_id={agent_id} (no API key on the client). SDK docs and the WebSocket guide refer to these as “public agents.” (elevenlabs.io)
- If you keep an allowlist, only requests from those hostnames will be accepted even if auth is disabled. Remove or extend the allowlist to make it broadly public. (elevenlabs.io)
Using the agent with “another API key”
- For programmatic access to the agent (read/update config, generate signed URLs/tokens, etc.), the other API key must belong to your workspace and be granted access to the agent (Viewer/Editor/Admin). Use a Service Account API key or add a user/group, then share the agent with that principal. (elevenlabs.io)
- Sharing is modeled within a workspace (principals are users, groups, or service accounts). Public agents only make conversation endpoints accessible; they do not grant management permissions to API keys outside your workspace. (elevenlabs.io)
References
- Authentication (enable_auth, allowlists, signed URLs) (elevenlabs.io)
- WebSocket guide (public agents connect by agent_id) (elevenlabs.io)
- React Native SDK (public vs private agents definition) (elevenlabs.io)
- Workspaces overview (resources shared within a workspace) (elevenlabs.io)
- Sharing resources (grant access to users/groups/service accounts; roles) (elevenlabs.io)
- Service Accounts and API Keys (use service accounts for non-user API access) (elevenlabs.io)
What is the best way to find the latest complete code for the ElevenLabs SDK so that I can use it?
Best practice is to use ElevenLabs’ official Libraries & SDKs index, then follow the links to the official repos and packages:
- Start here: the Libraries & SDKs page lists the officially supported SDKs and links to both GitHub (source code) and the package registries (installable releases). (elevenlabs.io)
- For the latest source code (complete repo and release tags), use the verified ElevenLabs GitHub organization and the SDK repos:
- Org overview (verified): github.com/elevenlabs (github.com)
- JavaScript/Node SDK: elevenlabs/elevenlabs-js (check the “Releases” tab for the newest tag). (github.com)
- Python SDK: elevenlabs/elevenlabs-python (check the “Releases” tab for the newest tag). (github.com)
- For the latest published package you can install:
- If you’re building browser-based Conversational AI apps, use the browser client (@elevenlabs/client) from the official packages monorepo. (npmjs.com)
In short: pick your language from the Libraries & SDKs page, read/clone the corresponding GitHub repo for the latest complete code, and install the latest stable release from npm or PyPI. (elevenlabs.io)
Sources:
Libraries & SDKs | ElevenLabs Documentation
ElevenLabs · GitHub
GitHub - elevenlabs/elevenlabs-js: The official JavaScript (Node) library for the ElevenLabs API.
GitHub - elevenlabs/elevenlabs-python: The official Python SDK for the ElevenLabs API.
@elevenlabs/elevenlabs-js - npm
elevenlabs · PyPI
@elevenlabs/client - npm
Libraries & SDKs | ElevenLabs Documentation
Can i add webhook tool that sends a request to the GraphQL endpoint?