#When creating workflows, how do I ensure that a subagent will complete its task and hand-off contro

1 messages · Page 1 of 1 (latest)

frank prairieBOT
#
AI-generated Answer for lmelzer

Short answer:

  • Use edges to control when a Subagent node hands off. From the Subagent node, add Forward Edges and set their routing logic (LLM Condition, Expression, or None). When the condition evaluates, the workflow advances to the connected next node. (elevenlabs.io)
  • For deterministic “do X then continue” behavior (e.g., must call a tool before moving on), insert a Dispatch Tool node instead of relying on tools inside the Subagent. Dispatch Tool nodes guarantee the tool is executed and let you route on Success/Failure result edges to the next node. (elevenlabs.io)
  • If the next step is another agent, use an Agent Transfer node (transfer_to_agent system tool). Configure transfer rules (target agent, condition, optional delay, transfer message, and whether the transferred agent should play its first message) so the handoff is explicit and reliable. (elevenlabs.io)
  • To terminate instead of handing off, connect to an End node. (elevenlabs.io)

References:

  • Workflows: node types, edges, Dispatch Tool node routing, End node. (elevenlabs.io)
  • Agent transfer: transfer_to_agent system tool and configuration. (elevenlabs.io)

Sources:
Workflows | ElevenLabs Documentation
Workflows | ElevenLabs Documentation
Agent transfer | ElevenLabs Documentation
Workflows | ElevenLabs Documentation
Workflows | ElevenLabs Documentation
Agent transfer | ElevenLabs Documentation

jolly galleon
#

The agent node in question will always start to answer questions itself, rather than passing control to the next node (the one that should be responsible to answer questions). The forward edge has an LLM condition "user has a question", but still, the former node will handle questions, without passing control on

frank prairieBOT
#
AI-generated Answer for lmelzer

Likely cause: the edge’s natural‑language condition isn’t actually being evaluated, so the current node responds instead of routing.

What to check and how to fix

  • Confirm you put the condition text in the LLM Condition field (not just the Label). Labels are not processed by the LLM; only the LLM Condition is evaluated to choose the forward edge. (elevenlabs.io)
  • Route to a dedicated node that owns Q&A. The recommended pattern is: current node → Forward Edge (LLM Condition: e.g., “the user is asking a question”) → Agent transfer node or Subagent node that’s configured for answering. Agent transfer nodes explicitly hand off the conversation to another agent; Subagent nodes let you override prompt/KB/tools for that phase. (elevenlabs.io)
  • If you need deterministic routing (instead of LLM interpretation), use an Expression edge tied to a variable you set upstream (e.g., via a tool). ElevenLabs demonstrates gating with an Expression that checks a dynamic variable before moving to the next node. (elevenlabs.io)
  • After adjusting, validate the behavior with Agent Testing so you can assert the flow actually transfers when the user asks a question. (elevenlabs.io)

References

  • Workflows: node types, forward edges, LLM Condition vs Label, and Expression edges. (elevenlabs.io)
  • Agent transfer (explicit handoff between agents). (elevenlabs.io)
  • Blog example of using Expression conditions with dynamic variables for routing. (elevenlabs.io)
  • Agent Testing to verify expected routing before deploying. (elevenlabs.io)

Sources:
Workflows | ElevenLabs Documentation
Workflows | ElevenLabs Documentation
Workflows | ElevenLabs Documentation
Agent Testing | ElevenLabs Documentation
Workflows | ElevenLabs Documentation
Agent transfer | ElevenLabs Documentation
Designing secure caller identity authentication flows for voice agents
Agent Testing | ElevenLabs Documentation

jolly galleon
#

Should LLM conditions within edges use english language or is it ok to use german here?

frank prairieBOT
#
AI-generated Answer for lmelzer

Short answer: The docs don’t specify any language requirement for LLM conditions. They describe them only as “natural language” conditions evaluated by the LLM, with no restriction to English. (elevenlabs.io)

Practical note: Since the evaluating model is the LLM configured for your agent/subagent, pick a model that reliably understands German if you plan to write conditions in German. (elevenlabs.io)

Sources:
Workflows | ElevenLabs Documentation
Workflows | ElevenLabs Documentation

jolly galleon
#

is it possible to simulate conversations via api for agents that use workflows?

frank prairieBOT
#
AI-generated Answer for lmelzer

Yes. The Agents API provides conversation simulation endpoints that work with any agent configuration, including agents that use workflows.

  • Batch (non‑streaming): POST /v1/convai/agents/:agent_id/simulate-conversation. Returns the full simulated transcript and analysis. The response includes agent_metadata and can include workflow_node_id per turn, so you can see which workflow node handled each step. (elevenlabs.io)
  • Streaming: POST /v1/convai/agents/:agent_id/simulate-conversation/stream. Streams partial message lists during the run, then a final analysis object. Supports fields like simulation_specification.simulated_user_config (e.g., first_message, language) and options such as new_turns_limit. (elevenlabs.io)
  • Guide: The Simulate Conversations guide shows how to run simulations via SDKs and notes advanced options such as extra_evaluation_criteria, tool_mock_config, and partial_conversation_history for testing complex flows. (elevenlabs.io)

If you’re creating or managing agents via API, the agent object itself can include a workflow, and simulations will execute against that configured workflow. (elevenlabs.io)

Sources:
Simulate conversation | ElevenLabs Documentation
Stream simulate conversation | ElevenLabs Documentation
Simulate Conversations | ElevenLabs Documentation
Create agent | ElevenLabs Documentation

jolly galleon
#

Why does a forward edge with a type of "unconditional" always skip the source node and directly start with the target node? How do I create an edge that:

  1. lets the source node achieve its prompted goal
  2. eventually just transfers to the target node without the user interacting in any way